From 4ec49b468a7ddc95bc2aa0a7e908ef126320b781 Mon Sep 17 00:00:00 2001 From: xolatile Date: Tue, 30 Apr 2024 14:20:30 -0400 Subject: [PATCH] Minor source change... --- source/core.adb | 7 +++++++ source/core.ads | 5 +++++ source/main.adb | 12 ++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/source/core.adb b/source/core.adb index 41bc430..7733944 100644 --- a/source/core.adb +++ b/source/core.adb @@ -352,6 +352,13 @@ package body core is ray.draw_rectangle (0, 0, window_width, window_height, (0, 0, 0, 127)); end overlay; + ------------------------------------------------------------------------------------------ + + 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; + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end core; diff --git a/source/core.ads b/source/core.ads index 62222ef..d5b6a3f 100644 --- a/source/core.ads +++ b/source/core.ads @@ -120,6 +120,11 @@ package core is procedure write_text_box (text : in string); + procedure move_camera_up; + procedure move_camera_down; + procedure move_camera_left; + procedure move_camera_right; + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end core; diff --git a/source/main.adb b/source/main.adb index b28ffe8..a7956db 100644 --- a/source/main.adb +++ b/source/main.adb @@ -70,10 +70,6 @@ procedure main is ------------------------------------------------------------------------------------------ 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; procedure show_attribute_menu is begin menu_insert (menu_attribute); end show_attribute_menu; procedure show_skill_menu is begin menu_insert (menu_skill); end show_skill_menu; procedure show_resource_menu is begin menu_insert (menu_resource); end show_resource_menu; @@ -87,10 +83,10 @@ procedure main is procedure zoom_out is begin core.zoom := 1; end zoom_out; signal_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, + core.signal_up => core.move_camera_up'access, + core.signal_down => core.move_camera_down'access, + core.signal_left => core.move_camera_left'access, + core.signal_right => core.move_camera_right'access, core.signal_a => show_attribute_menu'access, core.signal_s => show_skill_menu'access, core.signal_r => show_resource_menu'access,