mikymod 12 лет назад
Родитель
Сommit
fb1f666cab
2 измененных файлов с 13 добавлено и 17 удалено
  1. 0 5
      engine/Device.cpp
  2. 13 12
      engine/lua/LuaEnvironment.cpp

+ 0 - 5
engine/Device.cpp

@@ -422,11 +422,6 @@ void Device::create_resource_manager()
 
 	SoundResource* res = (SoundResource*)m_resource_manager->data(rid);
 
-	if (res)
-	{
-		Log::d("Size: %d", res->size());
-	}
-
 	Log::d("Resource manager created.");
 	Log::d("Resource seed: %d", m_resource_manager->seed());
 }

+ 13 - 12
engine/lua/LuaEnvironment.cpp

@@ -170,31 +170,32 @@ void LuaEnvironment::execute(int32_t args, int32_t results)
 //-----------------------------------------------------------------------------
 void LuaEnvironment::game_init()
 {
-	// const char* path = device()->filesystem()->os_path("disk", g_boot.value());
+	const char* path = device()->filesystem()->os_path("disk", g_boot.value());
 
-	// load_file(path);
-	// execute(0, 0);
+	load_file(path);
+	execute(0, 0);
 
-	// get_global_symbol("init");
-	// execute(0, 0);
+	get_global_symbol("init");
+	execute(0, 0);
 }
 
 //-----------------------------------------------------------------------------
 void LuaEnvironment::game_shutdown()
 {
-	// get_global_symbol("shutdown");
-	// execute(0, 0);
+	get_global_symbol("shutdown");
+	execute(0, 0);
 }
 
 //-----------------------------------------------------------------------------
 void LuaEnvironment::game_frame(float dt)
 {
-	// LuaStack stack(m_state);
+	LuaStack stack(m_state);
 
-	// get_global_symbol("frame");
-	// stack.push_float(dt);
-	// execute(1, 0);
-	(void)dt;
+	Log::i("Game frame called.");
+	
+	get_global_symbol("frame");
+	stack.push_float(dt);
+	execute(1, 0);
 }
 
 //-----------------------------------------------------------------------------