- Reorder code
- [FIX] game_update() not being called
This commit is contained in:
@@ -1,14 +1,3 @@
|
|||||||
keyUp = KEY_UP
|
|
||||||
keyDown = KEY_DOWN
|
|
||||||
keyLeft = KEY_LEFT
|
|
||||||
keyRight = KEY_RIGHT
|
|
||||||
keyShoot = KEY_SPACE
|
|
||||||
|
|
||||||
btnUp = BTN_UP
|
|
||||||
btnDown = BTN_DOWN
|
|
||||||
btnLeft = BTN_LEFT
|
|
||||||
btnRigth = BTN_RIGHT
|
|
||||||
btnShoot = BTN_A
|
|
||||||
|
|
||||||
function _init()
|
function _init()
|
||||||
tiles=loadsurf("tiles.gif")
|
tiles=loadsurf("tiles.gif")
|
||||||
@@ -36,6 +25,18 @@ function _init()
|
|||||||
audio_hit = loadsound(audio_hit)
|
audio_hit = loadsound(audio_hit)
|
||||||
audio_low = loadsound(audio_low)
|
audio_low = loadsound(audio_low)
|
||||||
|
|
||||||
|
keyUp = tonumber(getconf("keyup")) or KEY_UP
|
||||||
|
keyDown = tonumber(getconf("keydown")) or KEY_DOWN
|
||||||
|
keyLeft = tonumber(getconf("keyleft")) or KEY_LEFT
|
||||||
|
keyRight = tonumber(getconf("keyright")) or KEY_RIGHT
|
||||||
|
keyShoot = tonumber(getconf("keyshoot")) or KEY_SPACE
|
||||||
|
|
||||||
|
btnUp = tonumber(getconf("btnup")) or BTN_UP
|
||||||
|
btnDown = tonumber(getconf("btndown")) or BTN_DOWN
|
||||||
|
btnLeft = tonumber(getconf("btnleft")) or BTN_LEFT
|
||||||
|
btnRight = tonumber(getconf("btnright")) or BTN_RIGHT
|
||||||
|
btnShoot = tonumber(getconf("btnshoot")) or BTN_A
|
||||||
|
|
||||||
--game_init()
|
--game_init()
|
||||||
intro_init()
|
intro_init()
|
||||||
--final_init()
|
--final_init()
|
||||||
@@ -52,5 +53,5 @@ function _update()
|
|||||||
cursor(fs)
|
cursor(fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (game_update) game_update() end
|
if (game_update) then game_update() end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user