60 public SunLight :: Scripting :: IScriptListener {
62 typedef std :: function<void(
void )> FUNCTION_STATE_HANDLER;
63 typedef std :: array<FUNCTION_STATE_HANDLER, MAX_STATE_HANDLERS> FunctionStateHandlers;
65 uint16_t m_CurrentSong;
66 uint64_t m_nClearInactiveSpriteQueueMilli;
67 FUNCTION_STATE_HANDLER m_CurrentStateHandler;
68 SunLight :: Scripting :: ScriptProcessor m_ScriptProcessorMachine;
69 SunLight :: Sound :: SoundManager m_SoundManager;
70 Scarab :: Lua :: LuaEngine m_LuaEngine;
71 Engine :: SpritePool m_SpritePool;
73 std :: string m_strEntryArg;
74 std :: string m_strEntryOverride;
75 std :: string m_strLastError;
76 bool m_bEntryScriptDone;
77 FunctionStateHandlers m_aEngineStateHandlers;
80 void CheckSpritesQueueEmpty(
void );
83 void RunScriptMachine(
void );
86 bool PlaySound( uint16_t
id,
bool bIgnorePlaying =
false );
87 bool PauseSound( uint16_t
id );
88 bool StopSound( uint16_t
id );
89 bool ResumeSound( uint16_t
id );
92 bool LoadLuaScript( std :: string strFileName );
93 bool RunLuaScriptMainEntryPoint(
void );
94 bool ResolveEntryScript(
const std :: string& strEntryArg, std :: string& strOutScriptPath );
97 void FatalErrorHandler(
void );
98 void InitEngineStateHandler(
void );
99 void RunStageStateHandler(
void );
103 EngineHost( Scarab :: Host :: RendererProvider *pRendererProvider,
104 std :: string strEntryArg,
105 std :: string strEntryOverride = std :: string() );
115 void OnUpdate( SunLight :: TileMap :: ITileMap& tileMap );
118 void OnCommand( SunLight :: Scripting :: Commands cmd, uint16_t nEventId );
119 void OnError( std :: string strError );
void RunEntryScript(void)
Run the entry script (main.lua, or whatever the entry argument resolves to) - BEFORE the window exist...
Definition enginehost.cpp:409
void OnCommand(SunLight ::Scripting ::Commands cmd, uint16_t nEventId)
Must be implemented to respond STOP_SONG_CMD command;.
Definition enginehost.cpp:568
void UseVirtualTime(void)
Headless (–headless) only - make Lua's os.time()/ os.clock() follow the null renderer's virtual clock...
Definition enginehost.cpp:527