|
|
@@ -23,10 +23,8 @@ procedure main is |
|
|
|
map_preview_panel, status_preview_panel, text_box_panel |
|
|
|
); |
|
|
|
|
|
|
|
view_icon : array (view) of core.sprite; |
|
|
|
|
|
|
|
view_list : array (view) of boolean := (others => true); |
|
|
|
|
|
|
|
view_icon : array (view) of core.sprite := (others => (others => 0)); |
|
|
|
view_list : array (view) of boolean := (others => true); |
|
|
|
view_text : array (view) of core.long_string := ( |
|
|
|
"Toggle map preview panel. ", |
|
|
|
"Toggle status preview panel. ", |
|
|
@@ -48,6 +46,7 @@ procedure main is |
|
|
|
procedure move_camera_up is |
|
|
|
begin |
|
|
|
core.move_camera_up; |
|
|
|
core.camera.y := core.clip (core.camera.y, 0, world.map.height - 1); |
|
|
|
if world.map.clips (core.camera.x, core.camera.y) then |
|
|
|
core.increment (core.camera.y); |
|
|
|
end if; |
|
|
@@ -56,6 +55,7 @@ procedure main is |
|
|
|
procedure move_camera_down is |
|
|
|
begin |
|
|
|
core.move_camera_down; |
|
|
|
core.camera.y := core.clip (core.camera.y, 0, world.map.height - 1); |
|
|
|
if world.map.clips (core.camera.x, core.camera.y) then |
|
|
|
core.decrement (core.camera.y); |
|
|
|
end if; |
|
|
@@ -64,6 +64,7 @@ procedure main is |
|
|
|
procedure move_camera_left is |
|
|
|
begin |
|
|
|
core.move_camera_left; |
|
|
|
core.camera.x := core.clip (core.camera.x, 0, world.map.width - 1); |
|
|
|
if world.map.clips (core.camera.x, core.camera.y) then |
|
|
|
core.increment (core.camera.x); |
|
|
|
end if; |
|
|
@@ -72,6 +73,7 @@ procedure main is |
|
|
|
procedure move_camera_right is |
|
|
|
begin |
|
|
|
core.move_camera_right; |
|
|
|
core.camera.x := core.clip (core.camera.x, 0, world.map.width - 1); |
|
|
|
if world.map.clips (core.camera.x, core.camera.y) then |
|
|
|
core.decrement (core.camera.x); |
|
|
|
end if; |
|
|
@@ -125,7 +127,7 @@ begin |
|
|
|
world.configure; |
|
|
|
ai.configure; |
|
|
|
|
|
|
|
world.make (world.grass, 140, 120); |
|
|
|
world.make (world.swamp, 120, 60); |
|
|
|
|
|
|
|
core.dash; |
|
|
|
core.echo (core.success, "Successfully initialized game data, entering main gameplay loop."); |
|
|
@@ -137,7 +139,7 @@ begin |
|
|
|
|
|
|
|
ui.active := ui.imp; |
|
|
|
|
|
|
|
core.camera := (55, 50); |
|
|
|
core.camera := (1, 1); |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
@@ -156,9 +158,6 @@ begin |
|
|
|
preview_height := core.window_height - text_box_height; |
|
|
|
text_box_height := 32; |
|
|
|
-- |
|
|
|
core.camera.x := core.clip (core.camera.x, 0, world.map.width - 1); |
|
|
|
core.camera.y := core.clip (core.camera.y, 0, world.map.height - 1); |
|
|
|
-- |
|
|
|
world.draw; |
|
|
|
-- |
|
|
|
if view_list (map_preview_panel) then |
|
|
|