mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-23 22:19:53 +00:00
z_en_item00 (#78)
* z_en_item00 WIP 17/21 match, rest close to matching * Split .rodata for z_en_item00 * Item00 documentation, some misc cleanup * Minor cleanup * Fixup for z_collision_check * Address feedback * Delete old file * Fix bad merge
This commit is contained in:
parent
623b6d5318
commit
b22e26dbd8
@ -509,27 +509,27 @@ void EnAObj_Update1(ActorEnAObj* this, GlobalContext* ctxt);
|
||||
void EnAObj_Update2(ActorEnAObj* this, GlobalContext* ctxt);
|
||||
void EnAObj_Update(ActorEnAObj* this, GlobalContext* ctxt);
|
||||
void EnAObj_Draw(ActorEnAObj* this, GlobalContext* ctxt);
|
||||
void EnItem00_UpdateForNewObjectId(ActorEnItem00* this, GlobalContext* ctxt, f32* puParm3, f32* pfParm4);
|
||||
void EnItem00_Init(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void EnItem00_Destroy(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void func_800A63A8(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void func_800A640C(ActorEnItem00* this);
|
||||
// void func_800A6650(void);
|
||||
// void func_800A6780(void);
|
||||
void EnItem00_Update1(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void EnItem00_Update(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void EnItem00_Draw(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void EnItem00_DrawRupee(ActorEnItem00* this, GlobalContext* ctxt);
|
||||
void EnItem00_DrawSprite(ActorEnItem00* actor, GlobalContext* ctxt);
|
||||
void EnItem00_DrawHeartContainer(ActorEnItem00* actor, GlobalContext* ctxt);
|
||||
// void EnItem00_DrawHeartPiece(void);
|
||||
// void func_800A7650(void);
|
||||
void func_800A7730(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
|
||||
// void func_800A7AD4(void);
|
||||
// void func_800A7D28(void);
|
||||
s32 func_800A8150(s32 params);
|
||||
// void func_800A817C(void);
|
||||
// void func_800A81A4(void);
|
||||
// void EnItem00_SetObject(EnItem00* this, GlobalContext* globalCtx, f32* shadowOffset, f32* shadowScale);
|
||||
// void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
// void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
// void EnItem00_WaitForHeartObject(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void func_800A640C(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void func_800A6650(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void func_800A6780(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void func_800A6A40(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
// void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
// void EnItem00_DrawRupee(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void EnItem00_DrawSprite(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void EnItem00_DrawHeartContainer(EnItem00* this, GlobalContext* globalCtx);
|
||||
// void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx);
|
||||
// s16 func_800A7650(s16 dropId);
|
||||
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
|
||||
Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 params);
|
||||
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params);
|
||||
s32 func_800A8150(s32 index);
|
||||
s32 func_800A817C(s32 index);
|
||||
s32 func_800A81A4(GlobalContext* globalCtx, s32 a1, s32 a2);
|
||||
void func_800A81F0(EffectBlure* this, Vec3f* p1, Vec3f* p2);
|
||||
// void func_800A8514(void);
|
||||
void EffectBlure_Initcommon(EffectBlure* params);
|
||||
@ -786,7 +786,7 @@ void func_800B78B8(GlobalContext* ctxt, Actor* actor, f32 uParm3, f32 uParm4, f3
|
||||
s32 func_800B7FE0(f32* param_1, f32* param_2, f32* param_3, GraphicsContext* gCtxt);
|
||||
// void func_800B8018(void);
|
||||
void func_800B8050(Actor* actor, GlobalContext* ctxt, s32 iParm3);
|
||||
// void func_800B8118(void);
|
||||
void func_800B8118(Actor* actor, GlobalContext* ctxt, s32 iParm3);
|
||||
// void func_800B81E0(void);
|
||||
UNK_PTR func_800B8214(PosRot* param_1, Actor* param_2);
|
||||
f32* func_800B8248(PosRot* param_1, ActorPlayer* param_2);
|
||||
@ -809,7 +809,7 @@ s32 func_800B8708(GlobalContext* ctxt);
|
||||
void func_800B8898(GlobalContext* ctxt, Actor* actor, UNK_PTR param_3, UNK_PTR param_4);
|
||||
// void func_800B8934(void);
|
||||
u32 Actor_HasParent(Actor* actor, GlobalContext* ctxt);
|
||||
// UNK_TYPE4 func_800B8A1C(Actor* actor, GlobalContext* ctxt, s32 iParm3, f32 fParm4, f32 param_5);
|
||||
UNK_TYPE4 func_800B8A1C(Actor* actor, GlobalContext* ctxt, s32 iParm3, f32 fParm4, f32 param_5);
|
||||
// void func_800B8B84(void);
|
||||
// void func_800B8BB0(void);
|
||||
// void func_800B8BD0(void);
|
||||
@ -1601,7 +1601,7 @@ void func_800EE0CC(Actor* actor, GlobalContext* ctxt, s32 iParm3);
|
||||
u32 func_800EE200(GlobalContext* ctxt, u32 uParm2);
|
||||
u32 func_800EE29C(GlobalContext* ctxt, u32 uParm2);
|
||||
u32 func_800EE2F4(GlobalContext* ctxt);
|
||||
void func_800EE320(GlobalContext* ctxt, s16 index);
|
||||
void GetItem_Draw(GlobalContext* ctxt, s16 index);
|
||||
void func_800EE364(GlobalContext* ctxt, s16 index);
|
||||
void func_800EE400(GlobalContext* ctxt, s16 index);
|
||||
void func_800EE5FC(GlobalContext* ctxt, s16 index);
|
||||
@ -2130,7 +2130,7 @@ void Interface_ChangeAlpha(u16 param_1);
|
||||
// void func_80112B40(void);
|
||||
// void func_80112BE4(void);
|
||||
// void func_80112C0C(void);
|
||||
u32 func_80112E80(GlobalContext* ctxt, u8 param_2);
|
||||
u32 Item_Give(GlobalContext* ctxt, u8 param_2);
|
||||
// void func_801143CC(void);
|
||||
// void func_80114978(void);
|
||||
// void func_801149A0(void);
|
||||
@ -2148,7 +2148,7 @@ u32 func_80112E80(GlobalContext* ctxt, u8 param_2);
|
||||
// void func_801155B4(void);
|
||||
// void func_80115764(void);
|
||||
void func_80115844(GlobalContext* ctxt, s16 param_2);
|
||||
// void func_80115908(void);
|
||||
void func_80115908(GlobalContext* ctxt, u8 param_2);
|
||||
void func_801159c0(s16 param_1);
|
||||
// void func_801159EC(void);
|
||||
// void func_80115A14(void);
|
||||
@ -3000,7 +3000,7 @@ void func_80165438(UNK_PTR param_1);
|
||||
// void func_80165E7C(void);
|
||||
// void func_80165EC0(void);
|
||||
// void func_80166060(void);
|
||||
// void func_801660B8(GlobalContext* ctxt, UNK_TYPE4 param_2);
|
||||
UNK_TYPE4 func_801660B8(GlobalContext* ctxt, UNK_TYPE4 param_2);
|
||||
void Play_Fini(GlobalContext* ctxt);
|
||||
// void func_801663C4(void);
|
||||
// void func_80166644(void);
|
||||
|
@ -26,6 +26,11 @@
|
||||
|
||||
#define PLAYER ((ActorPlayer*)globalCtx->actorCtx.actorList[ACTORCAT_PLAYER].first)
|
||||
|
||||
// linkAge still exists in MM, but is always set to 0 (always adult)
|
||||
// There are remnants of these macros from OOT, but they are essentially useless
|
||||
//#define LINK_IS_CHILD (gSaveContext.perm.linkAge != 0)
|
||||
#define LINK_IS_ADULT (gSaveContext.perm.linkAge == 0)
|
||||
|
||||
#define SQ(x) ((x)*(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
|
||||
|
||||
|
@ -3,13 +3,37 @@
|
||||
|
||||
#include <z64.h>
|
||||
|
||||
extern Gfx D_04029CB0[]; // D_04029CB0
|
||||
extern Gfx D_04029CF0[]; // D_04029CF0
|
||||
extern Gfx D_040008D0[];
|
||||
extern Gfx D_04029CB0[];
|
||||
extern Gfx D_04029CF0[];
|
||||
extern Gfx D_0405AAB0[];
|
||||
extern UNK_TYPE D_0405BEF0;
|
||||
extern UNK_TYPE D_0405B6F0;
|
||||
extern UNK_TYPE D_0405C6F0;
|
||||
extern UNK_TYPE D_0405CEF0;
|
||||
extern UNK_TYPE D_0405E6F0;
|
||||
extern Gfx D_0405F6F0[];
|
||||
extern UNK_TYPE D_0405F7C0;
|
||||
extern UNK_TYPE D_0405FFC0;
|
||||
extern UNK_TYPE D_040607C0;
|
||||
extern UNK_TYPE D_04060FC0;
|
||||
extern UNK_TYPE D_040617C0;
|
||||
extern UNK_TYPE D_04061FC0;
|
||||
extern UNK_TYPE D_04061FE0;
|
||||
extern UNK_TYPE D_04062000;
|
||||
extern UNK_TYPE D_04062020;
|
||||
extern UNK_TYPE D_04062040;
|
||||
extern UNK_TYPE D_04062060;
|
||||
extern Gfx D_040622C0[];
|
||||
extern Gfx D_04075A40[];
|
||||
extern Gfx D_04075B30[];
|
||||
extern Gfx D_04076BC0[];
|
||||
extern Gfx D_04077480[];
|
||||
|
||||
//extern Gfx[] D_05018090; // pot break shard displaylist
|
||||
//extern Gfx[] D_05017EA0; // pot displaylist
|
||||
extern UNK_TYPE D_05018090; // pot break shard displaylist
|
||||
extern UNK_TYPE D_05017EA0; // pot displaylist
|
||||
extern Gfx D_05017EA0[]; // pot displaylist
|
||||
extern Gfx D_05018090[]; // pot break shard displaylist
|
||||
extern Gfx D_0501D980[];
|
||||
extern Gfx D_050219E0[];
|
||||
|
||||
extern UNK_TYPE D_0E000048;
|
||||
extern UNK_TYPE D_0E000088;
|
||||
@ -23,22 +47,4 @@ extern AnimatedTexture object_ikana_obj_001228[];
|
||||
extern Gfx object_fu_kaiten_0005D0[];
|
||||
extern BgMeshHeader object_fu_kaiten_002D30;
|
||||
|
||||
extern UNK_PTR D_04061FC0[];
|
||||
extern UNK_PTR D_04061FE0[];
|
||||
extern UNK_PTR D_04062000[];
|
||||
extern UNK_PTR D_04062040[];
|
||||
extern UNK_PTR D_04062020[];
|
||||
extern UNK_PTR D_04062060[];
|
||||
extern UNK_PTR D_04062000[];
|
||||
extern Gfx D_040622C0[];
|
||||
extern Gfx D_04075A40[];
|
||||
|
||||
/* z_actor.c */
|
||||
extern Gfx D_04076BC0[];
|
||||
extern Gfx D_04077480[];
|
||||
extern Gfx D_04075B30[];
|
||||
|
||||
extern Gfx D_0501D980[];
|
||||
extern Gfx D_050219E0[];
|
||||
|
||||
#endif
|
||||
|
@ -376,14 +376,14 @@ extern u32 enAObjDisplayLists[2];
|
||||
extern ActorInit En_Item00_InitVars;
|
||||
extern ColliderCylinderInit enItem00CylinderInit;
|
||||
extern InitChainEntry enItem00InitVars[1];
|
||||
// extern UNK_TYPE1 D_801ADF10;
|
||||
// extern UNK_TYPE1 D_801ADF14;
|
||||
extern Color_RGBA8 D_801ADF10;
|
||||
extern Color_RGBA8 D_801ADF14;
|
||||
extern Vec3f D_801ADF18;
|
||||
extern Vec3f D_801ADF24;
|
||||
// extern UNK_TYPE1 D_801ADF30;
|
||||
// extern UNK_TYPE1 D_801ADF44;
|
||||
extern u8 D_801ADF74[272];
|
||||
extern u8 D_801AE084[272];
|
||||
extern UNK_PTR D_801ADF30[5];
|
||||
extern UNK_PTR D_801ADF44[12];
|
||||
extern u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern s32 D_801AE194[32];
|
||||
extern u8 D_801AE214[32];
|
||||
// extern UNK_TYPE4 D_801AE240;
|
||||
@ -1444,10 +1444,10 @@ extern UNK_PTR D_801C1E6C;
|
||||
// extern UNK_TYPE1 D_801C1FAC;
|
||||
// extern UNK_TYPE4 D_801C1FE0;
|
||||
// extern UNK_TYPE1 D_801C2054;
|
||||
// extern UNK_TYPE1 D_801C2078;
|
||||
// extern UNK_TYPE1 D_801C2079;
|
||||
extern u8 D_801C2078[1]; // TODO This array is larger than this. How large is it?
|
||||
extern u8 D_801C2079;
|
||||
// extern UNK_TYPE1 D_801C207A;
|
||||
// extern UNK_TYPE1 D_801C207E;
|
||||
extern u8 D_801C207E;
|
||||
// extern UNK_TYPE1 D_801C207F;
|
||||
// extern UNK_TYPE1 D_801C2080;
|
||||
// extern UNK_TYPE1 D_801C2081;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <z64cutscene.h>
|
||||
#include <z64dma.h>
|
||||
#include <z64effect.h>
|
||||
#include <z64item.h>
|
||||
#include <z64light.h>
|
||||
#include <z64math.h>
|
||||
#include <z64object.h>
|
||||
@ -364,9 +365,10 @@ typedef struct {
|
||||
/* 0x06 */ UNK_TYPE1 pad6[0xA];
|
||||
/* 0x10 */ s16 maxLife;
|
||||
/* 0x12 */ s16 currentLife;
|
||||
/* 0x14 */ UNK_TYPE1 pad14[0x1];
|
||||
/* 0x14 */ s8 unk14;
|
||||
/* 0x15 */ s8 currentMagic;
|
||||
/* 0x16 */ UNK_TYPE1 pad16[0x12];
|
||||
/* 0x16 */ s16 unk16;
|
||||
/* 0x16 */ UNK_TYPE1 pad17[0x10];
|
||||
} SaveContext_struct1; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
@ -657,7 +659,8 @@ typedef struct {
|
||||
// Permanent save context, kept in regular save files
|
||||
typedef struct {
|
||||
/* 0x0000 */ u32 entranceIndex; // bits 0-3 : offset; 4-8: spawn index; 9-15: scene index
|
||||
/* 0x0004 */ UNK_TYPE1 pad4[0x4];
|
||||
/* 0x0004 */ UNK_TYPE1 pad4[0x3];
|
||||
/* 0x0007 */ u8 linkAge;
|
||||
/* 0x0008 */ s32 cutscene;
|
||||
/* 0x000C */ u16 time;
|
||||
/* 0x000E */ UNK_TYPE1 padE[0x2];
|
||||
|
@ -263,19 +263,58 @@ typedef struct {
|
||||
/* 0xCC4 */ UNK_TYPE1 padCC4[0xB4];
|
||||
} ActorPlayer; // size = 0xD78
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ ActorFunc update;
|
||||
/* 0x148 */ s16 collectibleFlagId;
|
||||
typedef enum {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
/* 0x01 */ ITEM00_RUPEE_BLUE,
|
||||
/* 0x02 */ ITEM00_RUPEE_RED,
|
||||
/* 0x03 */ ITEM00_HEART,
|
||||
/* 0x04 */ ITEM00_BOMBS_A,
|
||||
/* 0x05 */ ITEM00_ARROWS_10,
|
||||
/* 0x06 */ ITEM00_HEART_PIECE,
|
||||
/* 0x07 */ ITEM00_HEART_CONTAINER,
|
||||
/* 0x08 */ ITEM00_ARROWS_30,
|
||||
/* 0x09 */ ITEM00_ARROWS_40,
|
||||
/* 0x0A */ ITEM00_ARROWS_50,
|
||||
/* 0x0B */ ITEM00_BOMBS_B,
|
||||
/* 0x0C */ ITEM00_NUTS_1,
|
||||
/* 0x0D */ ITEM00_STICK,
|
||||
/* 0x0E */ ITEM00_MAGIC_LARGE,
|
||||
/* 0x0F */ ITEM00_MAGIC_SMALL,
|
||||
/* 0x10 */ ITEM00_MASK,
|
||||
/* 0x11 */ ITEM00_SMALL_KEY,
|
||||
/* 0x12 */ ITEM00_FLEXIBLE,
|
||||
/* 0x13 */ ITEM00_RUPEE_ORANGE,
|
||||
/* 0x14 */ ITEM00_RUPEE_PURPLE,
|
||||
/* 0x15 */ ITEM00_3_HEARTS,
|
||||
/* 0x16 */ ITEM00_SHIELD_HERO,
|
||||
/* 0x17 */ ITEM00_NUTS_10,
|
||||
/* 0x18 */ ITEM00_NOTHING,
|
||||
/* 0x19 */ ITEM00_BOMBS_0,
|
||||
/* 0x1A */ ITEM00_BIG_FAIRY,
|
||||
/* 0x1B */ ITEM00_MAP,
|
||||
/* 0x1C */ ITEM00_COMPASS,
|
||||
/* 0x1D */ ITEM00_MUSHROOM_CLOUD,
|
||||
|
||||
/* 0xFF */ ITEM00_NO_DROP = -1
|
||||
} Item00Type;
|
||||
|
||||
struct EnItem00;
|
||||
|
||||
typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct GlobalContext*);
|
||||
|
||||
typedef struct EnItem00 {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ EnItem00ActionFunc actionFunc;
|
||||
/* 0x148 */ s16 collectibleFlag;
|
||||
/* 0x14A */ s16 unk14A;
|
||||
/* 0x14C */ s16 unk14C;
|
||||
/* 0x14E */ s16 unk14E;
|
||||
/* 0x150 */ s16 unk150;
|
||||
/* 0x152 */ s16 unk152;
|
||||
/* 0x154 */ f32 unk154;
|
||||
/* 0x158 */ ColliderCylinder collision;
|
||||
/* 0x1A4 */ UNK_TYPE1 pad1A4[0x4];
|
||||
} ActorEnItem00; // size = 0x1A8
|
||||
/* 0x158 */ ColliderCylinder collider;
|
||||
/* 0x1A4 */ s8 unk1A4;
|
||||
} EnItem00; // size = 0x1A8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
|
50
include/z64item.h
Normal file
50
include/z64item.h
Normal file
@ -0,0 +1,50 @@
|
||||
#ifndef _Z64ITEM_H_
|
||||
#define _Z64ITEM_H_
|
||||
|
||||
#define DROP_TABLE_SIZE 16
|
||||
#define DROP_TABLE_NUMBER 17
|
||||
|
||||
// TODO fill out these enums
|
||||
|
||||
typedef enum {
|
||||
/* 0x78 */ ITEM_KEY_SMALL = 0x78,
|
||||
/* 0x79 */ ITEM_MAGIC_SMALL = 0x79,
|
||||
/* 0x7A */ ITEM_MAGIC_LARGE = 0x7A,
|
||||
/* 0x83 */ ITEM_HEART = 0x83,
|
||||
/* 0x84 */ ITEM_RUPEE_GREEN = 0x84,
|
||||
/* 0x85 */ ITEM_RUPEE_BLUE = 0x85,
|
||||
/* 0x86 */ ITEM_RUPEE_10 = 0x86,
|
||||
/* 0x87 */ ITEM_RUPEE_RED = 0x87,
|
||||
/* 0x88 */ ITEM_RUPEE_PURPLE = 0x88,
|
||||
/* 0x89 */ ITEM_RUPEE_100 = 0x89,
|
||||
/* 0x8A */ ITEM_RUPEE_ORANGE = 0x8A,
|
||||
/* 0x8F */ ITEM_BOMBS_5 = 0x8F,
|
||||
/* 0x90 */ ITEM_BOMBS_10 = 0x90,
|
||||
/* 0x91 */ ITEM_BOMBS_20 = 0x91,
|
||||
/* 0x92 */ ITEM_BOMBS_30 = 0x92,
|
||||
/* 0x93 */ ITEM_ARROWS_10 = 0x93,
|
||||
/* 0x94 */ ITEM_ARROWS_30 = 0x94,
|
||||
/* 0x95 */ ITEM_ARROWS_40 = 0x95,
|
||||
/* 0x96 */ ITEM_ARROWS_50 = 0x96
|
||||
} ItemID;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ GI_NONE,
|
||||
/* 0x0C */ GI_HEART_PIECE = 0x0C,
|
||||
/* 0x0D */ GI_HEART_CONTAINER = 0x0D,
|
||||
/* 0x19 */ GI_STICKS_1 = 0x19,
|
||||
/* 0x28 */ GI_NUTS_1 = 0x28,
|
||||
/* 0x2A */ GI_NUTS_10 = 0x2A,
|
||||
/* 0x32 */ GI_SHIELD_HERO = 0x32,
|
||||
/* 0x3C */ GI_KEY_SMALL = 0x3C,
|
||||
/* 0x3E */ GI_MAP = 0x3E,
|
||||
/* 0x3F */ GI_COMPASS = 0x3F
|
||||
} GetItemID;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0A */ GID_COMPASS = 0x0A,
|
||||
/* 0x1B */ GID_DUNGEON_MAP = 0x1B,
|
||||
/* 0x27 */ GID_SHIELD_HERO = 0x27
|
||||
} GetItemDrawID;
|
||||
|
||||
#endif
|
@ -319,7 +319,7 @@ SECTIONS
|
||||
{
|
||||
code_text_start = .;
|
||||
build/src/code/code_0x800A5AC0.o(.text)
|
||||
build/asm/code/z_en_item00.o(.text)
|
||||
build/src/code/z_en_item00.o(.text)
|
||||
build/src/code/z_eff_blure.o(.text)
|
||||
build/asm/code/z_eff_shield_particle.o(.text)
|
||||
build/asm/code/z_eff_spark.o(.text)
|
||||
@ -461,7 +461,7 @@ SECTIONS
|
||||
code_data_start = .;
|
||||
build/asm/code/code_data_0x801AAAB0.o(.data)
|
||||
build/asm/code/code_data_0x800A5AC0.o(.data)
|
||||
build/asm/code/code_data_z_en_item00.o(.data)
|
||||
build/src/code/z_en_item00.o(.data)
|
||||
build/asm/code/code_data_z_eff_blure.o(.data)
|
||||
build/asm/code/code_data_z_eff_shield_particle.o(.data)
|
||||
build/src/code/code_0x800AF710.o(.data)
|
||||
@ -537,7 +537,7 @@ SECTIONS
|
||||
code_data_end = .;
|
||||
|
||||
code_rodata_start = .;
|
||||
build/asm/code/code_rodata_z_en_item00.o(.rodata)
|
||||
build/src/code/z_en_item00.o(.rodata)
|
||||
build/asm/code/code_rodata_z_eff_blure.o(.rodata)
|
||||
build/asm/code/code_rodata_z_eff_shield_particle.o(.rodata)
|
||||
build/asm/code/code_rodata_z_eff_spark.o(.rodata)
|
||||
|
@ -1,14 +1,24 @@
|
||||
D_040008D0 = 0x040008D0;
|
||||
D_04029CB0 = 0x04029CB0;
|
||||
D_04029CF0 = 0x04029CF0;
|
||||
D_040008D0 = 0x040008D0;
|
||||
|
||||
D_0405AAB0 = 0x0405AAB0;
|
||||
D_0405BEF0 = 0x0405BEF0;
|
||||
D_0405B6F0 = 0x0405B6F0;
|
||||
D_0405C6F0 = 0x0405C6F0;
|
||||
D_0405CEF0 = 0x0405CEF0;
|
||||
D_0405E6F0 = 0x0405E6F0;
|
||||
D_0405F6F0 = 0x0405F6F0;
|
||||
D_0405F7C0 = 0x0405F7C0;
|
||||
D_0405FFC0 = 0x0405FFC0;
|
||||
D_040607C0 = 0x040607C0;
|
||||
D_04060FC0 = 0x04060FC0;
|
||||
D_040617C0 = 0x040617C0;
|
||||
D_04061FC0 = 0x04061FC0;
|
||||
D_04061FE0 = 0x04061FE0;
|
||||
D_04062000 = 0x04062000;
|
||||
D_04062040 = 0x04062040;
|
||||
D_04062020 = 0x04062020;
|
||||
D_04062040 = 0x04062040;
|
||||
D_04062060 = 0x04062060;
|
||||
D_04062000 = 0x04062000;
|
||||
D_040622C0 = 0x040622C0;
|
||||
D_04076BC0 = 0x04076BC0;
|
||||
D_04075A40 = 0x04075A40;
|
||||
@ -35,6 +45,10 @@ D_0E0002C8 = 0x0E0002C8;
|
||||
|
||||
D_06000500 = 0x06000500;
|
||||
|
||||
/* z_en_item00 */
|
||||
D_06001290 = 0x06001290;
|
||||
D_06001470 = 0x06001470;
|
||||
|
||||
/* z_en_nnh */
|
||||
D_06001510 = 0x06001510;
|
||||
|
||||
|
1167
src/code/z_en_item00.c
Normal file
1167
src/code/z_en_item00.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -414,7 +414,7 @@ void Lights_DrawGlow(GlobalContext* globalCtx) {
|
||||
gDPSetCombineLERP(dl++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0,
|
||||
0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
gSPDisplayList(dl++, &D_04029CB0);
|
||||
gSPDisplayList(dl++, D_04029CB0);
|
||||
|
||||
do {
|
||||
if (light->info->type == LIGHT_POINT_GLOW) {
|
||||
@ -429,7 +429,7 @@ void Lights_DrawGlow(GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(dl++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(dl++, &D_04029CF0);
|
||||
gSPDisplayList(dl++, D_04029CF0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,6 @@ Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f };
|
||||
Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f };
|
||||
|
||||
extern Gfx D_0601D960[];
|
||||
extern Gfx D_040008D0[];
|
||||
|
||||
void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
|
@ -30,7 +30,7 @@ void func_80BFCFA0(EnScopecoin* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80BFCFB8(EnScopecoin* this, GlobalContext* globalCtx) {
|
||||
if (Actor_GetCollectibleFlag(globalCtx, (this->actor.params & 0x7F0) >> 4)) {
|
||||
func_800A7730(globalCtx, &this->actor.world, 2);
|
||||
Item_DropCollectible(globalCtx, &this->actor.world, 2);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
@ -77,14 +77,14 @@ void EnScopecoin_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
static UNK_PTR D_80BFD280[] = {D_04061FC0, D_04061FE0, D_04062000, D_04062040, D_04062020, D_04062060, D_04062000};
|
||||
static UNK_PTR D_80BFD280[] = {&D_04061FC0, &D_04061FE0, &D_04062000, &D_04062040, &D_04062020, &D_04062060, &D_04062000};
|
||||
|
||||
void EnScopecoin_Draw(Actor *thisx, GlobalContext *globalCtx) {
|
||||
EnScopecoin* this = THIS;
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
func_800B8050(&this->actor, globalCtx, 0);
|
||||
func_800B8050(&this->actor, globalCtx, 0);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
@ -67,10 +67,9 @@ void func_8093089C(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
s32 dropCount = func_800A8150(itemParam);
|
||||
|
||||
if (dropCount >= 0) {
|
||||
// in OOT this is Item_DropCollectible
|
||||
func_800A7730(globalCtx,
|
||||
&this->actor.world,
|
||||
((this->actor.params & 0x7F) << 8) | dropCount);
|
||||
Item_DropCollectible(globalCtx,
|
||||
&this->actor.world,
|
||||
((this->actor.params & 0x7F) << 8) | dropCount);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,10 +119,10 @@ void func_809308F4(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
arg5,
|
||||
0x14,
|
||||
0,
|
||||
0,
|
||||
((Rand_ZeroOne() * 85.0f) + 15.0f),
|
||||
0,
|
||||
0,
|
||||
((Rand_ZeroOne() * 85.0f) + 15.0f),
|
||||
0,
|
||||
0,
|
||||
0x3C,
|
||||
-1,
|
||||
GAMEPLAY_DANGEON_KEEP,
|
||||
@ -150,7 +149,7 @@ void func_80930B60(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
|
||||
pos = *actorPos;
|
||||
pos.y += this->actor.yDistToWater;
|
||||
|
||||
|
||||
EffectSsGSplash_Spawn(globalCtx, &pos, NULL, NULL, 0, 0x190);
|
||||
|
||||
for (i = 0, var = 0; i < 15; i++, var += 20000) {
|
||||
@ -176,15 +175,15 @@ void func_80930B60(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
}
|
||||
|
||||
EffectSsKakera_Spawn(globalCtx,
|
||||
&pos,
|
||||
&vel,
|
||||
&pos,
|
||||
&vel,
|
||||
actorPos,
|
||||
-0xAA,
|
||||
-0xAA,
|
||||
arg5,
|
||||
0x32, 5, 0,
|
||||
0x32, 5, 0,
|
||||
((Rand_ZeroOne() * 85.0f) + 15.0f),
|
||||
0, 0, 0x46,
|
||||
-1,
|
||||
0, 0, 0x46,
|
||||
-1,
|
||||
GAMEPLAY_DANGEON_KEEP,
|
||||
&D_05018090);
|
||||
|
||||
@ -195,7 +194,7 @@ void func_80930B60(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
void func_80930DDC(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
Actor *player = PLAYER;
|
||||
Actor *player2 = PLAYER;
|
||||
|
||||
|
||||
// in oot func_800F0568 is Audio_PlaySoundAtPosition
|
||||
|
||||
if (((this->actor.bgCheckFlags & 0x20) != 0) && (this->actor.yDistToWater > 15.0f)) {
|
||||
@ -240,13 +239,13 @@ void func_80930DDC(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
func_8093089C(this, globalCtx);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if NON-MATCHING
|
||||
// Wait For Proximity (idle)
|
||||
// NON-MATCHING: wrong register used, v instead of t for the weirdValues[] pointer
|
||||
void func_80931004(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
Actor *player = PLAYER;
|
||||
Actor *player = PLAYER;
|
||||
f32 currentHeight;
|
||||
s8 weirdvalue;
|
||||
s16 startingRotation;
|
||||
@ -261,7 +260,7 @@ void func_80931004(EnTuboTrap *this, GlobalContext *globalCtx) {
|
||||
func_800BC154(globalCtx, &globalCtx->actorCtx, this, ACTORCAT_ENEMY);
|
||||
currentHeight = this->actor.world.pos.y;
|
||||
this->actor.flags |= 0x11; // always update and can target
|
||||
|
||||
|
||||
// hard to know what this value is even used for without knowing what ActorPlayer::unk14B is
|
||||
// wild guess: this is player animation state, height is modified to always point at center of link model
|
||||
weirdvalue = D_8093146C[ ((ActorPlayer*) player)->unk14B & 0xFF];
|
||||
|
@ -499,14 +499,14 @@
|
||||
0x800A5C28:("EnAObj_Update2",),
|
||||
0x800A5C60:("EnAObj_Update",),
|
||||
0x800A5CB8:("EnAObj_Draw",),
|
||||
0x800A5D00:("EnItem00_UpdateForNewObjectId",),
|
||||
0x800A5D00:("EnItem00_SetObject",),
|
||||
0x800A5D70:("EnItem00_Init",),
|
||||
0x800A637C:("EnItem00_Destroy",),
|
||||
0x800A63A8:("func_800A63A8",),
|
||||
0x800A63A8:("EnItem00_WaitForHeartObject",),
|
||||
0x800A640C:("func_800A640C",),
|
||||
0x800A6650:("func_800A6650",),
|
||||
0x800A6780:("func_800A6780",),
|
||||
0x800A6A40:("EnItem00_Update1",),
|
||||
0x800A6A40:("func_800A6A40",),
|
||||
0x800A6B98:("EnItem00_Update",),
|
||||
0x800A7128:("EnItem00_Draw",),
|
||||
0x800A72AC:("EnItem00_DrawRupee",),
|
||||
@ -514,9 +514,9 @@
|
||||
0x800A74D8:("EnItem00_DrawHeartContainer",),
|
||||
0x800A75B8:("EnItem00_DrawHeartPiece",),
|
||||
0x800A7650:("func_800A7650",),
|
||||
0x800A7730:("func_800A7730",),
|
||||
0x800A7AD4:("func_800A7AD4",),
|
||||
0x800A7D28:("func_800A7D28",),
|
||||
0x800A7730:("Item_DropCollectible",),
|
||||
0x800A7AD4:("Item_DropCollectible2",),
|
||||
0x800A7D28:("Item_DropCollectibleRandom",),
|
||||
0x800A8150:("func_800A8150",),
|
||||
0x800A817C:("func_800A817C",),
|
||||
0x800A81A4:("func_800A81A4",),
|
||||
@ -1591,7 +1591,7 @@
|
||||
0x800EE200:("func_800EE200",),
|
||||
0x800EE29C:("func_800EE29C",),
|
||||
0x800EE2F4:("func_800EE2F4",),
|
||||
0x800EE320:("func_800EE320",),
|
||||
0x800EE320:("GetItem_Draw",),
|
||||
0x800EE364:("func_800EE364",),
|
||||
0x800EE400:("func_800EE400",),
|
||||
0x800EE5FC:("func_800EE5FC",),
|
||||
@ -2121,7 +2121,7 @@
|
||||
0x80112B40:("func_80112B40",),
|
||||
0x80112BE4:("func_80112BE4",),
|
||||
0x80112C0C:("func_80112C0C",),
|
||||
0x80112E80:("func_80112E80",),
|
||||
0x80112E80:("Item_Give",),
|
||||
0x801143CC:("func_801143CC",),
|
||||
0x80114978:("func_80114978",),
|
||||
0x801149A0:("func_801149A0",),
|
||||
|
@ -373,14 +373,14 @@
|
||||
0x801ADEC0:("En_Item00_InitVars","ActorInit","",0x20),
|
||||
0x801ADEE0:("enItem00CylinderInit","ColliderCylinderInit","",0x2c),
|
||||
0x801ADF0C:("enItem00InitVars","ActorInitVar","[1]",0x4),
|
||||
0x801ADF10:("D_801ADF10","UNK_TYPE1","",0x1),
|
||||
0x801ADF14:("D_801ADF14","UNK_TYPE1","",0x1),
|
||||
0x801ADF10:("D_801ADF10","ColorRGBA8","",0x4),
|
||||
0x801ADF14:("D_801ADF14","ColorRGBA8","",0x4),
|
||||
0x801ADF18:("D_801ADF18","Vec3f","",0xc),
|
||||
0x801ADF24:("D_801ADF24","Vec3f","",0xc),
|
||||
0x801ADF30:("D_801ADF30","UNK_TYPE1","",0x1),
|
||||
0x801ADF44:("D_801ADF44","UNK_TYPE1","",0x1),
|
||||
0x801ADF74:("D_801ADF74","u8","[272]",0x110),
|
||||
0x801AE084:("D_801AE084","u8","[272]",0x110),
|
||||
0x801ADF30:("D_801ADF30","UNK_PTR","[5]",0x14),
|
||||
0x801ADF44:("D_801ADF44","UNK_PTR","[12]",0x30),
|
||||
0x801ADF74:("sDropTable","u8","[272]",0x110),
|
||||
0x801AE084:("sDropTableAmounts","u8","[272]",0x110),
|
||||
0x801AE194:("D_801AE194","s32","[32]",0x80),
|
||||
0x801AE214:("D_801AE214","u8","[32]",0x20),
|
||||
0x801AE240:("D_801AE240","UNK_TYPE4","",0x4),
|
||||
@ -1438,10 +1438,10 @@
|
||||
0x801C1FAC:("D_801C1FAC","UNK_TYPE1","",0x1),
|
||||
0x801C1FE0:("D_801C1FE0","UNK_TYPE4","",0x4),
|
||||
0x801C2054:("D_801C2054","UNK_TYPE1","",0x1),
|
||||
0x801C2078:("D_801C2078","UNK_TYPE1","",0x1),
|
||||
0x801C2079:("D_801C2079","UNK_TYPE1","",0x1),
|
||||
0x801C2078:("D_801C2078","u8","[1]",0x1),
|
||||
0x801C2079:("D_801C2079","u8","",0x1),
|
||||
0x801C207A:("D_801C207A","UNK_TYPE1","",0x1),
|
||||
0x801C207E:("D_801C207E","UNK_TYPE1","",0x1),
|
||||
0x801C207E:("D_801C207E","u8","",0x1),
|
||||
0x801C207F:("D_801C207F","UNK_TYPE1","",0x1),
|
||||
0x801C2080:("D_801C2080","UNK_TYPE1","",0x1),
|
||||
0x801C2081:("D_801C2081","UNK_TYPE1","",0x1),
|
||||
|
@ -16,13 +16,23 @@ def split_asm_and_rodata():
|
||||
disableRodataConvert = False
|
||||
|
||||
basename = str(args.input)
|
||||
|
||||
if "0x" in basename:
|
||||
basename = basename.split("0x")[0]
|
||||
else:
|
||||
basename = basename.split(".")[0]
|
||||
rodataFile = basename + "late_rodata.asm"
|
||||
|
||||
rodataFile = None
|
||||
|
||||
if "ovl_" in basename:
|
||||
if "0x" in basename:
|
||||
basename = basename.split("0x")[0]
|
||||
else:
|
||||
basename = basename.split(".")[0]
|
||||
else: # files in code
|
||||
if "0x" in basename:
|
||||
basename = basename.split("code_")[-1]
|
||||
else:
|
||||
basename = basename.split("/")[-1]
|
||||
rodataFile = "asm/code/code_rodata_" + basename
|
||||
|
||||
if rodataFile is None:
|
||||
rodataFile = basename + "late_rodata.asm"
|
||||
|
||||
if not os.path.exists(rodataFile):
|
||||
rodataFile = basename + "rodata.asm"
|
||||
|
||||
@ -81,7 +91,7 @@ def split_asm_and_rodata():
|
||||
deleteLine = True
|
||||
break
|
||||
if not deleteLine:
|
||||
f.writelines([xline])
|
||||
f.writelines([xline])
|
||||
f.close()
|
||||
|
||||
relevant_rodata = []
|
||||
@ -130,7 +140,7 @@ def split_asm_and_rodata():
|
||||
current_file.write("glabel " + entry[0] + "\n")
|
||||
written_rodata.append(entry[0])
|
||||
current_file.write(entry[1])
|
||||
|
||||
|
||||
if os.path.exists(rodataFile):
|
||||
with open(rodataFile, 'w+') as f:
|
||||
f.truncate()
|
||||
@ -149,7 +159,7 @@ def split_asm_and_rodata():
|
||||
if not deleteLine:
|
||||
f.writelines([xline])
|
||||
f.close()
|
||||
|
||||
|
||||
relevant_rodata = []
|
||||
written_rodata = []
|
||||
current_file.close()
|
||||
@ -162,6 +172,9 @@ def split_asm_and_rodata():
|
||||
for name in file_names:
|
||||
f.write('\n#pragma GLOBAL_ASM("{}")\n'.format(name))
|
||||
|
||||
rodata_excluded = ["ovl_Bg_Dkjail_Ivy", "ovl_Bg_Ikana_Mirror", "ovl_Boss_02", "ovl_Boss_07", "ovl_Boss_Hakugin", "ovl_Elf_Msg", "ovl_Elf_Msg2", "ovl_Elf_Msg3", "ovl_Elf_Msg4", "ovl_Elf_Msg5", "ovl_En_Az", "ovl_En_Bigokuta", "ovl_En_Bigpamet", "ovl_En_Bigpo", "ovl_En_Bigslime", "ovl_En_Box", "ovl_En_Butte", "ovl_En_Col_Man", "ovl_En_Crow", "ovl_En_Death", "ovl_En_Elf", "ovl_En_Elforg", "ovl_En_Encount3", "ovl_En_Encount4", "ovl_En_Fish", "ovl_En_Fish2", "ovl_En_Fsn", "ovl_En_Honotrap", "ovl_En_Horse", "ovl_En_Horse_Game", "ovl_En_Invadepoh", "ovl_En_Ishi", "ovl_En_Kame", "ovl_En_Kanban", "ovl_En_Kusa2", "ovl_En_M_Thunder", "ovl_En_Maruta", "ovl_En_Mushi2", "ovl_En_Okuta", "ovl_En_Ossan", "ovl_En_Pametfrog", "ovl_En_Peehat", "ovl_En_Rg", "ovl_En_Ruppecrow", "ovl_En_Slime", "ovl_En_Sob1", "ovl_En_Syateki_Man", "ovl_En_Test7", "ovl_En_Trt", "ovl_En_Wiz_Fire", "ovl_Mir_Ray", "ovl_Obj_Bombiwa", "ovl_Obj_Driftice", "ovl_Obj_Hariko", "ovl_Obj_Iceblock", "ovl_Obj_Mure", "ovl_Obj_Snowball2", "ovl_Obj_Toudai", "ovl_select"]
|
||||
rodata_included = ["z_en_item00"]
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
@ -174,7 +187,7 @@ if __name__ == '__main__':
|
||||
|
||||
file_names = []
|
||||
|
||||
if "ovl_" in str(args.input) and not any(ovlFile in str(args.input) for ovlFile in ["ovl_Bg_Dkjail_Ivy", "ovl_Bg_Ikana_Mirror", "ovl_Boss_02", "ovl_Boss_07", "ovl_Boss_Hakugin", "ovl_Elf_Msg", "ovl_Elf_Msg2", "ovl_Elf_Msg3", "ovl_Elf_Msg4", "ovl_Elf_Msg5", "ovl_En_Az", "ovl_En_Bigokuta", "ovl_En_Bigpamet", "ovl_En_Bigpo", "ovl_En_Bigslime", "ovl_En_Box", "ovl_En_Butte", "ovl_En_Col_Man", "ovl_En_Crow", "ovl_En_Death", "ovl_En_Elf", "ovl_En_Elforg", "ovl_En_Encount3", "ovl_En_Encount4", "ovl_En_Fish", "ovl_En_Fish2", "ovl_En_Fsn", "ovl_En_Honotrap", "ovl_En_Horse", "ovl_En_Horse_Game", "ovl_En_Invadepoh", "ovl_En_Ishi", "ovl_En_Kame", "ovl_En_Kanban", "ovl_En_Kusa2", "ovl_En_M_Thunder", "ovl_En_Maruta", "ovl_En_Mushi2", "ovl_En_Okuta", "ovl_En_Ossan", "ovl_En_Pametfrog", "ovl_En_Peehat", "ovl_En_Rg", "ovl_En_Ruppecrow", "ovl_En_Slime", "ovl_En_Sob1", "ovl_En_Syateki_Man", "ovl_En_Test7", "ovl_En_Trt", "ovl_En_Wiz_Fire", "ovl_Mir_Ray", "ovl_Obj_Bombiwa", "ovl_Obj_Driftice", "ovl_Obj_Hariko", "ovl_Obj_Iceblock", "ovl_Obj_Mure", "ovl_Obj_Snowball2", "ovl_Obj_Toudai", "ovl_select"]):
|
||||
if ("ovl_" in str(args.input) and not any(file in str(args.input) for file in rodata_excluded)) or any(file in str(args.input) for file in rodata_included):
|
||||
split_asm_and_rodata()
|
||||
exit(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user