21#ifndef __LUAENGINEUTIL_H__
22#define __LUAENGINEUTIL_H__
34#include "tilemap/itilemap.h"
35#include "drawsurface/idrawsurface.h"
36#include "sound/soundmanager.h"
38#include "scripting/scriptprocessor.h"
39#include "concurrent/timer.h"
70 typedef std :: map<int, SunLight :: Concurrent :: Timer*>
TimerMap;
113 static SunLight :: TileMap :: ITileMap*
GetTileMap( lua_State *pLuaState );
114 static SunLight :: DrawSurface :: IDrawSurface*
GetDrawSurface( lua_State *pLuaState );
115 static SunLight :: Sound :: SoundManager*
GetSoundManager( lua_State *pLuaState );
116 static Engine :: SpritePool*
GetSpritePool( lua_State *pLuaState );
117 static SunLight :: Scripting :: ScriptProcessor*
GetScriptProcessor( lua_State *pLuaState );
Shared helpers used by every Lua primitive API module - and, for s_LuaMutex specifically,...
Definition luaengineutil.h:79
static SunLight::Sound::SoundManager * GetSoundManager(lua_State *pLuaState)
Fetch the engine's SoundManager instance stashed as a Lua light userdata global.
Definition luaengineutil.cpp:109
static SunLight::Scripting::ScriptProcessor * GetScriptProcessor(lua_State *pLuaState)
Fetch the engine's ScriptProcessor instance stashed as a Lua light userdata global.
Definition luaengineutil.cpp:133
static void RegisterRealConstants(lua_State *pLuaState, const stNamedRealConstant *pTable, size_t nCount)
Register a table of named real-valued constants as Lua globals (see stNamedRealConstant).
Definition luaengineutil.cpp:182
static void RegisterConstants(lua_State *pLuaState, const stNamedConstant *pTable, size_t nCount)
Register a table of named integer constants as Lua globals.
Definition luaengineutil.cpp:166
static SunLight::TileMap::ITileMap * GetTileMap(lua_State *pLuaState)
The engine's ITileMap - creating the default renderer first if the script has not created one yet (se...
Definition luaengineutil.cpp:83
static std::mutex s_LuaMutex
Definition luaengineutil.h:109
static Engine::SpritePool * GetSpritePool(lua_State *pLuaState)
Fetch the engine's SpritePool instance stashed as a Lua light userdata global.
Definition luaengineutil.cpp:121
static void EnsureRenderer(lua_State *pLuaState)
Make sure a renderer exists, creating the default one (and opening its window) if the script hasn't -...
Definition luaengineutil.cpp:72
static SunLight::DrawSurface::IDrawSurface * GetDrawSurface(lua_State *pLuaState)
The engine's IDrawSurface - screen-space text/rectangle drawing and window-state primitives (see sunl...
Definition luaengineutil.cpp:99
static void AddOneParmCommandScript(lua_State *pLuaState, SunLight ::Scripting ::Commands cmd)
Add an one parameter command to the ScriptProcessor's queue; shared by every Lua primitive that queue...
Definition luaengineutil.cpp:149
static Engine::IRendererProvider * GetRendererProvider(lua_State *pLuaState)
Fetch the renderer provider stashed as a Lua light userdata global - the one object every renderer-ne...
Definition luaengineutil.cpp:38
std ::map< int, SunLight ::Concurrent ::Timer * > TimerMap
Shared type for LuaEngine's m_Timers member and LuaTimerApi's casts of the timerMapPtr global - both ...
Definition luaengineutil.h:70
Definition irendererprovider.h:32
A named integer constant, used to register enum values as Lua globals.
Definition luaengineutil.h:50
int nValue
Definition luaengineutil.h:52
const char * szName
Definition luaengineutil.h:51
A named real-valued constant, used to register non-integer values (eg. the zoom step and factor limit...
Definition luaengineutil.h:60
const char * szName
Definition luaengineutil.h:61
double fValue
Definition luaengineutil.h:62