Added new docs

Identified more functions
Before I do something stupid...
Build: OK
This commit is contained in:
Ogre 2023-09-15 00:28:31 +02:00
parent 85d80f4097
commit 140710227f
12 changed files with 17489 additions and 169 deletions

17213
docs/cyricz-walkthrough.txt Normal file

File diff suppressed because it is too large Load Diff

30
include/ability.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef __ABILITY_H__
#define __ABILITY_H__
#include <ultra64.h>
#include "element.h"
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ u8 field_0x4;
/* 0x05 */ Element element;
/* 0x06 */ u8 field_0x6;
/* 0x07 */ u8 field_0x7;
/* 0x08 */ u8 field_0x8;
/* 0x09 */ u8 field_0x9;
/* 0x0a */ u8 field_0xa;
/* 0x0b */ u8 field_0xb;
/* 0x0c */ u8 field_0xc;
/* 0x0d */ u8 field_0xd;
/* 0x0e */ u8 field_0xe;
/* 0x0f */ u8 field_0xf;
} AbilityData; // size:0x10
extern AbilityData ABILITY_DATA[];
extern char* ability_get_name(u8 index);
extern Element ability_get_element(u8 index, u16 arg1, u16 arg2, s32 arg3, u16 arg4);
#endif // __ABILITY_H__

View File

@ -32,15 +32,16 @@ typedef struct {
/* 0x28 */ u8 field_0x28; /* 0x28 */ u8 field_0x28;
/* 0x29 */ u8 field_0x29; /* 0x29 */ u8 field_0x29;
/* 0x2a */ u8 field_0x2a; /* 0x2a */ u16 item_upper_left;
/* 0x2b */ u16 item_upper_left; /* 0x2c */ u16 item_upper_right;
/* 0x2d */ u16 item_upper_right; /* 0x2e */ u16 item_lower_left;
/* 0x30 */ u16 item_lower_left; /* 0x30 */ u16 item_lower_right;
/* 0x32 */ u16 item_lower_right; /* 0x32 */ u8 field_0x32;
/* 0x34 */ u8 field_0x33; /* 0x33 */ s8 field_0x33;
/* 0x35 */ s8 field_0x34; /* 0x34 */ u8 field_0x34;
/* 0x36 */ u8 field_0x35; /* 0x35 */ u8 field_0x35;
/* 0x37 */ u8 field_0x36; /* 0x36 */ u8 field_0x36;
/* 0x37 */ u8 field_0x37;
} CharacterSlot; // size:0x38 } CharacterSlot; // size:0x38
#endif // __CHARACTER_H__ #endif // __CHARACTER_H__

107
include/class.h Normal file
View File

@ -0,0 +1,107 @@
#ifndef __CLASS_H__
#define __CLASS_H__
#include <ultra64.h>
#include "item.h"
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ u8 field_0x4;
/* 0x05 */ u8 gender;
/* 0x06 */ u8 leadership_rank;
/* 0x07 */ u8 field_0x7;
/* 0x08 */ u16 max_hp;
/* 0x0a */ u8 field_0xa;
/* 0x0b */ u8 field_0xb;
/* 0x0c */ u16 strength;
/* 0x0e */ u8 field_0xe;
/* 0x0f */ u8 field_0xf;
/* 0x10 */ u16 vitality;
/* 0x12 */ u8 field_0x12;
/* 0x13 */ u8 field_0x13;
/* 0x14 */ u16 intelligence;
/* 0x16 */ u8 field_0x16;
/* 0x17 */ u8 field_0x17;
/* 0x18 */ u16 mentality;
/* 0x1a */ u8 field_0x1a;
/* 0x1b */ u8 field_0x1b;
/* 0x1c */ u16 agility;
/* 0x1e */ u8 field_0x1e;
/* 0x1f */ u8 field_0x1f;
/* 0x20 */ u16 dexterity;
/* 0x22 */ u8 field_0x22;
/* 0x23 */ u8 field_0x23;
/* 0x24 */ u8 field_0x24;
/* 0x25 */ u8 field_0x25;
/* 0x26 */ u8 field_0x26;
/* 0x27 */ u8 field_0x27;
/* 0x28 */ u8 field_0x28;
/* 0x29 */ u8 field_0x29;
/* 0x2a */ u8 field_0x2a;
/* 0x2b */ u8 field_0x2b;
/* 0x2c */ u8 field_0x2c;
/* 0x2d */ u8 field_0x2d;
/* 0x2e */ u16 item_upper_left;
/* 0x30 */ u16 item_upper_right;
/* 0x32 */ u16 item_lower_left;
/* 0x34 */ u16 item_lower_right;
/* 0x36 */ u8 field_0x36;
// The ability which is used when the unit is placed in the front row.
/* 0x37 */ u8 ability_front;
// The amount of hits the unit performs when placed in the front row.
/* 0x38 */ u8 ability_front_hitcount;
// The ability which is used when the unit is placed in the middle row.
/* 0x39 */ u8 ability_middle;
// The amount of hits the unit performs when placed in the middle row.
/* 0x3a */ u8 ability_middle_hitcount;
// The ability which is used when the unit is placed in the back row.
/* 0x3b */ u8 ability_back;
// The amount of hits the unit performs when placed in the back row.
/* 0x3c */ u8 ability_back_hitcount;
/* 0x3d */ u8 field_0x3d;
/* 0x3e */ u8 field_0x3e;
/* 0x3f */ u8 field_0x3f;
/* 0x40 */ u8 field_0x40;
/* 0x41 */ u8 field_0x41;
/* 0x42 */ u8 field_0x42;
/* 0x43 */ u8 field_0x43;
/* 0x44 */ u8 field_0x44;
/* 0x45 */ u8 field_0x45;
/* 0x46 */ u8 element;
/* 0x47 */ u8 max_items;
} ClassData; // size:0x48
extern ClassData CLASS_DATA[];
extern ItemId (*FP_CLASS_GET_ITEM[4])(u8, u8);
extern u8 class_get_field_0x2c(u8 portrait, u8 class);
extern u8 class_get_ability_front(u8 portrait, u8 class);
extern u8 class_get_ability_front_hitcount(u8 portrait, u8 class);
extern u8 class_get_ability_middle(u8 portrait, u8 class);
extern u8 class_get_ability_middle_hitcount(u8 portrait, u8 class);
extern u8 class_get_ability_back(u8 portrait, u8 class);
extern u8 class_get_ability_back_hitcount(u8 portrait, u8 class);
extern u8 class_get_field_0x4(u8 portrait, u8 class);
extern u8 class_get_gender(u8 portrait, u8 class);
extern u8 class_get_leadership_rank(u8 portrait, u8 class);
extern u8 class_get_global_flag(u8 portrait, u8 class);
extern ItemId class_get_item_upper_left(u8 portrait, u8 class);
extern ItemId class_get_item_upper_right(u8 portrait, u8 class);
extern ItemId class_get_item_lower_left(u8 portrait, u8 class);
extern ItemId class_get_item_lower_right(u8 portrait, u8 class);
extern char* class_get_ability_front_name(u8 portrait, u8 class);
extern char* class_get_ability_middle_name(u8 portrait, u8 class);
extern char* class_get_ability_back_name(u8 portrait, u8 class);
extern char* class_get_name(u8 portrait, u8 class);
#endif // __CLASS_H__

View File

@ -36,6 +36,8 @@ typedef u8 bool;
#include "character.h" #include "character.h"
#include "item.h" #include "item.h"
#include "ability.h"
#include "class.h"
typedef struct { typedef struct {
/* 0x00 */ s32 field_0x0; /* 0x00 */ s32 field_0x0;
@ -318,132 +320,10 @@ extern u8 D_800A872C;
extern CharacterSlot CHARACTER_SLOT[0x64]; extern CharacterSlot CHARACTER_SLOT[0x64];
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ u8 field_0x0;
/* 0x05 */ Element element;
/* 0x06 */ u8 field_0x2;
/* 0x07 */ u8 field_0x3;
/* 0x08 */ u8 field_0x4;
/* 0x09 */ u8 field_0x5;
/* 0x0a */ u8 field_0x6;
/* 0x0b */ u8 field_0x7;
/* 0x0c */ u8 field_0x8;
/* 0x0d */ u8 field_0x9;
/* 0x0e */ u8 field_0xa;
/* 0x0f */ u8 field_0xb;
} AbilityData; // size:0x10
extern AbilityData ABILITY_DATA[];
extern char* ability_get_name(u8 index);
extern Element ability_get_element(u8 index, u16 arg1, u16 arg2, s32 arg3, u16 arg4);
extern u16 func_8016FA34(u16, u16, u16, u16);
extern u16 func_8016FB50(u16, u16, u16, u16);
#define RANK_NONE 0 #define RANK_NONE 0
#define RANK_UNIT_LEADER 1 #define RANK_UNIT_LEADER 1
#define RANK_LEGION_LEADER 2 #define RANK_LEGION_LEADER 2
typedef struct {
/* 0x00 */ char* name;
/* 0x04 */ u8 field_0x4;
/* 0x05 */ u8 gender;
/* 0x06 */ u8 leadership_rank;
/* 0x07 */ u8 field_0x7;
/* 0x08 */ u16 field_0x8;
/* 0x0a */ u8 field_0xa;
/* 0x0b */ u8 field_0xb;
/* 0x0c */ u16 field_0xc;
/* 0x0e */ u8 field_0xe;
/* 0x0f */ u8 field_0xf;
/* 0x10 */ u16 field_0x10;
/* 0x12 */ u8 field_0x12;
/* 0x13 */ u8 field_0x13;
/* 0x14 */ u16 field_0x14;
/* 0x16 */ u8 field_0x16;
/* 0x17 */ u8 field_0x17;
/* 0x18 */ u16 field_0x18;
/* 0x1a */ u8 field_0x1a;
/* 0x1b */ u8 field_0x1b;
/* 0x1c */ u16 field_0x1c;
/* 0x1e */ u8 field_0x1e;
/* 0x1f */ u8 field_0x1f;
/* 0x20 */ u16 field_0x20;
/* 0x22 */ u8 field_0x22;
/* 0x23 */ u8 field_0x23;
/* 0x24 */ u8 field_0x24;
/* 0x25 */ u8 field_0x25;
/* 0x26 */ u8 field_0x26;
/* 0x27 */ u8 field_0x27;
/* 0x28 */ u8 field_0x28;
/* 0x29 */ u8 field_0x29;
/* 0x2a */ u8 field_0x2a;
/* 0x2b */ u8 field_0x2b;
/* 0x2c */ u8 field_0x2c;
/* 0x2d */ u8 field_0x2d;
/* 0x2e */ u16 item_upper_left;
/* 0x30 */ u16 item_upper_right;
/* 0x32 */ u16 item_lower_left;
/* 0x34 */ u16 item_lower_right;
/* 0x36 */ u8 field_0x36;
// The ability which is used when the unit is placed in the front row.
/* 0x37 */ u8 ability_front;
// The amount of hits the unit performs when placed in the front row.
/* 0x38 */ u8 ability_front_hitcount;
// The ability which is used when the unit is placed in the middle row.
/* 0x39 */ u8 ability_middle;
// The amount of hits the unit performs when placed in the middle row.
/* 0x3a */ u8 ability_middle_hitcount;
// The ability which is used when the unit is placed in the back row.
/* 0x3b */ u8 ability_back;
// The amount of hits the unit performs when placed in the back row.
/* 0x3c */ u8 ability_back_hitcount;
/* 0x3d */ u8 field_0x3d;
/* 0x3e */ u8 field_0x3e;
/* 0x3f */ u8 field_0x3f;
/* 0x40 */ u8 field_0x40;
/* 0x41 */ u8 field_0x41;
/* 0x42 */ u8 field_0x42;
/* 0x43 */ u8 field_0x43;
/* 0x44 */ u8 field_0x44;
/* 0x45 */ u8 field_0x45;
/* 0x46 */ u8 field_0x46;
/* 0x47 */ u8 max_items;
} ClassData; // size:0x48
extern ClassData CLASS_DATA[];
extern ItemId (*FP_CLASS_GET_ITEM[4])(u8, u8);
extern u8 class_get_field_0x2c(u8 portrait, u8 class);
extern u8 class_get_ability_front(u8 portrait, u8 class);
extern u8 class_get_ability_front_hitcount(u8 portrait, u8 class);
extern u8 class_get_ability_middle(u8 portrait, u8 class);
extern u8 class_get_ability_middle_hitcount(u8 portrait, u8 class);
extern u8 class_get_ability_back(u8 portrait, u8 class);
extern u8 class_get_ability_back_hitcount(u8 portrait, u8 class);
extern u8 class_get_field_0x4(u8 portrait, u8 class);
extern u8 class_get_gender(u8 portrait, u8 class);
extern u8 class_get_leadership_rank(u8 portrait, u8 class);
extern u8 class_get_global_flag(u8 portrait, u8 class);
extern ItemId class_get_item_upper_left(u8 portrait, u8 class);
extern ItemId class_get_item_upper_right(u8 portrait, u8 class);
extern ItemId class_get_item_lower_left(u8 portrait, u8 class);
extern ItemId class_get_item_lower_right(u8 portrait, u8 class);
extern char* class_get_ability_front_name(u8 portrait, u8 class);
extern char* class_get_ability_middle_name(u8 portrait, u8 class);
extern char* class_get_ability_back_name(u8 portrait, u8 class);
extern char* class_get_name(u8 portrait, u8 class);
extern struct { extern struct {
/* 0x0 */ u8 field_0x0; /* 0x0 */ u8 field_0x0;
@ -596,6 +476,9 @@ extern void *__MusIntMemMalloc(s32 size);
extern ALHeap D_800B1A70; extern ALHeap D_800B1A70;
extern void __character_initialise(CharacterSlot *arg0, u8 level);
extern u16 character_get_item(CharacterSlot* character, u8 slot);
extern void __character_handle_levelup(CharacterSlot *slot);
#endif #endif

View File

@ -25,4 +25,4 @@ typedef u8 Element;
#define ELEMENT_INVALID 0xFF #define ELEMENT_INVALID 0xFF
#endif #endif // __ELEMENT_H__

View File

@ -70,8 +70,9 @@ typedef struct {
/* 0x1f */ u8 field_0x1f; /* 0x1f */ u8 field_0x1f;
} ItemData; // size:0x20 } ItemData; // size:0x20
extern char* ITEM_TYPE_NAMES[];
extern ItemData ITEM_DATA[]; extern ItemData ITEM_DATA[];
extern s8 (*FP_ITEM_GET_RESISTANCE[])(ItemId index); extern s8 (*FP_ITEM_GET_RESISTANCE[])(ItemId index);
extern char* item_get_name(ItemId index); extern char* item_get_name(ItemId index);
extern ItemType item_get_type(ItemId index); extern ItemType item_get_type(ItemId index);
@ -106,6 +107,10 @@ extern u8 item_get_field_0x19_b46(ItemId index);
extern u8 item_get_field_0x19_b24(ItemId index); extern u8 item_get_field_0x19_b24(ItemId index);
extern u8 item_get_field_0x19_b12(ItemId index); extern u8 item_get_field_0x19_b12(ItemId index);
extern u8 item_is_weapon(ItemId index); extern u8 item_get_field_0x1a_b7(ItemId index);
extern u8 item_is_weapon(ItemId index);
extern ItemId item_get_first_weapon(ItemId arg0, ItemId arg1, ItemId arg2, ItemId arg3);
extern ItemId item_get_first_spellbook(ItemId arg0, ItemId arg1, ItemId arg2, ItemId arg3);
#endif #endif

View File

@ -440,6 +440,7 @@ segments:
- [0x42C30, c] - [0x42C30, c]
- [0x42C90, asm] - [0x42C90, asm]
- [0x43100, c, "item"] - [0x43100, c, "item"]
- [0x45AE0, c]
- [0x45CB0, asm] - [0x45CB0, asm]
- [0x46090, asm] - [0x46090, asm]
- [0x49510, asm] - [0x49510, asm]

5
src/45AE0.c Normal file
View File

@ -0,0 +1,5 @@
#include "common.h"
INCLUDE_ASM(const s32, "45AE0", func_8016FBE0);
INCLUDE_ASM(const s32, "45AE0", func_8016FCEC);

View File

@ -1,4 +1,6 @@
#include "common.h" #include "common.h"
#include "element.h"
#include "item.h"
INCLUDE_ASM(const s32, "item", func_8016D200); INCLUDE_ASM(const s32, "item", func_8016D200);
@ -232,10 +234,34 @@ char* class_get_name(u8 portrait, u8 class) {
return CLASS_DATA[class].name; return CLASS_DATA[class].name;
} }
/* 44130 8016E230 */
u8 class_get_ability(u8 portrait, u8 class, u8 row)
{
if (CLASS_DATA[portrait].field_0x45 != class)
portrait = class;
INCLUDE_ASM(const s32, "item", func_8016E230); if (row == 0) {
return CLASS_DATA[portrait].ability_front != 0xFF ? CLASS_DATA[portrait].ability_front : CLASS_DATA[class].ability_front;
} else if (row == 1) {
return CLASS_DATA[portrait].ability_middle != 0xFF ? CLASS_DATA[portrait].ability_middle : CLASS_DATA[class].ability_middle;
} else {
return CLASS_DATA[portrait].ability_back != 0xFF ? CLASS_DATA[portrait].ability_back : CLASS_DATA[class].ability_back;
}
}
INCLUDE_ASM(const s32, "item", func_8016E338); /* 44238 8016E338 */
u8 class_get_ability_hitcount(u8 portrait, u8 class, u8 row) {
if (CLASS_DATA[portrait].field_0x45 != class)
portrait = class;
if (row == 0) {
return CLASS_DATA[portrait].ability_front_hitcount != 0xFF ? CLASS_DATA[portrait].ability_front_hitcount : CLASS_DATA[class].ability_front_hitcount;
} else if (row == 1) {
return CLASS_DATA[portrait].ability_middle_hitcount != 0xFF ? CLASS_DATA[portrait].ability_middle_hitcount : CLASS_DATA[class].ability_middle_hitcount;
} else {
return CLASS_DATA[portrait].ability_back_hitcount != 0xFF ? CLASS_DATA[portrait].ability_back_hitcount : CLASS_DATA[class].ability_back_hitcount;
}
}
/* 44340 8016E440 */ /* 44340 8016E440 */
char* ability_get_name(u8 index) { char* ability_get_name(u8 index) {
@ -244,7 +270,7 @@ char* ability_get_name(u8 index) {
/* 44358 8016E458 */ /* 44358 8016E458 */
u8 func_8016E458(u8 index) { u8 func_8016E458(u8 index) {
return ABILITY_DATA[index].field_0x0; return ABILITY_DATA[index].field_0x4;
} }
/* 44370 8016E470 */ /* 44370 8016E470 */
@ -254,14 +280,14 @@ Element ability_get_element(u8 index, u16 arg1, u16 arg2, s32 arg3, u16 arg4) {
if (ABILITY_DATA[index].element != ELEMENT_INVALID && ABILITY_DATA[index].element != 0xF) if (ABILITY_DATA[index].element != ELEMENT_INVALID && ABILITY_DATA[index].element != 0xF)
return ABILITY_DATA[index].element; return ABILITY_DATA[index].element;
if (ABILITY_DATA[index].field_0x0 == 3) { if (ABILITY_DATA[index].field_0x4 == 3) {
item_index = func_8016FB50(arg1, arg2, arg3, arg4); item_index = item_get_first_spellbook(arg1, arg2, arg3, arg4);
} else { } else {
item_index = func_8016FA34(arg1, arg2, arg3, arg4); item_index = item_get_first_weapon(arg1, arg2, arg3, arg4);
} }
if (item_index == 0) if (item_index == 0)
return 0; return ELEMENT_PHYSICAL;
return item_get_element(item_index); return item_get_element(item_index);
} }
@ -271,11 +297,39 @@ INCLUDE_ASM(const s32, "item", func_8016E50C);
INCLUDE_ASM(const s32, "item", func_8016EA34); INCLUDE_ASM(const s32, "item", func_8016EA34);
INCLUDE_ASM(const s32, "item", func_8016EAEC); /* 449EC 8016EAEC */
u16 character_get_item(CharacterSlot* character, u8 slot) {
u16 item_id;
INCLUDE_ASM(const s32, "item", func_8016EBA4); item_id = 0;
switch(slot) {
case 0:
item_id = character->item_upper_left;
break;
case 1:
item_id = character->item_upper_right;
break;
INCLUDE_ASM(const s32, "item", func_8016F11C); case 2:
item_id = character->item_lower_left;
break;
case 3:
item_id = character->item_lower_right;
break;
}
if (item_id == 0) {
item_id = FP_CLASS_GET_ITEM[slot](character->portrait, character->class);
}
return item_id;
}
INCLUDE_ASM(const s32, "item", __character_handle_levelup);
INCLUDE_ASM(const s32, "item", __character_initialise);
INCLUDE_ASM(const s32, "item", func_8016F4E0); INCLUDE_ASM(const s32, "item", func_8016F4E0);
@ -288,12 +342,12 @@ INCLUDE_ASM(const s32, "item", func_8016F540);
INCLUDE_ASM(const s32, "item", func_8016F560); INCLUDE_ASM(const s32, "item", func_8016F560);
/* 45480 8016F580 */ /* 45480 8016F580 */
u8 func_8016F580(ItemId index) { u8 item_get_field_0x1b(ItemId index) {
return ITEM_DATA[index].field_0x1b; return ITEM_DATA[index].field_0x1b;
} }
/* 45498 8016F598 */ /* 45498 8016F598 */
u8 func_8016F598(ItemId index) { u8 item_get_field_0x1c(ItemId index) {
return ITEM_DATA[index].field_0x1c; return ITEM_DATA[index].field_0x1c;
} }
@ -475,29 +529,42 @@ u8 item_get_field_0x19_b12(ItemId index) {
} }
/* 458D4 8016F9D4 */ /* 458D4 8016F9D4 */
u8 func_8016F9D4(ItemId index) { u8 item_get_field_0x1a_b7(ItemId index) {
return ITEM_DATA[index].field_0x1a >> 7; return ITEM_DATA[index].field_0x1a >> 7;
} }
/* 458F0 8016F9F0 */ /* 458F0 8016F9F0 */
u8 item_is_weapon(ItemId index) { bool item_is_weapon(ItemId index) {
s32 type = ITEM_DATA[index].type; s32 type = ITEM_DATA[index].type;
if (type != 0) { if (type != 0) {
if (type < ITEM_TYPE_SMALL_SHIELD) { if (type < ITEM_TYPE_SMALL_SHIELD) {
return 1; return true;
} }
if (type == ITEM_TYPE_FAN) { if (type == ITEM_TYPE_FAN) {
return 1; return true;
} }
} }
return false;
}
INCLUDE_ASM(const s32, "item", item_get_first_weapon);
/* 45A50 8016FB50 */
ItemId item_get_first_spellbook(ItemId arg0, ItemId arg1, ItemId arg2, ItemId arg3) {
if (ITEM_DATA[arg0].type == ITEM_TYPE_SPELLBOOK)
return arg0;
if (ITEM_DATA[arg1].type == ITEM_TYPE_SPELLBOOK)
return arg1;
if (ITEM_DATA[arg2].type == ITEM_TYPE_SPELLBOOK)
return arg2;
if (ITEM_DATA[arg3].type == ITEM_TYPE_SPELLBOOK)
return arg3;
return 0; return 0;
} }
INCLUDE_ASM(const s32, "item", func_8016FA34);
INCLUDE_ASM(const s32, "item", func_8016FB50);
INCLUDE_ASM(const s32, "item", func_8016FBE0);
INCLUDE_ASM(const s32, "item", func_8016FCEC);

View File

@ -10,6 +10,10 @@ __ms_encount = 0x801E7920; // rom:0x13C060
__something_calc_vit_str = 0x801F2484; // rom:0x235754 __something_calc_vit_str = 0x801F2484; // rom:0x235754
__character_initialise = 0x8016F11C; // rom:0x4501C
character_get_item = 0x8016EAEC; // rom:0x449EC
__character_handle_levelup = 0x8016EBA4; // rom:0x44AA4
// Set by calls to bzero // Set by calls to bzero
D_80193BC0 = 0x80193BC0; // size:0x15E0 D_80193BC0 = 0x80193BC0; // size:0x15E0
D_801971F0 = 0x801971F0; // size:0x4E2 D_801971F0 = 0x801971F0; // size:0x4E2
@ -82,15 +86,19 @@ class_get_ability_front_name = 0x8016E0D8; // rom:0x43FD8
class_get_ability_middle_name = 0x8016E140; // rom:0x44040 class_get_ability_middle_name = 0x8016E140; // rom:0x44040
class_get_ability_back_name = 0x8016E174; // rom:0x44074 class_get_ability_back_name = 0x8016E174; // rom:0x44074
class_get_name = 0x8016E1DC; // rom:0x440DC class_get_name = 0x8016E1DC; // rom:0x440DC
class_get_ability = 0x8016E230; // rom:0x44130
class_get_ability_hitcount = 0x8016E338; // rom:0x44238
ITEM_TYPE_NAMES = 0x802130A4; // rom:0x164214 type:char*
FORMATION_COMMAND_NAMES = 0x8021315C; // rom:0x1642CC type:char* FORMATION_COMMAND_NAMES = 0x8021315C; // rom:0x1642CC type:char*
ABILITY_DATA = 0x8018AA7C; // rom:0x6097C size:0x10 ABILITY_DATA = 0x8018AA7C; // rom:0x6097C size:0x10
ability_get_name = 0x8016E440; ability_get_name = 0x8016E440;
ability_get_element = 0x8016E470; ability_get_element = 0x8016E470;
ITEM_TYPE_NAMES = 0x802130A4; // rom:0x164214 type:char*
ITEM_DATA = 0x8018C40C; // size:0x20 ITEM_DATA = 0x8018C40C; // size:0x20
item_get_field_0x1b = 0x8016F580; // rom:0x45480
item_get_field_0x1c = 0x8016F598; // rom:0x45498
item_get_name = 0x8016F5B0; item_get_name = 0x8016F5B0;
item_get_type = 0x8016F5C8; item_get_type = 0x8016F5C8;
item_get_element = 0x8016F5E0; item_get_element = 0x8016F5E0;
@ -110,18 +118,18 @@ item_get_resistance_earth = 0x8016F884;
item_get_resistance_water = 0x8016F89C; item_get_resistance_water = 0x8016F89C;
item_get_resistance_holy = 0x8016F8B4; item_get_resistance_holy = 0x8016F8B4;
item_get_resistance_dark = 0x8016F8CC; item_get_resistance_dark = 0x8016F8CC;
item_get_field_0x18_b68 = 0x8016F8E4; item_get_field_0x18_b68 = 0x8016F8E4;
item_get_field_0x18_b46 = 0x8016F900; item_get_field_0x18_b46 = 0x8016F900;
item_get_field_0x18_b24 = 0x8016F920; item_get_field_0x18_b24 = 0x8016F920;
item_get_field_0x18_b12 = 0x8016F940; item_get_field_0x18_b12 = 0x8016F940;
item_get_field_0x19_b68 = 0x8016F95C; item_get_field_0x19_b68 = 0x8016F95C;
item_get_field_0x19_b46 = 0x8016F978; item_get_field_0x19_b46 = 0x8016F978;
item_get_field_0x19_b24 = 0x8016F998; item_get_field_0x19_b24 = 0x8016F998;
item_get_field_0x19_b12 = 0x8016F9B8; item_get_field_0x19_b12 = 0x8016F9B8;
item_get_field_0x1a_b7 = 0x8016F9D4; // rom:0x458D4
item_is_weapon = 0x8016F9F0; // rom:0x458F0 item_is_weapon = 0x8016F9F0; // rom:0x458F0
item_get_first_weapon = 0x8016FA34; // rom:0x45934
item_get_first_spellbook = 0x8016FB50; // rom:0x45A50
FP_ITEM_GET_RESISTANCE = 0x801EF2B0; // rom:0xDBD10 FP_ITEM_GET_RESISTANCE = 0x801EF2B0; // rom:0xDBD10
FP_ITEM_GET_ALL_STATS = 0x801EF298; // rom:0xDBCF8 FP_ITEM_GET_ALL_STATS = 0x801EF298; // rom:0xDBCF8

View File

@ -19,25 +19,25 @@ class ClassData(NamedTuple):
# None, Unit Leader, Legion Leader # None, Unit Leader, Legion Leader
leadership_rank: int leadership_rank: int
field_0x7: int field_0x7: int
field_0x8: int max_hp: int
field_0xa: int field_0xa: int
field_0xb: int field_0xb: int
field_0xc: int strength: int
field_0xe: int field_0xe: int
field_0xf: int field_0xf: int
field_0x10: int vitality: int
field_0x12: int field_0x12: int
field_0x13: int field_0x13: int
field_0x14: int intelligence: int
field_0x16: int field_0x16: int
field_0x17: int field_0x17: int
field_0x18: int mentality: int
field_0x1a: int field_0x1a: int
field_0x1b: int field_0x1b: int
field_0x1c: int agility: int
field_0x1e: int field_0x1e: int
field_0x1f: int field_0x1f: int
field_0x20: int dexterity: int
field_0x22: int field_0x22: int
field_0x23: int field_0x23: int
field_0x24: int field_0x24: int
@ -74,8 +74,8 @@ class ClassData(NamedTuple):
field_0x43: int field_0x43: int
field_0x44: int field_0x44: int
field_0x45: int field_0x45: int
field_0x46: int
element: int
max_items: int max_items: int
def read_class(index): def read_class(index):