mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z_actor with some documentation, with 1 NON_EQUIVALENTs (#401)
* Match Player_GetHeight * Another bunch * Fix merge conflict * rename Gfx_DrawDListXlu * add WEEROR * Actor_Spawn * almost Actor_SpawnTransitionActors and Actor_Delete * A bunch of small actors * More renames * format * Some Player renames * a few more * import data * run formatter * func_800B7170 * whoops * Fix merge issues * Whoops 2 * func_800B83BC and func_800B83F8 * Actor_IsActorFacingPlayerAndWithinRange * add some prototypes * match Actor_UpdateBgCheckInfo * func_800B7678 * mark Actor_SpawnAsChildAndCutscene as non_matching * Actor_Draw * Update is chaotic * 2 new matches * func_800BC8B8 * Another bunch * function renames * run formatter * cleanup * remove unnecesary casts * add missing sfx * Fix renames * fix merge * func_800BF7CC * small bunch * another bunch * func_800BE184 non_matching * two more * split z_cheap_proc * Another bunch * another bunch * a few and a non matching * yeee * a * Actor_DrawAll non_equivalent * Actor_RecordUndrawnActor * i don't know what to put in this commit message * func_800B4B50 non matching * func_800B42F8 non matching * func_800B5040 * func_800B5814 non_equiv * func_800B6584 * func_800B6608 * func_800B6680 * func_800B7E04 * func_800B8118 * func_800b9170 * , * func_800BC4EC * func_800BA6FC * func_800BA798 * func_800BA8B8 * Actor_LoadOverlay * small cleanup * func_800BB2D0 * meh * func_800BBAC0 * func_800BC270 * func_800B5208 non matching * Fix warnings * meh * rename some ActorShadow_ functions * fairy * Flags_ * fix warnings * format * Actor_PickUp and family * func_800B8E58 * match Actor_RemoveFromCategory * another bit of docs * Match func_800B86C8 * And another bit * rename Player_GetRunSpeedLimit * func_800B9E84 * func_800BE63C * func_800BB8EC * match func_800B5814 * match func_800B9334 * cleanup * fix conflicts: first pass * another fix * actorfixer fix * fix conflicts * func_800BE680 non_equivalent * Improve func_800BE680 a bit * func_800BE680 equivalent (?) * func_800BE680 equivalent * Actor_UpdateActor equivalent * format * use some ExchangeItemID enum values * Some more cleaning * more cleanup * More name stealing from OoT * match func_800B82EC * match func_800B9D1C and a bit of cleanup * Add ACTOR_FLAGS placeholders * Renames and match func_800BE184 * last pass of name stealing * format * fix conflicts * more cleanup * more cleanup * cleanup and OVERLAY_RELOCATION_OFFSET macro * Remove prototypes of obviously internal-only functions, update variable names, forward declare where necessary, remove all `param_\d`s * remove newlines * minor rename * Use ACTOR_FLAGS in z_actor * Match func_800BE3D0 * Rename movement functions * Document Actor_CalcOffsetOrientedToDrawRotation * velX -> horizontalSpeed * A bit of documentation for actor movement functions * format * Fix merge issues * format * Format * Fix renames * fix warnings * fix conflicts * review :D * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Fix * format * Actor_SpawnSetupActors * engineer review * Update src/code/z_actor.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * A bunch of Engineer's reviews * more Engineer's review * a * whoops * run actorfixer * c'mon * 😮💨 * whoops * warning * More engineer's review * run format * I'm dumb * a * match func_800BE680 * Match Actor_DrawZTarget * Match Actor_SpawnAsChildAndCutscene, fix non-equivalent in Actor_UpdateActor * Fix merge issue * format * update actor * Steal a bit of @Thar0 documentation from OoT's z_message * Run actorfixer * Fix renames * Match func_800B4B50 thanks to @hensldm * Improve ActorShadow_DrawFeet thanks to @hensldm * whoops * Actor_PlaySfxAtProjectedPos * Actor_UpdateActor matched by @hensldm * Match func_800BA2FC by @hensldm * Match Actor_SpawnTransitionActors by @hensldm * Match func_800BB604 by @hensldm * Match Actor_DrawAll by @hensldm * ActorShadow_DrawFeet by @hensldm * Actor_UpdateAll by @hensldm * Match func_800BCCDC by @engineer124 * Small Actor_PlaySfxAtPos by @engineer124 * ACTOR_FLAGS_ALL and a bit of cleanup * Add invisible comment * Small docs pass * Fix merge * Engineer's review * format lol * Actor_DrawDoorLock docs * Actor_SpawnShieldParticlesMetal * fix merge issues * sActorFaultClient * fix * commit message * Run actorfixer.py && format.sh * Fix warnings * fixes * format * bss * Update include/functions.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Address review * Fix merge issues, format and such * fix merge issues * Add ACTORCAT_MAX * actorList -> actorLists * Fix merge issues * format * Enable WERROR on jenkinsfile * Fix merge * Use object symbols * address review * format * review * fix merge issues * fix * VRAM_PTR_SIZE, small cleanup and format * review Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
This commit is contained in:
co-authored by
Elliptic Ellipsis
Derek Hensley
engineer124
engineer124
parent
b74bec0e1d
commit
6069a1585f
+218
-312
File diff suppressed because it is too large
Load Diff
@@ -153,4 +153,11 @@ extern u8 __osMaxControllers;
|
||||
// extern OSMesgQueue D_8009CF38;
|
||||
// extern OSMesg D_8009CF50;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
#endif
|
||||
|
||||
+7
-2
@@ -39,9 +39,9 @@
|
||||
} \
|
||||
(void)0
|
||||
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorList[ACTORCAT_PLAYER].first)
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
|
||||
|
||||
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorList[ACTORCAT_ENEMY].first)
|
||||
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorLists[ACTORCAT_ENEMY].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
|
||||
@@ -86,6 +86,8 @@
|
||||
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
|
||||
#define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0)
|
||||
|
||||
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
|
||||
|
||||
extern GraphicsContext* __gfxCtx;
|
||||
|
||||
#define WORK_DISP __gfxCtx->work.p
|
||||
@@ -147,6 +149,9 @@ extern GraphicsContext* __gfxCtx;
|
||||
(b) = _temp; \
|
||||
}
|
||||
|
||||
#define OVERLAY_RELOCATION_OFFSET(overlayEntry) ((uintptr_t)((overlayEntry)->vramStart) - (uintptr_t)((overlayEntry)->loadedRamAddr))
|
||||
#define VRAM_PTR_SIZE(entry) ((uintptr_t)((entry)->vramEnd) - (uintptr_t)((entry)->vramStart))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGNED8 __attribute__ ((aligned (8)))
|
||||
#else
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
#define SP_DMEM_START 0x04000000
|
||||
#define SP_DMEM_SIZE 0x1000
|
||||
|
||||
#define TMEM_SIZE 0x1000
|
||||
|
||||
#define SP_MEM_ADDR_REG 0x04040000
|
||||
#define SP_DRAM_ADDR_REG 0x04040004
|
||||
#define SP_RD_LEN_REG 0x04040008
|
||||
|
||||
+14
-19
@@ -374,7 +374,6 @@ extern u8 D_801AE214[32];
|
||||
// extern UNK_TYPE4 D_801AE240;
|
||||
// extern UNK_TYPE4 D_801AE250;
|
||||
extern UNK_PTR D_801AE260[3];
|
||||
// extern UNK_TYPE4 D_801AE26C;
|
||||
// extern UNK_TYPE4 D_801AE27C;
|
||||
// extern UNK_TYPE4 D_801AE28C;
|
||||
// extern UNK_TYPE4 D_801AE29C;
|
||||
@@ -415,11 +414,8 @@ extern EffectSsOverlay gParticleOverlayTable[39];
|
||||
// extern s32 sEntryIndex;
|
||||
// extern u32 sCurrentBit;
|
||||
// extern s32 sTimer;
|
||||
extern Color_RGBA8 D_801AEC80;
|
||||
extern s801AEC84 D_801AEC84[13];
|
||||
extern f32 actorMovementScale;
|
||||
extern f32 D_801AECF0;
|
||||
extern f32 D_801AECF4;
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern s16 D_801AED48[8];
|
||||
// extern UNK_TYPE4 D_801AED58;
|
||||
extern Color_RGBA8 actorDefaultHitColor;
|
||||
@@ -2838,7 +2834,7 @@ extern f32 D_801DE860;
|
||||
extern f32 D_801DE864;
|
||||
extern f32 D_801DE868;
|
||||
extern f32 D_801DE884;
|
||||
// extern UNK_TYPE1 D_801DE890;
|
||||
extern TexturePtr D_801DE890[];
|
||||
extern f32 D_801DF090;
|
||||
extern f32 D_801DF094;
|
||||
extern f32 D_801DF0A0;
|
||||
@@ -3102,15 +3098,15 @@ extern u64 gJpegUCodeData[];
|
||||
|
||||
// bss
|
||||
// extern UNK_TYPE1 D_801ED890;
|
||||
// extern UNK_TYPE1 D_801ED8A0;
|
||||
// extern UNK_TYPE1 D_801ED8B0;
|
||||
// extern UNK_TYPE1 D_801ED8B4;
|
||||
// extern UNK_TYPE1 D_801ED894;
|
||||
extern CollisionPoly* D_801ED8B0;
|
||||
extern s32 D_801ED8B4;
|
||||
// extern UNK_TYPE1 D_801ED8B8;
|
||||
// extern UNK_TYPE1 D_801ED8BC;
|
||||
// extern UNK_TYPE1 D_801ED8C0;
|
||||
// extern UNK_TYPE1 D_801ED8C4;
|
||||
extern f32 D_801ED8C8;
|
||||
extern f32 D_801ED8CC;
|
||||
extern f32 sBgmEnemyDistSq;
|
||||
extern f32 D_801ED8D0;
|
||||
// extern UNK_TYPE1 D_801ED8D4;
|
||||
// extern UNK_TYPE1 D_801ED8D8;
|
||||
@@ -3887,8 +3883,6 @@ extern Gfx D_04023210[];
|
||||
extern UNK_TYPE D_04023288;
|
||||
extern Gfx D_04023348[];
|
||||
extern Gfx D_04023428[];
|
||||
extern Gfx D_04025850[];
|
||||
extern Gfx D_04025970[];
|
||||
extern UNK_TYPE D_04025DD0;
|
||||
extern UNK_TYPE D_040281DC;
|
||||
extern UNK_TYPE D_04028FEC;
|
||||
@@ -3920,8 +3914,8 @@ extern UNK_TYPE D_0403F230;
|
||||
extern UNK_TYPE D_04044300;
|
||||
extern Gfx D_04048DF0[];
|
||||
extern UNK_TYPE D_04050D10;
|
||||
extern UNK_TYPE D_04051180;
|
||||
extern UNK_TYPE D_04051238;
|
||||
extern Gfx D_04051180[];
|
||||
extern Gfx D_04051238[];
|
||||
extern AnimationHeader D_0405140C;
|
||||
extern Gfx D_040527F0[];
|
||||
extern Gfx D_040528B0[];
|
||||
@@ -3940,7 +3934,8 @@ extern TexturePtr D_0408EFE0[]; // gDust6Tex
|
||||
extern TexturePtr D_0408F3E0[]; // gDust7Tex
|
||||
extern TexturePtr D_0408F7E0[]; // gDust8Tex
|
||||
extern UNK_TYPE D_04050550;
|
||||
extern UNK_TYPE D_04050648;
|
||||
extern Gfx D_04050648[];
|
||||
extern Gfx D_040506E0[];
|
||||
extern UNK_TYPE D_040510B0;
|
||||
extern UNK_TYPE D_04054940;
|
||||
extern Gfx D_0405AAB0[];
|
||||
@@ -3969,15 +3964,11 @@ extern UNK_TYPE D_0406F380;
|
||||
extern Gfx D_040706E0[];
|
||||
extern UNK_TYPE D_04073F00;
|
||||
extern UNK_TYPE D_04075400;
|
||||
extern Gfx D_04075A40[];
|
||||
extern Gfx D_04075B30[];
|
||||
extern Gfx D_04076BC0[];
|
||||
extern Gfx D_04077480[];
|
||||
extern UNK_TYPE D_04079B10;
|
||||
extern Gfx D_0407AB10[]; // sun (sparkles when small) displaylist
|
||||
extern Gfx D_0407AB58[];
|
||||
extern UNK_TYPE D_0407AFB0;
|
||||
extern Gfx gGameplayKeepDrawFlameDL[];
|
||||
extern UNK_TYPE D_0407D650;
|
||||
extern UNK_TYPE D_0407F218;
|
||||
extern UNK_TYPE D_040815D0;
|
||||
@@ -3985,6 +3976,10 @@ extern UNK_TYPE D_04081628;
|
||||
extern UNK_TYPE D_04083534;
|
||||
extern UNK_TYPE D_04091BE0;
|
||||
extern UNK_TYPE D_04091CE0;
|
||||
extern TexturePtr D_04091DE0[];
|
||||
extern TexturePtr D_04091FE0[];
|
||||
extern TexturePtr D_040921E0[];
|
||||
extern TexturePtr D_040923E0[];
|
||||
|
||||
extern Gfx D_05000C40[];
|
||||
extern UNK_TYPE D_05001D20;
|
||||
|
||||
+33
-117
@@ -334,26 +334,6 @@ typedef struct {
|
||||
/* 0x24 */ s16 unk_24;
|
||||
} SramContext; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE4 unk0;
|
||||
/* 0x04 */ UNK_TYPE4 unk4;
|
||||
/* 0x08 */ UNK_TYPE4 unk8;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x10 */ Color_RGBA8 unk10;
|
||||
} TargetContextEntry; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 texture;
|
||||
/* 0x4 */ s16 unk4;
|
||||
/* 0x6 */ s16 unk6;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 unk9;
|
||||
/* 0xA */ u8 fadeOutDelay;
|
||||
/* 0xB */ u8 fadeInDelay;
|
||||
/* 0xC */ s16 alpha;
|
||||
/* 0xE */ s16 color;
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s32 topY;
|
||||
/* 0x4 */ s32 bottomY;
|
||||
@@ -392,15 +372,27 @@ typedef struct {
|
||||
} s80185D40; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unk0;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
/* 0x6 */ u8 unk6;
|
||||
/* 0x7 */ u8 unk7;
|
||||
} s801AEC84; // size = 0x8
|
||||
/* 0x00 */ u32 unk0;
|
||||
/* 0x04 */ u8 unk4;
|
||||
/* 0x05 */ u8 unk5;
|
||||
/* 0x06 */ u8 unk6;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[0x2];
|
||||
/* 0x09 */ u8 unk9;
|
||||
/* 0x0A */ UNK_TYPE1 padA[0x2];
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ u16 unk10;
|
||||
/* 0x12 */ u16 unk12;
|
||||
/* 0x14 */ u16 unk14;
|
||||
/* 0x16 */ UNK_TYPE1 pad16[0x2];
|
||||
/* 0x18 */ u32 unk18;
|
||||
/* 0x1C */ u32 unk1C;
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ u32 unk24;
|
||||
/* 0x28 */ u32 unk28;
|
||||
/* 0x2C */ u32 unk2C;
|
||||
/* 0x30 */ u32 unk30;
|
||||
/* 0x34 */ u32 unk34;
|
||||
} s8018CFAC; // size = 0x38
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
@@ -480,13 +472,6 @@ typedef struct {
|
||||
/* 0x10 */ Vec3f relativePos;
|
||||
} SoundSource; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u32 magic;
|
||||
/* 0x004 */ GraphicsContext* gfxCtx;
|
||||
@@ -743,7 +728,7 @@ typedef struct {
|
||||
/* 0x22 */ u16 unk_22;
|
||||
/* 0x24 */ u16 unk_24;
|
||||
/* 0x26 */ u8 unk_26;
|
||||
/* 0x28 */ LightInfo unk_28; // sun 1
|
||||
/* 0x28 */ LightInfo dirLight1; // sun 1
|
||||
/* 0x36 */ LightInfo unk_36; // sun 2
|
||||
/* 0x44 */ s8 unk_44;
|
||||
/* 0x48 */ DmaRequest unk_48;
|
||||
@@ -877,7 +862,9 @@ typedef struct {
|
||||
/* 0x1202A */ u16 unk1202A;
|
||||
/* 0x1202C */ UNK_TYPE1 pad1202C[0x2];
|
||||
/* 0x1202E */ u16 unk1202E;
|
||||
/* 0x12030 */ UNK_TYPE1 pad12030[0x14];
|
||||
/* 0x12030 */ s16 unk_12030;
|
||||
/* 0x12032 */ UNK_TYPE1 unk_12032[0x2];
|
||||
/* 0x12034 */ UNK_TYPE1 pad12034[0x10];
|
||||
/* 0x12044 */ s16 unk12044;
|
||||
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
|
||||
/* 0x12048 */ u8 unk12048; // EnKakasi
|
||||
@@ -1197,24 +1184,12 @@ typedef enum {
|
||||
STACK_STATUS_OVERFLOW = 2
|
||||
} StackStatus;
|
||||
|
||||
typedef struct TargetContext TargetContext;
|
||||
|
||||
typedef struct ActorContext ActorContext;
|
||||
|
||||
typedef struct s800B948C s800B948C;
|
||||
|
||||
struct FireObjLight {
|
||||
/* 0x00 */ LightNode* light;
|
||||
/* 0x04 */ LightInfoPositional lightInfo;
|
||||
/* 0x12 */ u8 unk12;
|
||||
}; // size = 0x13
|
||||
|
||||
typedef struct ActorListEntry {
|
||||
/* 0x0 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x4 */ Actor* first; // pointer to first actor of this type
|
||||
/* 0x8 */ UNK_TYPE1 pad8[0x4];
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
#define OS_SC_RETRACE_MSG 1
|
||||
#define OS_SC_DONE_MSG 2
|
||||
#define OS_SC_NMI_MSG 3 // name is made up, 3 is OS_SC_RDP_DONE_MSG in the original sched.c
|
||||
@@ -1271,72 +1246,6 @@ struct FireObj {
|
||||
/* 0x78 */ FireObjLight light;
|
||||
}; // size = 0x8B
|
||||
|
||||
struct TargetContext {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f unkC;
|
||||
/* 0x18 */ Color_RGBAf unk18;
|
||||
/* 0x28 */ Color_RGBAf unk28;
|
||||
/* 0x38 */ Actor* unk38;
|
||||
/* 0x3C */ Actor* unk3C;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48;
|
||||
/* 0x4A */ u8 unk4A;
|
||||
/* 0x4B */ u8 unk4B;
|
||||
/* 0x4C */ s8 unk4C;
|
||||
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
|
||||
/* 0x50 */ TargetContextEntry unk50[3];
|
||||
/* 0x8C */ Actor* unk8C;
|
||||
/* 0x90 */ Actor* unk90;
|
||||
/* 0x94 */ Actor* unk_94;
|
||||
}; // size = 0x98
|
||||
|
||||
struct s800B948C {
|
||||
/* 0x00 */ GlobalContext* globalCtx;
|
||||
/* 0x04 */ Actor* actor;
|
||||
/* 0x08 */ u32 updateActorIfSet;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ Actor* unk10;
|
||||
/* 0x14 */ Player* player;
|
||||
/* 0x18 */ u32 runMainIfSet; // Bitmask of actor flags. The actor will only have main called if it has at least 1 flag set that matches this bitmask
|
||||
}; // size = 0x1C
|
||||
|
||||
struct ActorContext {
|
||||
/* 0x000 */ UNK_TYPE1 pad0[0x2];
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x010 */ ActorListEntry actorList[12];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ u32 switchFlags[4]; // First 0x40 are permanent, second 0x40 are temporary
|
||||
/* 0x1C8 */ u32 chestFlags;
|
||||
/* 0x1CC */ u32 clearedRooms;
|
||||
/* 0x1D0 */ u32 clearedRoomsTemp;
|
||||
/* 0x1D4 */ u32 collectibleFlags[4]; // bitfield of 128 bits
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
|
||||
/* 0x1F8 */ f32 unk1F8;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x208 */ UNK_TYPE1 pad208[0x48];
|
||||
/* 0x250 */ void* unk250; // allocation of 0x20f0 bytes?
|
||||
/* 0x254 */ u32 unk254[5];
|
||||
/* 0x268 */ u8 unk268;
|
||||
/* 0x269 */ UNK_TYPE1 pad269[0x3];
|
||||
/* 0x26C */ UNK_TYPE1 pad26C[0xC];
|
||||
/* 0x278 */ u16 unk278;
|
||||
/* 0x27A */ UNK_TYPE1 pad27A[0x2];
|
||||
/* 0x27C */ UNK_TYPE1 pad27C[0x8];
|
||||
}; // size = 0x284
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 seqIndex;
|
||||
/* 0x01 */ u8 nightSeqIndex;
|
||||
@@ -1448,7 +1357,9 @@ struct GlobalContext {
|
||||
/* 0x18B4C */ PreRender pauseBgPreRender;
|
||||
/* 0x18B9C */ char unk_18B9C[0x2B8];
|
||||
/* 0x18E54 */ SceneTableEntry* loadedScene;
|
||||
/* 0x18E58 */ char unk_18E58[0x400];
|
||||
/* 0x18E58 */ char unk_18E58[0x10];
|
||||
/* 0x18E68 */ s32 unk_18E68;
|
||||
/* 0x18E6C */ char unk_18E6C[0x3EC];
|
||||
}; // size = 0x19258
|
||||
|
||||
typedef struct {
|
||||
@@ -1577,6 +1488,11 @@ typedef struct DebugDispObject {
|
||||
/* 0x2C */ s32 pad; //Padding not in the OOT version
|
||||
} DebugDispObject; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 rangeSq;
|
||||
/* 0x4 */ f32 leashScale;
|
||||
} TargetRangeParams; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8* value;
|
||||
/* 0x04 */ const char* name;
|
||||
|
||||
+174
-8
@@ -1,5 +1,5 @@
|
||||
#ifndef _Z64ACTOR_H_
|
||||
#define _Z64ACTOR_H_
|
||||
#ifndef Z64ACTOR_H
|
||||
#define Z64ACTOR_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "z64math.h"
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "z64collision_check.h"
|
||||
#include "unk.h"
|
||||
|
||||
// This value is hardcoded to be the size of ovl_Arrow_Fire which currently is the biggest actor that uses the AM_FIELD.
|
||||
#define AM_FIELD_SIZE SEGMENT_SIZE(ovl_Arrow_Fire)
|
||||
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC collisions
|
||||
#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
|
||||
|
||||
@@ -15,6 +17,7 @@ struct GlobalContext;
|
||||
struct Lights;
|
||||
struct CollisionPoly;
|
||||
|
||||
struct EnBox;
|
||||
struct EnDoor;
|
||||
|
||||
typedef void(*ActorFunc)(struct Actor* this, struct GlobalContext* globalCtx);
|
||||
@@ -118,6 +121,8 @@ typedef struct {
|
||||
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
|
||||
/* 0x14 */ u8 shadowAlpha; // Default is 255
|
||||
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
|
||||
/* 0x16 */ u8 unk_16;
|
||||
/* 0x17 */ u8 unk_17;
|
||||
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDrawOpa
|
||||
} ActorShape; // size = 0x30
|
||||
|
||||
@@ -133,15 +138,15 @@ typedef struct Actor {
|
||||
/* 0x020 */ s16 unk20;
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
/* 0x038 */ s8 cutscene;
|
||||
/* 0x039 */ s8 unk39;
|
||||
/* 0x039 */ u8 audioFlags; // Another set of flags? Seems related to sfx or bgm
|
||||
/* 0x03C */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
|
||||
/* 0x050 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
|
||||
/* 0x050 */ u16 sfxId; // Id of sound effect to play. Plays when value is set, then is cleared the following update cycle
|
||||
/* 0x054 */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position
|
||||
/* 0x058 */ Vec3f scale; // Scale of the actor in each axis
|
||||
/* 0x064 */ Vec3f velocity; // Velocity of the actor in each axis
|
||||
/* 0x070 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane
|
||||
/* 0x074 */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
|
||||
/* 0x078 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x078 */ f32 terminalVelocity; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x07C */ struct CollisionPoly* wallPoly; // Wall polygon the actor is touching
|
||||
/* 0x080 */ struct CollisionPoly* floorPoly; // Floor polygon directly below the actor
|
||||
/* 0x084 */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
|
||||
@@ -170,12 +175,12 @@ typedef struct Actor {
|
||||
/* 0x11C */ u8 colorFilterTimer; // A non-zero value enables the color filter. Decrements automatically
|
||||
/* 0x11D */ u8 isDrawn; // Set to true if the actor is currently being drawn. Always stays false for lens actors
|
||||
/* 0x11E */ u8 dropFlag; // Configures what item is dropped by the actor from `Item_DropCollectibleRandom`
|
||||
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
|
||||
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to Tatl. Default 0xFF
|
||||
/* 0x120 */ struct Actor* parent; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x124 */ struct Actor* child; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x128 */ struct Actor* prev; // Previous actor of this category
|
||||
/* 0x12C */ struct Actor* next; // Next actor of this category
|
||||
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_Init` or `Actor_UpdateAll`
|
||||
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_InitContext` or `Actor_UpdateAll`
|
||||
/* 0x134 */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
|
||||
/* 0x138 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
|
||||
/* 0x13C */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
|
||||
@@ -289,7 +294,8 @@ typedef enum {
|
||||
/* 0x08 */ ACTORCAT_MISC,
|
||||
/* 0x09 */ ACTORCAT_BOSS,
|
||||
/* 0x0A */ ACTORCAT_DOOR,
|
||||
/* 0x0B */ ACTORCAT_CHEST
|
||||
/* 0x0B */ ACTORCAT_CHEST,
|
||||
/* 0x0C */ ACTORCAT_MAX
|
||||
} ActorType;
|
||||
|
||||
typedef struct {
|
||||
@@ -310,6 +316,96 @@ typedef struct {
|
||||
/* 0x0E */ s16 transitionRate;
|
||||
} ActorAnimationEntryS; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x10 */ Color_RGBA8 color;
|
||||
} TargetContextEntry; // size = 0x14
|
||||
|
||||
typedef struct TargetContext {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f targetCenterPos;
|
||||
/* 0x18 */ Color_RGBAf fairyInner;
|
||||
/* 0x28 */ Color_RGBAf fairyOuter;
|
||||
/* 0x38 */ Actor* arrowPointedActor;
|
||||
/* 0x3C */ Actor* targetedActor;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48; // alpha
|
||||
/* 0x4A */ u8 unk4A;
|
||||
/* 0x4B */ u8 unk4B;
|
||||
/* 0x4C */ s8 unk4C;
|
||||
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
|
||||
/* 0x50 */ TargetContextEntry unk50[3];
|
||||
/* 0x8C */ Actor* unk8C;
|
||||
/* 0x90 */ Actor* bgmEnemy;
|
||||
/* 0x94 */ Actor* unk_94;
|
||||
} TargetContext; // size = 0x98
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ TexturePtr texture;
|
||||
/* 0x4 */ s16 x;
|
||||
/* 0x6 */ s16 y;
|
||||
/* 0x8 */ u8 width;
|
||||
/* 0x9 */ u8 height;
|
||||
/* 0xA */ u8 durationTimer; // how long the title card appears for before fading
|
||||
/* 0xB */ u8 delayTimer; // how long the title card waits to appear
|
||||
/* 0xC */ s16 alpha;
|
||||
/* 0xE */ s16 intensity;
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct ActorContext_unk_20C {
|
||||
/* 0x0 */ s16 id;
|
||||
/* 0x2 */ s8 isDynamicallyInitialised;
|
||||
/* 0x4 */ void* ptr;
|
||||
} ActorContext_unk_20C; // size = 0x8
|
||||
|
||||
typedef struct ActorContextFlags {
|
||||
/* 0x00 */ u32 switches[4]; // First 0x40 are permanent, second 0x40 are temporary
|
||||
/* 0x10 */ u32 chest;
|
||||
/* 0x14 */ u32 clearedRoom;
|
||||
/* 0x18 */ u32 clearedRoomTemp;
|
||||
/* 0x1C */ u32 collectible[4]; // bitfield of 128 bits
|
||||
} ActorContextFlags; // size = 0x2C
|
||||
|
||||
typedef struct ActorListEntry {
|
||||
/* 0x0 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x4 */ Actor* first; // pointer to first actor of this type
|
||||
/* 0x8 */ s32 unk_08;
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
typedef struct ActorContext {
|
||||
/* 0x000 */ u8 freezeFlashTimer;
|
||||
/* 0x001 */ UNK_TYPE1 pad1;
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ ActorContextFlags flags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
|
||||
/* 0x1F8 */ f32 unk1F8;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x208 */ UNK_TYPE1 unk_208[0x4];
|
||||
/* 0x20C */ ActorContext_unk_20C unk_20C[8];
|
||||
/* 0x24C */ UNK_TYPE1 unk_24C[0x4];
|
||||
/* 0x250 */ void* absoluteSpace; // Space used to allocate actor overlays of alloc type ALLOCTYPE_ABSOLUTE
|
||||
/* 0x254 */ u32 unk254[5];
|
||||
/* 0x268 */ u8 unk268;
|
||||
/* 0x269 */ UNK_TYPE1 pad269[0x3];
|
||||
/* 0x26C */ Input unk_26C;
|
||||
} ActorContext; // size = 0x284
|
||||
|
||||
typedef enum {
|
||||
/* 0x000 */ ACTOR_PLAYER,
|
||||
/* 0x001 */ ACTOR_EN_TEST,
|
||||
@@ -1004,6 +1100,76 @@ typedef enum {
|
||||
/* 0x2B2 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX"
|
||||
} ActorID;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DOORLOCK_NORMAL,
|
||||
/* 1 */ DOORLOCK_BOSS,
|
||||
/* 2 */ DOORLOCK_2, // DOORLOCK_NORMAL_SPIRIT on OoT
|
||||
/* 3 */ DOORLOCK_MAX
|
||||
} DoorLockType;
|
||||
|
||||
// Targetability / ACTOR_FLAG_TARGETABLE?
|
||||
#define ACTOR_FLAG_1 (1 << 0)
|
||||
//
|
||||
#define ACTOR_FLAG_2 (1 << 1)
|
||||
//
|
||||
#define ACTOR_FLAG_4 (1 << 2)
|
||||
//
|
||||
#define ACTOR_FLAG_8 (1 << 3)
|
||||
//
|
||||
#define ACTOR_FLAG_10 (1 << 4)
|
||||
//
|
||||
#define ACTOR_FLAG_20 (1 << 5)
|
||||
//
|
||||
#define ACTOR_FLAG_40 (1 << 6)
|
||||
// Invisible
|
||||
#define ACTOR_FLAG_80 (1 << 7)
|
||||
// Related to talk
|
||||
#define ACTOR_FLAG_100 (1 << 8)
|
||||
//
|
||||
#define ACTOR_FLAG_200 (1 << 9)
|
||||
//
|
||||
#define ACTOR_FLAG_400 (1 << 10)
|
||||
//
|
||||
#define ACTOR_FLAG_800 (1 << 11)
|
||||
//
|
||||
#define ACTOR_FLAG_1000 (1 << 12)
|
||||
//
|
||||
#define ACTOR_FLAG_2000 (1 << 13)
|
||||
//
|
||||
#define ACTOR_FLAG_4000 (1 << 14)
|
||||
//
|
||||
#define ACTOR_FLAG_8000 (1 << 15)
|
||||
//
|
||||
#define ACTOR_FLAG_10000 (1 << 16)
|
||||
//
|
||||
#define ACTOR_FLAG_20000 (1 << 17)
|
||||
//
|
||||
#define ACTOR_FLAG_40000 (1 << 18)
|
||||
//
|
||||
#define ACTOR_FLAG_80000 (1 << 19)
|
||||
//
|
||||
#define ACTOR_FLAG_100000 (1 << 20)
|
||||
//
|
||||
#define ACTOR_FLAG_200000 (1 << 21)
|
||||
//
|
||||
#define ACTOR_FLAG_400000 (1 << 22)
|
||||
//
|
||||
#define ACTOR_FLAG_800000 (1 << 23)
|
||||
//
|
||||
#define ACTOR_FLAG_1000000 (1 << 24)
|
||||
//
|
||||
#define ACTOR_FLAG_2000000 (1 << 25)
|
||||
//
|
||||
#define ACTOR_FLAG_4000000 (1 << 26)
|
||||
//
|
||||
#define ACTOR_FLAG_8000000 (1 << 27)
|
||||
//
|
||||
#define ACTOR_FLAG_10000000 (1 << 28)
|
||||
//
|
||||
#define ACTOR_FLAG_20000000 (1 << 29)
|
||||
//
|
||||
#define ACTOR_FLAG_40000000 (1 << 30)
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CLEAR_TAG_SMALL_EXPLOSION,
|
||||
/* 0x01 */ CLEAR_TAG_LARGE_EXPLOSION,
|
||||
|
||||
@@ -343,6 +343,7 @@ typedef enum {
|
||||
/* 0x9F */ GI_SHIELD_HERO_2, // Code that treats this as hero's shield is unused, so take with a grain of salt
|
||||
/* 0xA1 */ GI_LETTER_TO_MAMA = 0xA1,
|
||||
/* 0xA9 */ GI_BOTTLE = 0xA9,
|
||||
/* 0xAB */ GI_PENDANT_OF_MEMORIES = 0xAB,
|
||||
/* 0xBA */ GI_MAX = 0xBA
|
||||
} GetItemID;
|
||||
|
||||
@@ -373,4 +374,12 @@ typedef enum {
|
||||
/* 0x68 */ GID_SWORD_GREAT_FAIRY
|
||||
} GetItemDrawID;
|
||||
|
||||
// TODO: fill
|
||||
typedef enum {
|
||||
/* -1 */ EXCH_ITEM_MINUS1 = -1, // Unknown usage or function
|
||||
/* 0x00 */ EXCH_ITEM_NONE,
|
||||
/* 0x1E */ EXCH_ITEM_1E = 0x1E, // BOTTLE_MUSHROOM
|
||||
/* 0x2A */ EXCH_ITEM_2A = 0x2A // MOON_TEAR?
|
||||
} ExchangeItemID;
|
||||
|
||||
#endif
|
||||
|
||||
+11
-10
@@ -1,5 +1,5 @@
|
||||
#ifndef _Z64PLAYER_H_
|
||||
#define _Z64PLAYER_H_
|
||||
#ifndef Z64PLAYER_H
|
||||
#define Z64PLAYER_H
|
||||
|
||||
#include "z64actor.h"
|
||||
#include "os.h"
|
||||
@@ -252,7 +252,7 @@ typedef struct Player {
|
||||
/* 0x32A */ Vec3s morphTable[5];
|
||||
/* 0x348 */ s16 eyeTexId;
|
||||
/* 0x34A */ s16 eyeAnimTimer;
|
||||
/* 0x34C */ Actor* leftHandActor;
|
||||
/* 0x34C */ Actor* heldActor;
|
||||
/* 0x350 */ PosRot leftHandWorld;
|
||||
/* 0x364 */ Actor* rightHandActor;
|
||||
/* 0x368 */ PosRot rightHandWorld;
|
||||
@@ -261,12 +261,12 @@ typedef struct Player {
|
||||
/* 0x37E */ s8 doorTimer;
|
||||
/* 0x37F */ s8 doorNext; // used with spiral staircase
|
||||
/* 0x380 */ Actor* doorActor;
|
||||
/* 0x384 */ s16 unk_384;
|
||||
/* 0x386 */ u16 unk_386;
|
||||
/* 0x388 */ Actor* unk_388;
|
||||
/* 0x38C */ s16 unk_38C;
|
||||
/* 0x384 */ s16 getItemId;
|
||||
/* 0x386 */ u16 getItemDirection;
|
||||
/* 0x388 */ Actor* interactRangeActor;
|
||||
/* 0x38C */ s8 mountSide;
|
||||
/* 0x390 */ Actor* rideActor;
|
||||
/* 0x394 */ u8 unk_394;
|
||||
/* 0x394 */ u8 csMode;
|
||||
/* 0x395 */ u8 unk_395;
|
||||
/* 0x396 */ u8 unk_396;
|
||||
/* 0x397 */ u8 unk_397;
|
||||
@@ -289,7 +289,8 @@ typedef struct Player {
|
||||
/* 0x664 */ ColliderQuad shieldQuad;
|
||||
/* 0x6E4 */ ColliderCylinder shieldCylinder;
|
||||
/* 0x730 */ Actor* unk_730;
|
||||
/* 0x734 */ char unk_734[8];
|
||||
/* 0x734 */ char unk_734[4];
|
||||
/* 0x738 */ s32 unk_738;
|
||||
/* 0x73C */ s32 blureEffectIndex[3];
|
||||
/* 0x748 */ char unk_748[0x320];
|
||||
/* 0xA68 */ PlayerAgeProperties* ageProperties; // repurposed as "transformation properties"?
|
||||
@@ -301,7 +302,7 @@ typedef struct Player {
|
||||
/* 0xA80 */ Actor* tatlActor;
|
||||
/* 0xA84 */ s16 tatlTextId;
|
||||
/* 0xA86 */ s8 unk_A86;
|
||||
/* 0xA87 */ s8 unk_A87;
|
||||
/* 0xA87 */ s8 exchangeItemId;
|
||||
/* 0xA88 */ Actor* targetActor;
|
||||
/* 0xA8C */ f32 targetActorDistance;
|
||||
/* 0xA90 */ Actor* unk_A90;
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ typedef struct {
|
||||
/* 0x3F5C */ s32 unk_3F5C; // "bet_rupees"
|
||||
/* 0x3F60 */ u8 unk_3F60; // "framescale_flag"
|
||||
/* 0x3F64 */ f32 unk_3F64; // "framescale_scale"
|
||||
/* 0x3F68 */ u32 unk_3F68[5][120];
|
||||
/* 0x3F68 */ u32 cycleSceneFlags[120][5];
|
||||
/* 0x48C8 */ u16 unk_48C8; // "scene_id_mix"
|
||||
/* 0x48CA */ u8 maskMaskBit[3]; // masks given away on the Moon
|
||||
/* 0x48CD */ char unk_48CD[24];
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ typedef struct {
|
||||
/* 0x04 */ s16 id;
|
||||
/* 0x06 */ Vec3s pos;
|
||||
/* 0x0C */ s16 rotY;
|
||||
/* 0x0E */ s16 params;
|
||||
/* 0x0E */ u16 params;
|
||||
} TransitionActorEntry; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user