|
|
@@ -39,10 +39,19 @@ procedure main is |
|
|
|
--~end if; |
|
|
|
--~end bind; |
|
|
|
|
|
|
|
--~procedure move_camera_up is begin core.camera.y := core.camera.y - 1; end move_camera_up; |
|
|
|
--~procedure move_camera_down is begin core.camera.y := core.camera.y + 1; end move_camera_down; |
|
|
|
--~procedure move_camera_left is begin core.camera.x := core.camera.x - 1; end move_camera_left; |
|
|
|
--~procedure move_camera_right is begin core.camera.x := core.camera.x + 1; end move_camera_right; |
|
|
|
procedure idle is begin null; end idle; |
|
|
|
procedure move_camera_up is begin core.camera.y := core.camera.y - 1; end move_camera_up; |
|
|
|
procedure move_camera_down is begin core.camera.y := core.camera.y + 1; end move_camera_down; |
|
|
|
procedure move_camera_left is begin core.camera.x := core.camera.x - 1; end move_camera_left; |
|
|
|
procedure move_camera_right is begin core.camera.x := core.camera.x + 1; end move_camera_right; |
|
|
|
|
|
|
|
action_list : constant array (core.signal_code) of access procedure := ( |
|
|
|
core.signal_up => move_camera_up'access, |
|
|
|
core.signal_down => move_camera_down'access, |
|
|
|
core.signal_left => move_camera_left'access, |
|
|
|
core.signal_right => move_camera_right'access, |
|
|
|
others => idle'access |
|
|
|
); |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
@@ -95,10 +104,10 @@ begin |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_w) then preview_height := preview_height - 60; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_s) then preview_height := preview_height + 60; end if; |
|
|
|
-- |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_left) then core.camera.x := core.camera.x - 1; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_right) then core.camera.x := core.camera.x + 1; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_up) then core.camera.y := core.camera.y - 1; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_down) then core.camera.y := core.camera.y + 1; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_left) then core.camera.x := core.camera.x - 1; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_right) then core.camera.x := core.camera.x + 1; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_up) then core.camera.y := core.camera.y - 1; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_down) then core.camera.y := core.camera.y + 1; end if; |
|
|
|
-- |
|
|
|
if core.cursor_mode = 3 then ui.active := ui.default; else ui.active := ui.steam; end if; |
|
|
|
-- |
|
|
@@ -148,6 +157,8 @@ begin |
|
|
|
--~magic.menu (0, 0, true); |
|
|
|
--~might.menu (0, 0, true); |
|
|
|
-- |
|
|
|
action_list (core.signal_code'val (core.signal_mode)).all; |
|
|
|
-- |
|
|
|
ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); |
|
|
|
end loop gameplay; |
|
|
|
|
|
|
|