- Icon resource for Windows added

- Zoom and fullscreen controlled from Lua
- Basic gamepad support
This commit is contained in:
2023-01-20 19:14:59 +01:00
parent 0b2f30bac8
commit db9ce7898b
13 changed files with 75 additions and 65 deletions

View File

@@ -133,13 +133,13 @@ function game_init(menu)
if menu then
abad.update = abad_nop
_update=update_menu
game_update=update_menu
menu_count=0
menu_change_room=300
menu_room=rnd(60)
playmus(audio_main_song)
else
_update=update_game
game_update=update_game
stopmusic()
end
--fade.fadein()
@@ -185,10 +185,10 @@ function update_dialog()
text("(Y)es (N)o",25,40,2)
if btnp(KEY_N) then
_update=update_game
game_update=update_game
elseif btnp(KEY_Y) then
mapa_save()
_update=update_game
game_update=update_game
end
end
@@ -220,7 +220,7 @@ function update_game()
elseif btnp(KEY_RETURN) then
mode=modes.playing
elseif btnp(KEY_S) and (btn(KEY_LCTRL) or btn(KEY_LGUI)) then
_update=update_dialog
game_update=update_dialog
elseif btnp(KEY_C) then
mapa_cycle_colors(abad.hab)
elseif btnp(KEY_M) then
@@ -360,7 +360,7 @@ function update_menu()
fireball.update()
switches.update()
if btnp(KEY_SPACE) then
if btnp(keyShoot) or padp(btnShoot) then
game_exit()
game_init()
fade.fadeoutin()
@@ -390,8 +390,8 @@ function pause()
sspr(0,0,128,96,0,0)
setdest(0)
setsource(tiles)
pause_old_update=_update
_update=update_pause
pause_old_update=game_update
game_update=update_pause
end
function update_pause()
@@ -405,8 +405,8 @@ function update_pause()
setsource(back)
sspr(0,0,128,96,0,0)
setsource(tiles)
_update = pause_old_update
elseif btnp(KEY_SPACE) then
game_update = pause_old_update
elseif btnp(keyShoot) or padp(btnShoot) then
game_exit()
game_init(true)
end