Reverting stupid fucking changes I have made, chasing simplicity...

This commit is contained in:
Ognjen Milan Robovic 2024-06-02 04:34:59 -04:00
parent b8e398b712
commit 6e80842b1a
5 changed files with 21 additions and 45 deletions

View File

@ -3,7 +3,7 @@
set -xe
cd source
gnatmake -gnato -O3 -fstack-check -fno-exceptions -c main.adb
gnatmake -gnatp -O3 -f -fstack-check -fno-exceptions -c main.adb
gnatbind main.ali
gnatlink -o xhads main.ali -lraylib
mv xhads ../xhads

View File

@ -9,13 +9,6 @@ package body attribute is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
procedure configure is
procedure define (index : in enumeration; minimum, maximum : in integer; name, text : in string) is
begin
description (index).base := (minimum, maximum);
description (index).name := core.unbound (name);
description (index).text := core.unbound (text);
end define;
--
structure : ui.structure;
--
time : float := 0.0;
@ -24,16 +17,6 @@ package body attribute is
--
core.echo (core.comment, "Configuring" & count'image & " attribute components...");
--
description := new description_array (enumeration'range);
icon := new icon_array (enumeration'range);
--
define (offense, 1, 12, "Offense", "Offense attribute determines your damage modifier when attacking.");
define (defense, 1, 12, "Defense", "D-FENS attribute determines how much damage your reflect and receive.");
define (wisdom, 1, 12, "Wisdom", "Wisdom attribute determines how much mana your chad has.");
define (stamina, 1, 12, "Stamina", "Stamina attribute determines how fast you recover from being wounded.");
define (speed, 1, 12, "Speed", "Speed attribute determines how far you can walk per turn.");
define (reach, 1, 12, "Reach", "Reach attribute determines your range modifier when shooting or casting.");
--
structure.title := "Attribute Menu ";
structure.toggle := core.signal_a;
structure.show := false;

View File

@ -23,17 +23,22 @@ package attribute is
type points is array (enumeration) of core.point;
type bonus is array (enumeration) of natural;
type description_array is array (enumeration range <>) of definition;
type icon_array is array (enumeration range <>) of core.sprite;
------------------------------------------------------------------------------------------
count : constant natural := enumeration'pos (enumeration'last) + 1;
default : constant points := (others => (1, 12));
description : access description_array;
icon : access icon_array;
description : constant array (enumeration) of definition := (
offense => ((1, 12), core.unbound ("Offense"), core.unbound ("Offense attribute determines your damage modifier when attacking.")),
defense => ((1, 12), core.unbound ("Defense"), core.unbound ("D-FENS attribute determines how much damage your reflect and receive.")),
wisdom => ((1, 12), core.unbound ("Wisdom"), core.unbound ("Wisdom attribute determines how much mana your chad has.")),
stamina => ((1, 12), core.unbound ("Stamina"), core.unbound ("Stamina attribute determines how fast you recover from being wounded.")),
speed => ((1, 12), core.unbound ("Speed"), core.unbound ("Speed attribute determines how far you can walk per turn.")),
reach => ((1, 12), core.unbound ("Reach"), core.unbound ("Reach attribute determines your range modifier when shooting or casting."))
);
icon : array (enumeration) of core.sprite;
------------------------------------------------------------------------------------------

View File

@ -9,13 +9,6 @@ package body resource is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
procedure configure is
procedure define (index : in enumeration; minimum, maximum : in integer; name, text : in string) is
begin
description (index).base := (minimum, maximum);
description (index).name := core.unbound (name);
description (index).text := core.unbound (text);
end define;
--
structure : ui.structure;
--
time : float := 0.0;
@ -24,16 +17,6 @@ package body resource is
--
core.echo (core.comment, "Configuring" & count'image & " resource components...");
--
description := new description_array (enumeration'range);
icon := new icon_array (enumeration'range);
--
define (gold, 24, 480, "Gold", "Gold is precious yellowish shiny metal, valued since ancient times.");
define (wood, 12, 240, "Wood", "Wood is just bundle of lignin and cellulose, nothing more.");
define (stone, 12, 240, "Stone", "Stone is essential building block for most constructions in this world.");
define (metal, 12, 240, "Metal", "Metal as a resource is mixture of commonly found metalic elements.");
define (leather, 12, 240, "Leather", "Leather is general purpose resource, used for armours and decorations.");
define (gem, 12, 240, "Gem", "Gem as a resource is same as metal, just mixture of various gems.");
--
structure.title := "Resource Menu ";
structure.toggle := core.signal_r;
structure.show := false;

View File

@ -23,15 +23,20 @@ package resource is
type points is array (enumeration) of core.point;
type price is array (enumeration) of natural;
type description_array is array (enumeration range <>) of definition;
type icon_array is array (enumeration range <>) of core.sprite;
------------------------------------------------------------------------------------------
count : constant natural := enumeration'pos (enumeration'last) + 1;
description : access description_array;
icon : access icon_array;
description : constant array (enumeration) of definition := (
gold => ((24, 480), core.unbound ("Gold"), core.unbound ("Gold is precious yellowish shiny metal, valued since ancient times.")),
wood => ((12, 240), core.unbound ("Wood"), core.unbound ("Wood is just bundle of lignin and cellulose, nothing more.")),
stone => ((12, 240), core.unbound ("Stone"), core.unbound ("Stone is essential building block for most constructions in this world.")),
metal => ((12, 240), core.unbound ("Metal"), core.unbound ("Metal as a resource is mixture of commonly found metalic elements.")),
leather => ((12, 240), core.unbound ("Leather"), core.unbound ("Leather is general purpose resource, used for armours and decorations.")),
gem => ((12, 240), core.unbound ("Gem"), core.unbound ("Gem as a resource is same as metal, just mixture of various gems."))
);
icon : array (enumeration) of core.sprite;
------------------------------------------------------------------------------------------