Random seed...

This commit is contained in:
Ognjen Milan Robovic 2024-03-21 19:03:15 -04:00
parent fdaa79a556
commit bfab2247ac
2 changed files with 18 additions and 10 deletions

View File

@ -107,19 +107,22 @@ package body core is
procedure echo (status : in echo_status; message : in string) is
begin
if not echo_mark (status) then return; end if;
if not echo_mark (status) then
return;
end if;
--
put ("[");
case status is
when failure => terminal (red, bold); put ("Failure"); terminal;
when warning => terminal (yellow, bold); put ("Warning"); terminal;
when success => terminal (green, bold); put ("Success"); terminal;
when comment => terminal (grey, bold); put ("Comment"); terminal;
when import => terminal (cyan, bold); put (" -<- "); terminal;
when export => terminal (pink, bold); put (" ->- "); terminal;
when deport => terminal (blue, bold); put (" -x- "); terminal;
when ray_ada => terminal (white, bold); put ("Ray-Ada"); terminal;
when failure => terminal (red, bold); put ("Failure");
when warning => terminal (yellow, bold); put ("Warning");
when success => terminal (green, bold); put ("Success");
when comment => terminal (grey, bold); put ("Comment");
when import => terminal (cyan, bold); put (" + ");
when export => terminal (pink, bold); put (" > ");
when deport => terminal (blue, bold); put (" - ");
when ray_ada => terminal (white, bold); put ("Ray-Ada");
end case;
terminal;
put_line ("] " & message);
end echo;
@ -516,6 +519,7 @@ package body core is
core.echo (core.ray_ada, "-- Initializing Raylib audio device data...");
open_audio_device;
--
randomization (25071997);
set_target_fps (60);
--
hexagon_grid_sprite := import_sprite ("./sprite/ui/hexagon_grid_tile.png", 1, 1);

View File

@ -127,7 +127,9 @@ begin
preview_width := core.window_width - side_panel;
preview_height := core.window_height;
core.dash;
core.echo (core.success, "Successfully initialized game data, entering main gameplay loop.");
core.dash;
------------------------------------------------------------------------------------------
@ -136,7 +138,7 @@ begin
--
exit when core.engine_active = false;
--
if core.cursor_mode = 3 then ui.active := ui.default; else ui.active := ui.steam; end if;
ui.active := (if core.cursor_mode = 3 then ui.default else ui.steam);
--
core.draw (core.hexagon_fill_sprite, 0, 0);
core.draw (core.hexagon_grid_sprite, 0, 0);
@ -168,4 +170,6 @@ begin
core.deinitialize;
core.dash;
end main;