Skip to content

Commit

Permalink
doc: Start adding information about item box and item format
Browse files Browse the repository at this point in the history
  • Loading branch information
SiD3W4y committed Apr 12, 2020
1 parent 278b1a4 commit f4cce2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/functions.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
--- Important functions ---

0x0884ea1c: int decrypt_data(void *state, void *data, int size)
0x0884ea1c: int decrypt_data(void *global_state, void *data, int size)
Decrypts data from buffer and returns decrypted bytes count.

0x9a6b130: Function handling damage computation to entity (applies all
kinds of modifiers to damage stored in entity+0x3b8). Function
is huge af.

0x9ac8af0: Indirectly calling function handling monster state (vtable+0x88)

0x88d72a4: <unk> give_item(void* player_state, u16 object_id, s16 object_count)
Adds count objects to player inventory
8 changes: 8 additions & 0 deletions doc/objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The player state contains informations relating to the player while in-game.
+0x2e4: Player HP (u16)
+0x3b8: Damage to apply during frame (converted to negative before call to
Player::deal_damage)
+0x55d: Index into item box

--[ Player vtable

Expand Down Expand Up @@ -54,3 +55,10 @@ vtable[58] = Called on hit by function 0x9ad4c58
- 7 16 X: Falling from the sky
- 5 0/3 X: Instant death
- 0 0x25 X: Sleep


--[ Itembox state (?)

0x89cc558: Pointer to itembox (u32*)

+0x390: Start of item array, composed of tuples (object_id: u16, object_count: s16)

0 comments on commit f4cce2c

Please sign in to comment.