Moved the no-game screen code to its own file.

This commit is contained in:
Alex Szpakowski
2015-06-09 22:38:36 -03:00
parent b2b5a1d9df
commit 3053278048
6 changed files with 5356 additions and 5241 deletions
+11
View File
@@ -56,6 +56,7 @@
#endif
// Scripts
#include "scripts/nogame.lua.h"
#include "scripts/boot.lua.h"
// All modules define a c-accessible luaopen
@@ -114,6 +115,7 @@ extern "C"
#if defined(LOVE_ENABLE_WINDOW)
extern int luaopen_love_window(lua_State*);
#endif
extern int luaopen_love_nogame(lua_State*);
extern int luaopen_love_boot(lua_State*);
}
@@ -169,6 +171,7 @@ static const luaL_Reg modules[] = {
#if defined(LOVE_ENABLE_WINDOW)
{ "love.window", luaopen_love_window },
#endif
{ "love.nogame", luaopen_love_nogame },
{ "love.boot", luaopen_love_boot },
{ 0, 0 }
};
@@ -395,6 +398,14 @@ int w__setAccelerometerAsJoystick(lua_State *L)
}
#endif // LOVE_LEGENDARY_ACCELEROMETER_AS_JOYSTICK_HACK
int luaopen_love_nogame(lua_State *L)
{
if (luaL_loadbuffer(L, (const char *)love::nogame_lua, sizeof(love::nogame_lua), "nogame.lua") == 0)
lua_call(L, 0, 1);
return 1;
}
int luaopen_love_boot(lua_State *L)
{
if (luaL_loadbuffer(L, (const char *)love::boot_lua, sizeof(love::boot_lua), "boot.lua") == 0)
+1
View File
@@ -35,6 +35,7 @@ extern "C"
LOVE_EXPORT const char *love_version();
LOVE_EXPORT const char *love_codename();
LOVE_EXPORT int luaopen_love(lua_State *L);
LOVE_EXPORT int luaopen_love_nogame(lua_State *L);
LOVE_EXPORT int luaopen_love_boot(lua_State *L);
#ifdef __cplusplus
+2 -987
View File
File diff suppressed because it is too large Load Diff
+4 -4254
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff