mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z64player.h and Player struct work (#195)
* Rename Player, name some of its struct vars, add collision flag macros to actors missing them * Name Player_GetMask/RemoveMask, add a few macros * Format * Update include/functions.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Fix unk_14B in a non-matching Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
co-authored by
engineer124
parent
abef65a6db
commit
e57fb5780d
+13
-13
@@ -715,7 +715,7 @@ void func_800B4F78(TargetContext* targetContext, u8 type, GlobalContext* globalC
|
||||
void func_800B5040(TargetContext* targetContext, Actor* actor, u8 type, GlobalContext* globalCtx);
|
||||
void Actor_TargetContextInit(TargetContext* targetCtx, Actor* actor, GlobalContext* globalCtx);
|
||||
void func_800B5208(TargetContext* targetCtx, GlobalContext* globalCtx);
|
||||
void func_800B5814(TargetContext* targetContext, ActorPlayer* player, Actor* param_3, GlobalContext* globalCtx);
|
||||
void func_800B5814(TargetContext* targetContext, Player* player, Actor* param_3, GlobalContext* globalCtx);
|
||||
u32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
|
||||
void Actor_SetSwitchFlag(GlobalContext* globalCtx, s32 flag);
|
||||
void Actor_UnsetSwitchFlag(GlobalContext* globalCtx, s32 flag);
|
||||
@@ -777,7 +777,7 @@ f32 Actor_XZDistanceToPoint(Actor* actor, Vec3f* point);
|
||||
void Actor_CalcOffsetOrientedToDrawRotation(Actor* actor, Vec3f* offset, Vec3f* point);
|
||||
f32 Actor_YDistance(Actor* actor1, Actor* actor2);
|
||||
void func_800B6F20(GlobalContext* globalCtx, s32 param_2, f32 param_3, s16 param_4);
|
||||
float func_800B6FC8(ActorPlayer* player);
|
||||
float func_800B6FC8(Player* player);
|
||||
// void func_800B7090(void);
|
||||
// void func_800B7118(void);
|
||||
// void func_800B7128(void);
|
||||
@@ -807,7 +807,7 @@ void func_800B8050(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
|
||||
void func_800B8118(Actor* actor, GlobalContext* globalCtx, 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);
|
||||
f32* func_800B8248(PosRot* param_1, Player* param_2);
|
||||
// void func_800B82EC(void);
|
||||
// void func_800B83BC(void);
|
||||
// void func_800B83F8(void);
|
||||
@@ -2214,8 +2214,8 @@ s32 func_801224E0(s32 param_1, s16 param_2, s16 param_3);
|
||||
// void func_801226E0(void);
|
||||
void func_80122744(GlobalContext* globalCtx, UNK_PTR arg1, u32 arg2, Vec3s* arg3);
|
||||
s32 func_80122760(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2);
|
||||
void func_80122868(GlobalContext* globalCtx, ActorPlayer* player);
|
||||
void func_801229A0(GlobalContext* globalCtx, ActorPlayer* player);
|
||||
void func_80122868(GlobalContext* globalCtx, Player* player);
|
||||
void func_801229A0(GlobalContext* globalCtx, Player* player);
|
||||
// void func_801229EC(void);
|
||||
// void func_801229FC(void);
|
||||
// void func_80122BA4(void);
|
||||
@@ -2223,13 +2223,13 @@ void func_801229A0(GlobalContext* globalCtx, ActorPlayer* player);
|
||||
// void func_80122D44(void);
|
||||
// void func_80122ED8(void);
|
||||
// void func_80122EEC(void);
|
||||
void func_80122F28(ActorPlayer* player, GlobalContext* globalCtx, Actor* actor);
|
||||
void func_80122F28(Player* player, GlobalContext* globalCtx, Actor* actor);
|
||||
// void func_80122F9C(void);
|
||||
// void func_80122FCC(void);
|
||||
// void func_8012300C(void);
|
||||
void func_8012301C(s32 iParm1, GlobalContext* globalCtx);
|
||||
void func_80123140(GlobalContext* globalCtx, ActorPlayer* param_2);
|
||||
u32 func_80123358(GlobalContext* globalCtx, ActorPlayer* player);
|
||||
void func_80123140(GlobalContext* globalCtx, Player* param_2);
|
||||
u32 func_80123358(GlobalContext* globalCtx, Player* player);
|
||||
u32 func_801233E4(GlobalContext* globalCtx);
|
||||
// void func_80123420(void);
|
||||
// void func_80123434(void);
|
||||
@@ -2246,17 +2246,17 @@ s32 func_80123590(GlobalContext* globalCtx, Actor* actor);
|
||||
// void func_80123C58(void);
|
||||
// void func_80123C90(void);
|
||||
// void func_80123D50(void);
|
||||
void func_80123DA4(ActorPlayer* player);
|
||||
void func_80123DA4(Player* player);
|
||||
// void func_80123DC0(void);
|
||||
// void func_80123E90(void);
|
||||
// void func_80123F2C(void);
|
||||
// void func_80123F48(void);
|
||||
// void func_80124020(void);
|
||||
u32 func_8012403C(GlobalContext* globalCtx); // Player_IsWearingAMask
|
||||
void func_8012404C(GlobalContext* globalCtx);
|
||||
u32 Player_GetMask(GlobalContext* globalCtx);
|
||||
void Player_RemoveMask(GlobalContext* globalCtx);
|
||||
// void func_8012405C(void);
|
||||
// void func_80124088(void);
|
||||
s32 func_801240C8(ActorPlayer* player);
|
||||
s32 func_801240C8(Player* player);
|
||||
// void func_801240DC(void);
|
||||
// void func_80124110(void);
|
||||
// void func_80124148(void);
|
||||
@@ -2345,7 +2345,7 @@ void Quake2_SetCountdown(s16 countdown);
|
||||
// s16 Quake2_GetType(void);
|
||||
void Quake2_SetType(s16 type);
|
||||
void Quake2_ClearType(s16 type);
|
||||
u32 Quake2_GetFloorQuake(ActorPlayer* player);
|
||||
u32 Quake2_GetFloorQuake(Player* player);
|
||||
// void Quake2_Update(void);
|
||||
// void Quake_NumActiveQuakes(void);
|
||||
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
|
||||
(curState)->nextGameStateSize = sizeof(newStruct);
|
||||
|
||||
#define PLAYER ((ActorPlayer*)globalCtx->actorCtx.actorList[ACTORCAT_PLAYER].first)
|
||||
#define PLAYER ((Player*)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
|
||||
|
||||
+11
-3
@@ -32,6 +32,7 @@
|
||||
#include <z64light.h>
|
||||
#include <z64math.h>
|
||||
#include <z64object.h>
|
||||
#include "z64player.h"
|
||||
#include <z64scene.h>
|
||||
#include <z64save.h>
|
||||
|
||||
@@ -1343,7 +1344,7 @@ struct Camera {
|
||||
/* 0x084 */ f32 unk84;
|
||||
/* 0x088 */ f32 unk88;
|
||||
/* 0x08C */ GlobalContext* globalCtx;
|
||||
/* 0x090 */ ActorPlayer* player;
|
||||
/* 0x090 */ Player* player;
|
||||
/* 0x094 */ PosRot unk94;
|
||||
/* 0x0A8 */ Actor* unkA8;
|
||||
/* 0x0AC */ Vec3f unkAC;
|
||||
@@ -1451,7 +1452,7 @@ struct s800B948C {
|
||||
/* 0x08 */ u32 updateActorIfSet;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ Actor* unk10;
|
||||
/* 0x14 */ ActorPlayer* player;
|
||||
/* 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
|
||||
|
||||
@@ -1525,7 +1526,14 @@ struct GlobalContext {
|
||||
/* 0x17D88 */ ObjectContext objectCtx;
|
||||
/* 0x186E0 */ RoomContext roomContext;
|
||||
/* 0x18760 */ TransitionContext transitionCtx;
|
||||
/* 0x18768 */ UNK_TYPE1 pad18768[0x30];
|
||||
/* 0x18768 */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader);
|
||||
/* 0x1876C */ void (*playerUpdate)(Player* player, struct GlobalContext* globalCtx, Input* input);
|
||||
/* 0x18770 */ UNK_TYPE1 pad18770[0x8];
|
||||
/* 0x18778 */ s32 (*grabPlayer)(struct GlobalContext* globalCtx, Player* player);
|
||||
/* 0x1877C */ s32 (*func_1877C)(struct GlobalContext* globalCtx, Player* player, s32 arg2);
|
||||
/* 0x18780 */ void (*func_18780)(Player* player, struct GlobalContext* globalCtx);
|
||||
/* 0x18784 */ s32 (*damagePlayer)(struct GlobalContext* globalCtx, s32 damage);
|
||||
/* 0x18788 */ UNK_TYPE1 pad18788[0x10];
|
||||
/* 0x18798 */ void (*func_18798)(struct GlobalContext* globalCtx, void* arg1, s32 arg2);
|
||||
/* 0x1879C */ UNK_TYPE1 pad1879C[0x14];
|
||||
/* 0x187B0 */ MtxF unk187B0;
|
||||
|
||||
@@ -212,71 +212,6 @@ typedef struct {
|
||||
/* 0x15A */ s16 pad15A;
|
||||
} DynaPolyActor; // size = 0x15C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ UNK_TYPE1 unk144;
|
||||
/* 0x145 */ UNK_TYPE1 pad145[0x2];
|
||||
/* 0x147 */ s8 itemActionParam;
|
||||
/* 0x148 */ UNK_TYPE1 pad148[0x2];
|
||||
/* 0x14A */ s8 heldItemActionParam;
|
||||
/* 0x14B */ u8 unk14B;
|
||||
/* 0x14C */ UNK_TYPE1 pad14C[0x5];
|
||||
/* 0x151 */ u8 unk151;
|
||||
/* 0x152 */ UNK_TYPE1 unk152;
|
||||
/* 0x153 */ u8 unk153; // isWearingAMask
|
||||
/* 0x154 */ UNK_TYPE1 pad154[0x1F8];
|
||||
/* 0x34C */ Actor* heldActor;
|
||||
/* 0x350 */ UNK_TYPE1 pad350[0x18];
|
||||
/* 0x368 */ Vec3f unk368;
|
||||
/* 0x374 */ UNK_TYPE1 pad374[0x8];
|
||||
/* 0x37C */ s8 doorType;
|
||||
/* 0x37D */ s8 doorDirection;
|
||||
/* 0x37E */ s8 doorTimer;
|
||||
/* 0x37F */ s8 unk37F;
|
||||
/* 0x380 */ Actor* doorActor;
|
||||
/* 0x384 */ UNK_TYPE1 unk384[0x10];
|
||||
/* 0x394 */ u8 unk394;
|
||||
/* 0x395 */ UNK_TYPE1 pad395[0x37];
|
||||
/* 0x3CC */ s16 unk3CC;
|
||||
/* 0x3CE */ s8 unk3CE;
|
||||
/* 0x3CF */ UNK_TYPE1 pad3CF[0x361];
|
||||
/* 0x730 */ Actor* unk730;
|
||||
/* 0x734 */ UNK_TYPE1 pad734[0x338];
|
||||
/* 0xA6C */ u32 stateFlags1;
|
||||
/* 0xA70 */ u32 unkA70;
|
||||
/* 0xA74 */ u32 unkA74;
|
||||
/* 0xA78 */ UNK_TYPE1 padA78[0x8];
|
||||
/* 0xA80 */ Actor* unkA80;
|
||||
/* 0xA84 */ UNK_TYPE1 padA84[0x4];
|
||||
/* 0xA88 */ Actor* unkA88;
|
||||
/* 0xA8C */ f32 unkA8C;
|
||||
/* 0xA90 */ UNK_TYPE1 padA90[0x44];
|
||||
/* 0xAD4 */ s16 unkAD4;
|
||||
/* 0xAD6 */ UNK_TYPE1 padAD6[0x8];
|
||||
/* 0xADE */ u8 unkADE;
|
||||
/* 0xADF */ UNK_TYPE1 padADF[0x4];
|
||||
/* 0xAE3 */ s8 unkAE3;
|
||||
/* 0xAE4 */ UNK_TYPE1 padAE4[0x3];
|
||||
/* 0xAE7 */ s8 unkAE7;
|
||||
/* 0xAE8 */ UNK_TYPE1 padAE8[0x20];
|
||||
/* 0xB08 */ f32 unkB08;
|
||||
/* 0xB0C */ UNK_TYPE1 padB0C[0x1C];
|
||||
/* 0xB28 */ s16 unkB28;
|
||||
/* 0xB2A */ UNK_TYPE1 padB2A[0x1E];
|
||||
/* 0xB48 */ f32 unkB48;
|
||||
/* 0xB4C */ UNK_TYPE1 padB4C[0x34];
|
||||
/* 0xB80 */ f32 unk_B80;
|
||||
/* 0xB84 */ s16 unk_B84;
|
||||
/* 0xB86 */ char unk_B86[0x16];
|
||||
/* 0xB9C */ Vec3f unkB9C;
|
||||
/* 0xBA8 */ UNK_TYPE1 padBA8[0x44];
|
||||
/* 0xBEC */ Vec3f bodyPartsPos[18];
|
||||
/* 0xCC4 */ MtxF mf_CC4;
|
||||
/* 0xD04 */ MtxF unkD04;
|
||||
/* 0xD44 */ UNK_TYPE1 padD44[0x18];
|
||||
/* 0xD5C */ s8 invincibilityTimer;
|
||||
/* 0xD5D */ UNK_TYPE1 padD5D[0x1B];
|
||||
} ActorPlayer; // size = 0xD78
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
#ifndef _Z64PLAYER_H_
|
||||
#define _Z64PLAYER_H_
|
||||
|
||||
#include "z64actor.h"
|
||||
#include "os.h"
|
||||
|
||||
struct Player;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_SHIELD_NONE,
|
||||
/* 0x01 */ PLAYER_SHIELD_HEROS_SHIELD,
|
||||
/* 0x02 */ PLAYER_SHIELD_MIRROR_SHIELD,
|
||||
/* 0x03 */ PLAYER_SHIELD_MAX
|
||||
} PlayerShield;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_FORM_FIERCE_DEITY,
|
||||
/* 0x01 */ PLAYER_FORM_GORON,
|
||||
/* 0x02 */ PLAYER_FORM_ZORA,
|
||||
/* 0x03 */ PLAYER_FORM_DEKU,
|
||||
/* 0x04 */ PLAYER_FORM_HUMAN,
|
||||
/* 0x05 */ PLAYER_FORM_MAX
|
||||
} PlayerTransformation;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_MASK_NONE,
|
||||
/* 0x01 */ PLAYER_MASK_MASK_OF_TRUTH,
|
||||
/* 0x02 */ PLAYER_MASK_KAFEIS_MASK,
|
||||
/* 0x03 */ PLAYER_MASK_ALL_NIGHT_MASK,
|
||||
/* 0x04 */ PLAYER_MASK_BUNNY_HOOD,
|
||||
/* 0x05 */ PLAYER_MASK_KEATON_MASK,
|
||||
/* 0x06 */ PLAYER_MASK_GAROS_MASK,
|
||||
/* 0x07 */ PLAYER_MASK_ROMANIS_MASK,
|
||||
/* 0x08 */ PLAYER_MASK_CIRCUS_LEADERS_MASK,
|
||||
/* 0x09 */ PLAYER_MASK_POSTMANS_HAT,
|
||||
/* 0x0A */ PLAYER_MASK_COUPLES_MASK,
|
||||
/* 0x0B */ PLAYER_MASK_GREAT_FAIRYS_MASK,
|
||||
/* 0x0C */ PLAYER_MASK_GIBDO_MASK,
|
||||
/* 0x0D */ PLAYER_MASK_DON_GEROS_MASK,
|
||||
/* 0x0E */ PLAYER_MASK_KAMAROS_MASK,
|
||||
/* 0x0F */ PLAYER_MASK_CAPTAINS_HAT,
|
||||
/* 0x10 */ PLAYER_MASK_STONE_MASK,
|
||||
/* 0x11 */ PLAYER_MASK_BREMEN_MASK,
|
||||
/* 0x12 */ PLAYER_MASK_BLAST_MASK,
|
||||
/* 0x13 */ PLAYER_MASK_MASK_OF_SCENTS,
|
||||
/* 0x14 */ PLAYER_MASK_GIANTS_MASK,
|
||||
/* 0x15 */ PLAYER_MASK_FIERCE_DEITYS_MASK,
|
||||
/* 0x16 */ PLAYER_MASK_GORON_MASK,
|
||||
/* 0x17 */ PLAYER_MASK_ZORA_MASK,
|
||||
/* 0x18 */ PLAYER_MASK_DEKU_MASK,
|
||||
/* 0x19 */ PLAYER_MASK_MAX
|
||||
} PlayerMask;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ f32 unk_14;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ f32 unk_1C;
|
||||
/* 0x20 */ f32 unk_20;
|
||||
/* 0x24 */ f32 unk_24;
|
||||
/* 0x28 */ f32 unk_28;
|
||||
/* 0x2C */ f32 unk_2C;
|
||||
/* 0x30 */ f32 unk_30;
|
||||
/* 0x34 */ f32 unk_34;
|
||||
/* 0x38 */ f32 unk_38;
|
||||
/* 0x3C */ f32 unk_3C;
|
||||
/* 0x40 */ f32 unk_40;
|
||||
/* 0x44 */ Vec3s unk_44;
|
||||
/* 0x4A */ Vec3s unk_4A[4];
|
||||
/* 0x62 */ Vec3s unk_62[4];
|
||||
/* 0x7A */ Vec3s unk_7A[4];
|
||||
/* 0x92 */ u16 unk_92;
|
||||
/* 0x94 */ u16 unk_94;
|
||||
/* 0x98 */ f32 unk_98;
|
||||
/* 0x9C */ f32 unk_9C;
|
||||
/* 0xA0 */ LinkAnimationHeader* unk_A0;
|
||||
/* 0xA4 */ LinkAnimationHeader* unk_A4;
|
||||
/* 0xA8 */ LinkAnimationHeader* unk_A8;
|
||||
/* 0xAC */ LinkAnimationHeader* unk_AC;
|
||||
/* 0xB0 */ LinkAnimationHeader* unk_B0;
|
||||
/* 0xB4 */ LinkAnimationHeader* unk_B4[4];
|
||||
/* 0xC4 */ LinkAnimationHeader* unk_C4[2];
|
||||
/* 0xCC */ LinkAnimationHeader* unk_CC[2];
|
||||
/* 0xD4 */ LinkAnimationHeader* unk_D4[2];
|
||||
} PlayerAgeProperties; // size = 0xDC
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 active;
|
||||
/* 0x04 */ Vec3f tip;
|
||||
/* 0x10 */ Vec3f base;
|
||||
} WeaponInfo; // size = 0x1C
|
||||
|
||||
|
||||
typedef void (*PlayerFuncD58)(struct GlobalContext*, struct Player*);
|
||||
|
||||
|
||||
typedef struct Player {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ s8 currentShield;
|
||||
/* 0x145 */ s8 currentBoots;
|
||||
/* 0x146 */ s8 heldItemButton;
|
||||
/* 0x147 */ s8 itemActionParam;
|
||||
/* 0x148 */ u8 heldItemId;
|
||||
/* 0x149 */ s8 prevBoots;
|
||||
/* 0x14A */ s8 heldItemActionParam;
|
||||
/* 0x14B */ u8 transformation;
|
||||
/* 0x14C */ u8 modelGroup;
|
||||
/* 0x14D */ u8 nextModelGroup;
|
||||
/* 0x14E */ s8 unk_14E;
|
||||
/* 0x14F */ u8 modelAnimType;
|
||||
/* 0x150 */ u8 leftHandType;
|
||||
/* 0x151 */ u8 rightHandType;
|
||||
/* 0x152 */ u8 sheathType;
|
||||
/* 0x153 */ u8 currentMask;
|
||||
/* 0x154 */ s8 unk_154;
|
||||
/* 0x155 */ u8 prevMask;
|
||||
/* 0x158 */ Gfx** rightHandDLists;
|
||||
/* 0x15C */ Gfx** leftHandDLists;
|
||||
/* 0x160 */ Gfx** sheathDLists;
|
||||
/* 0x164 */ Gfx** waistDLists;
|
||||
/* 0x168 */ f32 unk_168;
|
||||
/* 0x16C */ f32 unk_16C;
|
||||
/* 0x170 */ f32 unk_170;
|
||||
/* 0x174 */ f32 unk_174;
|
||||
/* 0x178 */ f32 unk_178;
|
||||
/* 0x17C */ f32 unk_17C;
|
||||
/* 0x180 */ f32 unk_180;
|
||||
/* 0x184 */ f32 unk_184;
|
||||
/* 0x188 */ f32 unk_188;
|
||||
/* 0x18C */ f32 unk_18C;
|
||||
/* 0x190 */ f32 unk_190;
|
||||
/* 0x194 */ f32 unk_194;
|
||||
/* 0x198 */ f32 unk_198;
|
||||
/* 0x19C */ f32 unk_19C;
|
||||
/* 0x1A0 */ f32 unk_1A0;
|
||||
/* 0x1A4 */ f32 unk_1A4;
|
||||
/* 0x1A8 */ f32 unk_1A8;
|
||||
/* 0x1AC */ f32 unk_1AC;
|
||||
/* 0x1B0 */ f32 unk_1B0;
|
||||
/* 0x1B4 */ s16 unk_1B4;
|
||||
/* 0x1B6 */ char unk_1B6[2];
|
||||
/* 0x1B8 */ u8 giObjectLoading;
|
||||
/* 0x1BC */ DmaRequest giObjectDmaRequest;
|
||||
/* 0x1DC */ OSMesgQueue giObjectLoadQueue;
|
||||
/* 0x1F4 */ OSMesg giObjectLoadMsg;
|
||||
/* 0x1F8 */ void* giObjectSegment;
|
||||
/* 0x1FC */ u8 maskObjectLoading;
|
||||
/* 0x1FD */ s8 maskId;
|
||||
/* 0x200 */ DmaRequest maskDmaRequest;
|
||||
/* 0x220 */ OSMesgQueue maskObjectLoadQueue;
|
||||
/* 0x238 */ OSMesg maskObjectLoadMsg;
|
||||
/* 0x23C */ void* maskObjectSegment;
|
||||
/* 0x240 */ SkelAnime skelAnime;
|
||||
/* 0x284 */ SkelAnime unk_284;
|
||||
/* 0x2C8 */ SkelAnime unk_2C8;
|
||||
/* 0x30C */ Vec3s jointTable[5];
|
||||
/* 0x32A */ Vec3s morphTable[5];
|
||||
/* 0x348 */ s16 eyeTexId;
|
||||
/* 0x34A */ s16 eyeAnimTimer;
|
||||
/* 0x34C */ Actor* leftHandActor;
|
||||
/* 0x350 */ PosRot leftHandWorld;
|
||||
/* 0x364 */ Actor* rightHandActor;
|
||||
/* 0x368 */ PosRot rightHandWorld;
|
||||
/* 0x37C */ s8 doorType;
|
||||
/* 0x37D */ s8 doorDirection;
|
||||
/* 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;
|
||||
/* 0x390 */ Actor* unk_390;
|
||||
/* 0x394 */ u8 unk_394;
|
||||
/* 0x395 */ u8 unk_395;
|
||||
/* 0x396 */ u8 unk_396;
|
||||
/* 0x397 */ u8 unk_397;
|
||||
/* 0x398 */ Actor* unk_398;
|
||||
/* 0x39C */ s16 unk_39C;
|
||||
/* 0x39E */ s16 unk_39E;
|
||||
/* 0x3A0 */ Vec3f unk_3A0;
|
||||
/* 0x3AC */ Vec3f unk_3AC;
|
||||
/* 0x3B8 */ u16 unk_3B8;
|
||||
/* 0x3BA */ s16 unk_3BA;
|
||||
/* 0x3BC */ s16 unk_3BC;
|
||||
/* 0x3BE */ char unk_3BE[2];
|
||||
/* 0x3C0 */ Vec3f unk_3C0;
|
||||
/* 0x3CC */ s16 unk_3CC;
|
||||
/* 0x3CE */ s8 unk_3CE;
|
||||
/* 0x3CF */ u8 unk_3CF;
|
||||
/* 0x3D0 */ char unk_3D0[0x148];
|
||||
/* 0x518 */ ColliderCylinder cylinder;
|
||||
/* 0x564 */ ColliderQuad swordQuads[2];
|
||||
/* 0x664 */ ColliderQuad shieldQuad;
|
||||
/* 0x6E4 */ ColliderCylinder shieldCylinder;
|
||||
/* 0x730 */ Actor* unk_730;
|
||||
/* 0x734 */ char unk_734[8];
|
||||
/* 0x73C */ s32 blureEffectIndex[3];
|
||||
/* 0x748 */ char unk_748[0x320];
|
||||
/* 0xA68 */ PlayerAgeProperties* ageProperties; // repurposed as "transformation properties"?
|
||||
/* 0xA6C */ u32 stateFlags1;
|
||||
/* 0xA70 */ u32 stateFlags2;
|
||||
/* 0xA74 */ u32 stateFlags3;
|
||||
/* 0xA78 */ Actor* unk_A78;
|
||||
/* 0xA7C */ Actor* boomerangActor;
|
||||
/* 0xA80 */ Actor* naviActor;
|
||||
/* 0xA84 */ s16 naviTextId;
|
||||
/* 0xA86 */ s8 unk_A86;
|
||||
/* 0xA87 */ s8 unk_A87;
|
||||
/* 0xA88 */ Actor* targetActor;
|
||||
/* 0xA8C */ f32 targetActorDistance;
|
||||
/* 0xA90 */ Actor* unk_A90;
|
||||
/* 0xA94 */ f32 unk_A94;
|
||||
/* 0xA98 */ Actor* unk_A98;
|
||||
/* 0xA9C */ f32 unk_A9C;
|
||||
/* 0xAA0 */ f32 unk_AA0;
|
||||
/* 0xAA4 */ s8 unk_AA4;
|
||||
/* 0xAA5 */ u8 unk_AA5;
|
||||
/* 0xAA6 */ u16 unk_AA6;
|
||||
/* 0xAA8 */ s16 unk_AA8;
|
||||
/* 0xAAA */ s16 unk_AAA;
|
||||
/* 0xAAC */ Vec3s unk_AAC;
|
||||
/* 0xAB2 */ Vec3s unk_AB2;
|
||||
/* 0xAB8 */ f32 unk_AB8;
|
||||
/* 0xABC */ f32 unk_ABC;
|
||||
/* 0xAC0 */ f32 unk_AC0;
|
||||
/* 0xAC4 */ void* unk_AC4;
|
||||
/* 0xAC8 */ f32 unk_AC8;
|
||||
/* 0xACC */ s16 unk_ACC;
|
||||
/* 0xACE */ s8 unk_ACE;
|
||||
/* 0xACF */ u8 unk_ACF;
|
||||
/* 0xAD0 */ f32 linearVelocity;
|
||||
/* 0xAD4 */ s16 currentYaw;
|
||||
/* 0xAD6 */ s16 targetYaw;
|
||||
/* 0xAD8 */ u16 unk_AD8;
|
||||
/* 0xADA */ s8 swordAnimation;
|
||||
/* 0xADB */ s8 swordState;
|
||||
/* 0xADC */ s8 unk_ADC;
|
||||
/* 0xADD */ s8 unk_ADD;
|
||||
/* 0xADE */ u8 unk_ADE;
|
||||
/* 0xADF */ s8 unk_ADF[4];
|
||||
/* 0xAE3 */ s8 unk_AE3[4];
|
||||
/* 0xAE7 */ s8 unk_AE7; // a timer
|
||||
/* 0xAE8 */ s16 unk_AE8; // multipurpose timer
|
||||
/* 0xAEC */ f32 unk_AEC;
|
||||
/* 0xAF0 */ Vec3f unk_AF0[2];
|
||||
/* 0xB08 */ f32 unk_B08[8];
|
||||
/* 0xB28 */ s16 unk_B28;
|
||||
/* 0xB2A */ s8 unk_B2A;
|
||||
/* 0xB2B */ s8 unk_B2B;
|
||||
/* 0xB2C */ f32 windSpeed;
|
||||
/* 0xB30 */ s16 windAngleX;
|
||||
/* 0xB32 */ s16 windAngleY;
|
||||
/* 0xB34 */ f32 unk_B34;
|
||||
/* 0xB38 */ f32 unk_B38;
|
||||
/* 0xB3C */ f32 unk_B3C;
|
||||
/* 0xB40 */ f32 unk_B40;
|
||||
/* 0xB44 */ f32 unk_B44;
|
||||
/* 0xB48 */ f32 unk_B48;
|
||||
/* 0xB4C */ s16 unk_B4C;
|
||||
/* 0xB4E */ s16 unk_B4E;
|
||||
/* 0xB50 */ f32 unk_B50;
|
||||
/* 0xB54 */ f32 unk_B54;
|
||||
/* 0xB58 */ f32 unk_B58;
|
||||
/* 0xB5C */ u8 unk_B5C;
|
||||
/* 0xB5D */ u8 unk_B5D;
|
||||
/* 0xB5E */ u8 unk_B5E;
|
||||
/* 0xB5F */ u8 unk_B5F;
|
||||
/* 0xB60 */ u16 unk_B60; // blast mask timer?
|
||||
/* 0xB62 */ s16 unk_B62;
|
||||
/* 0xB64 */ u8 unk_B64;
|
||||
/* 0xB65 */ u8 unk_B65;
|
||||
/* 0xB66 */ u8 unk_B66;
|
||||
/* 0xB67 */ u8 unk_B67; // deku hop timer?
|
||||
/* 0xB68 */ s16 unk_B68;
|
||||
/* 0xB6A */ s16 unk_B6A;
|
||||
/* 0xB6C */ s16 unk_B6C;
|
||||
/* 0xB6E */ s16 unk_B6E;
|
||||
/* 0xB70 */ s16 unk_B70;
|
||||
/* 0xB72 */ u16 unk_B72; // floor type?
|
||||
/* 0xB74 */ u8 unk_B74;
|
||||
/* 0xB75 */ u8 unk_B75;
|
||||
/* 0xB76 */ s16 unk_B76;
|
||||
/* 0xB78 */ f32 unk_B78;
|
||||
/* 0xB7C */ f32 unk_B7C;
|
||||
/* 0xB80 */ f32 unk_B80;
|
||||
/* 0xB84 */ s16 unk_B84;
|
||||
/* 0xB86 */ s16 unk_B86;
|
||||
/* 0xB88 */ s16 unk_B88;
|
||||
/* 0xB8A */ s16 unk_B8A;
|
||||
/* 0xB8C */ s16 unk_B8C;
|
||||
/* 0xB8E */ s16 unk_B8E;
|
||||
/* 0xB90 */ s16 unk_B90;
|
||||
/* 0xB92 */ s16 unk_B92;
|
||||
/* 0xB94 */ s16 unk_B94;
|
||||
/* 0xB96 */ s16 unk_B96;
|
||||
/* 0xB98 */ WeaponInfo swordInfo[3];
|
||||
/* 0xBEC */ Vec3f bodyPartsPos[18];
|
||||
/* 0xCC4 */ MtxF mf_CC4;
|
||||
/* 0xD04 */ MtxF shieldMf;
|
||||
/* 0xD44 */ u8 isBurning;
|
||||
/* 0xD45 */ u8 flameTimers[18]; // one flame per body part
|
||||
/* 0xD57 */ u8 unk_D57;
|
||||
/* 0xD58 */ PlayerFuncD58 unk_D58;
|
||||
/* 0xD5C */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
|
||||
/* 0xD5D */ u8 unk_D5D;
|
||||
/* 0xD5E */ u8 unk_D5E;
|
||||
/* 0xD5F */ u8 unk_D5F;
|
||||
/* 0xD60 */ f32 unk_D60;
|
||||
/* 0xD64 */ s16 unk_D64;
|
||||
/* 0xD66 */ u16 unk_D66;
|
||||
/* 0xD68 */ s16 unk_D68;
|
||||
/* 0xD6A */ s8 unk_D6A;
|
||||
/* 0xD6B */ u8 unk_D6B;
|
||||
/* 0xD6C */ Vec3f unk_D6C; // previous body part 0 position
|
||||
} Player; // size = 0xD78
|
||||
|
||||
#endif
|
||||
@@ -50,7 +50,7 @@ void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* a
|
||||
angleChange = colCtx->dyna.bgActors[index].curTransform.rot.y - colCtx->dyna.bgActors[index].prevTransform.rot.y;
|
||||
|
||||
if (actor->id == 0) {
|
||||
((ActorPlayer*)actor)->unkAD4 += angleChange;
|
||||
((Player*)actor)->currentYaw += angleChange;
|
||||
}
|
||||
|
||||
actor->shape.rot.y += angleChange;
|
||||
|
||||
@@ -55,7 +55,7 @@ s32 func_800E8FA4(Actor* actor, Vec3f* param_2, Vec3s* param_3, Vec3s* param_4)
|
||||
}
|
||||
|
||||
s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, f32 param_5) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
|
||||
@@ -74,15 +74,16 @@ s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
|
||||
if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) {
|
||||
local_14 = globalCtx->view.eye;
|
||||
} else {
|
||||
local_14 = player->base.focus.pos;
|
||||
local_14 = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_800E8FA4(actor, &local_14, param_3, param_4);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
|
||||
@@ -100,7 +101,7 @@ s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
|
||||
if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) {
|
||||
local_14 = globalCtx->view.eye;
|
||||
} else {
|
||||
local_14 = player->base.focus.pos;
|
||||
local_14 = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_800E8FA4(actor, &local_14, param_3, param_4);
|
||||
|
||||
@@ -875,9 +875,9 @@ void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f*
|
||||
#endif
|
||||
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
|
||||
EffectSsFireTail_SpawnFlame(globalCtx, &player->base, &player->bodyPartsPos[bodyPart], scale, bodyPart,
|
||||
EffectSsFireTail_SpawnFlame(globalCtx, &player->actor, &player->bodyPartsPos[bodyPart], scale, bodyPart,
|
||||
colorIntensity);
|
||||
}
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ void func_800A6780(EnItem00* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
|
||||
if (this->unk14A != 0) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx) == 0) {
|
||||
@@ -420,7 +420,7 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->actor.world.pos = player->base.world.pos;
|
||||
this->actor.world.pos = player->actor.world.pos;
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED) {
|
||||
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
|
||||
@@ -440,8 +440,8 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) {
|
||||
void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnItem00* this = THIS;
|
||||
s32 pad;
|
||||
ActorPlayer* player = PLAYER;
|
||||
s32 sp38 = player->unkA74 & 0x1000;
|
||||
Player* player = PLAYER;
|
||||
s32 sp38 = player->stateFlags3 & 0x1000;
|
||||
s32 getItemId = GI_NONE;
|
||||
s32 pad2;
|
||||
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
|
||||
}
|
||||
|
||||
actors[0] = actor;
|
||||
actors[1] = &PLAYER->base;
|
||||
actors[1] = &PLAYER->actor;
|
||||
if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colCheckCtx, pos, &camera->eye, actors, 2) != 0) {
|
||||
func_8013A41C(0x3b);
|
||||
ret |= 0x3b;
|
||||
|
||||
@@ -79,7 +79,7 @@ void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.parent == NULL) {
|
||||
ArmsHook_SetupAction(this, ArmsHook_Shoot);
|
||||
func_800B6C04(&this->actor, 20.0f);
|
||||
this->actor.parent = &PLAYER->base;
|
||||
this->actor.parent = &PLAYER->actor;
|
||||
this->timer = 26;
|
||||
}
|
||||
}
|
||||
@@ -89,11 +89,11 @@ void func_808C1154(ArmsHook* this) {
|
||||
this->actor.parent->parent = &this->actor;
|
||||
}
|
||||
|
||||
s32 ArmsHook_AttachToPlayer(ArmsHook* this, ActorPlayer* player) {
|
||||
player->base.child = &this->actor;
|
||||
player->heldActor = &this->actor;
|
||||
s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
|
||||
player->actor.child = &this->actor;
|
||||
player->leftHandActor = &this->actor;
|
||||
if (this->actor.child != NULL) {
|
||||
player->base.parent = this->actor.child = NULL;
|
||||
player->actor.parent = this->actor.child = NULL;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -107,13 +107,13 @@ void ArmsHook_DetachHookFromActor(ArmsHook* this) {
|
||||
}
|
||||
|
||||
s32 ArmsHook_CheckForCancel(ArmsHook* this) {
|
||||
ActorPlayer* player = (ActorPlayer*)this->actor.parent;
|
||||
Player* player = (Player*)this->actor.parent;
|
||||
if (func_801240C8(player)) {
|
||||
if ((player->heldItemActionParam != player->itemActionParam) || ((player->base.flags & 0x100)) ||
|
||||
if ((player->heldItemActionParam != player->itemActionParam) || ((player->actor.flags & 0x100)) ||
|
||||
((player->stateFlags1 & 0x4000080))) {
|
||||
this->timer = 0;
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &player->unk368);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &player->rightHandWorld.pos);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) {
|
||||
}
|
||||
|
||||
void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((this->actor.parent == NULL) || (!func_801240C8(player))) {
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
@@ -135,7 +135,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
return;
|
||||
}
|
||||
|
||||
func_800B8F98(&player->base, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG);
|
||||
func_800B8F98(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG);
|
||||
ArmsHook_CheckForCancel(this);
|
||||
|
||||
if (this->timer != 0 && (this->collider.base.atFlags & AT_HIT) &&
|
||||
@@ -184,7 +184,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
{
|
||||
f32 velocity;
|
||||
|
||||
bodyDistDiff = Math_Vec3f_DistXYZAndStoreDiff(&player->unk368, &this->actor.world.pos, &bodyDistDiffVec);
|
||||
bodyDistDiff =
|
||||
Math_Vec3f_DistXYZAndStoreDiff(&player->rightHandWorld.pos, &this->actor.world.pos, &bodyDistDiffVec);
|
||||
if (bodyDistDiff < 30.0f) {
|
||||
velocity = 0.0f;
|
||||
phi_f16 = 0.0f;
|
||||
@@ -211,13 +212,13 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (this->actor.child == NULL) {
|
||||
Math_Vec3f_Sum(&player->unk368, &newPos, &this->actor.world.pos);
|
||||
Math_Vec3f_Sum(&player->rightHandWorld.pos, &newPos, &this->actor.world.pos);
|
||||
if (grabbed != NULL) {
|
||||
Math_Vec3f_Sum(&this->actor.world.pos, &this->unk1FC, &grabbed->world.pos);
|
||||
}
|
||||
} else {
|
||||
Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->base.velocity);
|
||||
player->base.world.rot.x =
|
||||
Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->actor.velocity);
|
||||
player->actor.world.rot.x =
|
||||
Math_FAtan2F(sqrtf(SQ(bodyDistDiffVec.x) + SQ(bodyDistDiffVec.z)), -bodyDistDiffVec.y);
|
||||
}
|
||||
if (phi_f16 < 50.0f) {
|
||||
@@ -225,8 +226,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
if (phi_f16 == 0.0f) {
|
||||
ArmsHook_SetupAction(this, ArmsHook_Wait);
|
||||
if (ArmsHook_AttachToPlayer(this, player)) {
|
||||
Math_Vec3f_Diff(&this->actor.world.pos, &player->base.world.pos, &player->base.velocity);
|
||||
player->base.velocity.y -= 20.0f;
|
||||
Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &player->actor.velocity);
|
||||
player->actor.velocity.y -= 20.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,14 +288,14 @@ void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArmsHook* this = THIS;
|
||||
s32 pad;
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
Vec3f sp68;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
|
||||
if (player->base.draw != NULL && player->unk151 == 0xB) {
|
||||
if (player->actor.draw != NULL && player->rightHandType == 0xB) {
|
||||
// OPEN_DISP macro
|
||||
{
|
||||
GraphicsContext* sp44 = globalCtx->state.gfxCtx;
|
||||
@@ -319,7 +320,7 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPDisplayList(sp44->polyOpa.p++, D_0601D960);
|
||||
SysMatrix_InsertTranslation(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Math_Vec3f_Diff(&player->unk368, &this->actor.world.pos, &sp68);
|
||||
Math_Vec3f_Diff(&player->rightHandWorld.pos, &this->actor.world.pos, &sp68);
|
||||
sp48 = SQ(sp68.x) + SQ(sp68.z);
|
||||
sp4C = sqrtf(sp48);
|
||||
Matrix_RotateY(Math_Atan2S(sp68.x, sp68.z), MTXMODE_APPLY);
|
||||
|
||||
@@ -55,7 +55,7 @@ static Gfx* bgCtowerRotDlists[] = { D_06012DA0, D_06017220, D_060174E0 };
|
||||
void BgCtowerRot_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgCtowerRot* this = THIS;
|
||||
s32 pad;
|
||||
ActorPlayer* player;
|
||||
Player* player;
|
||||
Vec3f offset;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
@@ -73,7 +73,7 @@ void BgCtowerRot_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06017650);
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y - 0x4000;
|
||||
}
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->base.world.pos);
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
if (offset.z < 0.0f) {
|
||||
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + (Math_SinS(this->dyna.actor.world.rot.y) * 80.0f);
|
||||
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z + (Math_CosS(this->dyna.actor.world.rot.y) * 80.0f);
|
||||
@@ -91,13 +91,13 @@ void BgCtowerRot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgCtowerRot_CorridorRotate(BgCtowerRot* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
Vec3f offset;
|
||||
f32 rotZ;
|
||||
f32 offsetDiffZ;
|
||||
f32 rotZtmp;
|
||||
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->base.world.pos);
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
if (offset.z > 1100.0f) {
|
||||
rotZ = 0.0f;
|
||||
} else {
|
||||
@@ -134,10 +134,10 @@ void BgCtowerRot_DoorClose(BgCtowerRot* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgCtowerRot_DoorIdle(BgCtowerRot* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
Vec3f offset;
|
||||
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->base.world.pos);
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
if (offset.z > 30.0f) {
|
||||
this->unk160 = 0.0f;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
|
||||
@@ -165,8 +165,8 @@ void BgIcicle_Shiver(BgIcicle* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgIcicle_Fall(BgIcicle* this, GlobalContext* globalCtx) {
|
||||
if ((this->collider.base.atFlags & 2) || (this->dyna.actor.bgCheckFlags & 1)) {
|
||||
this->collider.base.atFlags &= ~2;
|
||||
if ((this->collider.base.atFlags & AT_HIT) || (this->dyna.actor.bgCheckFlags & 1)) {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
this->dyna.actor.bgCheckFlags &= ~1;
|
||||
|
||||
if (this->dyna.actor.world.pos.y < this->dyna.actor.floorHeight) {
|
||||
@@ -202,8 +202,8 @@ void BgIcicle_Regrow(BgIcicle* this, GlobalContext* globalCtx) {
|
||||
void BgIcicle_UpdateAttacked(BgIcicle* this, GlobalContext* globalCtx) {
|
||||
s32 sp24;
|
||||
|
||||
if (this->collider.base.acFlags & 2) {
|
||||
this->collider.base.acFlags &= ~2;
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if (this->dyna.actor.params == ICICLE_STALAGMITE_RANDOM_DROP) {
|
||||
BgIcicle_Break(this, globalCtx, 50.0f);
|
||||
|
||||
@@ -57,14 +57,14 @@ void BgIkanaRay_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgIkanaRay* this = THIS;
|
||||
ColliderCylinder* collision = &this->collision;
|
||||
|
||||
Actor_ProcessInitChain(&this->base, sInitChain);
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
Collider_InitCylinder(globalCtx, collision);
|
||||
Collider_SetCylinder(globalCtx, collision, &this->base, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->base, &this->collision);
|
||||
Collider_SetCylinder(globalCtx, collision, &this->actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collision);
|
||||
|
||||
this->animatedTextures = (AnimatedMaterial*)Lib_SegmentedToVirtual(object_ikana_obj_001228);
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, this->base.params & 0x7F) != 0) {
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params & 0x7F)) {
|
||||
BgIkanaRay_SetActivated(this);
|
||||
} else {
|
||||
BgIkanaRay_SetDeactivated(this);
|
||||
@@ -79,20 +79,20 @@ void BgIkanaRay_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgIkanaRay_SetDeactivated(BgIkanaRay* this) {
|
||||
this->base.draw = NULL;
|
||||
this->base.flags |= 0x10;
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags |= 0x10;
|
||||
this->update = BgIkanaRay_UpdateCheckForActivation;
|
||||
}
|
||||
|
||||
void BgIkanaRay_UpdateCheckForActivation(BgIkanaRay* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->base.params & 0x7F) != 0) {
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params & 0x7F)) {
|
||||
BgIkanaRay_SetActivated(this);
|
||||
}
|
||||
}
|
||||
|
||||
void BgIkanaRay_SetActivated(BgIkanaRay* this) {
|
||||
this->base.draw = BgIkanaRay_Draw;
|
||||
this->base.flags &= ~0x10;
|
||||
this->actor.draw = BgIkanaRay_Draw;
|
||||
this->actor.flags &= ~0x10;
|
||||
this->update = BgIkanaRay_UpdateActivated;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
struct BgIkanaRay;
|
||||
|
||||
typedef struct BgIkanaRay {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collision;
|
||||
/* 0x190 */ AnimatedMaterial* animatedTextures;
|
||||
/* 0x194 */ void (*update)(struct BgIkanaRay*, GlobalContext*);
|
||||
|
||||
@@ -49,9 +49,9 @@ static InitChainEntry sInitChain[] = {
|
||||
s32 func_80C0A740(BgIkninSusceil* this, GlobalContext* globalCtx) {
|
||||
s32 pad2[2];
|
||||
Vec3f offset;
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->base.world.pos);
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
|
||||
return (D_80C0B0E8.x < offset.z) && (offset.z < D_80C0B0E8.y) && (offset.x > -240.0f) && (offset.x < D_80C0B0E4);
|
||||
}
|
||||
@@ -84,11 +84,11 @@ s32 func_80C0A95C(BgIkninSusceil* this, GlobalContext* globalCtx) {
|
||||
s32 phi_t0 = true;
|
||||
s32 i;
|
||||
f32 new_var;
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
Vec3f offset;
|
||||
f32 temp1, temp2, temp3, temp4;
|
||||
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->base.world.pos);
|
||||
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
for (i = 0; i < 7; i++) {
|
||||
temp3 = (D_80C0B0F0[i] * 80.0f) + 0.5f;
|
||||
temp4 = (D_80C0B0F0[i] * 80.0f) + 79.5f;
|
||||
@@ -218,12 +218,12 @@ void func_80C0AE5C(BgIkninSusceil* this, GlobalContext* globalCtx) {
|
||||
void BgIkninSusceil_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
BgIkninSusceil* this = THIS;
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((this->unk168 == 0) && (this->unk166 > 0) && ((player->unkA74 & 0x100) != 0) && (player->unkB48 > 1000.0f)) {
|
||||
if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & 0x100) && (player->unk_B48 > 1000.0f)) {
|
||||
this->unk168 = 2;
|
||||
if ((func_80C0A95C(this, globalCtx) != 0) && (this->actionFunc != func_80C0AE5C)) {
|
||||
func_800B8E58(&player->base, NA_SE_PL_BODY_HIT);
|
||||
func_800B8E58(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
func_80C0AE3C(this);
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void BgIkninSusceil_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if ((this->dyna.actor.home.pos.y + 70.0f) < this->dyna.actor.world.pos.y) {
|
||||
this->unk166 = 0;
|
||||
} else if ((player->unkA74 & 0x100) != 0) {
|
||||
} else if (player->stateFlags3 & 0x100) {
|
||||
this->unk166 = 3;
|
||||
} else {
|
||||
if (this->unk166 > 0) {
|
||||
|
||||
@@ -33,21 +33,21 @@ const ActorInit Bg_Iknv_Obj_InitVars = {
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_ENEMY,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
AC_ON | AC_TYPE_ENEMY,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 40, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
@@ -88,7 +88,7 @@ void BgIknvObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
break;
|
||||
default:
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BgIknvObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -185,7 +185,7 @@ void BgKin2Fence_HandleMaskCode(BgKin2Fence* this, GlobalContext* globalCtx) {
|
||||
s32 hitMask;
|
||||
s32 nextMask;
|
||||
|
||||
if (this->collider.base.acFlags & 2) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
hitMask = BgKin2Fence_CheckHitMask(this);
|
||||
if (hitMask >= 0) {
|
||||
nextMask = (s8)gSaveContext.spiderHouseMaskOrder[this->masksHit];
|
||||
@@ -198,7 +198,7 @@ void BgKin2Fence_HandleMaskCode(BgKin2Fence* this, GlobalContext* globalCtx) {
|
||||
this->masksHit = 0;
|
||||
}
|
||||
}
|
||||
this->collider.base.acFlags &= ~2;
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->cooldownTimer = 5;
|
||||
if (this->masksHit > 5) {
|
||||
BgKin2Fence_SetupPlayOpenCutscene(this);
|
||||
|
||||
@@ -25,7 +25,7 @@ extern Gfx D_06000088[];
|
||||
extern CollisionHeader D_060011C0;
|
||||
|
||||
void BgTobira01_Open(BgTobira01* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
s16 cutsceneId = this->dyna.actor.cutscene;
|
||||
s16 prevTimer;
|
||||
|
||||
@@ -41,7 +41,7 @@ void BgTobira01_Open(BgTobira01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else if (!(gSaveContext.weekEventReg[88] & 0x40) && (this->timer == 0) && (globalCtx->actorCtx.unk1F5 != 0) &&
|
||||
(globalCtx->actorCtx.unk1F4 == 0) &&
|
||||
(func_800C99AC(&globalCtx->colCtx, player->base.floorPoly, player->base.floorBgId) == 6)) {
|
||||
(func_800C99AC(&globalCtx->colCtx, player->actor.floorPoly, player->actor.floorBgId) == 6)) {
|
||||
this->playCutscene = true;
|
||||
this->unk_16C = 0; // this variable is not used anywhere else
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void DoorAna_WaitClosed(DoorAna* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player = PLAYER;
|
||||
Player* player = PLAYER;
|
||||
s32 dooranaType = GET_DOORANA_TYPE(this);
|
||||
s8 pad[4];
|
||||
s32 entranceIndex;
|
||||
@@ -126,7 +126,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f) != 0) {
|
||||
if ((this->actor.targetMode != 0) && (globalCtx->unk18875 == 0) && (globalCtx->unk18B4A == 0) &&
|
||||
(player->stateFlags1 & 0x80000000) && (player->unkAE7 == 0)) {
|
||||
(player->stateFlags1 & 0x80000000) && (player->unk_AE7 == 0)) {
|
||||
|
||||
if (dooranaType == DOORANA_TYPE_ADJACENT) {
|
||||
// 300 uses scene exit addresses, not static DoorAna entrance addresses,
|
||||
@@ -175,7 +175,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void DoorAna_GrabLink(DoorAna* this, GlobalContext* globalCtx) {
|
||||
ActorPlayer* player;
|
||||
Player* player;
|
||||
s8 pad[2];
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() != this->actor.cutscene) {
|
||||
@@ -188,18 +188,18 @@ void DoorAna_GrabLink(DoorAna* this, GlobalContext* globalCtx) {
|
||||
|
||||
if ((this->actor.yDistToPlayer <= 0.0f) && (this->actor.xzDistToPlayer > 20.0f)) {
|
||||
player = PLAYER;
|
||||
player->base.world.pos.x = (Math_SinS(this->actor.yawTowardsPlayer) * 20.0f) + this->actor.world.pos.x;
|
||||
player->base.world.pos.z = (Math_CosS(this->actor.yawTowardsPlayer) * 20.0f) + this->actor.world.pos.z;
|
||||
player->actor.world.pos.x = (Math_SinS(this->actor.yawTowardsPlayer) * 20.0f) + this->actor.world.pos.x;
|
||||
player->actor.world.pos.z = (Math_CosS(this->actor.yawTowardsPlayer) * 20.0f) + this->actor.world.pos.z;
|
||||
}
|
||||
}
|
||||
|
||||
void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DoorAna* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
this->actor.shape.rot.y = func_800DFCDC(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
|
||||
}
|
||||
|
||||
void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Gfx* doorAnaDL = D_05000C40;
|
||||
func_800BE03C(globalCtx, doorAnaDL);
|
||||
func_800BE03C(globalCtx, D_05000C40);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user