|
@@ -42,6 +42,7 @@ class Camera;
|
|
|
class World;
|
|
class World;
|
|
|
class Mesh;
|
|
class Mesh;
|
|
|
class Sprite;
|
|
class Sprite;
|
|
|
|
|
+class ResourcePackage;
|
|
|
typedef Id SoundInstanceId;
|
|
typedef Id SoundInstanceId;
|
|
|
|
|
|
|
|
void clear_lua_temporaries();
|
|
void clear_lua_temporaries();
|
|
@@ -118,12 +119,6 @@ public:
|
|
|
lua_pushlstring(m_state, s, len);
|
|
lua_pushlstring(m_state, s, len);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //-----------------------------------------------------------------------------
|
|
|
|
|
- void push_lightdata(void* data)
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushlightuserdata(m_state, data);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
|
bool get_bool(int32_t index)
|
|
bool get_bool(int32_t index)
|
|
|
{
|
|
{
|
|
@@ -148,12 +143,6 @@ public:
|
|
|
return luaL_checkstring(m_state, index);
|
|
return luaL_checkstring(m_state, index);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //-----------------------------------------------------------------------------
|
|
|
|
|
- void* get_lightdata(int32_t index)
|
|
|
|
|
- {
|
|
|
|
|
- return lua_touserdata(m_state, index);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/// Pushes an empty table onto the stack.
|
|
/// Pushes an empty table onto the stack.
|
|
|
/// When you want to set keys on the table, you have to use LuaStack::push_key_begin()
|
|
/// When you want to set keys on the table, you have to use LuaStack::push_key_begin()
|
|
|
/// and LuaStack::push_key_end() as in the following example:
|
|
/// and LuaStack::push_key_end() as in the following example:
|
|
@@ -186,6 +175,18 @@ public:
|
|
|
lua_settable(m_state, -3);
|
|
lua_settable(m_state, -3);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //-----------------------------------------------------------------------------
|
|
|
|
|
+ void push_resource_package(ResourcePackage* package)
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushlightuserdata(m_state, package);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //-----------------------------------------------------------------------------
|
|
|
|
|
+ ResourcePackage* get_resource_package(int32_t index)
|
|
|
|
|
+ {
|
|
|
|
|
+ return (ResourcePackage*) lua_touserdata(m_state, index);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
|
void push_world(World* world)
|
|
void push_world(World* world)
|
|
|
{
|
|
{
|