From b355ad4db86bec7b34d8c8b62864d3948ac5fde8 Mon Sep 17 00:00:00 2001 From: xolatile Date: Sat, 1 Jun 2024 11:56:18 -0400 Subject: [PATCH] Finished renaming values and traits for now... --- source/chad.adb | 12 ++++++------ source/chad.ads | 16 ++++++++-------- source/construction.ads | 2 +- source/effect.adb | 4 ++-- source/effect.ads | 6 +++--- source/equipment.ads | 2 +- source/magic.ads | 2 +- source/main.adb | 2 +- source/world.adb | 20 ++++++++++---------- source/world.ads | 6 +++--- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/source/chad.adb b/source/chad.adb index 8ebc854..8dff503 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -35,7 +35,7 @@ package body chad is ------------------------------------------------------------------------------------------ - procedure draw (player : in value; x, y : in integer) is + procedure draw (player : in information; x, y : in integer) is begin core.draw (sprite (player.index), x, y, state => player.state); -- @@ -46,7 +46,7 @@ package body chad is ------------------------------------------------------------------------------------------ - procedure draw_data (player : in value; x, y : in integer) is + procedure draw_data (player : in information; x, y : in integer) is offset : constant integer := 8; begin ui.draw_frame ("--", x, y, 360 + 2 * offset, 96 + 2 * offset); @@ -92,14 +92,14 @@ package body chad is ------------------------------------------------------------------------------------------ - procedure draw_menu (player : in value; x, y : in integer) is + procedure draw_menu (player : in information; x, y : in integer) is begin null; end draw_menu; ------------------------------------------------------------------------------------------ - function take_equipment_item (player : in out value; item : in equipment.enumeration) return boolean is + function take_equipment_item (player : in out information; item : in equipment.enumeration) return boolean is use type equipment.enumeration; begin if player.item_count = item_limit or item = equipment.none then @@ -129,7 +129,7 @@ package body chad is ------------------------------------------------------------------------------------------ - procedure save_value (here : in core.io.file_type; data : in value) is + procedure save_value (here : in core.io.file_type; data : in information) is begin core.io.write (here, enumeration'pos (data.index)); core.io.write (here, core.animation'pos (data.state)); @@ -160,7 +160,7 @@ package body chad is ------------------------------------------------------------------------------------------ - procedure load_value (here : in core.io.file_type; data : out value) is + procedure load_value (here : in core.io.file_type; data : out information) is this : integer; begin core.io.read (here, this); data.index := enumeration'val (this); diff --git a/source/chad.ads b/source/chad.ads index 3ec9b3b..089d327 100644 --- a/source/chad.ads +++ b/source/chad.ads @@ -26,7 +26,7 @@ package chad is type item_array is array (0 .. item_limit - 1) of equipment.enumeration; - type value is record + type information is record index : enumeration; state : core.animation; x : integer; @@ -43,7 +43,7 @@ package chad is items : item_array; end record; - type value_array is array (natural range <>) of value; + type informations is array (natural range <>) of information; ------------------------------------------------------------------------------------------ @@ -62,17 +62,17 @@ package chad is procedure configure; - procedure draw (player : in value; x, y : in integer); - procedure draw_data (player : in value; x, y : in integer); - procedure draw_menu (player : in value; x, y : in integer); + procedure draw (player : in information; x, y : in integer); + procedure draw_data (player : in information; x, y : in integer); + procedure draw_menu (player : in information; x, y : in integer); - function take_equipment_item (player : in out value; item : in equipment.enumeration) return boolean; + function take_equipment_item (player : in out information; item : in equipment.enumeration) return boolean; procedure draw_pepe; procedure draw_alice; - procedure save_value (here : in core.io.file_type; data : in value); - procedure load_value (here : in core.io.file_type; data : out value); + procedure save_value (here : in core.io.file_type; data : in information); + procedure load_value (here : in core.io.file_type; data : out information); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/source/construction.ads b/source/construction.ads index 3cfde6d..64a07bf 100644 --- a/source/construction.ads +++ b/source/construction.ads @@ -19,7 +19,7 @@ package construction is kind : faction.enumeration; price : resource.price; frames : integer; - evoke : effect.value; + evoke : effect.information; end record; ------------------------------------------------------------------------------------------ diff --git a/source/effect.adb b/source/effect.adb index a37c3a9..9ab5c02 100644 --- a/source/effect.adb +++ b/source/effect.adb @@ -10,8 +10,8 @@ package body effect is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - procedure apply (data : in value) is - player : chad.value renames world.map.chads (1); + procedure apply (data : in information) is + player : chad.information renames world.map.chads (1); -- attribute_index : attribute.enumeration; skill_index : skill.enumeration; diff --git a/source/effect.ads b/source/effect.ads index 9671a95..2a67adc 100644 --- a/source/effect.ads +++ b/source/effect.ads @@ -16,7 +16,7 @@ package effect is ------------------------------------------------------------------------------------------ - type value is record + type information is record kind : enumeration; modifier : integer; amount : integer; @@ -24,11 +24,11 @@ package effect is duration : natural; end record; - none : constant value := (idle, 0, 0, false, 0); + none : constant information := (idle, 0, 0, false, 0); ------------------------------------------------------------------------------------------ - procedure apply (data : in value); + procedure apply (data : in information); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/source/equipment.ads b/source/equipment.ads index 954543f..ce2fdf0 100644 --- a/source/equipment.ads +++ b/source/equipment.ads @@ -47,7 +47,7 @@ package equipment is kind : slot; attributes : attribute.bonus; favor : faction.enumeration; - evoke : effect.value; + evoke : effect.information; end record; type equip_array is array (slot) of enumeration; diff --git a/source/magic.ads b/source/magic.ads index 7dfb710..064e04e 100644 --- a/source/magic.ads +++ b/source/magic.ads @@ -35,7 +35,7 @@ package magic is name : core.short_string; kind : school; level : level_limit; - evoke : effect.value; + evoke : effect.information; text : core.long_string; end record; diff --git a/source/main.adb b/source/main.adb index c8dada8..ff7e93c 100644 --- a/source/main.adb +++ b/source/main.adb @@ -118,7 +118,7 @@ procedure main is preview_height : integer := 0; text_box_height : integer := 0; - player : chad.value := ( + player : chad.information := ( index => chad.ada, state => core.idle, x => 0, diff --git a/source/world.adb b/source/world.adb index dae81f1..5811827 100644 --- a/source/world.adb +++ b/source/world.adb @@ -400,15 +400,15 @@ package body world is map.chad_limit := chad_limit; map.chad_count := 0; -- - map.tiles := new integer_matrix (0 .. map.width - 1, 0 .. map.height - 1); - map.clips := new boolean_matrix (0 .. map.width - 1, 0 .. map.height - 1); - map.views := new boolean_matrix (0 .. map.width - 1, 0 .. map.height - 1); - map.landmarks := new entity_array (1 .. landmark_limit); - map.locations := new entity_array (1 .. location_limit); - map.constructions := new entity_array (1 .. construction_limit); - map.equipments := new entity_array (1 .. equipment_limit); - map.units := new entity_array (1 .. unit_limit); - map.chads := new chad.value_array (1 .. map.chad_limit); + map.tiles := new integer_matrix (0 .. map.width - 1, 0 .. map.height - 1); + map.clips := new boolean_matrix (0 .. map.width - 1, 0 .. map.height - 1); + map.views := new boolean_matrix (0 .. map.width - 1, 0 .. map.height - 1); + map.landmarks := new entity_array (1 .. landmark_limit); + map.locations := new entity_array (1 .. location_limit); + map.constructions := new entity_array (1 .. construction_limit); + map.equipments := new entity_array (1 .. equipment_limit); + map.units := new entity_array (1 .. unit_limit); + map.chads := new chad.informations (1 .. map.chad_limit); -- for x in 0 .. width - 1 loop for y in 0 .. height - 1 loop @@ -749,7 +749,7 @@ package body world is ------------------------------------------------------------------------------------------ - procedure add_chad (data : in chad.value) is + procedure add_chad (data : in chad.information) is begin core.echo_when (map.chad_count = map.chad_limit, core.failure, "Can't add new chad, limit reached."); core.increment (map.chad_count); diff --git a/source/world.ads b/source/world.ads index ee0de5c..9d75c10 100644 --- a/source/world.ads +++ b/source/world.ads @@ -40,7 +40,7 @@ package world is clip : boolean; frames : integer; states : integer; - evoke : effect.value; + evoke : effect.information; end record; type entity_description is record @@ -67,7 +67,7 @@ package world is constructions : access entity_array; equipments : access entity_array; units : access entity_array; - chads : access chad.value_array; + chads : access chad.informations; end record; ------------------------------------------------------------------------------------------ @@ -161,7 +161,7 @@ package world is function map_is_revealed return boolean; - procedure add_chad (data : in chad.value); + procedure add_chad (data : in chad.information); procedure resource_cheat_1; procedure resource_cheat_2;