-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#include <stdint.h> | ||
|
||
uint32_t get_npc_model_offset(uint32_t item_id) { | ||
// These values are offsets that are used to calculate the char* that contains the name of the .bin | ||
// file (see: Npc/ directory in the rom) of the NPC being spawned. The exact way it is used is: | ||
// char *npc = 20ddf40 + (<return_value> * 0xC) | ||
switch (item_id) { | ||
case 0x1: // key | ||
return 0xC; | ||
case 0x3: // oshus sword | ||
return 0xE3; | ||
} | ||
// TODO: calculate values for rest of items | ||
// These values are offsets that are used to calculate the char* that contains | ||
// the name of the .bin | ||
// file (see: Npc/ directory in the rom) of the NPC being spawned. The exact | ||
// way it is used is: | ||
// char *npc = 20ddf40 + (<return_value> * 0xC) | ||
switch (item_id) { | ||
case 0x1: // key | ||
return 0xC; | ||
case 0x3: // oshus sword | ||
return 0xE3; | ||
} | ||
// TODO: calculate values for rest of items | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters