4
0
This commit is contained in:
2026-01-17 00:10:11 +01:00
parent b3158bdc37
commit 3fbce5aced
16 changed files with 29 additions and 371 deletions

View File

@@ -18,7 +18,7 @@ function Input.up() return btnp(INPUT_KEY_UP) end
function Input.down() return btnp(INPUT_KEY_DOWN) end
function Input.left() return btn(INPUT_KEY_LEFT) end
function Input.right() return btn(INPUT_KEY_RIGHT) end
function Input.player_jump() return btnp(INPUT_KEY_A) or keyp(INPUT_KEY_SPACE) end
function Input.select() return btnp(INPUT_KEY_A) or keyp(INPUT_KEY_SPACE) end
function Input.menu_confirm() return btnp(INPUT_KEY_A) or keyp(INPUT_KEY_ENTER) end
function Input.player_interact() return btnp(INPUT_KEY_B) or keyp(INPUT_KEY_ENTER) end -- B button
function Input.menu_back() return btnp(INPUT_KEY_Y) or keyp(INPUT_KEY_BACKSPACE) end

View File

@@ -20,15 +20,6 @@ local STATE_HANDLERS = {
PopupWindow.update()
PopupWindow.draw()
end,
[WINDOW_INVENTORY] = function()
InventoryWindow.update()
InventoryWindow.draw()
end,
[WINDOW_INVENTORY_ACTION] = function()
InventoryWindow.draw()
PopupWindow.draw()
PopupWindow.update()
end,
[WINDOW_CONFIGURATION] = function()
ConfigurationWindow.update()
ConfigurationWindow.draw()
@@ -37,7 +28,7 @@ local STATE_HANDLERS = {
local initialized_game = false
function init_game()
local function init_game()
if initialized_game then return end
MenuWindow.refresh_menu_items()
@@ -45,7 +36,7 @@ function init_game()
end
function TIC()
init_game()
init_game()
cls(Config.colors.black)
local handler = STATE_HANDLERS[Context.active_window]