diff options
author | chai <chaifix@163.com> | 2018-11-05 07:33:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-05 07:33:41 +0800 |
commit | 1d1210d7932b287d66e27157701b92df764528cb (patch) | |
tree | 0f6ff1178abb3eec2976cfdee80e201283d949b5 /src/lua/embed/boot.lua.h | |
parent | 91641bccdf744e0dc29f015fbffc64be46d2ad2c (diff) |
+状态机测试代码
Diffstat (limited to 'src/lua/embed/boot.lua.h')
-rw-r--r-- | src/lua/embed/boot.lua.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/embed/boot.lua.h b/src/lua/embed/boot.lua.h index 2369b0f..0884188 100644 --- a/src/lua/embed/boot.lua.h +++ b/src/lua/embed/boot.lua.h @@ -19,6 +19,7 @@ jin.config.title = jin.config.title or ("jin v" .. jin.version) jin.config.resizable = jin.config.resizable or false jin.config.fullscreen = jin.config.fullscreen or false jin.config.fps = jin.config.fps or 60 +jin.config.icon = jin.config.icon or "" ------------------------------------------------------------------------- -- Default game loop @@ -62,6 +63,7 @@ end -- Display error message. local function onError(msg) + jin.graphics.showWindow() local err = "Error:\n" .. msg .. "\n" .. debug.traceback() jin.graphics.reset() jin.graphics.setClearColor(100, 100, 100, 255) @@ -80,7 +82,7 @@ end -- No game screen. local function noGame() - jin.graphics.reset() + jin.graphics.showWindow() jin.graphics.reset() jin.graphics.setClearColor(100, 100, 100, 255) jin.graphics.clear() @@ -114,6 +116,10 @@ end jin.audio.init() jin.graphics.init(jin.config) +------------------------------------------------------------------------- +-- Boot game +------------------------------------------------------------------------- + xpcall(boot, onError) ------------------------------------------------------------------------- |