diff --git a/source/ai.adb b/source/ai.adb index 9672af8..1893202 100644 --- a/source/ai.adb +++ b/source/ai.adb @@ -63,9 +63,9 @@ package body ai is --~ui.draw_tiny_menu (x, y, width, height, true); --~for index in 1 .. actor_count --~loop - --~core.write ("Bot" & integer'image (index), x + offset + 0, y * index + offset, ui.glyphs (ui.active)); - --~core.write ("T =" & boolean'image (actor_is_thirsty (index)), x + offset + 120, y * index + offset, ui.glyphs (ui.active)); - --~core.write ("H =" & boolean'image (actor_is_hungry (index)), x + offset + 240, y * index + offset, ui.glyphs (ui.active)); + --~core.write ("Bot" & index'image, x + offset + 0, y * index + offset, ui.glyphs (ui.active)); + --~core.write ("T =" & actor_is_thirsty (index)'image, x + offset + 120, y * index + offset, ui.glyphs (ui.active)); + --~core.write ("H =" & actor_is_hungry (index)'image, x + offset + 240, y * index + offset, ui.glyphs (ui.active)); --~end loop; null; end review; @@ -85,20 +85,20 @@ package body ai is -- ui.write (male_name_array (actor (index).name), x + offset, y + offset); -- - ui.write ("Envious = " & boolean'image (actor_is_envious), x + offset, y + offset + 32); - ui.write ("Glutton = " & boolean'image (actor_is_glutton), x + offset, y + offset + 64); - ui.write ("Greedy = " & boolean'image (actor_is_greedy), x + offset, y + offset + 96); - ui.write ("Slutty = " & boolean'image (actor_is_slutty), x + offset, y + offset + 128); - ui.write ("Proud = " & boolean'image (actor_is_proud), x + offset, y + offset + 160); - ui.write ("Lazy = " & boolean'image (actor_is_lazy), x + offset, y + offset + 192); - ui.write ("Angry = " & boolean'image (actor_is_angry), x + offset, y + offset + 224); - ui.write ("Thirsty = " & boolean'image (actor_is_thirsty), x + offset, y + offset + 256); - ui.write ("Hungry = " & boolean'image (actor_is_hungry), x + offset, y + offset + 288); - ui.write ("Tired = " & boolean'image (actor_is_tired), x + offset, y + offset + 320); - ui.write ("Lonely = " & boolean'image (actor_is_lonely), x + offset, y + offset + 352); - ui.write ("Healthy = " & boolean'image (actor_is_healthy), x + offset, y + offset + 384); - ui.write ("Happy = " & boolean'image (actor_is_happy), x + offset, y + offset + 416); - ui.write ("Bored = " & boolean'image (actor_is_bored), x + offset, y + offset + 448); + ui.write ("Envious = " & actor_is_envious'image, x + offset, y + offset + 32); + ui.write ("Glutton = " & actor_is_glutton'image, x + offset, y + offset + 64); + ui.write ("Greedy = " & actor_is_greedy'image, x + offset, y + offset + 96); + ui.write ("Slutty = " & actor_is_slutty'image, x + offset, y + offset + 128); + ui.write ("Proud = " & actor_is_proud'image, x + offset, y + offset + 160); + ui.write ("Lazy = " & actor_is_lazy'image, x + offset, y + offset + 192); + ui.write ("Angry = " & actor_is_angry'image, x + offset, y + offset + 224); + ui.write ("Thirsty = " & actor_is_thirsty'image, x + offset, y + offset + 256); + ui.write ("Hungry = " & actor_is_hungry'image, x + offset, y + offset + 288); + ui.write ("Tired = " & actor_is_tired'image, x + offset, y + offset + 320); + ui.write ("Lonely = " & actor_is_lonely'image, x + offset, y + offset + 352); + ui.write ("Healthy = " & actor_is_healthy'image, x + offset, y + offset + 384); + ui.write ("Happy = " & actor_is_happy'image, x + offset, y + offset + 416); + ui.write ("Bored = " & actor_is_bored'image, x + offset, y + offset + 448); end view_actor_state; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/source/core.adb b/source/core.adb index 16ca5a0..cc03bab 100644 --- a/source/core.adb +++ b/source/core.adb @@ -536,9 +536,9 @@ package body core is -- engine_active := false; -- - core.echo (core.deport, "-- -- Unloading Raylib" & integer'image (texture_count) & " textures."); - core.echo (core.deport, "-- -- Unloading Raylib" & integer'image (sound_count) & " sounds."); - core.echo (core.deport, "-- -- Unloading Raylib" & integer'image (font_count) & " fonts."); + core.echo (core.deport, "-- -- Unloading Raylib" & texture_count'image & " textures."); + core.echo (core.deport, "-- -- Unloading Raylib" & sound_count'image & " sounds."); + core.echo (core.deport, "-- -- Unloading Raylib" & font_count'image & " fonts."); -- for index in 0 .. texture_count - 1 loop unload_texture (texture_array (index)); end loop; for index in 0 .. sound_count - 1 loop unload_sound (sound_array (index)); end loop; diff --git a/source/main.adb b/source/main.adb index 1cee632..2cf9378 100644 --- a/source/main.adb +++ b/source/main.adb @@ -113,10 +113,10 @@ begin attribute.configure; skill.configure; resource.configure; - --~might.configure; - --~magic.configure; + might.configure; + magic.configure; item.configure; - --~unit.configure; + unit.configure; construction.configure; --~chad.configure; world.configure; @@ -160,11 +160,14 @@ begin signal_list (core.signal_code'val (core.signal_mode)).all; -- --~ai.review; - ai.view_actor_state (1); + --~ai.view_actor_state (1); + -- + --~magic.menu (0, 0, true); + --~might.menu (0, 0, true); -- menu_render; -- - ui.write (integer'image (menu_count), 16, 16); + ui.write (menu_count'image, 16, 16); -- ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); end loop gameplay; diff --git a/source/ui.adb b/source/ui.adb index b67385f..1bc4e86 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -292,16 +292,15 @@ package body ui is procedure draw_state_box (x, y : in integer) is begin - core.write ("Cursor X :" & integer'image (core.cursor.x), x, y + 0, glyphs (active)); - core.write ("Cursor Y :" & integer'image (core.cursor.y), x, y + 32, glyphs (active)); - core.write ("Cursor Mode :" & integer'image (core.cursor_mode), x, y + 64, glyphs (active)); - core.write ("Signal Code :" & core.signal_code'image (core.signal_code'val (core.signal_mode)), x, y + 96, glyphs (active)); - core.write ("Camera X :" & integer'image (core.camera.x), x, y + 128, glyphs (active)); - core.write ("Camera Y :" & integer'image (core.camera.y), x, y + 160, glyphs (active)); - core.write ("Global Time :" & integer'image (core.global_time), x, y + 192, glyphs (active)); - core.write ("Gameplay Time :" & integer'image (core.gameplay_time), x, y + 224, glyphs (active)); - core.write ("Animation Time :" & integer'image (core.animation_time), x, y + 256, glyphs (active)); - core.write ("Framerate :" & integer'image (core.framerate), x, y + 288, glyphs (active)); + ui.write ("Cursor X :" & core.cursor.x'image, x, y + 0); + ui.write ("Cursor Y :" & core.cursor.y'image, x, y + 32); + ui.write ("Cursor Mode :" & core.cursor_mode'image, x, y + 64); + ui.write ("Camera X :" & core.camera.x'image, x, y + 96); + ui.write ("Camera Y :" & core.camera.y'image, x, y + 128); + ui.write ("Global Time :" & core.global_time'image, x, y + 160); + ui.write ("Gameplay Time :" & core.gameplay_time'image, x, y + 192); + ui.write ("Animation Time :" & core.animation_time'image, x, y + 224); + ui.write ("Framerate :" & core.framerate'image, x, y + 256); end draw_state_box; ------------------------------------------------------------------------------------------ diff --git a/source/unit.adb b/source/unit.adb index 85dac04..797700c 100644 --- a/source/unit.adb +++ b/source/unit.adb @@ -100,7 +100,7 @@ package body unit is ui.draw_icon (attribute.trait (data).text, move_x + view_width + 12 + offset, move_y + offset + move); attribute.draw (data, move_x + view_width + 12 + offset, move_y + offset + move); -- - ui.write (integer'image (trait (index).attributes (data)), move_x + view_width + 12 + offset + core.icon, move_y + offset + move); + ui.write (trait (index).attributes (data)'image, move_x + view_width + 12 + offset + core.icon, move_y + offset + move); end loop; -- for animate in animation diff --git a/source/world.adb b/source/world.adb index 1b7027d..eccf2cf 100644 --- a/source/world.adb +++ b/source/world.adb @@ -41,7 +41,7 @@ package body world is loop declare folder : constant string := core.lowercase (codex'image (index)); - file : constant string := ada.strings.fixed.trim (integer'image (value), ada.strings.left); + file : constant string := ada.strings.fixed.trim (value'image, ada.strings.left); begin landmarks (index) (value) := core.import_sprite ("./sprite/world/landmark/" & folder & "/" & file & ".png", 1, 1); end; @@ -54,12 +54,12 @@ package body world is procedure make (index : in codex; width, height : in natural) is begin core.echo (core.comment, "-- Procedurally generating new map..."); - core.echo (core.comment, "-- -- Map type : " & codex'image (index)); - core.echo (core.comment, "-- -- Map width :" & integer'image (width)); - core.echo (core.comment, "-- -- Map height :" & integer'image (height)); - core.echo (core.comment, "-- -- Landmark count :" & integer'image (landmark_limit)); - core.echo (core.comment, "-- -- Construction count :" & integer'image (construction_limit)); - core.echo (core.comment, "-- -- Item count :" & integer'image (item_limit)); + core.echo (core.comment, "-- -- Map type : " & index'image); + core.echo (core.comment, "-- -- Map width :" & width'image); + core.echo (core.comment, "-- -- Map height :" & height'image); + core.echo (core.comment, "-- -- Landmark count :" & landmark_limit'image); + core.echo (core.comment, "-- -- Construction count :" & construction_limit'image); + core.echo (core.comment, "-- -- Item count :" & item_limit'image); -- map.terrain := index; map.width := width;