Removing clutter...
This commit is contained in:
parent
300c1b78e3
commit
cb06f12d35
@ -3,7 +3,7 @@
|
||||
set -xe
|
||||
|
||||
cd source
|
||||
gnatmake -gnatp -O3 -f -fstack-check -fno-exceptions -c main.adb
|
||||
gnatmake -O3 -fstack-check -fno-exceptions -c main.adb
|
||||
gnatbind main.ali
|
||||
gnatlink -o xhads main.ali -lraylib
|
||||
mv xhads ../xhads
|
||||
|
@ -8,37 +8,6 @@ package body attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure is
|
||||
structure : ui.structure;
|
||||
--
|
||||
time : float := 0.0;
|
||||
begin
|
||||
time := core.time;
|
||||
--
|
||||
core.echo (core.comment, "Configuring" & count'image & " attribute components...");
|
||||
--
|
||||
structure.title := "Attribute Menu ";
|
||||
structure.toggle := core.signal_a;
|
||||
structure.show := false;
|
||||
structure.center := false;
|
||||
structure.resize := true;
|
||||
structure.x := 60;
|
||||
structure.y := 100;
|
||||
structure.gui_n := count;
|
||||
--
|
||||
ui.add_structure (data => structure);
|
||||
--
|
||||
for index in enumeration loop
|
||||
icon (index) := core.import_sprite (core.folder & "/icon/attribute/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
--
|
||||
ui.add_structure_button (icon (index), description (index).name, description (index).text);
|
||||
end loop;
|
||||
--
|
||||
core.echo (core.success, "Successfully configured attribute information in" & natural'image (natural (1_000_000.0 * (core.time - time))) & " microseconds.");
|
||||
end configure;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_points (data : in points; x, y : in integer) is
|
||||
move_x : integer := x;
|
||||
begin
|
||||
@ -51,24 +20,6 @@ package body attribute is
|
||||
end loop;
|
||||
end draw_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.save_point (here, data (index));
|
||||
end loop;
|
||||
end save_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure load_points (here : in core.io.file_type; data : out points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.load_point (here, data (index));
|
||||
end loop;
|
||||
end load_points;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end attribute;
|
||||
|
@ -43,13 +43,8 @@ package attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw_points (data : in points; x, y : in integer);
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points);
|
||||
procedure load_points (here : in core.io.file_type; data : out points);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end attribute;
|
||||
|
@ -140,10 +140,10 @@ package body chad is
|
||||
core.save_point (here, data.mana);
|
||||
core.save_point (here, data.movement);
|
||||
--
|
||||
attribute.save_points (here, data.attributes);
|
||||
skill.save_points (here, data.skills);
|
||||
resource.save_points (here, data.resources);
|
||||
material.save_points (here, data.materials);
|
||||
for index in attribute.enumeration loop core.save_point (here, data.attributes (index)); end loop;
|
||||
for index in skill.enumeration loop core.save_point (here, data.skills (index)); end loop;
|
||||
for index in resource.enumeration loop core.save_point (here, data.resources (index)); end loop;
|
||||
for index in material.enumeration loop core.save_point (here, data.materials (index)); end loop;
|
||||
--
|
||||
for index in equipment.slot loop
|
||||
core.io.write (here, equipment.enumeration'pos (data.equipments (index)));
|
||||
@ -172,10 +172,10 @@ package body chad is
|
||||
core.load_point (here, data.mana);
|
||||
core.load_point (here, data.movement);
|
||||
--
|
||||
attribute.load_points (here, data.attributes);
|
||||
skill.load_points (here, data.skills);
|
||||
resource.load_points (here, data.resources);
|
||||
material.load_points (here, data.materials);
|
||||
for index in attribute.enumeration loop core.load_point (here, data.attributes (index)); end loop;
|
||||
for index in skill.enumeration loop core.load_point (here, data.skills (index)); end loop;
|
||||
for index in resource.enumeration loop core.load_point (here, data.resources (index)); end loop;
|
||||
for index in material.enumeration loop core.load_point (here, data.materials (index)); end loop;
|
||||
--
|
||||
for index in equipment.slot loop
|
||||
core.io.read (here, this); data.equipments (index) := equipment.enumeration'val (this);
|
||||
|
@ -198,12 +198,33 @@ begin
|
||||
|
||||
--~core.play (core.import_song (core.c_string (core.folder & "/song/main_menu.ogg")).index);
|
||||
|
||||
attribute.configure;
|
||||
skill.configure;
|
||||
resource.configure;
|
||||
core.echo (core.comment, "Configuring" & attribute.count'image & " attribute components...");
|
||||
--
|
||||
for index in attribute.enumeration loop
|
||||
attribute.icon (index) := core.import_sprite (core.folder & "/icon/attribute/" & core.lowercase (attribute.enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
|
||||
core.echo (core.comment, "Configuring" & skill.count'image & " skill components...");
|
||||
--
|
||||
for index in skill.enumeration loop
|
||||
skill.icon (index) := core.import_sprite (core.folder & "/icon/skill/" & core.lowercase (skill.enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
|
||||
core.echo (core.comment, "Configuring" & resource.count'image & " resource components...");
|
||||
--
|
||||
for index in resource.enumeration loop
|
||||
resource.icon (index) := core.import_sprite (core.folder & "/icon/resource/" & core.lowercase (resource.enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
|
||||
--~might.configure;
|
||||
magic.configure;
|
||||
material.configure;
|
||||
|
||||
core.echo (core.comment, "Configuring" & material.count'image & " material components...");
|
||||
--
|
||||
for index in material.enumeration loop
|
||||
material.icon (index) := core.import_sprite (core.folder & "/icon/material/" & core.lowercase (material.enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
|
||||
equipment.configure;
|
||||
unit.configure;
|
||||
deity.configure;
|
||||
|
@ -8,22 +8,6 @@ package body material is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure is
|
||||
time : float := 0.0;
|
||||
begin
|
||||
time := core.time;
|
||||
--
|
||||
core.echo (core.comment, "Configuring" & count'image & " material components...");
|
||||
--
|
||||
for index in enumeration loop
|
||||
icon (index) := core.import_sprite (core.folder & "/icon/material/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
--
|
||||
core.echo (core.success, "Successfully configured resource information in" & natural'image (natural (1_000_000.0 * (core.time - time))) & " microseconds.");
|
||||
end configure;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_points (data : in points := (others => (0, 0));
|
||||
x : in integer := 0;
|
||||
y : in integer := 0) is
|
||||
@ -40,24 +24,6 @@ package body material is
|
||||
end loop;
|
||||
end draw_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.save_point (here, data (index));
|
||||
end loop;
|
||||
end save_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure load_points (here : in core.io.file_type; data : out points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.load_point (here, data (index));
|
||||
end loop;
|
||||
end load_points;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end material;
|
||||
|
@ -67,15 +67,10 @@ package material is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw_points (data : in points := (others => (0, 0));
|
||||
x : in integer := 0;
|
||||
y : in integer := 0);
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points);
|
||||
procedure load_points (here : in core.io.file_type; data : out points);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end material;
|
||||
|
@ -8,37 +8,6 @@ package body resource is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure is
|
||||
structure : ui.structure;
|
||||
--
|
||||
time : float := 0.0;
|
||||
begin
|
||||
time := core.time;
|
||||
--
|
||||
core.echo (core.comment, "Configuring" & count'image & " resource components...");
|
||||
--
|
||||
structure.title := "Resource Menu ";
|
||||
structure.toggle := core.signal_r;
|
||||
structure.show := false;
|
||||
structure.center := false;
|
||||
structure.resize := true;
|
||||
structure.x := 60;
|
||||
structure.y := 500;
|
||||
structure.gui_n := count;
|
||||
--
|
||||
ui.add_structure (structure);
|
||||
--
|
||||
for index in enumeration loop
|
||||
icon (index) := core.import_sprite (core.folder & "/icon/resource/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
--
|
||||
ui.add_structure_button (icon (index), description (index).name, description (index).text);
|
||||
end loop;
|
||||
--
|
||||
core.echo (core.success, "Successfully configured resource information in" & natural'image (natural (1_000_000.0 * (core.time - time))) & " microseconds.");
|
||||
end configure;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_points (data : in points; x, y : in integer) is
|
||||
frame_width : constant integer := 4 * core.icon;
|
||||
begin
|
||||
@ -53,24 +22,6 @@ package body resource is
|
||||
end loop;
|
||||
end draw_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.save_point (here, data (index));
|
||||
end loop;
|
||||
end save_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure load_points (here : in core.io.file_type; data : out points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.load_point (here, data (index));
|
||||
end loop;
|
||||
end load_points;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end resource;
|
||||
|
@ -41,13 +41,8 @@ package resource is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw_points (data : in points; x, y : in integer);
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points);
|
||||
procedure load_points (here : in core.io.file_type; data : out points);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end resource;
|
||||
|
@ -8,41 +8,6 @@ package body skill is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure is
|
||||
structure : ui.structure;
|
||||
--
|
||||
time : float := 0.0;
|
||||
begin
|
||||
time := core.time;
|
||||
--
|
||||
core.echo (core.comment, "Configuring" & count'image & " skill components...");
|
||||
--
|
||||
structure.title := "Skill Menu ";
|
||||
structure.toggle := core.signal_s;
|
||||
structure.show := false;
|
||||
structure.center := true;
|
||||
structure.resize := true;
|
||||
structure.x := 80;
|
||||
structure.y := (core.window_height - 320) / 2;
|
||||
structure.gui_n := count + 1;
|
||||
--
|
||||
ui.add_structure (structure);
|
||||
--
|
||||
for index in enumeration loop
|
||||
icon (index) := core.import_sprite (core.folder & "/icon/skill/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
--
|
||||
if enumeration'pos (index) = 9 then
|
||||
ui.add_structure_orient;
|
||||
end if;
|
||||
--
|
||||
ui.add_structure_button (icon (index), description (index).name, description (index).text);
|
||||
end loop;
|
||||
--
|
||||
core.echo (core.success, "Successfully configured skill information in" & natural'image (natural (1_000_000.0 * (core.time - time))) & " microseconds.");
|
||||
end configure;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_points (data : in points := (others => (0, 0));
|
||||
x : in integer := 0;
|
||||
y : in integer := 0) is
|
||||
@ -65,24 +30,6 @@ package body skill is
|
||||
end loop;
|
||||
end draw_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.save_point (here, data (index));
|
||||
end loop;
|
||||
end save_points;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure load_points (here : in core.io.file_type; data : out points) is
|
||||
begin
|
||||
for index in enumeration loop
|
||||
core.load_point (here, data (index));
|
||||
end loop;
|
||||
end load_points;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end skill;
|
||||
|
@ -57,15 +57,10 @@ package skill is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw_points (data : in points := (others => (0, 0));
|
||||
x : in integer := 0;
|
||||
y : in integer := 0);
|
||||
|
||||
procedure save_points (here : in core.io.file_type; data : in points);
|
||||
procedure load_points (here : in core.io.file_type; data : out points);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end skill;
|
||||
|
Loading…
Reference in New Issue
Block a user