Added diagonal arrows and target...
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
BIN
game/world/arrow/lower_left.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
game/world/arrow/lower_right.png
Normal file
After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
BIN
game/world/arrow/upper_left.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
game/world/arrow/upper_right.png
Normal file
After Width: | Height: | Size: 182 B |
@ -454,22 +454,22 @@ package body core is
|
||||
|
||||
procedure initialize is
|
||||
begin
|
||||
--~echo (comment, "Initializing core components...");
|
||||
echo (comment, "Initializing core components...");
|
||||
--
|
||||
engine_active := true;
|
||||
texture_array := new texture_data_array (0 .. 1600);
|
||||
sound_array := new sound_data_array (0 .. 4);
|
||||
font_array := new font_data_array (0 .. 16);
|
||||
--
|
||||
--~echo (comment, "-- Setting trace log level to none (ignoring all default Raylib logs).");
|
||||
echo (comment, "-- Setting trace log level to none (ignoring all default Raylib logs).");
|
||||
ray.set_trace_log_level (ray.log_none);
|
||||
--
|
||||
ray.set_window_flags (ray.flag_window_resizable);
|
||||
--
|
||||
--~echo (comment, "-- Initializing Raylib window data...");
|
||||
--~echo (comment, "-- -- Window title : Xorana");
|
||||
--~echo (comment, "-- -- Window width : 1800");
|
||||
--~echo (comment, "-- -- Window height : 900");
|
||||
echo (comment, "-- Initializing Raylib window data...");
|
||||
echo (comment, "-- -- Window title : Xorana");
|
||||
echo (comment, "-- -- Window width : 1800");
|
||||
echo (comment, "-- -- Window height : 900");
|
||||
--
|
||||
ray.open_window (1800, 900, c_string ("Xorana"));
|
||||
ray.hide_cursor;
|
||||
@ -477,7 +477,7 @@ package body core is
|
||||
ray.set_window_minimal_size (640, 480);
|
||||
ray.set_window_maximal_size (3840, 2160);
|
||||
--
|
||||
--~echo (comment, "-- Initializing Raylib audio device data...");
|
||||
echo (comment, "-- Initializing Raylib audio device data...");
|
||||
--~ray.open_audio_device;
|
||||
--
|
||||
game_icon := ray.load_image (c_string (folder & "/ui/game_icon.png"));
|
||||
@ -487,35 +487,35 @@ package body core is
|
||||
--ray.randomization (19970725);
|
||||
ray.set_target_fps (60);
|
||||
--
|
||||
--~echo (success, "Initialized core components.");
|
||||
echo (success, "Initialized core components.");
|
||||
end initialize;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure deinitialize is
|
||||
begin
|
||||
--~echo (comment, "Deinitializing core components...");
|
||||
echo (comment, "Deinitializing core components...");
|
||||
--
|
||||
engine_active := false;
|
||||
--
|
||||
--~echo (comment, "-- -- Unloading Raylib" & texture_count'image & " textures.");
|
||||
--~echo (comment, "-- -- Unloading Raylib" & sound_count'image & " sounds.");
|
||||
--~echo (comment, "-- -- Unloading Raylib" & font_count'image & " fonts.");
|
||||
echo (comment, "-- -- Unloading Raylib" & texture_count'image & " textures.");
|
||||
echo (comment, "-- -- Unloading Raylib" & sound_count'image & " sounds.");
|
||||
echo (comment, "-- -- Unloading Raylib" & font_count'image & " fonts.");
|
||||
--
|
||||
for index in 0 .. texture_count - 1 loop ray.unload_texture (texture_array (index)); end loop;
|
||||
for index in 0 .. sound_count - 1 loop ray.unload_sound (sound_array (index)); end loop;
|
||||
for index in 0 .. font_count - 1 loop ray.unload_font (font_array (index)); end loop;
|
||||
--
|
||||
--~echo (comment, "-- Deinitializing Raylib audio device data...");
|
||||
echo (comment, "-- Deinitializing Raylib audio device data...");
|
||||
--~ray.close_audio_device;
|
||||
--
|
||||
ray.unload_image (game_icon);
|
||||
--
|
||||
--~echo (comment, "-- Deinitializing Raylib window data...");
|
||||
echo (comment, "-- Deinitializing Raylib window data...");
|
||||
ray.close_window;
|
||||
ray.show_cursor;
|
||||
--
|
||||
--~echo (success, "Deinitialized core components.");
|
||||
echo (success, "Deinitialized core components.");
|
||||
end deinitialize;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
@ -339,7 +339,7 @@ begin
|
||||
core.camera.x := world.map.chads (1).x;
|
||||
core.camera.y := world.map.chads (1).y;
|
||||
--
|
||||
world.draw_performance_box;
|
||||
--~world.draw_performance_box;
|
||||
--
|
||||
ui.synchronize;
|
||||
end loop gameplay_loop;
|
||||
|
@ -23,6 +23,8 @@ package body world is
|
||||
|
||||
tiles : array (biome) of core.sprite;
|
||||
|
||||
target : core.vector := (-1, -1);
|
||||
|
||||
dark : core.sprite;
|
||||
border_upper : core.sprite;
|
||||
border_lower : core.sprite;
|
||||
@ -32,6 +34,15 @@ package body world is
|
||||
corner_upper_right : core.sprite;
|
||||
corner_lower_left : core.sprite;
|
||||
corner_lower_right : core.sprite;
|
||||
arrow_target : core.sprite;
|
||||
arrow_upper : core.sprite;
|
||||
arrow_lower : core.sprite;
|
||||
arrow_left : core.sprite;
|
||||
arrow_right : core.sprite;
|
||||
arrow_upper_left : core.sprite;
|
||||
arrow_upper_right : core.sprite;
|
||||
arrow_lower_left : core.sprite;
|
||||
arrow_lower_right : core.sprite;
|
||||
|
||||
draw_tiles_timer : natural := 0;
|
||||
draw_views_timer : natural := 0;
|
||||
@ -92,20 +103,26 @@ package body world is
|
||||
--
|
||||
core.increment (drawn_tiles);
|
||||
--
|
||||
--~if core.cursor.x > offset.x + (horizontal - core.camera.x ) * core.base * core.zoom - 6
|
||||
--~and core.cursor.x < offset.x + (horizontal - core.camera.x + 1) * core.base * core.zoom + 6
|
||||
--~and core.cursor.y > offset.y + (vertical - core.camera.y ) * core.base * core.zoom - 6
|
||||
--~and core.cursor.y < offset.y + (vertical - core.camera.y + 1) * core.base * core.zoom + 6
|
||||
--~and core.cursor_mode = core.cursor_left
|
||||
--~and not ui.prioritize then
|
||||
--~map.chads (1).x := horizontal;
|
||||
--~map.chads (1).y := vertical;
|
||||
--~core.cursor_mode := core.cursor_none;
|
||||
--~end if;
|
||||
if core.cursor.x > offset.x + (horizontal - core.camera.x ) * core.base * core.zoom - 6
|
||||
and core.cursor.x < offset.x + (horizontal - core.camera.x + 1) * core.base * core.zoom + 6
|
||||
and core.cursor.y > offset.y + (vertical - core.camera.y ) * core.base * core.zoom - 6
|
||||
and core.cursor.y < offset.y + (vertical - core.camera.y + 1) * core.base * core.zoom + 6
|
||||
and core.cursor_mode = core.cursor_left
|
||||
and not ui.prioritize then
|
||||
target.x := horizontal;
|
||||
target.y := vertical;
|
||||
--
|
||||
core.cursor_mode := core.cursor_none;
|
||||
end if;
|
||||
end if;
|
||||
end loop;
|
||||
end loop;
|
||||
--
|
||||
core.draw (data => arrow_target,
|
||||
x => offset.x + (target.x - core.camera.x) * core.base * core.zoom,
|
||||
y => offset.y + (target.y - core.camera.y) * core.base * core.zoom,
|
||||
factor => core.zoom);
|
||||
--
|
||||
draw_tiles_timer := natural (1_000_000.0 * (core.time - time));
|
||||
end draw_tiles;
|
||||
|
||||
@ -386,6 +403,15 @@ package body world is
|
||||
corner_upper_right := core.import_sprite (core.folder & "/game/world/frame/corner_upper_right.png", 1, 1);
|
||||
corner_lower_left := core.import_sprite (core.folder & "/game/world/frame/corner_lower_left.png", 1, 1);
|
||||
corner_lower_right := core.import_sprite (core.folder & "/game/world/frame/corner_lower_right.png", 1, 1);
|
||||
arrow_target := core.import_sprite (core.folder & "/game/world/arrow/target.png", 1, 1);
|
||||
arrow_upper := core.import_sprite (core.folder & "/game/world/arrow/upper.png", 1, 1);
|
||||
arrow_lower := core.import_sprite (core.folder & "/game/world/arrow/lower.png", 1, 1);
|
||||
arrow_left := core.import_sprite (core.folder & "/game/world/arrow/left.png", 1, 1);
|
||||
arrow_right := core.import_sprite (core.folder & "/game/world/arrow/right.png", 1, 1);
|
||||
arrow_upper_left := core.import_sprite (core.folder & "/game/world/arrow/upper_left.png", 1, 1);
|
||||
arrow_upper_right := core.import_sprite (core.folder & "/game/world/arrow/upper_right.png", 1, 1);
|
||||
arrow_lower_left := core.import_sprite (core.folder & "/game/world/arrow/lower_left.png", 1, 1);
|
||||
arrow_lower_right := core.import_sprite (core.folder & "/game/world/arrow/lower_right.png", 1, 1);
|
||||
--
|
||||
for index in landmark_index loop
|
||||
landmarks (index) := core.import_sprite (file_path => core.folder & "/game/world/landmark/" & core.lowercase (index'image) & ".png",
|
||||
|