Lots of stuff...
This commit is contained in:
parent
053f0d5cda
commit
85d80f4097
|
|
@ -30,16 +30,17 @@ typedef struct {
|
|||
// DEX affects melee and special attacks, as well as accuracy.
|
||||
/* 0x26 */ u16 dexterity;
|
||||
|
||||
/* 0x28 */ u8 field_0x28[3];
|
||||
/* 0x2B */ u16 item_upper_left;
|
||||
/* 0x2D */ u16 item_upper_right;
|
||||
/* 0x2F */ u16 item_lower_left;
|
||||
/* 0x31 */ u16 item_lower_right;
|
||||
/* 0x33 */ u8 field_0x33;
|
||||
/* 0x34 */ s8 field_0x34;
|
||||
/* 0x35 */ u8 field_0x35;
|
||||
/* 0x36 */ u8 field_0x36;
|
||||
/* 0x37 */ u8 field_0x37;
|
||||
/* 0x28 */ u8 field_0x28;
|
||||
/* 0x29 */ u8 field_0x29;
|
||||
/* 0x2a */ u8 field_0x2a;
|
||||
/* 0x2b */ u16 item_upper_left;
|
||||
/* 0x2d */ u16 item_upper_right;
|
||||
/* 0x30 */ u16 item_lower_left;
|
||||
/* 0x32 */ u16 item_lower_right;
|
||||
/* 0x34 */ u8 field_0x33;
|
||||
/* 0x35 */ s8 field_0x34;
|
||||
/* 0x36 */ u8 field_0x35;
|
||||
/* 0x37 */ u8 field_0x36;
|
||||
} CharacterSlot; // size:0x38
|
||||
|
||||
#endif // __CHARACTER_H__
|
||||
196
include/common.h
196
include/common.h
|
|
@ -1,9 +1,28 @@
|
|||
#ifndef __COMMON_H__
|
||||
#define __COMMON_H__
|
||||
|
||||
#include "PR/os.h"
|
||||
#include "include_asm.h"
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
extern OSDevMgr __osPiDevMgr;
|
||||
extern OSPiHandle *__osCurrentHandle[2];
|
||||
extern OSMesgQueue piEventQueue;
|
||||
extern OSMesg piEventBuf[1];
|
||||
|
||||
extern u32 __osGetCause(void);
|
||||
extern void __osSetCause(u32);
|
||||
extern u32 __osGetCompare(void);
|
||||
extern void __osSetCompare(u32);
|
||||
extern u32 __osGetConfig(void);
|
||||
extern void __osSetConfig(u32);
|
||||
extern void __osSetCount(u32);
|
||||
extern u32 __osGetSR(void);
|
||||
extern void __osSetSR(u32);
|
||||
extern u32 __osDisableInt(void);
|
||||
extern void __osRestoreInt(u32);
|
||||
|
||||
#include "libmus.h"
|
||||
|
||||
typedef u8 bool;
|
||||
|
|
@ -117,7 +136,9 @@ extern u8 __MAIN_NOT_NULL_INF_LOOP;
|
|||
extern OSMesgQueue MQ_800B9C40;
|
||||
extern s8 D_800E918D;
|
||||
|
||||
extern void romCopy(const void* src, void* dst, u32 len);
|
||||
|
||||
extern void romCopy(u32 devAddr, void* dramAddr, u32 size, s32 direction);
|
||||
extern void romCopy_512(const void* src, void* dst, u32 len);
|
||||
extern void __calls_romCopy_8009DA50(u8* src, u8* dst, u32 len);
|
||||
|
||||
extern void Stack__dma_load_loop_new(Stack__dma_load_loop* arg0, OSMesgQueue* arg1, s16 flags);
|
||||
|
|
@ -198,7 +219,7 @@ extern void func_80073164(u8 arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s16 a
|
|||
extern s8 D_800A81F0;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ void* field_0x0;
|
||||
/* 0x00 */ void(*field_0x0)(u32, void*, u32, s32);
|
||||
/* 0x04 */ void* field_0x4;
|
||||
/* 0x08 */ u32 field_0x8;
|
||||
/* 0x0c */ u32 field_0xc;
|
||||
|
|
@ -295,7 +316,7 @@ extern void func_801C8864(void);
|
|||
|
||||
extern u8 D_800A872C;
|
||||
|
||||
extern CharacterSlot CHARACTER_SLOT[];
|
||||
extern CharacterSlot CHARACTER_SLOT[0x64];
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ char* name;
|
||||
|
|
@ -400,12 +421,29 @@ typedef struct {
|
|||
} ClassData; // size:0x48
|
||||
|
||||
extern ClassData CLASS_DATA[];
|
||||
extern ItemId (*FP_CLASS_GET_ITEM[4])(u8, u8);
|
||||
|
||||
extern ItemId class_get_item_lower_right(u8 arg0, u8 arg1);
|
||||
extern char* class_get_ability_front_name(u8 arg0, u8 arg1);
|
||||
extern char* class_get_ability_middle_name(u8 arg0, u8 arg1);
|
||||
extern char* class_get_ability_back_name(u8 arg0, u8 arg1);
|
||||
extern char* class_get_name(u8 arg0, u8 arg1);
|
||||
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 {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
|
|
@ -416,6 +454,148 @@ extern struct {
|
|||
/* 0x5 */ u8 field_0x5;
|
||||
} D_8018ECE4[]; // size:0x6
|
||||
|
||||
extern struct {
|
||||
/* 0x00 */ char battalion_name[0x14];
|
||||
|
||||
/* 0x14 */ s32 field_0x14;
|
||||
/* 0x18 */ s16 field_0x18;
|
||||
/* 0x1a */ u16 field_0x1a;
|
||||
/* 0x1c */ u8 field_0x1c;
|
||||
/* 0x1d */ u8 field_0x1d;
|
||||
/* 0x1e */ u8 field_0x1e;
|
||||
/* 0x1f */ u8 field_0x1f;
|
||||
|
||||
/* 0x20 */ u8 field_0x20;
|
||||
/* 0x21*/ u8 field_0x21;
|
||||
/* 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 */ u8 field_0x2e;
|
||||
/* 0x2f */ u8 field_0x2f;
|
||||
|
||||
/* 0x30 */ u8 field_0x30;
|
||||
/* 0x31 */ u8 field_0x31;
|
||||
/* 0x32 */ u8 field_0x32;
|
||||
/* 0x33 */ u8 field_0x33;
|
||||
/* 0x34 */ u8 field_0x34;
|
||||
/* 0x35 */ u8 field_0x35;
|
||||
/* 0x36 */ u8 field_0x36;
|
||||
/* 0x37 */ u8 field_0x37;
|
||||
/* 0x38 */ u8 field_0x38;
|
||||
/* 0x39 */ u8 field_0x39;
|
||||
/* 0x3a */ u8 field_0x3a;
|
||||
/* 0x3b */ u8 field_0x3b;
|
||||
/* 0x3c */ u8 field_0x3c;
|
||||
/* 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 */ s16 field_0x44;
|
||||
/* 0x46 */ s16 field_0x46;
|
||||
/* 0x48 */ s16 field_0x48;
|
||||
/* 0x4a */ s16 field_0x4a;
|
||||
/* 0x4b */ u8 field_0x4b;
|
||||
/* 0x4c */ s8 field_0x4c;
|
||||
/* 0x4d */ s8 field_0x4d;
|
||||
/* 0x4e */ s8 field_0x4e;
|
||||
/* 0x4f */ u8 field_0x4f;
|
||||
|
||||
/* 0x50 */ u8 field_0x50;
|
||||
/* 0x51 */ u8 field_0x51;
|
||||
/* 0x52 */ u8 field_0x52;
|
||||
/* 0x53 */ u8 field_0x53;
|
||||
/* 0x54 */ u8 field_0x54;
|
||||
/* 0x55 */ u8 field_0x55;
|
||||
/* 0x56 */ u8 field_0x56;
|
||||
/* 0x57 */ u8 field_0x57;
|
||||
/* 0x58 */ u8 field_0x58;
|
||||
/* 0x59 */ u8 field_0x59;
|
||||
/* 0x5a */ u8 field_0x5a;
|
||||
/* 0x5b */ u8 field_0x5b;
|
||||
/* 0x5c */ u8 field_0x5c;
|
||||
/* 0x5d */ u8 field_0x5d;
|
||||
/* 0x5e */ u8 field_0x5e;
|
||||
/* 0x5f */ u8 field_0x5f;
|
||||
|
||||
/* 0x60 */ u8 field_0x60;
|
||||
/* 0x61 */ u8 field_0x61;
|
||||
/* 0x62 */ u8 field_0x62;
|
||||
/* 0x63 */ u8 field_0x63;
|
||||
/* 0x64 */ u8 field_0x64;
|
||||
/* 0x65 */ u8 field_0x65;
|
||||
/* 0x66 */ u8 field_0x66;
|
||||
/* 0x67 */ u8 field_0x67;
|
||||
/* 0x68 */ u8 field_0x68;
|
||||
/* 0x69 */ u8 field_0x69;
|
||||
/* 0x6a */ u8 field_0x6a;
|
||||
/* 0x6b */ u8 field_0x6b;
|
||||
/* 0x6c */ u8 field_0x6c;
|
||||
/* 0x6d */ u8 field_0x6d;
|
||||
/* 0x6e */ u8 field_0x6e;
|
||||
/* 0x6f */ u8 field_0x6f;
|
||||
|
||||
/* 0x70 */ u8 field_0x70;
|
||||
/* 0x71 */ u8 field_0x71;
|
||||
/* 0x72 */ u8 field_0x72;
|
||||
/* 0x73 */ u8 field_0x73;
|
||||
/* 0x74 */ u8 field_0x74;
|
||||
/* 0x75 */ u8 field_0x75;
|
||||
/* 0x76 */ u8 field_0x76;
|
||||
/* 0x77 */ u8 field_0x77;
|
||||
/* 0x78 */ u8 field_0x78;
|
||||
/* 0x79 */ u8 field_0x79;
|
||||
/* 0x7a */ u8 field_0x7a;
|
||||
/* 0x7b */ u8 field_0x7b;
|
||||
/* 0x7c */ u8 field_0x7c;
|
||||
/* 0x7d */ u8 field_0x7d;
|
||||
/* 0x7e */ u8 field_0x7e;
|
||||
/* 0x7f */ u8 field_0x7f;
|
||||
|
||||
/* 0x80 */ u8 field_0x80;
|
||||
/* 0x81 */ u8 field_0x81;
|
||||
/* 0x82 */ u8 field_0x82;
|
||||
/* 0x83 */ u8 field_0x83;
|
||||
/* 0x84 */ u8 field_0x84;
|
||||
/* 0x85 */ u8 field_0x85;
|
||||
/* 0x86 */ u8 field_0x86;
|
||||
/* 0x87 */ u8 field_0x87;
|
||||
/* 0x88 */ u8 field_0x88;
|
||||
/* 0x89 */ u8 field_0x89;
|
||||
/* 0x8a */ u8 field_0x8a;
|
||||
/* 0x8b */ u8 field_0x8b;
|
||||
/* 0x8c */ u8 field_0x8c;
|
||||
/* 0x8d */ u8 field_0x8d;
|
||||
/* 0x8e */ u8 field_0x8e;
|
||||
/* 0x8f */ u8 field_0x8f;
|
||||
|
||||
/* 0x91 */ s8 field_0x91;
|
||||
/* 0x92 */ u8 field_0x92;
|
||||
/* 0x93 */ u8 field_0x93;
|
||||
} __CONTAINS_BATTALION_NAME; // size:0x94
|
||||
|
||||
extern char DEFAULT_BATTALION_NAME[];
|
||||
|
||||
extern musConfig __MUS_CONFIG_8010A710;
|
||||
extern OSIoMesg __MUS_MEM_800B186C[];
|
||||
|
||||
extern void *__virtual_mem_alloc(u32);
|
||||
extern void *__MusIntMemMalloc(s32 size);
|
||||
extern ALHeap D_800B1A70;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
"\t.set at\n" \
|
||||
"\t.end\t"#NAME \
|
||||
);
|
||||
|
||||
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) INCLUDE_ASM_INTERNAL(TYPE, "nonmatchings", FOLDER, NAME, ARGS)
|
||||
#define INCLUDE_ASM_SHIFT(TYPE, FOLDER, NAME, ARGS...) INCLUDE_ASM_INTERNAL(TYPE, "shiftable", FOLDER, NAME, ARGS)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -7,9 +7,33 @@
|
|||
|
||||
typedef u8 ItemType;
|
||||
|
||||
#define ITEM_TYPE_SWORD 1
|
||||
#define ITEM_TYPE_GREATSWORD 2
|
||||
#define ITEM_TYPE_THRUSTING_SWORD 3
|
||||
#define ITEM_TYPE_SWORD 0x01
|
||||
#define ITEM_TYPE_GREATSWORD 0x02
|
||||
#define ITEM_TYPE_THRUSTING_SWORD 0x03
|
||||
#define ITEM_TYPE_1_HANDED_HAMMER 0x04
|
||||
#define ITEM_TYPE_2_HANDED_HAMMER 0x05
|
||||
#define ITEM_TYPE_SHORT_SPEAR 0x06
|
||||
#define ITEM_TYPE_SPEAR 0x07
|
||||
#define ITEM_TYPE_WHIP 0x08
|
||||
#define ITEM_TYPE_CLAW 0x09
|
||||
#define ITEM_TYPE_BOW 0x0a
|
||||
#define ITEM_TYPE_MACE 0x0b
|
||||
#define ITEM_TYPE_STAFF 0x0c
|
||||
#define ITEM_TYPE_DOLL 0x0d
|
||||
#define ITEM_TYPE_SMALL_SHIELD 0x0e
|
||||
#define ITEM_TYPE_SHIELD 0x0f
|
||||
#define ITEM_TYPE_LIGHT_ARMOR 0x10
|
||||
#define ITEM_TYPE_ARMOR 0x11
|
||||
#define ITEM_TYPE_FULL_BODY_ARMOR 0x12
|
||||
#define ITEM_TYPE_ROBE 0x13
|
||||
#define ITEM_TYPE_GARMENT 0x14
|
||||
#define ITEM_TYPE_HELM 0x15
|
||||
#define ITEM_TYPE_HEAD_GEAR 0x16
|
||||
#define ITEM_TYPE_SPELLBOOK 0x17
|
||||
#define ITEM_TYPE_FAN 0x18
|
||||
#define ITEM_TYPE_ACCESSORY 0x19
|
||||
#define ITEM_TYPE_INVALID 0xFF
|
||||
|
||||
|
||||
typedef u16 ItemId;
|
||||
|
||||
|
|
@ -21,7 +45,7 @@ typedef struct {
|
|||
/* 0x05 */ Element element;
|
||||
/* 0x06 */ u8 field_0x6;
|
||||
/* 0x07 */ u8 field_0x7;
|
||||
/* 0x08 */ u16 field_0x8;
|
||||
/* 0x08 */ u16 buy_price;
|
||||
/* 0x0a */ s8 strength;
|
||||
/* 0x0b */ s8 intelligence;
|
||||
/* 0x0c */ s8 agility;
|
||||
|
|
@ -53,9 +77,9 @@ extern char* item_get_name(ItemId index);
|
|||
extern ItemType item_get_type(ItemId index);
|
||||
extern Element item_get_element(ItemId index);
|
||||
|
||||
extern u8 item_get_field_0x2(ItemId index);
|
||||
extern u16 item_get_field_0x4(ItemId index);
|
||||
extern s8 item_get_field_0xc(ItemId index);
|
||||
extern u8 item_get_field_0x6(ItemId index);
|
||||
extern u16 item_get_buy_price(ItemId index);
|
||||
extern s8 item_get_field_0x10(ItemId index);
|
||||
|
||||
extern s8 item_get_strength(ItemId index);
|
||||
extern s8 item_get_vitality(ItemId index);
|
||||
|
|
@ -72,9 +96,16 @@ extern s8 item_get_resistance_water(ItemId index);
|
|||
extern s8 item_get_resistance_holy(ItemId index);
|
||||
extern s8 item_get_resistance_dark(ItemId index);
|
||||
|
||||
extern u32 item_get_field_0x14_b68(ItemId index);
|
||||
extern u32 item_get_field_0x14_b46(ItemId index);
|
||||
extern u32 item_get_field_0x14_b24(ItemId index);
|
||||
extern u32 item_get_field_0x14_b12(ItemId index);
|
||||
extern u8 item_get_field_0x18_b68(ItemId index);
|
||||
extern u8 item_get_field_0x18_b46(ItemId index);
|
||||
extern u8 item_get_field_0x18_b24(ItemId index);
|
||||
extern u8 item_get_field_0x18_b12(ItemId index);
|
||||
|
||||
extern u8 item_get_field_0x19_b68(ItemId index);
|
||||
extern u8 item_get_field_0x19_b46(ItemId index);
|
||||
extern u8 item_get_field_0x19_b24(ItemId index);
|
||||
extern u8 item_get_field_0x19_b12(ItemId index);
|
||||
|
||||
extern u8 item_is_weapon(ItemId index);
|
||||
|
||||
#endif
|
||||
19
splat.yaml
19
splat.yaml
|
|
@ -47,7 +47,7 @@ segments:
|
|||
bss_size: 0x3AE70
|
||||
subsegments:
|
||||
- [0x1060, c, "main"]
|
||||
- [0x4AC0, asm]
|
||||
- [0x4AC0, c]
|
||||
- [0x5FC0, c]
|
||||
- [0x68E0, asm]
|
||||
- [0x8700, asm]
|
||||
|
|
@ -107,7 +107,7 @@ segments:
|
|||
- [0x19EB0, asm]
|
||||
- [0x19FC0, c, "black"]
|
||||
- [0x1A050, c]
|
||||
- [0x1A4F0, asm]
|
||||
- [0x1A4F0, c]
|
||||
- [0x1A5B0, c]
|
||||
- [0x1A660, c]
|
||||
- [0x1A9A0, c]
|
||||
|
|
@ -241,11 +241,14 @@ segments:
|
|||
- [0x29160, asm, "libultra/os/exceptasm"]
|
||||
- [0x29AD0, asm, "libultra/os/disableint"]
|
||||
- [0x29AD0, asm]
|
||||
- [0x29B60, asm]
|
||||
- [0x29BF0, asm]
|
||||
- [0x29E50, asm]
|
||||
- [0x29B60, asm, "libultra/os/setglobalintmask"]
|
||||
- [0x29BF0, asm, "libultra/io/pirawdma"]
|
||||
- [0x29CC0, asm, "libultra/io/pigetcmdq"]
|
||||
- [0x29CE0, asm, "libultra/io/epirawread"]
|
||||
- [0x29E50, asm, "libultra/io/epirawwrite"]
|
||||
- [0x29FC0, asm]
|
||||
- [0x29FE0, asm]
|
||||
- [0x2AA30, asm, "libultra/io/dpsetnextbuf"]
|
||||
- [0x2AAD0, asm, "libultra/os/getcause"]
|
||||
- [0x2AAE0, asm, "libultra/os/getcount"]
|
||||
- [0x2AAF0, asm, "libultra/os/getsr"]
|
||||
|
|
@ -256,6 +259,7 @@ segments:
|
|||
- [0x2AB40, asm, "libultra/io/sp"]
|
||||
- [0x2AB60, asm, "libultra/io/spsetstat"]
|
||||
- [0x2AB70, asm, "libultra/io/spsetpc"]
|
||||
- [0x2ABA0, asm, "libultra/io/sprawdma"]
|
||||
- [0x2AC30, asm]
|
||||
- [0x2AC80, asm]
|
||||
- [0x2ACD0, asm]
|
||||
|
|
@ -268,7 +272,7 @@ segments:
|
|||
- [0x2B790, asm]
|
||||
- [0x2BA70, asm, "libc/xlitob"]
|
||||
- [0x2BCC0, asm]
|
||||
- [0x2C750, asm]
|
||||
- [0x2C750, asm, "libultra/io/dp"]
|
||||
- [0x2C770, asm]
|
||||
- [0x2C790, asm]
|
||||
- [0x2C950, asm]
|
||||
|
|
@ -444,7 +448,7 @@ segments:
|
|||
- [0x49A30, asm]
|
||||
- [0x4D5C0, c]
|
||||
- [0x4EF10, asm]
|
||||
- [0x514B0, asm]
|
||||
- [0x514B0, c]
|
||||
- [0x5AC70, asm]
|
||||
- [0x5AFF0, asm]
|
||||
- [0x5C060, c]
|
||||
|
|
@ -744,6 +748,7 @@ segments:
|
|||
- [0x134830, asm]
|
||||
- [0x1356A0, asm]
|
||||
- [0x139DC0, asm]
|
||||
- [0x13C060, c, "ms/ms_encount"]
|
||||
|
||||
- [0x13C4A0, rodata]
|
||||
- [0x13CCC0, rodata]
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void obInitializePi(void) {
|
|||
}
|
||||
|
||||
/* 1A380 80089F80 */
|
||||
void romCopy(const void *src, void *dst, u32 len) {
|
||||
void romCopy_512(const void *src, void *dst, u32 len) {
|
||||
OSIoMesg dmaIoMesgBuf;
|
||||
|
||||
OSMesgQueue dmaMessageQ;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
#include "common.h"
|
||||
|
||||
extern OSPiHandle* carthandle;
|
||||
|
||||
/* 1A4F0 8008A0F0 */
|
||||
void romCopy(u32 devAddr, void* dramAddr, u32 size, s32 direction) {
|
||||
OSIoMesg dmaIoMesgBuf;
|
||||
OSMesgQueue dmaMessageQ;
|
||||
void* dummyMesg;
|
||||
|
||||
osCreateMesgQueue(&dmaMessageQ, &dummyMesg, 1);
|
||||
|
||||
dmaIoMesgBuf.hdr.pri = OS_MESG_PRI_NORMAL;
|
||||
dmaIoMesgBuf.hdr.retQueue = &dmaMessageQ;
|
||||
dmaIoMesgBuf.dramAddr = dramAddr;
|
||||
dmaIoMesgBuf.devAddr = devAddr;
|
||||
dmaIoMesgBuf.size = size;
|
||||
|
||||
if (direction == OS_READ) {
|
||||
osInvalDCache(dramAddr, size);
|
||||
} else {
|
||||
osWritebackDCache(dramAddr, size);
|
||||
}
|
||||
|
||||
osEPiStartDma(carthandle, &dmaIoMesgBuf, direction);
|
||||
osRecvMesg(&dmaMessageQ, &dummyMesg, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
|
|
@ -15,13 +15,13 @@ void __calls_romCopy_8009DA50(u8* src, u8* dst, u32 len) {
|
|||
if (len < 16) {
|
||||
_dst = dst;
|
||||
// Copy into stack, length aligned to 2 bytes...
|
||||
romCopy(src, _src, (len + 1) & ~1);
|
||||
romCopy_512(src, _src, (len + 1) & ~1);
|
||||
// ...then copy from stack into destination
|
||||
for(len--; len != -1; len--)
|
||||
*_dst++ = *_src++;
|
||||
} else {
|
||||
// Too big to fit in our stack, so just do a regular copy
|
||||
romCopy(src, dst, (len + 1) & ~1);
|
||||
romCopy_512(src, dst, (len + 1) & ~1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ extern u8 D_80104710;
|
|||
/* 3F1B0 800E9C20 */
|
||||
void func_800E9C20(void)
|
||||
{
|
||||
romCopy(&n64_ptr_tables_v2_00_ROM_START, &D_80164770, &n64_ptr_tables_v2_00_ROM_END - &n64_ptr_tables_v2_00_ROM_START);
|
||||
romCopy(&n64_ptr_tables_v2_01_ROM_START, &D_80104710, &n64_ptr_tables_v2_01_ROM_END - &n64_ptr_tables_v2_01_ROM_START);
|
||||
romCopy(&n64_wave_data_ROM_START, &D_8010A760, &n64_wave_data_ROM_END - &n64_wave_data_ROM_START);
|
||||
romCopy_512(&n64_ptr_tables_v2_00_ROM_START, &D_80164770, &n64_ptr_tables_v2_00_ROM_END - &n64_ptr_tables_v2_00_ROM_START);
|
||||
romCopy_512(&n64_ptr_tables_v2_01_ROM_START, &D_80104710, &n64_ptr_tables_v2_01_ROM_END - &n64_ptr_tables_v2_01_ROM_START);
|
||||
romCopy_512(&n64_wave_data_ROM_START, &D_8010A760, &n64_wave_data_ROM_END - &n64_wave_data_ROM_START);
|
||||
|
||||
MusPtrBankInitialize(&D_80164770, &n64_wave_table_00_ROM_START);
|
||||
MusPtrBankInitialize(&D_80104710, &n64_wave_table_01_ROM_START);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
#include "common.h"
|
||||
|
||||
void func_800746C0(void) {
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_800746C8);
|
||||
|
||||
// INCLUDE_ASM(const s32, "4AC0", func_80074834);
|
||||
|
||||
extern void func_80074BF0(u32);
|
||||
extern void func_80074F9C();
|
||||
|
||||
/* 4C34 80074834 */
|
||||
void func_80074834(void) {
|
||||
func_80074F9C();
|
||||
func_80074BF0(0x37081383);
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", buSave);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_800749C0);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80074AD4);
|
||||
|
||||
// INCLUDE_ASM(const s32, "4AC0", func_80074BF0);
|
||||
extern void func_80074C58(void*);
|
||||
|
||||
extern void* __ROM_0_to_8000;
|
||||
extern u8 D_800A83BC;
|
||||
|
||||
/* 4FF0 80074BF0 */
|
||||
void func_80074BF0(u32 arg0) {
|
||||
if (D_800A83BC == 1) {
|
||||
if (arg0 == 0x37081383) {
|
||||
func_80074C58(__ROM_0_to_8000);
|
||||
}
|
||||
D_800A83BC = 0;
|
||||
}
|
||||
if (__ROM_0_to_8000 != NULL) {
|
||||
func_800712C4(__ROM_0_to_8000);
|
||||
__ROM_0_to_8000 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80074C58);
|
||||
|
||||
// INCLUDE_ASM(const s32, "4AC0", func_80074CF0);
|
||||
|
||||
/* 50F0 80074CF0 */
|
||||
void romCopy_256(void* dst, s32 arg1, s32 len) {
|
||||
s32 devAddr;
|
||||
|
||||
if (__ROM_0_to_8000 == 0) {
|
||||
__ROM_0_to_8000 = __virtual_mem_alloc(0x8000);
|
||||
|
||||
for(devAddr = 0; devAddr < 0x8000; devAddr += 0x100) {
|
||||
romCopy(devAddr, __ROM_0_to_8000 + devAddr, 0x100, OS_READ);
|
||||
}
|
||||
}
|
||||
bcopy(__ROM_0_to_8000 + arg1, dst, len);
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80074DA0);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80074F9C);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_8007513C);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075224);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075360);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_8007541C);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075578);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075688);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_8007578C);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075858);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_800758FC);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_8007599C);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075A84);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075AC4);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075B00);
|
||||
|
||||
INCLUDE_ASM(const s32, "4AC0", func_80075B60);
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017B5B0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017B5BC);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017B5E0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", __setup_overlay_79730);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", __setup_overlay_87200);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", __setup_overlay_71280);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017B838);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017B9A8);
|
||||
|
||||
void func_8017BA2C(void) {
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BA34);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BA40);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BB08);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BB34);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BB50);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BD48);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BDC0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BED4);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BF10);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017BFB0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C074);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C24C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C29C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C2FC);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C384);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C4B4);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017C584);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017CBE8);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017D6D0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017E264);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017E80C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017EAE8);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017EC84);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017EE64);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017EF24);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F010);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F114);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F214);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F334);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F36C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F3C0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F408);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F490);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017F554);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017FAF8);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_8017FC28);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_801805B4);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_801805D0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", __handle_name_input);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80180B1C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80180BDC);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80181498);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_801814AC);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80181504);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_801818A0);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80181C2C);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80182578);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_80184130);
|
||||
|
||||
INCLUDE_ASM(const s32, "514B0", func_801841F4);
|
||||
206
src/item.c
206
src/item.c
|
|
@ -61,175 +61,175 @@ INCLUDE_ASM(const s32, "item", func_8016DB30);
|
|||
INCLUDE_ASM(const s32, "item", func_8016DB84);
|
||||
|
||||
/* 43AD8 8016DBD8 */
|
||||
u8 class_get_field_0x2c(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].field_0x2c;
|
||||
u8 class_get_field_0x2c(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].field_0x2c;
|
||||
|
||||
return CLASS_DATA[arg1].field_0x2c;
|
||||
return CLASS_DATA[class].field_0x2c;
|
||||
}
|
||||
|
||||
/* 43B2C 8016DC2C */
|
||||
u8 class_get_ability_front(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].ability_front;
|
||||
u8 class_get_ability_front(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].ability_front;
|
||||
|
||||
return CLASS_DATA[arg1].ability_front;
|
||||
return CLASS_DATA[class].ability_front;
|
||||
}
|
||||
|
||||
/* 43B80 8016DC80 */
|
||||
u8 class_get_ability_front_hitcount(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].ability_front_hitcount;
|
||||
u8 class_get_ability_front_hitcount(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].ability_front_hitcount;
|
||||
|
||||
return CLASS_DATA[arg1].ability_front_hitcount;
|
||||
return CLASS_DATA[class].ability_front_hitcount;
|
||||
}
|
||||
|
||||
/* 43BD4 8016DCD4 */
|
||||
u8 class_get_ability_middle(u8 arg0, u8 arg1) {
|
||||
u8 class_get_ability_middle(u8 portrait, u8 class) {
|
||||
s32 var_v0;
|
||||
|
||||
if (CLASS_DATA[arg0].field_0x45 != arg1) {
|
||||
var_v0 = arg1 * 9;
|
||||
if (CLASS_DATA[portrait].field_0x45 != class) {
|
||||
var_v0 = class * 9;
|
||||
} else {
|
||||
var_v0 = CLASS_DATA[arg0].field_0x45 * 9;
|
||||
var_v0 = CLASS_DATA[portrait].field_0x45 * 9;
|
||||
}
|
||||
return *(&CLASS_DATA->ability_middle + (var_v0 * 8));
|
||||
}
|
||||
|
||||
/* 43C20 8016DD20 */
|
||||
u8 class_get_ability_middle_hitcount(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].ability_middle_hitcount;
|
||||
u8 class_get_ability_middle_hitcount(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].ability_middle_hitcount;
|
||||
|
||||
return CLASS_DATA[arg1].ability_middle_hitcount;
|
||||
return CLASS_DATA[class].ability_middle_hitcount;
|
||||
}
|
||||
|
||||
/* 43C74 8016DD74 */
|
||||
u8 class_get_ability_back(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].ability_back;
|
||||
u8 class_get_ability_back(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].ability_back;
|
||||
|
||||
return CLASS_DATA[arg1].ability_back;
|
||||
return CLASS_DATA[class].ability_back;
|
||||
}
|
||||
|
||||
/* 43CC8 8016DDC8 */
|
||||
u8 class_get_ability_back_hitcount(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].ability_back_hitcount;
|
||||
u8 class_get_ability_back_hitcount(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].ability_back_hitcount;
|
||||
|
||||
return CLASS_DATA[arg1].ability_back_hitcount;
|
||||
return CLASS_DATA[class].ability_back_hitcount;
|
||||
}
|
||||
|
||||
/* 43D1C 8016DE1C */
|
||||
u8 class_get_field_0x4(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].field_0x4;
|
||||
u8 class_get_field_0x4(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].field_0x4;
|
||||
|
||||
return CLASS_DATA[arg1].field_0x4;
|
||||
return CLASS_DATA[class].field_0x4;
|
||||
}
|
||||
|
||||
/* 43D70 8016DE70 */
|
||||
u8 class_get_gender(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].gender;
|
||||
u8 class_get_gender(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].gender;
|
||||
|
||||
return CLASS_DATA[arg1].gender;
|
||||
return CLASS_DATA[class].gender;
|
||||
}
|
||||
|
||||
/* 43DC4 8016DEC4 */
|
||||
u8 class_get_leadership_rank(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].leadership_rank;
|
||||
u8 class_get_leadership_rank(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].leadership_rank;
|
||||
|
||||
return CLASS_DATA[arg1].leadership_rank;
|
||||
return CLASS_DATA[class].leadership_rank;
|
||||
}
|
||||
|
||||
/* 43E18 8016DF18 */
|
||||
u8 class_get_global_flag(u8 arg0, u8 arg1) {
|
||||
u8 class_get_global_flag(u8 portrait, u8 class) {
|
||||
u8 var_a1;
|
||||
|
||||
var_a1 = arg1;
|
||||
if (D_8018ECE4[arg0].field_0x0 & 0x80) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == var_a1) {
|
||||
var_a1 = arg0;
|
||||
var_a1 = class;
|
||||
if (D_8018ECE4[portrait].field_0x0 & 0x80) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == var_a1) {
|
||||
var_a1 = portrait;
|
||||
}
|
||||
}
|
||||
return D_8018ECE4[var_a1].field_0x0 & 0x3F;
|
||||
}
|
||||
|
||||
/* 43E88 8016DF88 */
|
||||
ItemId class_get_item_upper_left(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].item_upper_left;
|
||||
ItemId class_get_item_upper_left(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].item_upper_left;
|
||||
|
||||
return CLASS_DATA[arg1].item_upper_left;
|
||||
return CLASS_DATA[class].item_upper_left;
|
||||
}
|
||||
|
||||
/* 43EDC 8016DFDC */
|
||||
ItemId class_get_item_upper_right(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].item_upper_right;
|
||||
ItemId class_get_item_upper_right(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].item_upper_right;
|
||||
|
||||
return CLASS_DATA[arg1].item_upper_right;
|
||||
return CLASS_DATA[class].item_upper_right;
|
||||
}
|
||||
|
||||
/* 43F30 8016E030 */
|
||||
ItemId class_get_item_lower_left(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].item_lower_left;
|
||||
ItemId class_get_item_lower_left(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].item_lower_left;
|
||||
|
||||
return CLASS_DATA[arg1].item_lower_left;
|
||||
return CLASS_DATA[class].item_lower_left;
|
||||
}
|
||||
|
||||
/* 43F84 8016E084 */
|
||||
ItemId class_get_item_lower_right(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].item_lower_right;
|
||||
ItemId class_get_item_lower_right(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].item_lower_right;
|
||||
|
||||
return CLASS_DATA[arg1].item_lower_right;
|
||||
return CLASS_DATA[class].item_lower_right;
|
||||
}
|
||||
|
||||
/* 43FD8 8016E0D8 */
|
||||
char* class_get_ability_front_name(u8 arg0, u8 arg1) {
|
||||
char* class_get_ability_front_name(u8 portrait, u8 class) {
|
||||
u8 var_v0;
|
||||
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1) {
|
||||
var_v0 = CLASS_DATA[arg0].ability_front;
|
||||
if (CLASS_DATA[portrait].field_0x45 == class) {
|
||||
var_v0 = CLASS_DATA[portrait].ability_front;
|
||||
} else {
|
||||
var_v0 = CLASS_DATA[arg1].ability_front;
|
||||
var_v0 = CLASS_DATA[class].ability_front;
|
||||
}
|
||||
|
||||
return ability_get_name(var_v0);
|
||||
}
|
||||
|
||||
/* 44040 8016E140 */
|
||||
char* class_get_ability_middle_name(u8 arg0, u8 arg1) {
|
||||
char* class_get_ability_middle_name(u8 portrait, u8 class) {
|
||||
// Possible a C macro wrapping?
|
||||
do {
|
||||
char* ret = ability_get_name(CLASS_DATA[arg1].ability_middle);
|
||||
char* ret = ability_get_name(CLASS_DATA[class].ability_middle);
|
||||
return ret;
|
||||
} while(0);
|
||||
}
|
||||
|
||||
/* 44074 8016E174 */
|
||||
char* class_get_ability_back_name(u8 arg0, u8 arg1) {
|
||||
char* class_get_ability_back_name(u8 portrait, u8 class) {
|
||||
u8 var_v0;
|
||||
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1) {
|
||||
var_v0 = CLASS_DATA[arg0].ability_back;
|
||||
if (CLASS_DATA[portrait].field_0x45 == class) {
|
||||
var_v0 = CLASS_DATA[portrait].ability_back;
|
||||
} else {
|
||||
var_v0 = CLASS_DATA[arg1].ability_back;
|
||||
var_v0 = CLASS_DATA[class].ability_back;
|
||||
}
|
||||
|
||||
return ability_get_name(var_v0);
|
||||
}
|
||||
|
||||
/* 440DC 8016E1DC */
|
||||
char* class_get_name(u8 arg0, u8 arg1) {
|
||||
if (CLASS_DATA[arg0].field_0x45 == arg1)
|
||||
return CLASS_DATA[arg0].name;
|
||||
char* class_get_name(u8 portrait, u8 class) {
|
||||
if (CLASS_DATA[portrait].field_0x45 == class)
|
||||
return CLASS_DATA[portrait].name;
|
||||
|
||||
return CLASS_DATA[arg1].name;
|
||||
return CLASS_DATA[class].name;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -319,17 +319,17 @@ Element item_get_element(ItemId index) {
|
|||
}
|
||||
|
||||
/* 45514 8016F614 */
|
||||
u8 item_get_field_0x2(ItemId index) {
|
||||
u8 item_get_field_0x6(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x6;
|
||||
}
|
||||
|
||||
/* 4552C 8016F62C */
|
||||
u16 item_get_field_0x4(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x8;
|
||||
u16 item_get_buy_price(ItemId index) {
|
||||
return ITEM_DATA[index].buy_price;
|
||||
}
|
||||
|
||||
/* 45544 8016F644 */
|
||||
s8 item_get_field_0xc(ItemId index) {
|
||||
s8 item_get_field_0x10(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x10;
|
||||
}
|
||||
|
||||
|
|
@ -435,36 +435,64 @@ s8 item_get_resistance_dark(ItemId index) {
|
|||
}
|
||||
|
||||
/* 457E4 8016F8E4 */
|
||||
u32 item_get_field_0x14_b68(ItemId index) {
|
||||
u8 item_get_field_0x18_b68(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x18 >> 6;
|
||||
}
|
||||
|
||||
/* 45800 8016F900 */
|
||||
u32 item_get_field_0x14_b46(ItemId index) {
|
||||
u8 item_get_field_0x18_b46(ItemId index) {
|
||||
return (ITEM_DATA[index].field_0x18 >> 4) & 3;
|
||||
}
|
||||
|
||||
/* 45820 8016F920 */
|
||||
u32 item_get_field_0x14_b24(ItemId index) {
|
||||
u8 item_get_field_0x18_b24(ItemId index) {
|
||||
return (ITEM_DATA[index].field_0x18 >> 2) & 3;
|
||||
}
|
||||
|
||||
/* 45840 8016F940 */
|
||||
u32 item_get_field_0x14_b12(ItemId index) {
|
||||
u8 item_get_field_0x18_b12(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x18 & 3;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F95C);
|
||||
/* 4585C 8016F95C */
|
||||
u8 item_get_field_0x19_b68(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x19 >> 6;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F978);
|
||||
/* 45878 8016F978 */
|
||||
u8 item_get_field_0x19_b46(ItemId index) {
|
||||
return (ITEM_DATA[index].field_0x19 >> 4) & 3;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F998);
|
||||
/* 45898 8016F998 */
|
||||
u8 item_get_field_0x19_b24(ItemId index) {
|
||||
return (ITEM_DATA[index].field_0x19 >> 2) & 3;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F9B8);
|
||||
/* 458B8 8016F9B8 */
|
||||
u8 item_get_field_0x19_b12(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x19 & 3;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F9D4);
|
||||
/* 458D4 8016F9D4 */
|
||||
u8 func_8016F9D4(ItemId index) {
|
||||
return ITEM_DATA[index].field_0x1a >> 7;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016F9F0);
|
||||
/* 458F0 8016F9F0 */
|
||||
u8 item_is_weapon(ItemId index) {
|
||||
s32 type = ITEM_DATA[index].type;
|
||||
|
||||
if (type != 0) {
|
||||
if (type < ITEM_TYPE_SMALL_SHIELD) {
|
||||
return 1;
|
||||
}
|
||||
if (type == ITEM_TYPE_FAN) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "item", func_8016FA34);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ INCLUDE_ASM(const s32, "lha", func_8007AB7C);
|
|||
|
||||
INCLUDE_ASM(const s32, "lha", func_8007ABAC);
|
||||
|
||||
extern char D_800AE038;
|
||||
extern char STR_UNPACK_ERROR_UNSUPPORTED_FORMAT[];
|
||||
extern OSMesgQueue MQ_800AF320;
|
||||
|
||||
/* B030 8007AC30 */
|
||||
|
|
@ -43,7 +43,7 @@ void UnpackProc(void) {
|
|||
Unpack(sp10->field_0x10, sp10->field_0xc);
|
||||
osSendMesg(sp10->field_0x4, sp10, 1);
|
||||
} else {
|
||||
__some_logging(&D_800AE038, sp10->field_0x8);
|
||||
__some_logging(STR_UNPACK_ERROR_UNSUPPORTED_FORMAT, sp10->field_0x8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "overlay_101CE0/ms/ms_encount", __ms_encount);
|
||||
|
|
@ -1,3 +1,15 @@
|
|||
FP_CLASS_GET_ITEM = 0x8018B494; // rom:0x61394 size:0x10
|
||||
|
||||
__restore_zombie_hp_to_max = 0x80219EEC; // rom:0x1B75DC
|
||||
|
||||
D_800AEDB0 = 0x800AEDB0; // size:0xC
|
||||
|
||||
guRandom = 0x80092A60; // rom:0x22E60
|
||||
|
||||
__ms_encount = 0x801E7920; // rom:0x13C060
|
||||
|
||||
__something_calc_vit_str = 0x801F2484; // rom:0x235754
|
||||
|
||||
// Set by calls to bzero
|
||||
D_80193BC0 = 0x80193BC0; // size:0x15E0
|
||||
D_801971F0 = 0x801971F0; // size:0x4E2
|
||||
|
|
@ -7,10 +19,12 @@ D_80196B00 = 0x80196B00; // size:0x458
|
|||
D_80193AB0 = 0x80193AB0; // size:0xA
|
||||
D_801977D8 = 0x801977D8; // size:0x1E
|
||||
D_80197710 = 0x80197710; // size:0x64
|
||||
D_80196A58 = 0x80196A58; // size:0x94
|
||||
__CONTAINS_BATTALION_NAME = 0x80196A58; // size:0x94
|
||||
|
||||
DEFAULT_BATTALION_NAME = 0x80190EFC; // rom:0x66DFC type:asciz
|
||||
|
||||
STR_UNPACK_ERROR_UNSUPPORTED_FORMAT = 0x800AE038; // rom:0x3E438
|
||||
|
||||
STR_SERIFU_POSITION_X_ERROR = 0x8019E20C; // rom:0xEAF8C type:asciz
|
||||
|
||||
STR_IS_THE_NAME_ACCEPTABLE = 0x8018FDC4; // rom:0x65CC4 type:asciz
|
||||
|
|
@ -80,9 +94,9 @@ ITEM_DATA = 0x8018C40C; // size:0x20
|
|||
item_get_name = 0x8016F5B0;
|
||||
item_get_type = 0x8016F5C8;
|
||||
item_get_element = 0x8016F5E0;
|
||||
item_get_field_0x2 = 0x8016F614;
|
||||
item_get_field_0x4 = 0x8016F62C;
|
||||
item_get_field_0xc = 0x8016F644;
|
||||
item_get_field_0x6 = 0x8016F614;
|
||||
item_get_buy_price = 0x8016F62C;
|
||||
item_get_field_0x10 = 0x8016F644;
|
||||
item_get_strength = 0x8016F65C;
|
||||
item_get_vitality = 0x8016F6AC;
|
||||
item_get_intelligence = 0x8016F6FC;
|
||||
|
|
@ -96,10 +110,18 @@ item_get_resistance_earth = 0x8016F884;
|
|||
item_get_resistance_water = 0x8016F89C;
|
||||
item_get_resistance_holy = 0x8016F8B4;
|
||||
item_get_resistance_dark = 0x8016F8CC;
|
||||
item_get_field_0x14_b68 = 0x8016F8E4;
|
||||
item_get_field_0x14_b46 = 0x8016F900;
|
||||
item_get_field_0x14_b24 = 0x8016F920;
|
||||
item_get_field_0x14_b12 = 0x8016F940;
|
||||
|
||||
item_get_field_0x18_b68 = 0x8016F8E4;
|
||||
item_get_field_0x18_b46 = 0x8016F900;
|
||||
item_get_field_0x18_b24 = 0x8016F920;
|
||||
item_get_field_0x18_b12 = 0x8016F940;
|
||||
|
||||
item_get_field_0x19_b68 = 0x8016F95C;
|
||||
item_get_field_0x19_b46 = 0x8016F978;
|
||||
item_get_field_0x19_b24 = 0x8016F998;
|
||||
item_get_field_0x19_b12 = 0x8016F9B8;
|
||||
|
||||
item_is_weapon = 0x8016F9F0; // rom:0x458F0
|
||||
|
||||
FP_ITEM_GET_RESISTANCE = 0x801EF2B0; // rom:0xDBD10
|
||||
FP_ITEM_GET_ALL_STATS = 0x801EF298; // rom:0xDBCF8
|
||||
|
|
@ -213,7 +235,7 @@ __add_0x594284 = 0x8009DD28;
|
|||
|
||||
__log_lha_error = 0x8007BB90;
|
||||
|
||||
CartRomHandle = 0x800C4C50;
|
||||
CartRomHandle = 0x800C4C50; // size:0x2A
|
||||
osCartRomInit = 0x8008BD30;
|
||||
PTR_CART_ROM_HANDLE = 0x800E7A20;
|
||||
|
||||
|
|
@ -533,7 +555,14 @@ __get_compared_osTvType = 0x8016CD30;
|
|||
__inc_compared_osTvType = 0x8016CD5C;
|
||||
__compared_osTvType = 0x80187021;
|
||||
|
||||
romCopy = 0x80089F80;
|
||||
// Taken from http://n64devkit.square7.ch/n64man/os/osEPiStartDma.htm
|
||||
romCopy = 0x8008A0F0; // rom:0x1A4F0
|
||||
carthandle = 0x800E79AC;
|
||||
|
||||
__ROM_0_to_8000 = 0x800A83B8; // rom:0x387B8
|
||||
|
||||
romCopy_256 = 0x80074CF0; // rom:0x50F0
|
||||
romCopy_512 = 0x80089F80;
|
||||
|
||||
__GLOBAL_CONTROLLER_DATA = 0x0800C4BF0; // size:0x18
|
||||
__GLOBAL_CONTROLLER_DATA_COPY = 0x0800AEE78; // size:0x18
|
||||
|
|
@ -749,6 +778,14 @@ __osPiAccessQueueEnabled = 0x800AA440; // type:u32
|
|||
__osPiAccessQueue = 0x800C4CC8;
|
||||
__osPiDevMgr = 0x800AA400; // size:0x1C
|
||||
|
||||
osEPiRawReadIo = 0x800998E0;
|
||||
osEPiRawWriteIo = 0x80099A50;
|
||||
|
||||
__osResetGlobalIntMask = 0x800997A0;
|
||||
__osSetGlobalIntMask = 0x80099760;
|
||||
|
||||
__osDpDeviceBusy = 0x8009C350;
|
||||
|
||||
siAccessBuf = 0x800C35A0;
|
||||
|
||||
__osSiRawStartDma = 0x800946C0;
|
||||
|
|
|
|||
|
|
@ -13,16 +13,16 @@ class ItemData(NamedTuple):
|
|||
name: int
|
||||
item_type: int
|
||||
element: int
|
||||
field_0x2: int
|
||||
field_0x3: int
|
||||
field_0x4: int
|
||||
field_0x6: int
|
||||
field_0x7: int
|
||||
buy_price: int
|
||||
strength: int
|
||||
intelligence: int
|
||||
agility: int
|
||||
dexterity: int
|
||||
vitality: int
|
||||
mem : int
|
||||
field_0xc: int
|
||||
field_0x10: int
|
||||
res_strike: int
|
||||
res_wind: int
|
||||
res_fire: int
|
||||
|
|
@ -87,7 +87,7 @@ def item_read(index):
|
|||
|
||||
if __name__ == "__main__":
|
||||
MAX_ITEM = 279
|
||||
for i in range(0, 5):
|
||||
for i in range(1, MAX_ITEM):
|
||||
item = item_read(i)
|
||||
|
||||
print(f"Name: {item_get_name(item.name)} ({i})")
|
||||
|
|
|
|||
Loading…
Reference in New Issue