diff --git a/source/chad.adb b/source/chad.adb index 569cf74..de36315 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -144,9 +144,18 @@ package body chad is skill.save_points (here, data.skills); resource.save_points (here, data.resources); material.save_points (here, data.materials); - --~equipments : equipment.equip_array; - --~item_count : natural; - --~items : item_array; + -- + for index in equipment.slot loop + core.io.write (here, equipment.enumeration'pos (data.equipments (index))); + end loop; + -- + core.io.write (here, data.item_count); + -- + if data.item_count > 0 then + for index in 0 .. data.item_count - 1 loop + core.io.write (here, equipment.enumeration'pos (data.items (index))); + end loop; + end if; end save_value; ------------------------------------------------------------------------------------------ @@ -167,9 +176,18 @@ package body chad is skill.load_points (here, data.skills); resource.load_points (here, data.resources); material.load_points (here, data.materials); - --~equipments : equipment.equip_array; - --~item_count : natural; - --~items : item_array; + -- + for index in equipment.slot loop + core.io.read (here, this); data.equipments (index) := equipment.enumeration'val (this); + end loop; + -- + core.io.read (here, data.item_count); + -- + if data.item_count > 0 then + for index in 0 .. data.item_count - 1 loop + core.io.read (here, this); data.items (index) := equipment.enumeration'val (this); + end loop; + end if; end load_value; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/source/main.adb b/source/main.adb index 8d4b497..23a6b54 100644 --- a/source/main.adb +++ b/source/main.adb @@ -265,7 +265,7 @@ begin core.cursor_mode := core.cursor_none; - --~world.load ("heyo"); + world.load ("heyo"); ui.active := ui.style'val (faction.enumeration'pos (chad.trait (player.index).kind) + 1); @@ -308,7 +308,7 @@ begin end loop; -- resource.draw_points (world.map.chads (1).resources, (preview_width - 5 * core.icon * resource.count) / 2, core.base); - material.draw_points (world.map.chads (1).materials, core.icon, 2 * core.base); + material.draw_points (world.map.chads (1).materials, (preview_width - core.icon * material.count) / 2, core.base + core.icon); -- signal_list (core.signal_mode).all; --