Nogame screen works without the graphics module;

This commit is contained in:
bjorn 2019-04-08 03:25:45 -07:00
parent 0139486f46
commit 0f6bcad90b
2 changed files with 31 additions and 10 deletions

View File

@ -12,12 +12,18 @@ local function nogame()
function lovr.conf(t)
t.modules.audio = false
t.modules.graphics = false
t.modules.math = false
t.modules.physics = false
t.modules.thread = false
end
function lovr.load()
if not lovr.graphics then
print(string.format('LÖVR %d.%d.%d (No game)', lovr.getVersion()))
lovr.event.quit()
return
end
local texture = lovr.graphics.newTexture(lovr.data.newBlob(lovr._logo, 'logo.png'))
logo = lovr.graphics.newMaterial(texture)
lovr.graphics.setBackgroundColor(.960, .988, 1.0)

View File

@ -30,15 +30,30 @@ unsigned char boot_lua[] = {
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x61, 0x75, 0x64, 0x69,
0x6f, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e,
0x6d, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x73, 0x2e, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x73, 0x20, 0x3d,
0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74,
0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x72,
0x65, 0x61, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a,
0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x66, 0x75, 0x6e,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x6c,
0x6f, 0x61, 0x64, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f,
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x66,
0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x2e, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x20,
0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x68,
0x79, 0x73, 0x69, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73,
0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x3d,
0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64,
0x0a, 0x0a, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x28, 0x29,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20,
0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x27, 0x4c, 0xc3,
0x96, 0x56, 0x52, 0x20, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x2e, 0x25, 0x64,
0x20, 0x28, 0x4e, 0x6f, 0x20, 0x67, 0x61, 0x6d, 0x65, 0x29, 0x27, 0x2c,
0x20, 0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x2e, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f,
0x63, 0x61, 0x6c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x20,
0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x72, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x69, 0x63, 0x73, 0x2e, 0x6e, 0x65, 0x77, 0x54, 0x65, 0x78, 0x74, 0x75,
@ -643,4 +658,4 @@ unsigned char boot_lua[] = {
0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20,
0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a
};
unsigned int boot_lua_len = 7712;
unsigned int boot_lua_len = 7892;