unit: Added docs for equipment and inventory
authorLukas Krickl <lukas@krickl.dev>
Fri, 13 Jun 2025 11:42:32 +0000 (13:42 +0200)
committerLukas Krickl <lukas@krickl.dev>
Fri, 13 Jun 2025 11:42:32 +0000 (13:42 +0200)
src/defs.s
src/unit.s

index 3dfe9657d1a79ed170093f4e5073ed48e27d1781..bfa1822bb25775bfd631a182bde4c45764c73826 100644 (file)
@@ -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
 .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 
index 0de652afce05e2ee3f617818a36496f4ce32dc8b..e76b495223780208ce122234d10a190471d70ded 100644 (file)
@@ -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