|
|
@@ -15,22 +15,34 @@ procedure main is |
|
|
|
|
|
|
|
player : chad.information := chad.trait (chad.ognjen); |
|
|
|
|
|
|
|
type menu_index is ( |
|
|
|
none, attribute_menu, skill_menu, resource_menu, unit_menu |
|
|
|
); |
|
|
|
|
|
|
|
show_menu_index : menu_index := none; |
|
|
|
|
|
|
|
procedure show_menu is |
|
|
|
begin |
|
|
|
case show_menu_index is |
|
|
|
when none => null; |
|
|
|
when attribute_menu => attribute.menu (0, 0, true); |
|
|
|
when skill_menu => skill.menu (0, 0, true); |
|
|
|
when resource_menu => resource.menu (0, 0, true); |
|
|
|
when unit_menu => unit.menu (0, 0, true); |
|
|
|
end case; |
|
|
|
end show_menu; |
|
|
|
--~type menu_index is ( |
|
|
|
--~none, attribute_menu, skill_menu, resource_menu, unit_menu |
|
|
|
--~); |
|
|
|
|
|
|
|
--~show_menu_index : menu_index := none; |
|
|
|
|
|
|
|
--~procedure show_menu is |
|
|
|
--~begin |
|
|
|
--~case show_menu_index is |
|
|
|
--~when none => null; |
|
|
|
--~when attribute_menu => attribute.menu (0, 0, true); |
|
|
|
--~when skill_menu => skill.menu (0, 0, true); |
|
|
|
--~when resource_menu => resource.menu (0, 0, true); |
|
|
|
--~when unit_menu => unit.menu (0, 0, true); |
|
|
|
--~end case; |
|
|
|
--~end show_menu; |
|
|
|
|
|
|
|
--~procedure bind (signal : in core.signal_code; action : in core.accessor) is |
|
|
|
--~begin |
|
|
|
--~if core.signal_mode = core.signal_code'pos (signal) then |
|
|
|
--~action.all; |
|
|
|
--~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; |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
@@ -46,6 +58,11 @@ begin |
|
|
|
core.configure; |
|
|
|
ui.configure; |
|
|
|
|
|
|
|
--~bind (core.signal_up, move_camera_up'access); |
|
|
|
--~bind (core.signal_down, move_camera_down'access); |
|
|
|
--~bind (core.signal_left, move_camera_left'access); |
|
|
|
--~bind (core.signal_right, move_camera_right'access); |
|
|
|
|
|
|
|
core.play_sound (core.import_sound (core.c_string ("./song/main_menu.ogg"))); |
|
|
|
|
|
|
|
attribute.configure; |
|
|
@@ -112,24 +129,25 @@ begin |
|
|
|
-- |
|
|
|
ui.draw_state_box (preview_width + 32, 32); |
|
|
|
-- |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_a) then show_menu_index := attribute_menu; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_s) then show_menu_index := skill_menu; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_r) then show_menu_index := resource_menu; end if; |
|
|
|
if core.signal_mode = core.signal_code'pos (core.signal_u) then show_menu_index := unit_menu; end if; |
|
|
|
if core.cursor_mode = 2 and show_menu_index /= none then show_menu_index := none; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_a) then show_menu_index := attribute_menu; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_s) then show_menu_index := skill_menu; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_r) then show_menu_index := resource_menu; end if; |
|
|
|
--~if core.signal_mode = core.signal_code'pos (core.signal_u) then show_menu_index := unit_menu; end if; |
|
|
|
--~if core.cursor_mode = 2 and show_menu_index /= none then show_menu_index := none; end if; |
|
|
|
-- |
|
|
|
attribute.menu (100, 100, false); |
|
|
|
skill.menu (600, 200, false); |
|
|
|
resource.menu (100, 400, false); |
|
|
|
--~unit.menu (0, 0, true); |
|
|
|
-- |
|
|
|
--~unit.stat (unit.griffin, 0, 0, true); |
|
|
|
--~unit.stat (unit.halberdier, 0, 0, true); |
|
|
|
--~unit.stat (unit.spirit, 0, 0, true); |
|
|
|
unit.stat (unit.spirit, 0, 0, true); |
|
|
|
--~unit.stat (unit.power_lich, 600, 300, false); |
|
|
|
-- |
|
|
|
--~magic.menu (0, 0, true); |
|
|
|
--~might.menu (0, 0, true); |
|
|
|
-- |
|
|
|
--~ui.synchronize; |
|
|
|
-- |
|
|
|
show_menu; |
|
|
|
-- |
|
|
|
ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); |
|
|
|
end loop gameplay; |
|
|
|
|
|
|
|