From: Lukas Krickl Date: Fri, 13 Jun 2025 11:42:32 +0000 (+0200) Subject: unit: Added docs for equipment and inventory X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=82dfc0fb4f139b4db4f46c39674e270ed3b480e1;p=gbrg%2F.git unit: Added docs for equipment and inventory --- diff --git a/src/defs.s b/src/defs.s index 3dfe965..bfa1822 100644 --- a/src/defs.s +++ b/src/defs.s @@ -96,6 +96,9 @@ ; lite stat with max value only ; used for stats that are not intended to ; decrease regularly + ; stat lite's real value is + ; calculated using an actor + ; and stat_calc_nnn calls #define stat_lite_size 1 ; status effect @@ -166,10 +169,19 @@ .de act_speed, stat_lite_size ; attributes + ; describes skills ; inventory - + ; stores items, for all actors but player + ; there are 4 inventory slots. + ; if the actor is type player a special inventory + ; used instead + ; equipment + ; stores all items equiped + ; for all actors but players there are 4 eqipment slots + ; if the actor is type player a special + ; equipment slot is used instead ; status effects .de act_effect, EFFECTS_MAX * effect_size diff --git a/src/unit.s b/src/unit.s index 0de652a..e76b495 100644 --- a/src/unit.s +++ b/src/unit.s @@ -798,6 +798,20 @@ unit_dice_display_set: pop_all ret + ; TODO: + ; returns: + ; hl: inventory ptr + ; a: inventory length +unit_get_inventory: + ret + + ; TODO: + ; returns: + ; hl: equipment ptr + ; a: equipment length +unit_get_equipment: + ret + unit_demo_1: st_def 0x00, unit_demo_1_init, st_unit_idle act_def ACT_T_DEMO_1, 0, 2, 2, 0