From bfab2247ac96816ab3f501e2233792b80fed9493 Mon Sep 17 00:00:00 2001 From: xolatile Date: Thu, 21 Mar 2024 19:03:15 -0400 Subject: [PATCH] Random seed... --- source/core.adb | 22 +++++++++++++--------- source/main.adb | 6 +++++- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/source/core.adb b/source/core.adb index 45ee438..16ca5a0 100644 --- a/source/core.adb +++ b/source/core.adb @@ -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); diff --git a/source/main.adb b/source/main.adb index 45a360c..ad7d6cd 100644 --- a/source/main.adb +++ b/source/main.adb @@ -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;