mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Moved the no-game screen code to its own file.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
+4
-4254
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
Reference in New Issue
Block a user