mirror of https://github.com/zeldaret/mm.git
Player preparation 1 (#1058)
* Bring over new stuff from player.h * door type * PlayerModelGroup * CSMODE * PLAYER_PARAMS * functions.h * item.h * a * format * ED * stuff * Magic_Reset * bodyPartsPos * format * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * format * params and fixes * GetItemId * yes * 2 * warnning * closestSecretDistSq Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Name the other PLAYER_DOORTYPE * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> * remove pyelftools * PlayerActionParam Player_GetExchangeItemId * Update include/z64animation.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * bss * bss * fix linkanimation warning * bss * bss * format * fix * namefixer * format * fix * fixes * namefixer * bss * fixes Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
ac0ef7823e
commit
a8c7a5bb89
|
@ -0,0 +1,28 @@
|
|||
#ifndef ALIGNMENT_H
|
||||
#define ALIGNMENT_H
|
||||
|
||||
#define ALIGN8(val) (((val) + 7) & ~7)
|
||||
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
||||
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
|
||||
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
|
||||
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGNED8 __attribute__ ((aligned (8)))
|
||||
#else
|
||||
#define ALIGNED8
|
||||
#endif
|
||||
|
||||
#ifdef __sgi /* IDO compiler */
|
||||
#define ALIGNOF(x) __builtin_alignof(x)
|
||||
#elif (__STDC_VERSION__ >= 201112L) /* C11 */
|
||||
#define ALIGNOF(x) _Alignof(x)
|
||||
#else /* __GNUC__ */
|
||||
#define ALIGNOF(x) __alignof__(x)
|
||||
#endif
|
||||
|
||||
#define ALIGN_MASK(n) (~((n) - 1))
|
||||
|
||||
#define ALIGNOF_MASK(x) ALIGN_MASK(ALIGNOF(x))
|
||||
|
||||
#endif
|
|
@ -473,7 +473,7 @@ void func_800AE5A0(PlayState* play);
|
|||
void func_800AE5E4(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_800AE778(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_800AE8EC(PlayState* play);
|
||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 arg4, CollisionPoly* colPoly, s32 arg6);
|
||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 angle, CollisionPoly* colPoly, s32 bgId);
|
||||
void func_800AEF44(EffectTireMark* this);
|
||||
void EffectTireMark_Init(void* thisx, void* initParamsx);
|
||||
void EffectTireMark_Destroy(void* thisx);
|
||||
|
@ -549,24 +549,24 @@ void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* veloc
|
|||
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objId, s16 life, Gfx* dList);
|
||||
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
|
||||
// void func_800B2364(void);
|
||||
// void EffectSsStick_Spawn(UNK_TYPE4 uParm1, UNK_PTR puParm2, UNK_TYPE2 uParm3);
|
||||
void EffectSsStick_Spawn(PlayState* play, Vec3f* pos, s16 yaw);
|
||||
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
void EffectSsSibuki_SpawnBurst(PlayState* play, Vec3f* pos);
|
||||
void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 reg0);
|
||||
void EffectSsHitmark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos);
|
||||
void EffectSsHitmark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsFhgFlash_SpawnShock(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, u8 params);
|
||||
// void EffectSsKFire_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE1 param_6);
|
||||
void EffectSsKFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
|
||||
void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16* playerDetected, s16 flags);
|
||||
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId, Gfx* dList);
|
||||
// void EffectSsIcePiece_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, UNK_TYPE4 uParm3, Vec3f* pzParm4, Vec3f* param_5, UNK_TYPE4 param_6);
|
||||
// void EffectSsIcePiece_SpawnBurst(void);
|
||||
void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale);
|
||||
void func_800B2B44(PlayState* play, Actor* actor, Vec3f* pos, f32 scale);
|
||||
// void func_800B2B7C(void);
|
||||
void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
|
||||
// void EffectSsFireTail_Spawn(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, UNK_TYPE4 uParm4, Vec3f* param_5, UNK_TYPE2 param_6, Color_RGBA8* param_7, Color_RGBA8* param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10, UNK_TYPE4 param_11);
|
||||
// void EffectSsFireTail_SpawnFlame(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
|
||||
// void EffectSsFireTail_SpawnFlameOnPlayer(void);
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
|
||||
void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, s16 params, s16 flags, s16 bodyPart);
|
||||
// void EffectSsEnFire_SpawnVec3s(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
|
||||
|
@ -656,7 +656,7 @@ s32 func_800B715C(PlayState* play);
|
|||
void Actor_SetCameraHorseSetting(PlayState* play, Player* player);
|
||||
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
|
||||
s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode);
|
||||
u32 func_800B7298(PlayState* play, Actor* actor, u8 csMode);
|
||||
s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode);
|
||||
void func_800B72F8(DynaPolyActor* dyna, f32 extraPushForce, s16 yRotation);
|
||||
|
||||
s32 Player_IsFacingActor(Actor* actor, s16 maxAngleDiff, PlayState* play);
|
||||
|
@ -666,7 +666,7 @@ s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 maxAngleDiff);
|
|||
s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 maxAngleDiff);
|
||||
s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s16 maxAngleDiff);
|
||||
|
||||
void func_800B75A0(CollisionPoly* poly, Vec3f* normal, s16* azimuth);
|
||||
void Actor_GetSlopeDirection(CollisionPoly* floorPoly, Vec3f* slopeNormal, s16* downwardSlopeYaw);
|
||||
void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius, f32 ceilingCheckHeight, u32 flags);
|
||||
Hilite* Hilite_DrawOpa(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
|
||||
void func_800B8050(Actor* actor, PlayState* play, s32 flag);
|
||||
|
@ -683,7 +683,7 @@ s32 func_800B8614(Actor* actor, PlayState* play, f32 radius);
|
|||
s32 func_800B863C(Actor* actor, PlayState* play);
|
||||
s32 Actor_TextboxIsClosing(Actor* actor, PlayState* play);
|
||||
s32 Actor_ChangeFocus(Actor* actor1, PlayState* play, Actor* actor2);
|
||||
s32 Player_GetExchangeItemId(PlayState* play);
|
||||
PlayerActionParam Player_GetExchangeItemId(PlayState* play);
|
||||
s32 func_800B8718(Actor* actor, GameState* gameState);
|
||||
s32 func_800B874C(Actor* actor, PlayState* play, f32 xzRange, f32 yRange);
|
||||
s32 func_800B8804(Actor* actor, PlayState* play, f32 xzRange);
|
||||
|
@ -691,10 +691,10 @@ s32 func_800B886C(Actor* actor, PlayState* play);
|
|||
void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y);
|
||||
s32 Actor_OnScreen(PlayState* play, Actor* actor);
|
||||
s32 Actor_HasParent(Actor* actor, PlayState* play);
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, s32 getItemId);
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange);
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_LiftActor(Actor* actor, PlayState* play);
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, s32 getItemId);
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, GetItemId getItemId);
|
||||
s32 Actor_HasNoParent(Actor* actor, PlayState* play);
|
||||
void func_800B8C20(Actor* actorA, Actor* actorB, PlayState* play);
|
||||
void func_800B8C50(Actor* actor, PlayState* play);
|
||||
|
@ -716,7 +716,7 @@ void func_800B9010(Actor* actor, u16 sfxId);
|
|||
void func_800B9038(Actor* actor, s32 timer);
|
||||
void func_800B9084(Actor* actor);
|
||||
void func_800B9098(Actor* actor);
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, s32 arg4);
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4);
|
||||
void Actor_DeactivateLens(PlayState* play);
|
||||
void func_800B9120(ActorContext* actorCtx);
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
|
@ -975,7 +975,7 @@ Vec3s* Camera_Update(Vec3s* param_1, Camera* camera);
|
|||
// void func_800DF498(void);
|
||||
u32 Camera_SetMode(Camera* camera, s16 mode, s8 param_3);
|
||||
s32 Camera_ChangeMode(Camera* camera, s16 mode);
|
||||
// void func_800DF86C(void);
|
||||
s32 func_800DF86C(Camera* camera, s16 arg1);
|
||||
// void func_800DF8EC(void);
|
||||
s32 Camera_ChangeSetting(Camera* camera, s16 setting);
|
||||
u32 Camera_ChangeDataIdx(Camera* camera, u32 camDataIdx);
|
||||
|
@ -999,7 +999,7 @@ s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
|
|||
Vec3f* Camera_GetQuakeOffset(Vec3f* dst, Camera* camera);
|
||||
// void func_800E01DC(s32 param_1, u32 param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
|
||||
// UNK_TYPE4 func_800E0228(void);
|
||||
// void func_800E0238(void);
|
||||
void func_800E0238(Camera* camera);
|
||||
void Camera_SetToTrackActor(Camera* camera, Actor* actor);
|
||||
void Camera_SetTargetActor(Camera* camera, Actor* actor);
|
||||
f32 Camera_GetWaterYPos(Camera* camera);
|
||||
|
@ -1732,9 +1732,9 @@ s32 Inventory_ConsumeFairy(PlayState* play);
|
|||
void Inventory_UpdateItem(PlayState* play, s16 slot, s16 item);
|
||||
// void func_801153C8(void);
|
||||
// void func_80115428(void);
|
||||
void func_8011552C(PlayState* play, s16 arg1);
|
||||
// void func_801155B4(void);
|
||||
// void func_80115764(void);
|
||||
void func_8011552C(PlayState* play, u16 arg1);
|
||||
void func_801155B4(PlayState* play, s16 arg1);
|
||||
void func_80115764(PlayState* play, UNK_TYPE arg1);
|
||||
void func_80115844(PlayState* play, s16 param_2);
|
||||
s32 Health_ChangeBy(PlayState* play, s16 healthChange);
|
||||
void Health_GiveHearts(s16 hearts);
|
||||
|
@ -1779,7 +1779,7 @@ s32 func_80122744(PlayState* play, struct_80122744_arg1* arg1, u32 arg2, Vec3s*
|
|||
s32 func_80122760(PlayState* play, struct_80122744_arg1* arg1, f32 arg2);
|
||||
void func_80122868(PlayState* play, Player* player);
|
||||
void func_801229A0(PlayState* play, Player* player);
|
||||
void func_801229EC(UNK_TYPE arg0, UNK_TYPE arg1);
|
||||
void func_801229EC(Actor* thisx, PlayState* play);
|
||||
void func_801229FC(Player* player);
|
||||
void func_80122BA4(PlayState* play, struct_80122D44_arg1* arg1, s32 arg2, s32 alpha);
|
||||
void func_80122C20(PlayState* play, struct_80122D44_arg1* arg1);
|
||||
|
@ -1790,7 +1790,7 @@ void func_80122F28(Player* player);
|
|||
s32 func_80122F9C(PlayState* play);
|
||||
s32 func_80122FCC(PlayState* play);
|
||||
void func_8012300C(PlayState* play, s32 arg1);
|
||||
void func_8012301C(Player* player, PlayState* play2);
|
||||
void func_8012301C(Actor* thisx, PlayState* play2);
|
||||
void func_80123140(PlayState* play, Player* player);
|
||||
s32 Player_InBlockingCsMode(PlayState* play, Player* player);
|
||||
s32 Player_InCsMode(PlayState* play);
|
||||
|
@ -1801,14 +1801,14 @@ s32 Player_IsGoronOrDeku(Player* player);
|
|||
s32 func_801234D4(PlayState* play);
|
||||
s32 func_80123590(PlayState* play, Actor* actor);
|
||||
ItemId func_8012364C(PlayState* play, Player* player, s32 arg2);
|
||||
s32 func_80123810(PlayState* play);
|
||||
PlayerActionParam func_80123810(PlayState* play);
|
||||
PlayerModelGroup Player_ActionToModelGroup(Player* player, PlayerActionParam actionParam);
|
||||
void Player_SetModelsForHoldingShield(Player* player);
|
||||
void Player_SetModels(Player* player, PlayerModelGroup modelGroup);
|
||||
void Player_SetModelGroup(Player* player, PlayerModelGroup modelGroup);
|
||||
void func_80123C58(Player* player);
|
||||
void Player_SetEquipmentData(PlayState* play, Player* player);
|
||||
void func_80123D50(PlayState* play, Player* player, ItemId itemId, PlayerActionParam actionParam);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, PlayerActionParam actionParam);
|
||||
void func_80123DA4(Player* player);
|
||||
void func_80123DC0(Player* player);
|
||||
void func_80123E90(PlayState* play, Actor* actor);
|
||||
|
@ -2078,7 +2078,7 @@ void AnimationContext_CopyTrue(PlayState* play, AnimationEntryData* data);
|
|||
void AnimationContext_CopyFalse(PlayState* play, AnimationEntryData* data);
|
||||
void AnimationContext_MoveActor(PlayState* play, AnimationEntryData* data);
|
||||
void AnimationContext_Update(PlayState* play, AnimationContext* animationCtx);
|
||||
void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable, Vec3s* morphTable, s32 limbBufCount);
|
||||
void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, LinkAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, s32 limbBufCount);
|
||||
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_Update(PlayState* play, SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_Morph(PlayState* play, SkelAnime* skelAnime);
|
||||
|
@ -2096,8 +2096,8 @@ void LinkAnimation_CopyMorphToJoint(PlayState* play, SkelAnime* skelAnime);
|
|||
void LinkAnimation_LoadToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 frame);
|
||||
void LinkAnimation_LoadToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 frame);
|
||||
void LinkAnimation_InterpJointMorph(PlayState* play, SkelAnime* skelAnime, f32 weight);
|
||||
void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable);
|
||||
void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable);
|
||||
void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, void* blendTableBuffer);
|
||||
void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, void* blendTableBuffer);
|
||||
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
|
||||
s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 frame, f32 updateRate);
|
||||
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
|
||||
|
@ -2339,8 +2339,8 @@ void func_80165658(u32 arg0);
|
|||
void func_8016566C(u32 arg0);
|
||||
void func_80165690(void);
|
||||
// void func_801656A4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
|
||||
// void func_80165DCC(void);
|
||||
// void func_80165DF0(void);
|
||||
void func_80165DCC(s32 arg0);
|
||||
void func_80165DF0(void);
|
||||
// void func_80165E1C(void);
|
||||
// void func_80165E7C(void);
|
||||
// void func_80165EC0(void);
|
||||
|
@ -2952,19 +2952,19 @@ void func_8019F420(Vec3f* pos, u16 sfxId);
|
|||
void func_8019F4AC(Vec3f* pos, u16 sfxId);
|
||||
void func_8019F540(s8 arg0);
|
||||
void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered);
|
||||
// void func_8019F5AC(void);
|
||||
// void func_8019F638(void);
|
||||
// void func_8019F780(void);
|
||||
f32 func_8019F5AC(f32 arg0);
|
||||
void func_8019F638(Vec3f* arg0, u16 sfxId, f32 arg2);
|
||||
void func_8019F780(Vec3f* arg0, u16 sfxId, f32 arg2);
|
||||
// void func_8019F7D8(void);
|
||||
// void func_8019F830(void);
|
||||
void func_8019F830(Vec3f* arg0, u16 arg1);
|
||||
void func_8019F88C(Vec3f* arg0, u16 sfxId, UNK_TYPE arg2);
|
||||
void func_8019F900(Vec3f* pos, u8 chargeLevel);
|
||||
// void func_8019FA18(void);
|
||||
void func_8019FAD8(Vec3f* param_1, u16 sfxId, f32 param_3);
|
||||
void func_8019FB0C(Vec3f* arg0, u16 sfxId, f32 arg2, s32 arg3);
|
||||
void func_8019FC20(Vec3f* pos, u16 sfxId);
|
||||
// void func_8019FCB8(void);
|
||||
// void func_8019FD90(void);
|
||||
void func_8019FCB8(Vec3f* arg0, u16 arg1, f32 arg2);
|
||||
void func_8019FD90(s8 arg0, s8 arg1);
|
||||
void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2);
|
||||
// void func_8019FE1C(void);
|
||||
void func_8019FE74(f32* arg0, f32 arg1, s32 arg2);
|
||||
|
@ -2974,8 +2974,8 @@ void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale);
|
|||
// void Audio_PlaySfxForWaterfall(void);
|
||||
// void Audio_StepFreqLerp(void);
|
||||
void func_801A0124(Vec3f* pos, u8 arg1);
|
||||
// void func_801A0184(void);
|
||||
// void func_801A01C4(void);
|
||||
void func_801A0184(void);
|
||||
void func_801A01C4(void);
|
||||
void func_801A0204(s8 seqId);
|
||||
void func_801A0238(s32 arg0, s32 arg1);
|
||||
// void Audio_SetGanonsTowerBgmVolumeLevel(void);
|
||||
|
@ -3034,9 +3034,9 @@ void func_801A3AEC(s32 arg0);
|
|||
void func_801A3B48(UNK_TYPE arg0);
|
||||
// void func_801A3B90(void);
|
||||
void func_801A3CD8(s8 param_1);
|
||||
// void func_801A3CF4(void);
|
||||
void func_801A3CF4(s8 arg0);
|
||||
void func_801A3D98(s8 audioSetting);
|
||||
// void func_801A3E38(void);
|
||||
void func_801A3E38(u8 arg0);
|
||||
// void func_801A3EC0(void);
|
||||
void Audio_SetCutsceneFlag(s8 flag);
|
||||
// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
|
@ -3045,7 +3045,7 @@ void Audio_SetCutsceneFlag(s8 flag);
|
|||
void Audio_SetSpec(u32 specId);
|
||||
void func_801A4058(UNK_TYPE arg0);
|
||||
// void func_801A41C8(void);
|
||||
// void func_801A41F8(void);
|
||||
void func_801A41F8(UNK_TYPE arg0);
|
||||
// void func_801A429C(void);
|
||||
// void func_801A42C8(void);
|
||||
// void func_801A4324(void);
|
||||
|
|
|
@ -128,7 +128,6 @@ extern GraphicsContext* __gfxCtx;
|
|||
} \
|
||||
(void)0
|
||||
|
||||
|
||||
#define SQ(x) ((x) * (x))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
|
@ -150,10 +149,4 @@ extern GraphicsContext* __gfxCtx;
|
|||
#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
|
||||
#define ALIGNED8
|
||||
#endif
|
||||
|
||||
#endif // MACROS_H
|
||||
|
|
|
@ -427,7 +427,7 @@ extern Gfx D_801AEFA0[];
|
|||
// extern UNK_TYPE1 D_801AEFBC;
|
||||
// extern UNK_TYPE1 D_801AEFC0;
|
||||
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX];
|
||||
extern s32 gMaxActorId;
|
||||
extern ActorId gMaxActorId;
|
||||
extern BgCheckSceneSubdivisionEntry sSceneSubdivisionList[];
|
||||
extern BgSpecialSceneMaxObjects sCustomDynapolyMem[];
|
||||
// extern UNK_TYPE1 D_801B4708;
|
||||
|
@ -2472,7 +2472,6 @@ extern TriNorm D_801EDBB0;
|
|||
// extern UNK_TYPE1 D_801EDBD8;
|
||||
// extern UNK_TYPE1 D_801EDBDC;
|
||||
// extern UNK_TYPE1 D_801EDBE0;
|
||||
extern s16 D_801EDBF0;
|
||||
// extern UNK_TYPE1 D_801EDBF4;
|
||||
// extern UNK_TYPE1 D_801EDBF8;
|
||||
// extern UNK_TYPE1 D_801EDC00;
|
||||
|
|
|
@ -1047,9 +1047,9 @@ struct PlayState {
|
|||
/* 0x18784 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
|
||||
/* 0x18788 */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
|
||||
/* 0x1878C */ void (*unk_1878C)(struct PlayState* play);
|
||||
/* 0x18790 */ void (*unk_18790)(struct PlayState* play, s16 arg1, Actor* actor);
|
||||
/* 0x18794 */ s32 (*unk_18794)(struct PlayState* play, Player* player, s32 itemId, s32 arg3);
|
||||
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, void* talkAnim, s32 arg2);
|
||||
/* 0x18790 */ void (*unk_18790)(struct PlayState* play, s16 arg1);
|
||||
/* 0x18794 */ PlayerActionParam (*unk_18794)(struct PlayState* play, Player* player, ItemId itemId);
|
||||
/* 0x18798 */ s32 (*setPlayerTalkAnim)(struct PlayState* play, LinkAnimationHeader* talkAnim, s32 animMode);
|
||||
/* 0x1879C */ s16 playerActorCsIds[10];
|
||||
/* 0x187B0 */ MtxF viewProjectionMtxF;
|
||||
/* 0x187F0 */ Vec3f unk_187F0;
|
||||
|
|
|
@ -19,6 +19,7 @@ struct Lights;
|
|||
struct CollisionPoly;
|
||||
|
||||
struct EnBox;
|
||||
struct EnTorch2;
|
||||
|
||||
typedef void(*ActorFunc)(struct Actor* this, struct PlayState* play);
|
||||
|
||||
|
@ -208,7 +209,7 @@ typedef enum {
|
|||
* 0x040 : Has touched water (actor is responsible for unsetting this the frame it touches the water)
|
||||
* 0x080 : Similar to & 0x1 but with no velocity check and is cleared every frame
|
||||
* 0x100 : Crushed between a floor and ceiling (triggers a void for player)
|
||||
* 0x200 : Unknown (only set/used by player so far)
|
||||
* 0x200 : Only set/used by player, related to interacting with walls
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
|
@ -224,7 +225,7 @@ typedef struct {
|
|||
} DynaPolyActor; // size = 0x15C
|
||||
|
||||
|
||||
typedef enum {
|
||||
typedef enum Item00Type {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
/* 0x01 */ ITEM00_RUPEE_BLUE,
|
||||
/* 0x02 */ ITEM00_RUPEE_RED,
|
||||
|
@ -404,7 +405,7 @@ typedef struct ActorContext {
|
|||
/* 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];
|
||||
/* 0x254 */ struct EnTorch2* elegyShells[5]; // PLAYER_FORM_MAX
|
||||
/* 0x268 */ u8 unk268;
|
||||
/* 0x269 */ UNK_TYPE1 pad269[0x3];
|
||||
/* 0x26C */ Input unk_26C;
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
struct PlayState;
|
||||
struct Actor;
|
||||
struct SkelAnime;
|
||||
struct PlayerAnimationFrame;
|
||||
|
||||
#define LINK_ANIMETION_OFFSET(addr, offset) \
|
||||
(SEGMENT_ROM_START(link_animetion) + ((u32)addr & 0xFFFFFF) + ((u32)offset))
|
||||
(SEGMENT_ROM_START(link_animetion) + ((uintptr_t)addr & 0xFFFFFF) + ((u32)offset))
|
||||
#define LIMB_DONE 0xFF
|
||||
#define ANIMATION_ENTRY_MAX 50
|
||||
|
||||
|
@ -20,14 +21,14 @@ struct SkelAnime;
|
|||
#define ANIM_FLAG_4 (1 << 2)
|
||||
#define ANIM_FLAG_NOMOVE (1 << 4)
|
||||
|
||||
typedef enum {
|
||||
typedef enum AnimationMode {
|
||||
/* 0 */ ANIMMODE_LOOP,
|
||||
/* 1 */ ANIMMODE_LOOP_INTERP,
|
||||
/* 2 */ ANIMMODE_ONCE,
|
||||
/* 3 */ ANIMMODE_ONCE_INTERP,
|
||||
/* 4 */ ANIMMODE_LOOP_PARTIAL,
|
||||
/* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP
|
||||
} AnimationModes;
|
||||
} AnimationMode;
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ ANIMTAPER_DECEL = -1,
|
||||
|
@ -170,7 +171,10 @@ typedef struct AnimationContext {
|
|||
|
||||
typedef struct {
|
||||
/* 0x0 */ AnimationHeaderCommon common;
|
||||
/* 0x4 */ u32 segment;
|
||||
/* 0x4 */ union {
|
||||
void* segmentVoid;
|
||||
struct PlayerAnimationFrame* segment;
|
||||
};
|
||||
} LinkAnimationHeader; // size = 0x8
|
||||
|
||||
typedef struct SkelAnime {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _Z64ITEM_H_
|
||||
#define _Z64ITEM_H_
|
||||
#ifndef Z64ITEM_H
|
||||
#define Z64ITEM_H
|
||||
|
||||
#define DROP_TABLE_SIZE 16
|
||||
#define DROP_TABLE_NUMBER 17
|
||||
|
@ -134,7 +134,7 @@ typedef enum {
|
|||
/* 0xFF */ SLOT_NONE = 0xFF
|
||||
} InventorySlot;
|
||||
|
||||
typedef enum {
|
||||
typedef enum ItemId {
|
||||
/* 0x00 */ ITEM_OCARINA,
|
||||
/* 0x01 */ ITEM_BOW,
|
||||
/* 0x02 */ ITEM_ARROW_FIRE,
|
||||
|
@ -248,7 +248,9 @@ typedef enum {
|
|||
/* 0x6E */ ITEM_SKULL_TOKEN,
|
||||
/* 0x6F */ ITEM_HEART_CONTAINER,
|
||||
/* 0x70 */ ITEM_HEART_PIECE,
|
||||
/* 0x73 */ ITEM_SONG_LULLABY_INTRO = 0x73,
|
||||
/* 0x71 */ ITEM_71,
|
||||
/* 0x72 */ ITEM_72,
|
||||
/* 0x73 */ ITEM_SONG_LULLABY_INTRO,
|
||||
/* 0x74 */ ITEM_KEY_BOSS,
|
||||
/* 0x75 */ ITEM_COMPASS,
|
||||
/* 0x76 */ ITEM_DUNGEON_MAP,
|
||||
|
@ -297,17 +299,19 @@ typedef enum {
|
|||
/* 0xA1 */ ITEM_GOLD_DUST_2,
|
||||
/* 0xA2 */ ITEM_HYLIAN_LOACH_2,
|
||||
/* 0xA3 */ ITEM_SEAHORSE_CAUGHT,
|
||||
/* 0xF0 */ ITEM_F0 = 0xF0,
|
||||
/* 0xF1 */ ITEM_F1,
|
||||
/* 0xF2 */ ITEM_F2,
|
||||
/* 0xFD */ ITEM_FD = 0xFD,
|
||||
/* 0xF0 */ ITEM_F0 = 0xF0, // PLAYER_MASK_BLAST
|
||||
/* 0xF1 */ ITEM_F1, // PLAYER_MASK_BREMEN
|
||||
/* 0xF2 */ ITEM_F2, // PLAYER_MASK_KAMARO
|
||||
/* 0xFC */ ITEM_FC = 0xFC,
|
||||
/* 0xFD */ ITEM_FD,
|
||||
/* 0xFE */ ITEM_FE,
|
||||
/* 0xFF */ ITEM_NONE = 0xFF
|
||||
} ItemId;
|
||||
|
||||
#define BOTTLE_FIRST 0
|
||||
#define BOTTLE_MAX 6
|
||||
|
||||
typedef enum {
|
||||
typedef enum GetItemId {
|
||||
/* 0x00 */ GI_NONE,
|
||||
/* 0x01 */ GI_RUPEE_GREEN,
|
||||
/* 0x02 */ GI_RUPEE_BLUE,
|
||||
|
@ -362,7 +366,8 @@ typedef enum {
|
|||
/* 0x3D */ GI_KEY_BOSS,
|
||||
/* 0x3E */ GI_MAP,
|
||||
/* 0x3F */ GI_COMPASS,
|
||||
/* 0x41 */ GI_HOOKSHOT = 0x41,
|
||||
/* 0x40 */ GI_40,
|
||||
/* 0x41 */ GI_HOOKSHOT,
|
||||
/* 0x42 */ GI_LENS,
|
||||
/* 0x43 */ GI_PICTO_BOX,
|
||||
/* 0x4C */ GI_OCARINA = 0x4C,
|
||||
|
@ -391,9 +396,13 @@ typedef enum {
|
|||
/* 0x69 */ GI_ZORA_EGG,
|
||||
/* 0x6A */ GI_GOLD_DUST,
|
||||
/* 0x6B */ GI_MUSHROOM,
|
||||
/* 0x6E */ GI_SEAHORSE = 0x6E,
|
||||
/* 0x6C */ GI_6C,
|
||||
/* 0x6D */ GI_6D,
|
||||
/* 0x6E */ GI_SEAHORSE,
|
||||
/* 0x6F */ GI_CHATEAU_BOTTLE,
|
||||
/* 0x76 */ GI_ICE_TRAP = 0x76,
|
||||
/* 0x70 */ GI_HYLIAN_LOACH,
|
||||
/* 0x75 */ GI_75 = 0x75,
|
||||
/* 0x76 */ GI_ICE_TRAP,
|
||||
/* 0x78 */ GI_MASK_DEKU = 0x78,
|
||||
/* 0x79 */ GI_MASK_GORON,
|
||||
/* 0x7A */ GI_MASK_ZORA,
|
||||
|
@ -421,7 +430,7 @@ typedef enum {
|
|||
/* 0x91 */ GI_CHATEAU = 0x91,
|
||||
/* 0x92 */ GI_MILK,
|
||||
/* 0x93 */ GI_GOLD_DUST_2,
|
||||
/* 0x94 */ GI_HYLIAN_LOACH, // Unused bottled eel
|
||||
/* 0x94 */ GI_HYLIAN_LOACH_2, // Unused bottled eel
|
||||
/* 0x95 */ GI_SEAHORSE_CAUGHT,
|
||||
/* 0x96 */ GI_MOON_TEAR,
|
||||
/* 0x97 */ GI_DEED_LAND,
|
||||
|
@ -435,7 +444,14 @@ typedef enum {
|
|||
/* 0x9F */ GI_SHIELD_HERO_STOLEN, // Code that treats this as hero's shield is unused, implied as intended to be stolen
|
||||
/* 0xA0 */ GI_ROOM_KEY,
|
||||
/* 0xA1 */ GI_LETTER_TO_MAMA,
|
||||
/* 0xA9 */ GI_BOTTLE_STOLEN = 0xA9, // buy back stolen bottle
|
||||
/* 0xA2 */ GI_A2,
|
||||
/* 0xA3 */ GI_A3,
|
||||
/* 0xA4 */ GI_A4,
|
||||
/* 0xA5 */ GI_A5,
|
||||
/* 0xA6 */ GI_A6,
|
||||
/* 0xA7 */ GI_A7,
|
||||
/* 0xA8 */ GI_A8,
|
||||
/* 0xA9 */ GI_BOTTLE_STOLEN, // buy back stolen bottle
|
||||
/* 0xAA */ GI_LETTER_TO_KAFEI,
|
||||
/* 0xAB */ GI_PENDANT_OF_MEMORIES,
|
||||
/* 0xB4 */ GI_TINGLE_MAP_CLOCK_TOWN = 0xB4,
|
||||
|
@ -447,8 +463,8 @@ typedef enum {
|
|||
/* 0xBA */ GI_MAX
|
||||
} GetItemId;
|
||||
|
||||
typedef enum {
|
||||
/* 0xFF */ GID_NONE = -1,
|
||||
typedef enum GetItemDrawId {
|
||||
/* -1 */ GID_NONE = -1,
|
||||
/* 0x00 */ GID_BOTTLE,
|
||||
/* 0x01 */ GID_KEY_SMALL,
|
||||
/* 0x02 */ GID_MASK_KAMARO,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _Z64LIGHT_H_
|
||||
#define _Z64LIGHT_H_
|
||||
#ifndef Z64LIGHT_H
|
||||
#define Z64LIGHT_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "PR/gbi.h"
|
||||
|
@ -12,8 +12,8 @@ typedef struct {
|
|||
/* 0x09 */ s8 diffusePos2[3];
|
||||
/* 0x0C */ u8 diffuseColor[3];
|
||||
/* 0x0F */ u8 fogColor[3];
|
||||
/* 0x12 */ u16 fogNear;
|
||||
/* 0x14 */ u16 fogFar;
|
||||
/* 0x12 */ s16 fogNear;
|
||||
/* 0x14 */ s16 fogFar;
|
||||
} LightSettings; // size = 0x16
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
#ifndef Z64PLAYER_H
|
||||
#define Z64PLAYER_H
|
||||
|
||||
#include "z64actor.h"
|
||||
#include "alignment.h"
|
||||
#include "os.h"
|
||||
#include "z64actor.h"
|
||||
|
||||
struct Player;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerShield {
|
||||
/* 0 */ PLAYER_SHIELD_NONE,
|
||||
/* 1 */ PLAYER_SHIELD_HEROS_SHIELD,
|
||||
/* 2 */ PLAYER_SHIELD_MIRROR_SHIELD,
|
||||
/* 3 */ PLAYER_SHIELD_MAX
|
||||
} PlayerShield;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerBoots {
|
||||
/* 0 */ PLAYER_BOOTS_FIERCE_DEITY,
|
||||
/* 1 */ PLAYER_BOOTS_HYLIAN,
|
||||
/* 2 */ PLAYER_BOOTS_GIANT,
|
||||
|
@ -24,7 +25,7 @@ typedef enum {
|
|||
/* 7 */ PLAYER_BOOTS_MAX
|
||||
} PlayerBoots;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerStrength {
|
||||
/* 0 */ PLAYER_STRENGTH_DEKU,
|
||||
/* 1 */ PLAYER_STRENGTH_HUMAN,
|
||||
/* 2 */ PLAYER_STRENGTH_ZORA,
|
||||
|
@ -32,7 +33,7 @@ typedef enum {
|
|||
/* 4 */ PLAYER_STRENGTH_MAX
|
||||
} PlayerStrength;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerTransformation {
|
||||
/* 0 */ PLAYER_FORM_FIERCE_DEITY,
|
||||
/* 1 */ PLAYER_FORM_GORON,
|
||||
/* 2 */ PLAYER_FORM_ZORA,
|
||||
|
@ -41,7 +42,7 @@ typedef enum {
|
|||
/* 5 */ PLAYER_FORM_MAX
|
||||
} PlayerTransformation;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerMask {
|
||||
/* 0x00 */ PLAYER_MASK_NONE,
|
||||
/* 0x01 */ PLAYER_MASK_TRUTH,
|
||||
/* 0x02 */ PLAYER_MASK_KAFEIS_MASK,
|
||||
|
@ -166,7 +167,7 @@ typedef enum PlayerActionParam {
|
|||
/* 0x53 */ PLAYER_AP_MAX
|
||||
} PlayerActionParam;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerMeleeWeaponAnimation {
|
||||
/* 0 */ PLAYER_MWA_FORWARD_SLASH_1H, // Vertical one-handed slash
|
||||
/* 1 */ PLAYER_MWA_FORWARD_SLASH_2H, // Vertical two-handed slash
|
||||
/* 2 */ PLAYER_MWA_FORWARD_COMBO_1H, // Third vertical one-handed slash
|
||||
|
@ -183,6 +184,7 @@ typedef enum {
|
|||
/* 13 */ PLAYER_MWA_STAB_2H, // Targeted two-handed stab
|
||||
/* 14 */ PLAYER_MWA_STAB_COMBO_1H, // Third targeted one-handed stab
|
||||
/* 15 */ PLAYER_MWA_STAB_COMBO_2H, // Third targeted two-handed stab
|
||||
// These animations result in double damage
|
||||
/* 16 */ PLAYER_MWA_FLIPSLASH_START, // unused
|
||||
/* 17 */ PLAYER_MWA_JUMPSLASH_START, // Start of jumpslash
|
||||
/* 18 */ PLAYER_MWA_ZORA_JUMPKICK_START, // Start of Zora jump attack
|
||||
|
@ -204,6 +206,16 @@ typedef enum {
|
|||
/* 34 */ PLAYER_MWA_MAX
|
||||
} PlayerMeleeWeaponAnimation;
|
||||
|
||||
typedef enum PlayerDoorType {
|
||||
/* -1 */ PLAYER_DOORTYPE_TALKING = -1, // Displays a message instead of opening
|
||||
/* 0 */ PLAYER_DOORTYPE_NONE,
|
||||
/* 1 */ PLAYER_DOORTYPE_HANDLE,
|
||||
/* 2 */ PLAYER_DOORTYPE_SLIDING,
|
||||
/* 3 */ PLAYER_DOORTYPE_FAKE, // Unused? OoT leftover (?)
|
||||
/* 4 */ PLAYER_DOORTYPE_STAIRCASE,
|
||||
/* 5 */ PLAYER_DOORTYPE_PROXIMITY
|
||||
} PlayerDoorType;
|
||||
|
||||
typedef enum PlayerAnimType {
|
||||
/* 0 */ PLAYER_ANIMTYPE_0,
|
||||
/* 1 */ PLAYER_ANIMTYPE_1,
|
||||
|
@ -267,7 +279,7 @@ typedef enum PlayerModelGroup {
|
|||
/* 15 */ PLAYER_MODELGROUP_MAX
|
||||
} PlayerModelGroup;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerEyeIndex {
|
||||
/* 0 */ PLAYER_EYES_OPEN,
|
||||
/* 1 */ PLAYER_EYES_HALF,
|
||||
/* 2 */ PLAYER_EYES_CLOSED,
|
||||
|
@ -279,7 +291,7 @@ typedef enum {
|
|||
/* 8 */ PLAYER_EYES_MAX
|
||||
} PlayerEyeIndex;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerMouthIndex {
|
||||
/* 0 */ PLAYER_MOUTH_CLOSED,
|
||||
/* 1 */ PLAYER_MOUTH_TEETH,
|
||||
/* 2 */ PLAYER_MOUTH_ANGRY,
|
||||
|
@ -287,7 +299,7 @@ typedef enum {
|
|||
/* 4 */ PLAYER_MOUTH_MAX
|
||||
} PlayerMouthIndex;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerFacialExpression {
|
||||
/* 0 */ PLAYER_FACE_0,
|
||||
/* 1 */ PLAYER_FACE_1,
|
||||
/* 2 */ PLAYER_FACE_2,
|
||||
|
@ -306,7 +318,7 @@ typedef enum {
|
|||
/* 15 */ PLAYER_FACE_15
|
||||
} PlayerFacialExpression;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerLimb {
|
||||
/* 0x00 */ PLAYER_LIMB_NONE,
|
||||
/* 0x01 */ PLAYER_LIMB_ROOT,
|
||||
/* 0x02 */ PLAYER_LIMB_WAIST,
|
||||
|
@ -332,9 +344,38 @@ typedef enum {
|
|||
/* 0x16 */ PLAYER_LIMB_MAX
|
||||
} PlayerLimb;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
typedef enum PlayerBodyPart {
|
||||
/* 0x00 */ PLAYER_BODYPART_WAIST, // PLAYER_LIMB_WAIST
|
||||
/* 0x01 */ PLAYER_BODYPART_RIGHT_THIGH, // PLAYER_LIMB_RIGHT_THIGH
|
||||
/* 0x02 */ PLAYER_BODYPART_RIGHT_SHIN, // PLAYER_LIMB_RIGHT_SHIN
|
||||
/* 0x03 */ PLAYER_BODYPART_RIGHT_FOOT, // PLAYER_LIMB_RIGHT_FOOT
|
||||
/* 0x04 */ PLAYER_BODYPART_LEFT_THIGH, // PLAYER_LIMB_LEFT_THIGH
|
||||
/* 0x05 */ PLAYER_BODYPART_LEFT_SHIN, // PLAYER_LIMB_LEFT_SHIN
|
||||
/* 0x06 */ PLAYER_BODYPART_LEFT_FOOT, // PLAYER_LIMB_LEFT_FOOT
|
||||
/* 0x07 */ PLAYER_BODYPART_HEAD, // PLAYER_LIMB_HEAD
|
||||
/* 0x08 */ PLAYER_BODYPART_HAT, // PLAYER_LIMB_HAT
|
||||
/* 0x09 */ PLAYER_BODYPART_COLLAR, // PLAYER_LIMB_COLLAR
|
||||
/* 0x0A */ PLAYER_BODYPART_LEFT_SHOULDER, // PLAYER_LIMB_LEFT_SHOULDER
|
||||
/* 0x0B */ PLAYER_BODYPART_LEFT_FOREARM, // PLAYER_LIMB_LEFT_FOREARM
|
||||
/* 0x0C */ PLAYER_BODYPART_LEFT_HAND, // PLAYER_LIMB_LEFT_HAND
|
||||
/* 0x0D */ PLAYER_BODYPART_RIGHT_SHOULDER, // PLAYER_LIMB_R_SHOULDER
|
||||
/* 0x0E */ PLAYER_BODYPART_RIGHT_FOREARM, // PLAYER_LIMB_R_FOREARM
|
||||
/* 0x0F */ PLAYER_BODYPART_RIGHT_HAND, // PLAYER_LIMB_R_HAND
|
||||
/* 0x10 */ PLAYER_BODYPART_SHEATH, // PLAYER_LIMB_SHEATH
|
||||
/* 0x11 */ PLAYER_BODYPART_TORSO, // PLAYER_LIMB_TORSO
|
||||
/* 0x12 */ PLAYER_BODYPART_MAX
|
||||
} PlayerBodyPart;
|
||||
|
||||
typedef struct PlayerAnimationFrame {
|
||||
/* 0x000 */ Vec3s frameTable[PLAYER_LIMB_MAX];
|
||||
/* 0x108 */ s16 faceInfo;
|
||||
} PlayerAnimationFrame; // size = 0x10A
|
||||
|
||||
#define PLAYER_LIMB_BUF_SIZE (ALIGN16(sizeof(PlayerAnimationFrame)) + 0xF)
|
||||
|
||||
typedef struct PlayerAgeProperties {
|
||||
/* 0x00 */ f32 unk_00; // ceilingCheckHeight?
|
||||
/* 0x04 */ f32 shadowScale;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
|
@ -347,15 +388,15 @@ typedef struct {
|
|||
/* 0x2C */ f32 unk_2C;
|
||||
/* 0x30 */ f32 unk_30;
|
||||
/* 0x34 */ f32 unk_34;
|
||||
/* 0x38 */ f32 unk_38;
|
||||
/* 0x38 */ f32 unk_38; // wallCheckHeight?
|
||||
/* 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;
|
||||
/* 0x92 */ u16 voiceSfxIdOffset;
|
||||
/* 0x94 */ u16 surfaceSfxIdOffset;
|
||||
/* 0x98 */ f32 unk_98;
|
||||
/* 0x9C */ f32 unk_9C;
|
||||
/* 0xA0 */ LinkAnimationHeader* unk_A0;
|
||||
|
@ -376,8 +417,6 @@ typedef struct {
|
|||
} WeaponInfo; // size = 0x1C
|
||||
|
||||
|
||||
typedef void (*PlayerFuncD58)(struct PlayState*, struct Player*);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 unk_00;
|
||||
/* 0x01 */ u8 alpha;
|
||||
|
@ -399,6 +438,151 @@ typedef struct struct_80122744_arg1 {
|
|||
/* 0x4 */ Vec3s* unk_04;
|
||||
} struct_80122744_arg1; // size = 0x8
|
||||
|
||||
typedef enum PlayerCsMode {
|
||||
/* 0x00 */ PLAYER_CSMODE_0,
|
||||
/* 0x01 */ PLAYER_CSMODE_1,
|
||||
/* 0x02 */ PLAYER_CSMODE_2,
|
||||
/* 0x03 */ PLAYER_CSMODE_3,
|
||||
/* 0x04 */ PLAYER_CSMODE_4,
|
||||
/* 0x05 */ PLAYER_CSMODE_5,
|
||||
/* 0x06 */ PLAYER_CSMODE_6,
|
||||
/* 0x07 */ PLAYER_CSMODE_7,
|
||||
/* 0x08 */ PLAYER_CSMODE_8,
|
||||
/* 0x09 */ PLAYER_CSMODE_9,
|
||||
/* 0x0A */ PLAYER_CSMODE_10,
|
||||
/* 0x0B */ PLAYER_CSMODE_11,
|
||||
/* 0x0C */ PLAYER_CSMODE_12,
|
||||
/* 0x0D */ PLAYER_CSMODE_13,
|
||||
/* 0x0E */ PLAYER_CSMODE_14,
|
||||
/* 0x0F */ PLAYER_CSMODE_15,
|
||||
/* 0x10 */ PLAYER_CSMODE_16,
|
||||
/* 0x11 */ PLAYER_CSMODE_17,
|
||||
/* 0x12 */ PLAYER_CSMODE_18,
|
||||
/* 0x13 */ PLAYER_CSMODE_19,
|
||||
/* 0x14 */ PLAYER_CSMODE_20,
|
||||
/* 0x15 */ PLAYER_CSMODE_21,
|
||||
/* 0x16 */ PLAYER_CSMODE_22,
|
||||
/* 0x17 */ PLAYER_CSMODE_23,
|
||||
/* 0x18 */ PLAYER_CSMODE_24,
|
||||
/* 0x19 */ PLAYER_CSMODE_25,
|
||||
/* 0x1A */ PLAYER_CSMODE_26,
|
||||
/* 0x1B */ PLAYER_CSMODE_27,
|
||||
/* 0x1C */ PLAYER_CSMODE_28,
|
||||
/* 0x1D */ PLAYER_CSMODE_29,
|
||||
/* 0x1E */ PLAYER_CSMODE_30,
|
||||
/* 0x1F */ PLAYER_CSMODE_31,
|
||||
/* 0x20 */ PLAYER_CSMODE_32,
|
||||
/* 0x21 */ PLAYER_CSMODE_33,
|
||||
/* 0x22 */ PLAYER_CSMODE_34,
|
||||
/* 0x23 */ PLAYER_CSMODE_35,
|
||||
/* 0x24 */ PLAYER_CSMODE_36,
|
||||
/* 0x25 */ PLAYER_CSMODE_37,
|
||||
/* 0x26 */ PLAYER_CSMODE_38,
|
||||
/* 0x27 */ PLAYER_CSMODE_39,
|
||||
/* 0x28 */ PLAYER_CSMODE_40,
|
||||
/* 0x29 */ PLAYER_CSMODE_41,
|
||||
/* 0x2A */ PLAYER_CSMODE_42,
|
||||
/* 0x2B */ PLAYER_CSMODE_43,
|
||||
/* 0x2C */ PLAYER_CSMODE_44,
|
||||
/* 0x2D */ PLAYER_CSMODE_45,
|
||||
/* 0x2E */ PLAYER_CSMODE_46,
|
||||
/* 0x2F */ PLAYER_CSMODE_47,
|
||||
/* 0x30 */ PLAYER_CSMODE_48,
|
||||
/* 0x31 */ PLAYER_CSMODE_49,
|
||||
/* 0x32 */ PLAYER_CSMODE_50,
|
||||
/* 0x33 */ PLAYER_CSMODE_51,
|
||||
/* 0x34 */ PLAYER_CSMODE_52,
|
||||
/* 0x35 */ PLAYER_CSMODE_53,
|
||||
/* 0x36 */ PLAYER_CSMODE_54,
|
||||
/* 0x37 */ PLAYER_CSMODE_55,
|
||||
/* 0x38 */ PLAYER_CSMODE_56,
|
||||
/* 0x39 */ PLAYER_CSMODE_57,
|
||||
/* 0x3A */ PLAYER_CSMODE_58,
|
||||
/* 0x3B */ PLAYER_CSMODE_59,
|
||||
/* 0x3C */ PLAYER_CSMODE_60,
|
||||
/* 0x3D */ PLAYER_CSMODE_61,
|
||||
/* 0x3E */ PLAYER_CSMODE_62,
|
||||
/* 0x3F */ PLAYER_CSMODE_63,
|
||||
/* 0x40 */ PLAYER_CSMODE_64,
|
||||
/* 0x41 */ PLAYER_CSMODE_65,
|
||||
/* 0x42 */ PLAYER_CSMODE_66,
|
||||
/* 0x43 */ PLAYER_CSMODE_67,
|
||||
/* 0x44 */ PLAYER_CSMODE_68,
|
||||
/* 0x45 */ PLAYER_CSMODE_69,
|
||||
/* 0x46 */ PLAYER_CSMODE_70,
|
||||
/* 0x47 */ PLAYER_CSMODE_71,
|
||||
/* 0x48 */ PLAYER_CSMODE_72,
|
||||
/* 0x49 */ PLAYER_CSMODE_73,
|
||||
/* 0x4A */ PLAYER_CSMODE_74,
|
||||
/* 0x4B */ PLAYER_CSMODE_75,
|
||||
/* 0x4C */ PLAYER_CSMODE_76,
|
||||
/* 0x4D */ PLAYER_CSMODE_77,
|
||||
/* 0x4E */ PLAYER_CSMODE_78,
|
||||
/* 0x4F */ PLAYER_CSMODE_79,
|
||||
/* 0x50 */ PLAYER_CSMODE_80,
|
||||
/* 0x51 */ PLAYER_CSMODE_81,
|
||||
/* 0x52 */ PLAYER_CSMODE_82,
|
||||
/* 0x53 */ PLAYER_CSMODE_83,
|
||||
/* 0x54 */ PLAYER_CSMODE_84,
|
||||
/* 0x55 */ PLAYER_CSMODE_85,
|
||||
/* 0x56 */ PLAYER_CSMODE_86,
|
||||
/* 0x57 */ PLAYER_CSMODE_87,
|
||||
/* 0x58 */ PLAYER_CSMODE_88,
|
||||
/* 0x59 */ PLAYER_CSMODE_89,
|
||||
/* 0x5A */ PLAYER_CSMODE_90,
|
||||
/* 0x5B */ PLAYER_CSMODE_91,
|
||||
/* 0x5C */ PLAYER_CSMODE_92,
|
||||
/* 0x5D */ PLAYER_CSMODE_93,
|
||||
/* 0x5E */ PLAYER_CSMODE_94,
|
||||
/* 0x5F */ PLAYER_CSMODE_95,
|
||||
/* 0x60 */ PLAYER_CSMODE_96,
|
||||
/* 0x61 */ PLAYER_CSMODE_97,
|
||||
/* 0x62 */ PLAYER_CSMODE_98,
|
||||
/* 0x63 */ PLAYER_CSMODE_99,
|
||||
/* 0x64 */ PLAYER_CSMODE_100,
|
||||
/* 0x65 */ PLAYER_CSMODE_101,
|
||||
/* 0x66 */ PLAYER_CSMODE_102,
|
||||
/* 0x67 */ PLAYER_CSMODE_103,
|
||||
/* 0x68 */ PLAYER_CSMODE_104,
|
||||
/* 0x69 */ PLAYER_CSMODE_105,
|
||||
/* 0x6A */ PLAYER_CSMODE_106,
|
||||
/* 0x6B */ PLAYER_CSMODE_107,
|
||||
/* 0x6C */ PLAYER_CSMODE_108,
|
||||
/* 0x6D */ PLAYER_CSMODE_109,
|
||||
/* 0x6E */ PLAYER_CSMODE_110,
|
||||
/* 0x6F */ PLAYER_CSMODE_111,
|
||||
/* 0x70 */ PLAYER_CSMODE_112,
|
||||
/* 0x71 */ PLAYER_CSMODE_113,
|
||||
/* 0x72 */ PLAYER_CSMODE_114,
|
||||
/* 0x73 */ PLAYER_CSMODE_115,
|
||||
/* 0x74 */ PLAYER_CSMODE_116,
|
||||
/* 0x75 */ PLAYER_CSMODE_117,
|
||||
/* 0x76 */ PLAYER_CSMODE_118,
|
||||
/* 0x77 */ PLAYER_CSMODE_119,
|
||||
/* 0x78 */ PLAYER_CSMODE_120,
|
||||
/* 0x79 */ PLAYER_CSMODE_121,
|
||||
/* 0x7A */ PLAYER_CSMODE_122,
|
||||
/* 0x7B */ PLAYER_CSMODE_123,
|
||||
/* 0x7C */ PLAYER_CSMODE_124,
|
||||
/* 0x7D */ PLAYER_CSMODE_125,
|
||||
/* 0x7E */ PLAYER_CSMODE_126,
|
||||
/* 0x7F */ PLAYER_CSMODE_127,
|
||||
/* 0x80 */ PLAYER_CSMODE_128,
|
||||
/* 0x81 */ PLAYER_CSMODE_129,
|
||||
/* 0x82 */ PLAYER_CSMODE_130,
|
||||
/* 0x83 */ PLAYER_CSMODE_131,
|
||||
/* 0x84 */ PLAYER_CSMODE_132,
|
||||
/* 0x85 */ PLAYER_CSMODE_133,
|
||||
/* 0x86 */ PLAYER_CSMODE_134,
|
||||
/* 0x87 */ PLAYER_CSMODE_135,
|
||||
/* 0x88 */ PLAYER_CSMODE_136,
|
||||
/* 0x89 */ PLAYER_CSMODE_137,
|
||||
/* 0x8A */ PLAYER_CSMODE_138,
|
||||
/* 0x8B */ PLAYER_CSMODE_139,
|
||||
/* 0x8C */ PLAYER_CSMODE_MAX
|
||||
} PlayerCsMode;
|
||||
|
||||
|
||||
//
|
||||
#define PLAYER_STATE1_1 (1 << 0)
|
||||
//
|
||||
|
@ -407,7 +591,7 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE1_4 (1 << 2)
|
||||
//
|
||||
#define PLAYER_STATE1_8 (1 << 3)
|
||||
//
|
||||
// Zora electric shield
|
||||
#define PLAYER_STATE1_10 (1 << 4)
|
||||
//
|
||||
#define PLAYER_STATE1_20 (1 << 5)
|
||||
|
@ -461,7 +645,7 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE1_20000000 (1 << 29)
|
||||
//
|
||||
#define PLAYER_STATE1_40000000 (1 << 30)
|
||||
//
|
||||
// Related to exit a grotto
|
||||
#define PLAYER_STATE1_80000000 (1 << 31)
|
||||
|
||||
|
||||
|
@ -523,15 +707,15 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE2_8000000 (1 << 27)
|
||||
//
|
||||
#define PLAYER_STATE2_10000000 (1 << 28)
|
||||
//
|
||||
// Disable drawing player
|
||||
#define PLAYER_STATE2_20000000 (1 << 29)
|
||||
//
|
||||
// Lunge: small forward boost at the end of certain attack animations
|
||||
#define PLAYER_STATE2_40000000 (1 << 30)
|
||||
//
|
||||
// Void-out
|
||||
#define PLAYER_STATE2_80000000 (1 << 31)
|
||||
|
||||
|
||||
//
|
||||
// Ignores collision with floor?
|
||||
#define PLAYER_STATE3_1 (1 << 0)
|
||||
//
|
||||
#define PLAYER_STATE3_2 (1 << 1)
|
||||
|
@ -547,7 +731,7 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE3_40 (1 << 6)
|
||||
//
|
||||
#define PLAYER_STATE3_80 (1 << 7)
|
||||
//
|
||||
// Related to form Deku
|
||||
#define PLAYER_STATE3_100 (1 << 8)
|
||||
//
|
||||
#define PLAYER_STATE3_200 (1 << 9)
|
||||
|
@ -555,7 +739,7 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE3_400 (1 << 10)
|
||||
//
|
||||
#define PLAYER_STATE3_800 (1 << 11)
|
||||
// being curled?
|
||||
// goron curled
|
||||
#define PLAYER_STATE3_1000 (1 << 12)
|
||||
//
|
||||
#define PLAYER_STATE3_2000 (1 << 13)
|
||||
|
@ -567,13 +751,13 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE3_10000 (1 << 16)
|
||||
//
|
||||
#define PLAYER_STATE3_20000 (1 << 17)
|
||||
//
|
||||
// Related to form Deku
|
||||
#define PLAYER_STATE3_40000 (1 << 18)
|
||||
//
|
||||
#define PLAYER_STATE3_80000 (1 << 19)
|
||||
//
|
||||
#define PLAYER_STATE3_100000 (1 << 20)
|
||||
//
|
||||
// Deku hopping?
|
||||
#define PLAYER_STATE3_200000 (1 << 21)
|
||||
//
|
||||
#define PLAYER_STATE3_400000 (1 << 22)
|
||||
|
@ -597,6 +781,34 @@ typedef struct struct_80122744_arg1 {
|
|||
#define PLAYER_STATE3_80000000 (1 << 31)
|
||||
|
||||
|
||||
#define PLAYER_GET_INITMODE(thisx) (((thisx)->params & 0xF00) >> 8)
|
||||
|
||||
typedef enum PlayerInitMode {
|
||||
/* 0x0 */ PLAYER_INITMODE_0,
|
||||
/* 0x1 */ PLAYER_INITMODE_1, // Spawning after pulling/putting-back Master sword // OoT leftover
|
||||
/* 0x2 */ PLAYER_INITMODE_2,
|
||||
/* 0x3 */ PLAYER_INITMODE_3,
|
||||
/* 0x4 */ PLAYER_INITMODE_4,
|
||||
/* 0x5 */ PLAYER_INITMODE_5,
|
||||
/* 0x6 */ PLAYER_INITMODE_6,
|
||||
/* 0x7 */ PLAYER_INITMODE_7,
|
||||
/* 0x8 */ PLAYER_INITMODE_8,
|
||||
/* 0x9 */ PLAYER_INITMODE_9,
|
||||
/* 0xA */ PLAYER_INITMODE_A,
|
||||
/* 0xB */ PLAYER_INITMODE_B,
|
||||
/* 0xC */ PLAYER_INITMODE_TELESCOPE,
|
||||
/* 0xD */ PLAYER_INITMODE_D,
|
||||
/* 0xE */ PLAYER_INITMODE_E,
|
||||
/* 0xF */ PLAYER_INITMODE_F
|
||||
} PlayerInitMode;
|
||||
|
||||
#define PLAYER_PARAMS(startBgCamIndex, initMode) ((startBgCamIndex & 0xFF) | ((initMode & 0xF) << 8))
|
||||
|
||||
typedef void (*PlayerActionFunc)(struct Player* this, struct PlayState* play);
|
||||
typedef s32 (*PlayerFuncAC4)(struct Player* this, struct PlayState* play);
|
||||
typedef void (*PlayerFuncD58)(struct PlayState* play, struct Player* this);
|
||||
|
||||
|
||||
typedef struct Player {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ s8 currentShield;
|
||||
|
@ -605,8 +817,8 @@ typedef struct Player {
|
|||
/* 0x147 */ s8 itemActionParam; // PlayerActionParam enum
|
||||
/* 0x148 */ u8 heldItemId; // ItemId enum
|
||||
/* 0x149 */ s8 prevBoots;
|
||||
/* 0x14A */ s8 heldItemActionParam;
|
||||
/* 0x14B */ u8 transformation;
|
||||
/* 0x14A */ s8 heldItemActionParam; // PlayerActionParam enum
|
||||
/* 0x14B */ u8 transformation; // PlayerTransformation enum
|
||||
/* 0x14C */ u8 modelGroup; // PlayerModelGroup enum
|
||||
/* 0x14D */ u8 nextModelGroup;
|
||||
/* 0x14E */ s8 unk_14E;
|
||||
|
@ -614,7 +826,7 @@ typedef struct Player {
|
|||
/* 0x150 */ u8 leftHandType;
|
||||
/* 0x151 */ u8 rightHandType;
|
||||
/* 0x152 */ u8 sheathType;
|
||||
/* 0x153 */ u8 currentMask;
|
||||
/* 0x153 */ u8 currentMask; // PlayerMask enum
|
||||
/* 0x154 */ s8 unk_154;
|
||||
/* 0x155 */ u8 prevMask;
|
||||
/* 0x158 */ Gfx** rightHandDLists;
|
||||
|
@ -664,44 +876,50 @@ typedef struct Player {
|
|||
/* 0x350 */ PosRot leftHandWorld;
|
||||
/* 0x364 */ Actor* rightHandActor;
|
||||
/* 0x368 */ PosRot rightHandWorld;
|
||||
/* 0x37C */ s8 doorType;
|
||||
/* 0x37C */ s8 doorType; // PlayerDoorType enum
|
||||
/* 0x37D */ s8 doorDirection;
|
||||
/* 0x37E */ s8 doorTimer;
|
||||
/* 0x37F */ s8 doorNext; // used with spiral staircase
|
||||
/* 0x380 */ Actor* doorActor;
|
||||
/* 0x384 */ s16 getItemId;
|
||||
/* 0x384 */ s16 getItemId; // GetItemId enum
|
||||
/* 0x386 */ u16 getItemDirection;
|
||||
/* 0x388 */ Actor* interactRangeActor;
|
||||
/* 0x38C */ s8 mountSide;
|
||||
/* 0x390 */ Actor* rideActor;
|
||||
/* 0x394 */ u8 csMode;
|
||||
/* 0x395 */ u8 unk_395; // prevCsMode?
|
||||
/* 0x396 */ u8 unk_396;
|
||||
/* 0x397 */ u8 unk_397;
|
||||
/* 0x394 */ u8 csMode; // PlayerCsMode enum
|
||||
/* 0x395 */ u8 prevCsMode; // PlayerCsMode enum
|
||||
/* 0x396 */ u8 unk_396; // currentActorActionId?
|
||||
/* 0x397 */ u8 unk_397; // PlayerDoorType enum
|
||||
/* 0x398 */ Actor* unk_398;
|
||||
/* 0x39C */ s16 unk_39C;
|
||||
/* 0x39E */ s16 unk_39E;
|
||||
/* 0x39C */ UNK_TYPE1 unk_39C[0x4];
|
||||
/* 0x3A0 */ Vec3f unk_3A0;
|
||||
/* 0x3AC */ Vec3f unk_3AC;
|
||||
/* 0x3B8 */ u16 unk_3B8;
|
||||
/* 0x3BA */ s16 unk_3BA;
|
||||
/* 0x3BC */ s16 unk_3BC;
|
||||
/* 0x3BC */ s16 subCamId;
|
||||
/* 0x3BE */ char unk_3BE[2];
|
||||
/* 0x3C0 */ Vec3f unk_3C0;
|
||||
/* 0x3CC */ s16 unk_3CC;
|
||||
/* 0x3CE */ s8 unk_3CE;
|
||||
/* 0x3CF */ u8 unk_3CF;
|
||||
/* 0x3D0 */ struct_80122D44_arg1 unk_3D0;
|
||||
/* 0x404 */ UNK_TYPE1 unk_404[0x34];
|
||||
/* 0x4E4 */ UNK_TYPE1 unk_4E4[0x20];
|
||||
/* 0x504 */ LightNode* lightNode;
|
||||
/* 0x508 */ LightInfo lightInfo;
|
||||
/* 0x518 */ ColliderCylinder cylinder;
|
||||
/* 0x564 */ ColliderQuad meleeWeaponQuads[2];
|
||||
/* 0x664 */ ColliderQuad shieldQuad;
|
||||
/* 0x6E4 */ ColliderCylinder shieldCylinder;
|
||||
/* 0x730 */ Actor* unk_730;
|
||||
/* 0x730 */ Actor* targetedActor; // Z/L-Targeted actor
|
||||
/* 0x734 */ char unk_734[4];
|
||||
/* 0x738 */ s32 unk_738;
|
||||
/* 0x73C */ s32 meleeWeaponEffectIndex[3];
|
||||
/* 0x748 */ char unk_748[0x320];
|
||||
/* 0x748 */ PlayerActionFunc actionFunc;
|
||||
/* 0x74C */ u8 jointTableBuffer[PLAYER_LIMB_BUF_SIZE];
|
||||
/* 0x7EB */ u8 morphTableBuffer[PLAYER_LIMB_BUF_SIZE];
|
||||
/* 0x88A */ u8 blendTableBuffer[PLAYER_LIMB_BUF_SIZE];
|
||||
/* 0x929 */ u8 unk_929[PLAYER_LIMB_BUF_SIZE];
|
||||
/* 0x9C8 */ u8 unk_9C8[PLAYER_LIMB_BUF_SIZE];
|
||||
/* 0xA68 */ PlayerAgeProperties* ageProperties; // repurposed as "transformation properties"?
|
||||
/* 0xA6C */ u32 stateFlags1;
|
||||
/* 0xA70 */ u32 stateFlags2;
|
||||
|
@ -710,18 +928,18 @@ typedef struct Player {
|
|||
/* 0xA7C */ Actor* boomerangActor;
|
||||
/* 0xA80 */ Actor* tatlActor;
|
||||
/* 0xA84 */ s16 tatlTextId;
|
||||
/* 0xA86 */ s8 unk_A86;
|
||||
/* 0xA87 */ s8 exchangeItemId;
|
||||
/* 0xA88 */ Actor* targetActor;
|
||||
/* 0xA8C */ f32 targetActorDistance;
|
||||
/* 0xA86 */ s8 unk_A86; // actorCutsceneIndex?
|
||||
/* 0xA87 */ s8 exchangeItemId; // PlayerActionParam enum
|
||||
/* 0xA88 */ Actor* talkActor;
|
||||
/* 0xA8C */ f32 talkActorDistance;
|
||||
/* 0xA90 */ Actor* unk_A90;
|
||||
/* 0xA94 */ f32 unk_A94;
|
||||
/* 0xA98 */ Actor* unk_A98;
|
||||
/* 0xA9C */ f32 unk_A9C;
|
||||
/* 0xAA0 */ f32 unk_AA0;
|
||||
/* 0xA9C */ f32 secretRumbleCharge; // builds per frame until discharges with a rumble request
|
||||
/* 0xAA0 */ f32 closestSecretDistSq; // Used to augment `secretRumbleCharge`. Cleared every frame
|
||||
/* 0xAA4 */ s8 unk_AA4;
|
||||
/* 0xAA5 */ u8 unk_AA5;
|
||||
/* 0xAA6 */ u16 unk_AA6;
|
||||
/* 0xAA6 */ u16 unk_AA6; // flags of some kind
|
||||
/* 0xAA8 */ s16 unk_AA8;
|
||||
/* 0xAAA */ s16 unk_AAA;
|
||||
/* 0xAAC */ Vec3s unk_AAC;
|
||||
|
@ -729,11 +947,11 @@ typedef struct Player {
|
|||
/* 0xAB8 */ f32 unk_AB8;
|
||||
/* 0xABC */ f32 unk_ABC;
|
||||
/* 0xAC0 */ f32 unk_AC0;
|
||||
/* 0xAC4 */ void* unk_AC4;
|
||||
/* 0xAC4 */ PlayerFuncAC4 unk_AC4;
|
||||
/* 0xAC8 */ f32 unk_AC8;
|
||||
/* 0xACC */ s16 unk_ACC;
|
||||
/* 0xACE */ s8 unk_ACE;
|
||||
/* 0xACF */ u8 unk_ACF;
|
||||
/* 0xACF */ u8 putAwayCountdown; // Frames to wait before showing "Put Away" on A
|
||||
/* 0xAD0 */ f32 linearVelocity;
|
||||
/* 0xAD4 */ s16 currentYaw;
|
||||
/* 0xAD6 */ s16 targetYaw;
|
||||
|
@ -743,15 +961,16 @@ typedef struct Player {
|
|||
/* 0xADC */ s8 unk_ADC;
|
||||
/* 0xADD */ s8 unk_ADD;
|
||||
/* 0xADE */ u8 unk_ADE;
|
||||
/* 0xADF */ s8 unk_ADF[4];
|
||||
/* 0xAE3 */ s8 unk_AE3[4];
|
||||
/* 0xADF */ s8 unk_ADF[4]; // Circular buffer used for testing for triggering a quickspin
|
||||
/* 0xAE3 */ s8 unk_AE3[4]; // Circular buffer used for ?
|
||||
/* 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];
|
||||
/* 0xB08 */ f32 unk_B08[2]; // TODO: Investigate if this member actually is an array
|
||||
/* 0xB10 */ f32 unk_B10[6];
|
||||
/* 0xB28 */ s16 unk_B28; //Burning stick timer?
|
||||
/* 0xB2A */ s8 unk_B2A;
|
||||
/* 0xB2A */ s8 getItemDrawId;
|
||||
/* 0xB2B */ s8 unk_B2B;
|
||||
/* 0xB2C */ f32 windSpeed;
|
||||
/* 0xB30 */ s16 windAngleX;
|
||||
|
@ -765,8 +984,8 @@ typedef struct Player {
|
|||
/* 0xB4C */ s16 unk_B4C;
|
||||
/* 0xB4E */ s16 unk_B4E;
|
||||
/* 0xB50 */ f32 unk_B50;
|
||||
/* 0xB54 */ f32 unk_B54;
|
||||
/* 0xB58 */ f32 unk_B58;
|
||||
/* 0xB54 */ f32 wallHeight; // height used to determine whether link can climb or grab a ledge at the top
|
||||
/* 0xB58 */ f32 wallDistance; // distance to the colliding wall plane
|
||||
/* 0xB5C */ u8 unk_B5C;
|
||||
/* 0xB5D */ u8 unk_B5D;
|
||||
/* 0xB5E */ u8 unk_B5E;
|
||||
|
@ -774,15 +993,15 @@ typedef struct Player {
|
|||
/* 0xB60 */ u16 unk_B60; // blast mask timer?
|
||||
/* 0xB62 */ s16 unk_B62;
|
||||
/* 0xB64 */ u8 unk_B64;
|
||||
/* 0xB65 */ u8 unk_B65;
|
||||
/* 0xB65 */ u8 shockTimer;
|
||||
/* 0xB66 */ u8 unk_B66;
|
||||
/* 0xB67 */ u8 unk_B67; // deku hop timer?
|
||||
/* 0xB68 */ s16 unk_B68;
|
||||
/* 0xB6A */ s16 unk_B6A;
|
||||
/* 0xB67 */ u8 unk_B67; // deku remaining hops counter
|
||||
/* 0xB68 */ s16 fallStartHeight; // last truncated Y position before falling
|
||||
/* 0xB6A */ s16 fallDistance; // truncated Y distance the player has fallen so far (positive is down)
|
||||
/* 0xB6C */ s16 unk_B6C;
|
||||
/* 0xB6E */ s16 unk_B6E;
|
||||
/* 0xB70 */ s16 unk_B70;
|
||||
/* 0xB72 */ u16 unk_B72; // floor type?
|
||||
/* 0xB72 */ u16 floorSfxOffset;
|
||||
/* 0xB74 */ u8 unk_B74;
|
||||
/* 0xB75 */ u8 unk_B75;
|
||||
/* 0xB76 */ s16 unk_B76;
|
||||
|
@ -790,8 +1009,7 @@ typedef struct Player {
|
|||
/* 0xB7C */ f32 unk_B7C;
|
||||
/* 0xB80 */ f32 unk_B80;
|
||||
/* 0xB84 */ s16 unk_B84;
|
||||
/* 0xB86 */ s16 unk_B86;
|
||||
/* 0xB88 */ s16 unk_B88;
|
||||
/* 0xB86 */ s16 unk_B86[2]; // unknown length
|
||||
/* 0xB8A */ s16 unk_B8A;
|
||||
/* 0xB8C */ s16 unk_B8C;
|
||||
/* 0xB8E */ s16 unk_B8E;
|
||||
|
@ -800,11 +1018,11 @@ typedef struct Player {
|
|||
/* 0xB94 */ s16 unk_B94;
|
||||
/* 0xB96 */ s16 unk_B96;
|
||||
/* 0xB98 */ WeaponInfo meleeWeaponInfo[3];
|
||||
/* 0xBEC */ Vec3f bodyPartsPos[18];
|
||||
/* 0xBEC */ Vec3f bodyPartsPos[PLAYER_BODYPART_MAX];
|
||||
/* 0xCC4 */ MtxF mf_CC4;
|
||||
/* 0xD04 */ MtxF shieldMf;
|
||||
/* 0xD44 */ u8 isBurning;
|
||||
/* 0xD45 */ u8 flameTimers[18]; // one flame per body part
|
||||
/* 0xD45 */ u8 flameTimers[PLAYER_BODYPART_MAX];
|
||||
/* 0xD57 */ u8 unk_D57;
|
||||
/* 0xD58 */ PlayerFuncD58 unk_D58;
|
||||
/* 0xD5C */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
|
||||
|
@ -813,7 +1031,7 @@ typedef struct Player {
|
|||
/* 0xD5F */ u8 unk_D5F;
|
||||
/* 0xD60 */ f32 unk_D60;
|
||||
/* 0xD64 */ s16 unk_D64;
|
||||
/* 0xD66 */ u16 unk_D66;
|
||||
/* 0xD66 */ u16 unk_D66; // sfx
|
||||
/* 0xD68 */ s16 unk_D68;
|
||||
/* 0xD6A */ s8 unk_D6A;
|
||||
/* 0xD6B */ u8 unk_D6B;
|
||||
|
|
|
@ -311,7 +311,7 @@ typedef struct SaveContext {
|
|||
/* 0x3DB8 */ u16 entranceSound; // "player_wipe_door_SE"
|
||||
/* 0x3DBA */ u8 unk_3DBA; // "player_wipe_item"
|
||||
/* 0x3DBB */ u8 unk_3DBB; // "next_walk"
|
||||
/* 0x3DBC */ u16 dogParams; // "dog_flag"
|
||||
/* 0x3DBC */ s16 dogParams; // "dog_flag"
|
||||
/* 0x3DBE */ u8 textTriggerFlags; // "guide_status"
|
||||
/* 0x3DBF */ u8 showTitleCard; // "name_display"
|
||||
/* 0x3DC0 */ s16 unk_3DC0; // "shield_magic_timer"
|
||||
|
@ -390,6 +390,8 @@ typedef enum SunsSongState {
|
|||
|
||||
#define CURRENT_DAY (((void)0, gSaveContext.save.day) % 5)
|
||||
|
||||
#define GET_PLAYER_FORM ((void)0, gSaveContext.save.playerForm)
|
||||
|
||||
#define SLOT(item) gItemSlots[item]
|
||||
#define AMMO(item) gSaveContext.save.inventory.ammo[SLOT(item)]
|
||||
#define INV_CONTENT(item) gSaveContext.save.inventory.items[SLOT(item)]
|
||||
|
@ -430,6 +432,10 @@ typedef enum SunsSongState {
|
|||
#define GET_CUR_FORM_BTN_ITEM(btn) ((u8)((btn) == EQUIP_SLOT_B ? BUTTON_ITEM_EQUIP(CUR_FORM, btn) : BUTTON_ITEM_EQUIP(0, btn)))
|
||||
#define GET_CUR_FORM_BTN_SLOT(btn) ((u8)((btn) == EQUIP_SLOT_B ? C_SLOT_EQUIP(CUR_FORM, btn) : C_SLOT_EQUIP(0, btn)))
|
||||
|
||||
#define C_BTN_ITEM(btn) \
|
||||
((gSaveContext.buttonStatus[(btn)] != BTN_DISABLED) \
|
||||
? BUTTON_ITEM_EQUIP(0, (btn)) \
|
||||
: ((gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C) ? BUTTON_ITEM_EQUIP(0, (btn)) : ITEM_NONE))
|
||||
|
||||
#define SET_CUR_FORM_BTN_ITEM(btn, item) \
|
||||
if ((btn) == EQUIP_SLOT_B) { \
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* Throughout this file, `mode` indicates whether to multiply the matrix on top of the stack by the new construction
|
||||
* (APPLY), or to just overwrite it (NEW).
|
||||
*/
|
||||
#include "prevent_bss_reordering.h"
|
||||
|
||||
#include "global.h"
|
||||
|
||||
/* data */
|
||||
|
|
|
@ -520,7 +520,7 @@ void Actor_DrawZTarget(TargetContext* targetCtx, PlayState* play) {
|
|||
|
||||
Target_SetPos(targetCtx, targetCtx->unk4C, projectedPos.x, projectedPos.y, projectedPos.z);
|
||||
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_40)) || (actor != player->unk_730)) {
|
||||
if ((!(player->stateFlags1 & PLAYER_STATE1_40)) || (actor != player->targetedActor)) {
|
||||
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39);
|
||||
|
||||
for (spB0 = 0, spAC = targetCtx->unk4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
|
||||
|
@ -589,7 +589,7 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
|
|||
Vec3f projectedPos;
|
||||
f32 invW;
|
||||
|
||||
if ((player->unk_730 != 0) && (player->unk_AE3[player->unk_ADE] == 2)) {
|
||||
if ((player->targetedActor != NULL) && (player->unk_AE3[player->unk_ADE] == 2)) {
|
||||
targetCtx->unk_94 = NULL;
|
||||
} else {
|
||||
func_800BB8EC(gameState, &play->actorCtx, &sp68, &D_801ED920, player);
|
||||
|
@ -1328,7 +1328,7 @@ s32 func_800B7118(Player* player) {
|
|||
}
|
||||
|
||||
s32 func_800B7128(Player* player) {
|
||||
return func_800B7118(player) && player->unk_ACC;
|
||||
return func_800B7118(player) && (player->unk_ACC != 0);
|
||||
}
|
||||
|
||||
s32 func_800B715C(PlayState* play) {
|
||||
|
@ -1354,7 +1354,7 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
|
|||
}
|
||||
|
||||
s32 func_800B7200(Player* player) {
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_20000000 | PLAYER_STATE1_80)) || (player->csMode != 0);
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) || (player->csMode != PLAYER_CSMODE_0);
|
||||
}
|
||||
|
||||
void func_800B722C(GameState* gameState, Player* player) {
|
||||
|
@ -1364,7 +1364,7 @@ void func_800B722C(GameState* gameState, Player* player) {
|
|||
s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->csMode == 5) || ((csMode == 6) && (player->csMode == 0))) {
|
||||
if ((player->csMode == PLAYER_CSMODE_5) || ((csMode == PLAYER_CSMODE_6) && (player->csMode == PLAYER_CSMODE_0))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1374,7 +1374,7 @@ s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
|
|||
return true;
|
||||
}
|
||||
|
||||
u32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
|
||||
s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_800B724C(play, actor, csMode)) {
|
||||
|
@ -1489,11 +1489,12 @@ s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s
|
|||
|
||||
/* Start of BgCheck related section */
|
||||
|
||||
void func_800B75A0(CollisionPoly* poly, Vec3f* normal, s16* azimuth) {
|
||||
normal->x = COLPOLY_GET_NORMAL(poly->normal.x);
|
||||
normal->y = COLPOLY_GET_NORMAL(poly->normal.y);
|
||||
normal->z = COLPOLY_GET_NORMAL(poly->normal.z);
|
||||
*azimuth = Math_FAtan2F(normal->z, normal->x);
|
||||
void Actor_GetSlopeDirection(CollisionPoly* floorPoly, Vec3f* slopeNormal, s16* downwardSlopeYaw) {
|
||||
slopeNormal->x = COLPOLY_GET_NORMAL(floorPoly->normal.x);
|
||||
slopeNormal->y = COLPOLY_GET_NORMAL(floorPoly->normal.y);
|
||||
slopeNormal->z = COLPOLY_GET_NORMAL(floorPoly->normal.z);
|
||||
|
||||
*downwardSlopeYaw = Math_FAtan2F(slopeNormal->z, slopeNormal->x);
|
||||
}
|
||||
|
||||
s32 func_800B761C(Actor* actor, f32 arg1, s32 arg2) {
|
||||
|
@ -1783,7 +1784,7 @@ f32 func_800B82EC(Actor* actor, Player* player, s16 angle) {
|
|||
s16 temp_v0 = BINANG_SUB(BINANG_SUB(actor->yawTowardsPlayer, 0x8000), angle);
|
||||
s16 yaw = ABS_ALT(temp_v0);
|
||||
|
||||
if (player->unk_730 != NULL) {
|
||||
if (player->targetedActor != NULL) {
|
||||
if ((yaw > 0x4000) || ((actor->flags & ACTOR_FLAG_8000000))) {
|
||||
return FLT_MAX;
|
||||
}
|
||||
|
@ -1821,7 +1822,7 @@ s32 func_800B83F8(Actor* actor, Player* player, s32 flag) {
|
|||
s16 phi_v1 = ABS_ALT(yaw);
|
||||
f32 dist;
|
||||
|
||||
if ((player->unk_730 == NULL) && (phi_v1 >= 0x2AAB)) {
|
||||
if ((player->targetedActor == NULL) && (phi_v1 >= 0x2AAB)) {
|
||||
dist = FLT_MAX;
|
||||
} else {
|
||||
dist = actor->xyzDistToPlayerSq;
|
||||
|
@ -1853,13 +1854,13 @@ s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, Player
|
|||
|
||||
if ((player->actor.flags & ACTOR_FLAG_100) || ((exchangeItemId > PLAYER_AP_NONE) && Player_InCsMode(play)) ||
|
||||
(!actor->isTargeted &&
|
||||
((fabsf(actor->playerHeightRel) > fabsf(yRange)) || ((actor->xzDistToPlayer > player->targetActorDistance)) ||
|
||||
((fabsf(actor->playerHeightRel) > fabsf(yRange)) || (actor->xzDistToPlayer > player->talkActorDistance) ||
|
||||
(xzRange < actor->xzDistToPlayer)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
player->targetActor = actor;
|
||||
player->targetActorDistance = actor->xzDistToPlayer;
|
||||
player->talkActor = actor;
|
||||
player->talkActorDistance = actor->xzDistToPlayer;
|
||||
player->exchangeItemId = exchangeItemId;
|
||||
|
||||
ActorCutscene_SetIntentToPlay(0x7C);
|
||||
|
@ -1894,21 +1895,21 @@ s32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
|
|||
* Fails if Player is not already focussing on an actor or in a talking state
|
||||
*/
|
||||
s32 Actor_ChangeFocus(Actor* actor1, PlayState* play, Actor* actor2) {
|
||||
Actor* targetActor;
|
||||
Actor* talkActor;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
targetActor = player->targetActor;
|
||||
talkActor = player->talkActor;
|
||||
|
||||
if ((player->actor.flags & ACTOR_FLAG_100) && (targetActor != NULL)) {
|
||||
player->targetActor = actor2;
|
||||
player->unk_730 = actor2;
|
||||
if ((player->actor.flags & ACTOR_FLAG_100) && (talkActor != NULL)) {
|
||||
player->talkActor = actor2;
|
||||
player->targetedActor = actor2;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Player_GetExchangeItemId(PlayState* play) {
|
||||
PlayerActionParam Player_GetExchangeItemId(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return player->exchangeItemId;
|
||||
|
@ -1992,7 +1993,7 @@ s32 Actor_HasParent(Actor* actor, PlayState* play) {
|
|||
* GI_NONE is usually used as a special case to lift an actor
|
||||
* GI_MAX is usually used to catch an actor in a bottle
|
||||
*/
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
s32 Actor_PickUp(Actor* actor, PlayState* play, GetItemId getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 &
|
||||
|
@ -2002,7 +2003,7 @@ s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
|
|||
if ((actor->xzDistToPlayer <= xzRange) && (fabsf(actor->playerHeightRel) <= fabsf(yRange))) {
|
||||
if ((getItemId == GI_MASK_CIRCUS_LEADER || getItemId == GI_PENDANT_OF_MEMORIES ||
|
||||
getItemId == GI_DEED_LAND ||
|
||||
((player->heldActor != NULL || actor == player->targetActor) &&
|
||||
((player->heldActor != NULL || actor == player->talkActor) &&
|
||||
(getItemId > GI_NONE && getItemId < GI_MAX))) ||
|
||||
!(player->stateFlags1 & (PLAYER_STATE1_800 | PLAYER_STATE1_20000000))) {
|
||||
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
|
||||
|
@ -2026,7 +2027,7 @@ s32 Actor_PickUp(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
|
|||
return false;
|
||||
}
|
||||
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
s32 Actor_PickUpNearby(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_PickUp(actor, play, getItemId, 50.0f, 10.0f);
|
||||
}
|
||||
|
||||
|
@ -2034,7 +2035,7 @@ s32 Actor_LiftActor(Actor* actor, PlayState* play) {
|
|||
return Actor_PickUpNearby(actor, play, GI_NONE);
|
||||
}
|
||||
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
s32 Actor_PickUpFar(Actor* actor, PlayState* play, GetItemId getItemId) {
|
||||
return Actor_PickUp(actor, play, getItemId, 9999.9f, 9999.9f);
|
||||
}
|
||||
|
||||
|
@ -2061,11 +2062,15 @@ void func_800B8C20(Actor* actorA, Actor* actorB, PlayState* play) {
|
|||
actorA->parent = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets closest secret distance to the distance to the actor. Calling this function on `actor` is the way to make it a
|
||||
* 'secret' for that update cycle, i.e. something that the controller will rumble for.
|
||||
*/
|
||||
void func_800B8C50(Actor* actor, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (actor->xyzDistToPlayerSq < player->unk_AA0) {
|
||||
player->unk_AA0 = actor->xyzDistToPlayerSq;
|
||||
if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) {
|
||||
player->closestSecretDistSq = actor->xyzDistToPlayerSq;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2207,7 +2212,7 @@ void func_800B9098(Actor* actor) {
|
|||
actor->audioFlags |= 0x40;
|
||||
}
|
||||
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, s32 arg4) {
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4) {
|
||||
if (func_800C99D4(&play->colCtx, polygon, bgId) == 8) {
|
||||
return true;
|
||||
}
|
||||
|
@ -2368,13 +2373,13 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
|
|||
actor->flags &= ~ACTOR_FLAG_1000000;
|
||||
|
||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->unk_18)) {
|
||||
if (actor == params->player->unk_730) {
|
||||
if (actor == params->player->targetedActor) {
|
||||
actor->isTargeted = true;
|
||||
} else {
|
||||
actor->isTargeted = false;
|
||||
}
|
||||
|
||||
if ((actor->targetPriority != 0) && (params->player->unk_730 == 0)) {
|
||||
if ((actor->targetPriority != 0) && (params->player->targetedActor == NULL)) {
|
||||
actor->targetPriority = 0;
|
||||
}
|
||||
|
||||
|
@ -2461,7 +2466,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && ((player->actor.textId & 0xFF00) != 0x1900)) {
|
||||
params.unk10 = player->targetActor;
|
||||
params.unk10 = player->talkActor;
|
||||
} else {
|
||||
params.unk10 = NULL;
|
||||
}
|
||||
|
@ -2499,7 +2504,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
actor = player->unk_730;
|
||||
actor = player->targetedActor;
|
||||
if ((actor != NULL) && (actor->update == NULL)) {
|
||||
actor = NULL;
|
||||
func_80123DA4(player);
|
||||
|
@ -3280,9 +3285,9 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
|
|||
Actor* newHead;
|
||||
ActorOverlay* overlayEntry = actor->overlayEntry;
|
||||
|
||||
if ((player != NULL) && (actor == player->unk_730)) {
|
||||
if ((player != NULL) && (actor == player->targetedActor)) {
|
||||
func_80123DA4(player);
|
||||
Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0);
|
||||
Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), CAM_MODE_NORMAL);
|
||||
}
|
||||
|
||||
if (actor == actorCtx->targetContext.arrowPointedActor) {
|
||||
|
@ -3323,7 +3328,7 @@ s32 func_800BB59C(PlayState* play, Actor* actor) {
|
|||
void func_800BB604(GameState* gameState, ActorContext* actorCtx, Player* player, s32 actorCategory) {
|
||||
PlayState* play = (PlayState*)gameState;
|
||||
f32 temp_f0_2;
|
||||
Actor* sp8C;
|
||||
Actor* targetedActor;
|
||||
Actor* actor;
|
||||
s32 phi_s2;
|
||||
CollisionPoly* sp80;
|
||||
|
@ -3332,7 +3337,7 @@ void func_800BB604(GameState* gameState, ActorContext* actorCtx, Player* player,
|
|||
s32 phi_s2_2;
|
||||
|
||||
actor = actorCtx->actorLists[actorCategory].first;
|
||||
sp8C = player->unk_730;
|
||||
targetedActor = player->targetedActor;
|
||||
while (actor != NULL) {
|
||||
if ((actor->update != NULL) && ((Player*)actor != player)) {
|
||||
if (actor->flags & (ACTOR_FLAG_40000000 | ACTOR_FLAG_1)) {
|
||||
|
@ -3343,7 +3348,7 @@ void func_800BB604(GameState* gameState, ActorContext* actorCtx, Player* player,
|
|||
}
|
||||
}
|
||||
|
||||
if ((actor != sp8C) || (actor->flags & ACTOR_FLAG_80000)) {
|
||||
if ((actor != targetedActor) || (actor->flags & ACTOR_FLAG_80000)) {
|
||||
temp_f0_2 = func_800B82EC(actor, player, D_801ED8DC);
|
||||
phi_s2_2 = (actor->flags & 1) != 0;
|
||||
if (phi_s2_2) {
|
||||
|
|
|
@ -36,7 +36,7 @@ ActorOverlay gActorOverlayTable[] = {
|
|||
#undef DEFINE_ACTOR_INTERNAL
|
||||
#undef DEFINE_ACTOR_UNSET
|
||||
|
||||
s32 gMaxActorId = 0;
|
||||
ActorId gMaxActorId = 0;
|
||||
|
||||
FaultClient D_801ED930;
|
||||
FaultAddrConvClient D_801ED940;
|
||||
|
@ -44,7 +44,7 @@ FaultAddrConvClient D_801ED940;
|
|||
void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
|
||||
ActorOverlay* overlayEntry;
|
||||
u32 overlaySize;
|
||||
s32 i;
|
||||
ActorId i;
|
||||
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
|
||||
|
@ -63,7 +63,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
|
|||
void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1) {
|
||||
u8* ptr = arg0;
|
||||
ActorOverlay* overlayEntry = &gActorOverlayTable[0];
|
||||
s32 i;
|
||||
ActorId i;
|
||||
u8* ramStart;
|
||||
u8* ramEnd;
|
||||
size_t size;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "prevent_bss_reordering.h"
|
||||
//#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64quake.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "global.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 arg4,
|
||||
CollisionPoly* colPoly, s32 arg6) {
|
||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 angle,
|
||||
CollisionPoly* colPoly, s32 bgId) {
|
||||
Vec3s spB8;
|
||||
Vec3s spB0;
|
||||
EffectTireMarkElement* spAC;
|
||||
|
@ -11,17 +11,17 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||
u32 spA0;
|
||||
Vec3s* vtxList = colCtx->colHeader->vtxList;
|
||||
|
||||
if ((arg6 != 50) || (this->numElements >= (ARRAY_COUNT(this->elements) - 1)) || (colPoly == NULL)) {
|
||||
if ((bgId != 50) || (this->numElements >= (ARRAY_COUNT(this->elements) - 1)) || (colPoly == NULL)) {
|
||||
func_800AEF44(this);
|
||||
return;
|
||||
}
|
||||
|
||||
spB8.x = (Math_SinS(arg4 - 0x4000) * arg3) + pos->x;
|
||||
spB8.z = (Math_CosS(arg4 - 0x4000) * arg3) + pos->z;
|
||||
spB8.x = (Math_SinS(angle - 0x4000) * arg3) + pos->x;
|
||||
spB8.z = (Math_CosS(angle - 0x4000) * arg3) + pos->z;
|
||||
spB8.y = func_800BFD84(colPoly, spB8.x, spB8.z) + 2.0f;
|
||||
|
||||
spB0.x = (Math_SinS(arg4 + 0x4000) * arg3) + pos->x;
|
||||
spB0.z = (Math_CosS(arg4 + 0x4000) * arg3) + pos->z;
|
||||
spB0.x = (Math_SinS(angle + 0x4000) * arg3) + pos->x;
|
||||
spB0.z = (Math_CosS(angle + 0x4000) * arg3) + pos->z;
|
||||
spB0.y = func_800BFD84(colPoly, spB0.x, spB0.z) + 2.0f;
|
||||
|
||||
spAC = &this->elements[this->numElements - 1];
|
||||
|
|
|
@ -77,7 +77,7 @@ void func_80127B64(struct_801F58B0 arg0[], s32 count, Vec3f* arg2);
|
|||
|
||||
s32 func_801226E0(PlayState* play, s32 arg1) {
|
||||
if (arg1 == 0) {
|
||||
Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_DOWN, 0xBFF);
|
||||
Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_DOWN, PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B));
|
||||
if (play->sceneId == SCENE_KAKUSIANA) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void func_801229A0(PlayState* play, Player* player) {
|
|||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_801229EC(UNK_TYPE arg0, UNK_TYPE arg1) {
|
||||
void func_801229EC(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
s16 sMaskObjectIds[PLAYER_MASK_MAX - 1] = {
|
||||
|
@ -185,7 +185,8 @@ void func_801229FC(Player* player) {
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_801F58B0); i++) {
|
||||
func_80127B64(D_801F58B0[i], ARRAY_COUNT(D_801F58B0[i]), &player->bodyPartsPos[7]);
|
||||
func_80127B64(D_801F58B0[i], ARRAY_COUNT(D_801F58B0[i]),
|
||||
&player->bodyPartsPos[PLAYER_BODYPART_HEAD]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +329,7 @@ void func_80122F28(Player* player) {
|
|||
(!(player->stateFlags1 & (PLAYER_STATE1_400 | PLAYER_STATE1_800 | PLAYER_STATE1_200000 | PLAYER_STATE1_800000 |
|
||||
PLAYER_STATE1_20000000))) &&
|
||||
(!(player->stateFlags2 & PLAYER_STATE2_1))) {
|
||||
if (player->doorType < 0) {
|
||||
if (player->doorType <= PLAYER_DOORTYPE_TALKING) {
|
||||
ActorCutscene_SetIntentToPlay(0x7C);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(0x7D);
|
||||
|
@ -354,27 +355,27 @@ void func_8012300C(PlayState* play, s32 arg1) {
|
|||
player->unk_B2B = arg1;
|
||||
}
|
||||
|
||||
void func_8012301C(Player* player, PlayState* play2) {
|
||||
void func_8012301C(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
s32 pad;
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
player->unk_AE7++;
|
||||
this->unk_AE7++;
|
||||
|
||||
if (player->unk_AE7 == 2) {
|
||||
s16 objectId = gPlayerFormObjectIndices[((void)0, gSaveContext.save.playerForm)];
|
||||
if (this->unk_AE7 == 2) {
|
||||
s16 objectId = gPlayerFormObjectIndices[GET_PLAYER_FORM];
|
||||
|
||||
gActorOverlayTable[ACTOR_PLAYER].initInfo->objectId = objectId;
|
||||
func_8012F73C(&play->objectCtx, player->actor.objBankIndex, objectId);
|
||||
player->actor.objBankIndex = Object_GetIndex(&play->objectCtx, GAMEPLAY_KEEP);
|
||||
} else if (player->unk_AE7 >= 3) {
|
||||
func_8012F73C(&play->objectCtx, this->actor.objBankIndex, objectId);
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, GAMEPLAY_KEEP);
|
||||
} else if (this->unk_AE7 >= 3) {
|
||||
s32 objBankIndex = Object_GetIndex(&play->objectCtx, gActorOverlayTable[ACTOR_PLAYER].initInfo->objectId);
|
||||
|
||||
if (Object_IsLoaded(&play->objectCtx, objBankIndex)) {
|
||||
player->actor.objBankIndex = objBankIndex;
|
||||
player->actor.shape.rot.z = gSaveContext.save.playerForm + 1;
|
||||
player->actor.init = PlayerCall_Init;
|
||||
player->actor.update = PlayerCall_Update;
|
||||
player->actor.draw = PlayerCall_Draw;
|
||||
this->actor.objBankIndex = objBankIndex;
|
||||
this->actor.shape.rot.z = GET_PLAYER_FORM + 1;
|
||||
this->actor.init = PlayerCall_Init;
|
||||
this->actor.update = PlayerCall_Update;
|
||||
this->actor.draw = PlayerCall_Draw;
|
||||
gSaveContext.save.equippedMask = PLAYER_MASK_NONE;
|
||||
}
|
||||
}
|
||||
|
@ -456,7 +457,7 @@ void func_80123140(PlayState* play, Player* player) {
|
|||
|
||||
s32 Player_InBlockingCsMode(PlayState* play, Player* player) {
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_20000000)) ||
|
||||
(player->csMode != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||
(player->csMode != PLAYER_CSMODE_0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||
(play->transitionMode != TRANS_MODE_OFF) || (player->stateFlags1 & PLAYER_STATE1_1) ||
|
||||
(player->stateFlags3 & PLAYER_STATE3_80) || (play->actorCtx.unk268 != 0);
|
||||
}
|
||||
|
@ -480,7 +481,7 @@ s32 func_80123448(PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return (player->stateFlags1 & PLAYER_STATE1_400000) &&
|
||||
(player->transformation != PLAYER_FORM_HUMAN || (!func_80123434(player) && player->unk_730 == NULL));
|
||||
(player->transformation != PLAYER_FORM_HUMAN || (!func_80123434(player) && player->targetedActor == NULL));
|
||||
}
|
||||
|
||||
// TODO: Player_IsGoronOrDeku is a temporary name until we have more info on this function.
|
||||
|
@ -536,7 +537,7 @@ ItemId func_8012364C(PlayState* play, Player* player, s32 arg2) {
|
|||
}
|
||||
|
||||
if (arg2 == 0) {
|
||||
s32 item = Inventory_GetBtnBItem(play);
|
||||
ItemId item = Inventory_GetBtnBItem(play);
|
||||
|
||||
if (item >= ITEM_FD) {
|
||||
return item;
|
||||
|
@ -558,27 +559,21 @@ ItemId func_8012364C(PlayState* play, Player* player, s32 arg2) {
|
|||
}
|
||||
|
||||
if (arg2 == 1) {
|
||||
return (gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] != BTN_DISABLED) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_LEFT)
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_LEFT)
|
||||
: ITEM_NONE;
|
||||
return C_BTN_ITEM(EQUIP_SLOT_C_LEFT);
|
||||
}
|
||||
|
||||
if (arg2 == 2) {
|
||||
return (gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] != BTN_DISABLED) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN)
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN)
|
||||
: ITEM_NONE;
|
||||
return C_BTN_ITEM(EQUIP_SLOT_C_DOWN);
|
||||
}
|
||||
|
||||
return (gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] != BTN_DISABLED) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_RIGHT)
|
||||
: (gSaveContext.hudVisibility == HUD_VISIBILITY_A_B_C) ? BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_RIGHT)
|
||||
: ITEM_NONE;
|
||||
return C_BTN_ITEM(EQUIP_SLOT_C_RIGHT);
|
||||
}
|
||||
|
||||
u16 sCItemButtons[] = { BTN_CLEFT, BTN_CDOWN, BTN_CRIGHT };
|
||||
|
||||
s32 func_80123810(PlayState* play) {
|
||||
PlayerActionParam func_80123810(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 temp_v0;
|
||||
s32 actionParam;
|
||||
ItemId itemId;
|
||||
s32 i;
|
||||
|
||||
|
@ -602,19 +597,19 @@ s32 func_80123810(PlayState* play) {
|
|||
play->interfaceCtx.unk_224 = 0;
|
||||
Interface_SetHudVisibility(play->msgCtx.unk_120BC);
|
||||
|
||||
if ((itemId >= ITEM_FD) || (temp_v0 = play->unk_18794(play, player, itemId, i), (temp_v0 < 0))) {
|
||||
if ((itemId >= ITEM_FD) || ((actionParam = play->unk_18794(play, player, itemId)) <= PLAYER_AP_MINUS1)) {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
return -1;
|
||||
return PLAYER_AP_MINUS1;
|
||||
} else {
|
||||
s32 pad;
|
||||
|
||||
player->heldItemButton = i;
|
||||
return temp_v0;
|
||||
return actionParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return PLAYER_AP_NONE;
|
||||
}
|
||||
|
||||
// Used to map action params to model groups
|
||||
|
@ -1249,7 +1244,7 @@ void func_80123C58(Player* player) {
|
|||
}
|
||||
|
||||
void Player_SetEquipmentData(PlayState* play, Player* player) {
|
||||
if (player->csMode != 0x86) {
|
||||
if (player->csMode != PLAYER_CSMODE_134) {
|
||||
player->currentShield = GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD);
|
||||
if ((player->transformation != PLAYER_FORM_ZORA) || (((player->currentBoots != PLAYER_BOOTS_ZORA_LAND)) &&
|
||||
(player->currentBoots != PLAYER_BOOTS_ZORA_UNDERWATER))) {
|
||||
|
@ -1263,7 +1258,7 @@ void Player_SetEquipmentData(PlayState* play, Player* player) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80123D50(PlayState* play, Player* player, ItemId itemId, PlayerActionParam actionParam) {
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, PlayerActionParam actionParam) {
|
||||
Inventory_UpdateBottleItem(play, itemId, player->heldItemButton);
|
||||
|
||||
if (itemId != ITEM_BOTTLE) {
|
||||
|
@ -1275,7 +1270,7 @@ void func_80123D50(PlayState* play, Player* player, ItemId itemId, PlayerActionP
|
|||
}
|
||||
|
||||
void func_80123DA4(Player* player) {
|
||||
player->unk_730 = NULL;
|
||||
player->targetedActor = NULL;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_2000;
|
||||
}
|
||||
|
||||
|
@ -1300,7 +1295,7 @@ void func_80123E90(PlayState* play, Actor* actor) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_80123DC0(player);
|
||||
player->unk_730 = actor;
|
||||
player->targetedActor = actor;
|
||||
player->unk_A78 = actor;
|
||||
player->stateFlags1 |= PLAYER_STATE1_10000;
|
||||
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, actor);
|
||||
|
@ -1333,7 +1328,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
|
|||
}
|
||||
|
||||
u8 Player_GetStrength(void) {
|
||||
return sPlayerStrengths[(void)0, gSaveContext.save.playerForm];
|
||||
return sPlayerStrengths[GET_PLAYER_FORM];
|
||||
}
|
||||
|
||||
u8 Player_GetMask(PlayState* play) {
|
||||
|
@ -2034,9 +2029,9 @@ void Player_DrawGetItem(PlayState* play, Player* player) {
|
|||
if (player->stateFlags1 & PLAYER_STATE1_400) {
|
||||
refPos.y = player->actor.world.pos.y + 30.0f;
|
||||
} else {
|
||||
refPos.x = player->bodyPartsPos[0xC].x;
|
||||
refPos.y = player->bodyPartsPos[0xC].y - 6.0f;
|
||||
refPos.z = player->bodyPartsPos[0xC].z;
|
||||
refPos.x = player->bodyPartsPos[PLAYER_BODYPART_LEFT_HAND].x;
|
||||
refPos.y = player->bodyPartsPos[PLAYER_BODYPART_LEFT_HAND].y - 6.0f;
|
||||
refPos.z = player->bodyPartsPos[PLAYER_BODYPART_LEFT_HAND].z;
|
||||
}
|
||||
} else {
|
||||
refPos.y = player->actor.world.pos.y + 28.0f;
|
||||
|
@ -2045,7 +2040,7 @@ void Player_DrawGetItem(PlayState* play, Player* player) {
|
|||
Math_Vec3f_Copy(&refPos, &D_801F59E8);
|
||||
}
|
||||
|
||||
drawIdPlusOne = ABS_ALT(player->unk_B2A);
|
||||
drawIdPlusOne = ABS_ALT(player->getItemDrawId);
|
||||
Player_DrawGetItemImpl(play, player, &refPos, drawIdPlusOne);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -738,10 +738,10 @@ void Distortion_Update(void) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (player->unk_B88 < 0) {
|
||||
xyScaleFactor = (player->unk_B88 - (f32)0x4000) / (f32)0xC000;
|
||||
if (player->unk_B86[1] < 0) {
|
||||
xyScaleFactor = (player->unk_B86[1] - (f32)0x4000) / (f32)0xC000;
|
||||
} else {
|
||||
xyScaleFactor = (player->unk_B88 + (f32)0x4000) / (f32)0xC000;
|
||||
xyScaleFactor = (player->unk_B86[1] + (f32)0x4000) / (f32)0xC000;
|
||||
}
|
||||
zScaleFactor = -xyScaleFactor;
|
||||
speedScaleFactor = 1.0f;
|
||||
|
|
|
@ -148,8 +148,9 @@ void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd) {
|
|||
|
||||
play->linkActorEntry =
|
||||
(ActorEntry*)Lib_SegmentedToVirtual(cmd->spawnList.segment) + play->setupEntranceList[play->curSpawn].spawn;
|
||||
if ((play->linkActorEntry->params & 0x0F00) >> 8 == 0x0C ||
|
||||
(gSaveContext.respawnFlag == 0x02 && gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == 0x0CFF)) {
|
||||
if ((PLAYER_GET_INITMODE(play->linkActorEntry) == PLAYER_INITMODE_TELESCOPE) ||
|
||||
((gSaveContext.respawnFlag == 0x02) &&
|
||||
(gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE)))) {
|
||||
// Skull Kid Object
|
||||
Object_Spawn(&play->objectCtx, OBJECT_STK);
|
||||
return;
|
||||
|
@ -159,7 +160,7 @@ void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd) {
|
|||
nextObject = play->objectCtx.status[play->objectCtx.num].segment;
|
||||
play->objectCtx.num = loadedCount;
|
||||
play->objectCtx.spawnedObjectCount = loadedCount;
|
||||
playerObjectId = gPlayerFormObjectIndices[(void)0, gSaveContext.save.playerForm];
|
||||
playerObjectId = gPlayerFormObjectIndices[GET_PLAYER_FORM];
|
||||
gActorOverlayTable[0].initInfo->objectId = playerObjectId;
|
||||
Object_Spawn(&play->objectCtx, playerObjectId);
|
||||
|
||||
|
@ -591,7 +592,7 @@ s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates an entrance from the scene, spawn, and lyaer.
|
||||
* Creates an entrance from the scene, spawn, and layer.
|
||||
*/
|
||||
u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) {
|
||||
return (scene << 9) | (spawn << 4) | layer;
|
||||
|
|
|
@ -996,7 +996,7 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
|
|||
|
||||
if (entry != NULL) {
|
||||
LinkAnimationHeader* linkAnimHeader = Lib_SegmentedToVirtual(animation);
|
||||
u32 ram = frameTable;
|
||||
uintptr_t ram = frameTable;
|
||||
|
||||
osCreateMesgQueue(&entry->data.load.msgQueue, &entry->data.load.msg, 1);
|
||||
DmaMgr_SendRequestImpl(&entry->data.load.req, ram,
|
||||
|
@ -1187,7 +1187,7 @@ void AnimationContext_Update(PlayState* play, AnimationContext* animationCtx) {
|
|||
* tables if not given.
|
||||
*/
|
||||
void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
|
||||
LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable, Vec3s* morphTable,
|
||||
LinkAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer,
|
||||
s32 limbBufCount) {
|
||||
FlexSkeletonHeader* skeletonHeader;
|
||||
s32 headerJointCount;
|
||||
|
@ -1216,12 +1216,12 @@ void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeade
|
|||
allocSize += 2;
|
||||
}
|
||||
|
||||
if (jointTable == NULL) {
|
||||
if (jointTableBuffer == NULL) {
|
||||
skelAnime->jointTable = ZeldaArena_Malloc(allocSize);
|
||||
skelAnime->morphTable = ZeldaArena_Malloc(allocSize);
|
||||
} else {
|
||||
skelAnime->jointTable = (Vec3s*)ALIGN16((u32)jointTable);
|
||||
skelAnime->morphTable = (Vec3s*)ALIGN16((u32)morphTable);
|
||||
skelAnime->jointTable = (void*)ALIGN16((uintptr_t)jointTableBuffer);
|
||||
skelAnime->morphTable = (void*)ALIGN16((uintptr_t)morphTableBuffer);
|
||||
}
|
||||
|
||||
LinkAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f);
|
||||
|
@ -1443,12 +1443,12 @@ void LinkAnimation_InterpJointMorph(PlayState* play, SkelAnime* skelAnime, f32 w
|
|||
* Requests loading frame data from the Link animations and blending them, placing the result in jointTable
|
||||
*/
|
||||
void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1,
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable) {
|
||||
Vec3s* alignedBlendTable;
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, void* blendTableBuffer) {
|
||||
void* alignedBlendTable;
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation1, (s32)frame1, skelAnime->limbCount, skelAnime->jointTable);
|
||||
|
||||
alignedBlendTable = (Vec3s*)ALIGN16((u32)blendTable);
|
||||
alignedBlendTable = (void*)ALIGN16((uintptr_t)blendTableBuffer);
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation2, (s32)frame2, skelAnime->limbCount, alignedBlendTable);
|
||||
AnimationContext_SetInterp(play, skelAnime->limbCount, skelAnime->jointTable, alignedBlendTable, blendWeight);
|
||||
|
@ -1458,12 +1458,12 @@ void LinkAnimation_BlendToJoint(PlayState* play, SkelAnime* skelAnime, LinkAnima
|
|||
* Requests loading frame data from the Link animations and blending them, placing the result in morphTable
|
||||
*/
|
||||
void LinkAnimation_BlendToMorph(PlayState* play, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1,
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable) {
|
||||
Vec3s* alignedBlendTable;
|
||||
LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, void* blendTableBuffer) {
|
||||
void* alignedBlendTable;
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation1, (s32)frame1, skelAnime->limbCount, skelAnime->morphTable);
|
||||
|
||||
alignedBlendTable = (Vec3s*)ALIGN16((u32)blendTable);
|
||||
alignedBlendTable = (void*)ALIGN16((uintptr_t)blendTableBuffer);
|
||||
|
||||
AnimationContext_SetLoadFrame(play, animation2, (s32)frame2, skelAnime->limbCount, alignedBlendTable);
|
||||
AnimationContext_SetInterp(play, skelAnime->limbCount, skelAnime->morphTable, alignedBlendTable, blendWeight);
|
||||
|
|
|
@ -918,9 +918,9 @@ void Sram_InitDebugSave(void) {
|
|||
Lib_MemCpy(&gSaveContext.save.inventory, &sSaveDebugInventory, sizeof(Inventory));
|
||||
Lib_MemCpy(&gSaveContext.save.checksum, &sSaveDebugChecksum, sizeof(gSaveContext.save.checksum));
|
||||
|
||||
if (gSaveContext.save.playerForm != PLAYER_FORM_HUMAN) {
|
||||
BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN) = D_801C6A48[((void)0, gSaveContext.save.playerForm)];
|
||||
C_SLOT_EQUIP(0, EQUIP_SLOT_C_DOWN) = D_801C6A50[((void)0, gSaveContext.save.playerForm)];
|
||||
if (GET_PLAYER_FORM != PLAYER_FORM_HUMAN) {
|
||||
BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN) = D_801C6A48[GET_PLAYER_FORM];
|
||||
C_SLOT_EQUIP(0, EQUIP_SLOT_C_DOWN) = D_801C6A50[GET_PLAYER_FORM];
|
||||
}
|
||||
|
||||
gSaveContext.save.hasTatl = true;
|
||||
|
|
|
@ -243,9 +243,9 @@ void BgCraceMovebg_ClosingDoor_CheckIfPlayerIsBeyondDoor(BgCraceMovebg* this, Pl
|
|||
|
||||
if ((BG_CRACE_MOVEBG_GET_TYPE(&this->dyna.actor) != BG_CRACE_MOVEBG_TYPE_UNUSED_CLOSING) &&
|
||||
SubS_LineSegVsPlane(&this->dyna.actor.home.pos, &this->dyna.actor.home.rot, &sUnitVecZ, &this->prevPlayerPos,
|
||||
&player->bodyPartsPos[0], &intersect)) {
|
||||
&player->bodyPartsPos[PLAYER_BODYPART_WAIST], &intersect)) {
|
||||
Matrix_RotateYS(-this->dyna.actor.home.rot.y, MTXMODE_NEW);
|
||||
Math_Vec3f_Diff(&player->bodyPartsPos[0], &this->dyna.actor.home.pos, &posDiff);
|
||||
Math_Vec3f_Diff(&player->bodyPartsPos[PLAYER_BODYPART_WAIST], &this->dyna.actor.home.pos, &posDiff);
|
||||
Matrix_MultVec3f(&posDiff, &this->intersectionOffsetFromHome);
|
||||
|
||||
if (fabsf(this->intersectionOffsetFromHome.x) < 100.0f && this->intersectionOffsetFromHome.y >= -10.0f &&
|
||||
|
|
|
@ -648,9 +648,9 @@ void func_80B814B8(BgIkanaRotaryroom* this, PlayState* play) {
|
|||
|
||||
if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) {
|
||||
if (player->actor.bgCheckFlags & 0x100) {
|
||||
func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92);
|
||||
func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset);
|
||||
func_80169EFC(&play->state);
|
||||
func_800B8E58(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->unk_92);
|
||||
func_800B8E58(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->voiceSfxIdOffset);
|
||||
play->unk_18845 = 1;
|
||||
play_sound(NA_SE_OC_ABYSS);
|
||||
this->actionFunc = NULL;
|
||||
|
@ -794,7 +794,7 @@ void func_80B819F0(Actor* thisx, PlayState* play) {
|
|||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (this->dyna.actor.cutscene >= 0) {
|
||||
func_800B7298(play, &this->dyna.actor, 7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
}
|
||||
func_80B81A64(this);
|
||||
} else {
|
||||
|
|
|
@ -126,7 +126,7 @@ s32 func_80953DA8(BgIngate* this, PlayState* play) {
|
|||
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
|
||||
|
||||
if (CHECK_EVENTINF(EVENTINF_35)) {
|
||||
func_800B7298(play, &this->dyna.actor, 7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
} else {
|
||||
SET_EVENTINF(EVENTINF_41);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ void func_80953E38(PlayState* play) {
|
|||
void func_80953EA4(BgIngate* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_800B7298(play, &this->dyna.actor, 0x3A);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_58);
|
||||
player->unk_3A0.x = this->dyna.actor.world.pos.x;
|
||||
player->unk_3A0.z = this->dyna.actor.world.pos.z;
|
||||
this->unk160 &= ~0x4;
|
||||
|
@ -192,7 +192,7 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
|
|||
|
||||
if (this->timePath->unk1 != 0xFF) {
|
||||
func_80953E38(play);
|
||||
func_800B7298(play, &this->dyna.actor, 7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
this->dyna.actor.textId = 0x9E4;
|
||||
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
|
||||
this->unk16C += 1;
|
||||
|
@ -231,7 +231,7 @@ void func_809541B8(BgIngate* this, PlayState* play) {
|
|||
if ((player->transformation == PLAYER_FORM_HUMAN) && (player->actor.bgCheckFlags & 1) &&
|
||||
(this->dyna.actor.xzDistToPlayer < 40.0f)) {
|
||||
if (this->dyna.actor.playerHeightRel > 15.0f) {
|
||||
func_800B7298(play, &this->dyna.actor, 7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
this->dyna.actor.textId = 0x9E6;
|
||||
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
|
||||
this->actionFunc = func_809543D4;
|
||||
|
@ -261,7 +261,7 @@ void func_809542A0(BgIngate* this, PlayState* play) {
|
|||
void func_80954340(BgIngate* this, PlayState* play) {
|
||||
if (!DECR(this->unk16A)) {
|
||||
if (this->timePath != NULL) {
|
||||
func_800B7298(play, &this->dyna.actor, 6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
this->timePath = &play->setupPathList[this->timePath->unk1];
|
||||
func_80953F14(this, play);
|
||||
func_800FE484();
|
||||
|
@ -280,7 +280,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
|
|||
break;
|
||||
case 0x9E5:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
func_800B7298(play, &this->dyna.actor, 6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
this->unk160 &= ~0x4;
|
||||
this->actionFunc = func_809541B8;
|
||||
func_800FE498();
|
||||
|
@ -301,7 +301,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
|
|||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
|
||||
func_8019F208();
|
||||
} else {
|
||||
func_800B7298(play, &this->dyna.actor, 6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
this->unk160 &= ~0x4;
|
||||
this->actionFunc = func_809541B8;
|
||||
func_800FE498();
|
||||
|
|
|
@ -121,7 +121,7 @@ void func_80ACAD88(BgOpenShutter* this, PlayState* play) {
|
|||
|
||||
doorDirection = func_80ACABA8(this, play);
|
||||
if (doorDirection > 0) {
|
||||
player->doorType = 2;
|
||||
player->doorType = PLAYER_DOORTYPE_SLIDING;
|
||||
player->doorDirection = doorDirection;
|
||||
player->doorActor = &this->dyna.actor;
|
||||
func_80122F28(player);
|
||||
|
|
|
@ -278,7 +278,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
|
|||
sp40.x = this->dyna.actor.world.pos.x;
|
||||
sp40.y = this->dyna.actor.world.pos.y - 50.0f;
|
||||
sp40.z = this->dyna.actor.world.pos.z;
|
||||
sp3A = player->unk_B6A;
|
||||
sp3A = player->fallDistance;
|
||||
|
||||
if (Player_IsBurningStickInRange(play, &sp40, 70.0f, 50.0f)) {
|
||||
this->dyna.actor.home.pos.x = player->meleeWeaponInfo[0].tip.x;
|
||||
|
@ -330,7 +330,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
|
|||
if ((this->unk_161 != 0) ||
|
||||
((DynaPolyActor_IsInRidingMovingState(&this->dyna) != 0) && (this->unk_164 > 2.0f))) {
|
||||
player->actor.velocity.y = this->unk_164 * 0.7f;
|
||||
player->unk_B68 = (SQ(this->unk_164) * 0.15f) + this->dyna.actor.world.pos.y;
|
||||
player->fallStartHeight = (SQ(this->unk_164) * 0.15f) + this->dyna.actor.world.pos.y;
|
||||
this->unk_161 = 0;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
}
|
||||
|
|
|
@ -1786,7 +1786,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
|
|||
player->actor.world.pos.x *= 10.0f;
|
||||
player->actor.world.pos.y -= 3150.0f;
|
||||
player->actor.world.pos.y *= 10.0f;
|
||||
player->unk_B68 = player->actor.world.pos.y;
|
||||
player->fallStartHeight = player->actor.world.pos.y;
|
||||
player->actor.world.pos.z *= 10.0f;
|
||||
|
||||
if ((sBlueWarp != NULL) && ((SQ(player->actor.world.pos.z) + SQ(player->actor.world.pos.x)) < SQ(60.0f))) {
|
||||
|
@ -1858,7 +1858,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
|
|||
player->actor.world.pos.x *= 0.1f;
|
||||
player->actor.world.pos.y *= 0.1f;
|
||||
player->actor.world.pos.y += 3150.0f;
|
||||
player->unk_B68 = player->actor.world.pos.y;
|
||||
player->fallStartHeight = player->actor.world.pos.y;
|
||||
player->actor.world.pos.z *= 0.1f;
|
||||
|
||||
sRedTwinmold->actor.world.pos.x *= 0.1f;
|
||||
|
@ -2086,7 +2086,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_1D1C == 45) {
|
||||
func_800B7298(play, &this->actor, 21);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
|
||||
sMusicStartTimer = KREG(91) + 43;
|
||||
}
|
||||
|
||||
|
@ -2100,7 +2100,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_1D1C == 100) {
|
||||
func_800B7298(play, &this->actor, 0x73);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_115);
|
||||
}
|
||||
|
||||
if (this->unk_1D1C == 112) {
|
||||
|
@ -2139,7 +2139,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->unk_1D20 = 0;
|
||||
sRedTwinmold->unk_0144 = sBlueTwinmold->unk_0144 = 3;
|
||||
|
@ -2200,7 +2200,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->unk_1D20 = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
sp68->unk_0144 = 10;
|
||||
|
|
|
@ -684,7 +684,7 @@ void Boss03_ChasePlayer(Boss03* this, PlayState* play) {
|
|||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_AE8 = 101;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = 0;
|
||||
player->csMode = PLAYER_CSMODE_0;
|
||||
}
|
||||
|
||||
func_809E344C(this, play);
|
||||
|
@ -779,7 +779,7 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) {
|
|||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_AE8 = 101;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = 0;
|
||||
player->csMode = PLAYER_CSMODE_0;
|
||||
func_80165690();
|
||||
}
|
||||
|
||||
|
@ -907,7 +907,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) {
|
|||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_AE8 = 101;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = 0;
|
||||
player->csMode = PLAYER_CSMODE_0;
|
||||
func_80165690();
|
||||
func_800B8D50(play, NULL, 10.0f, this->actor.shape.rot.y, 0.0f, 0x20);
|
||||
}
|
||||
|
@ -1145,7 +1145,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
|||
case 0:
|
||||
if (player->actor.world.pos.y < 1350.0f) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
|
@ -1256,7 +1256,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
|||
|
||||
if (this->csTimer == 5) {
|
||||
// Rotates Player towards Gyorg
|
||||
func_800B7298(play, &this->actor, 8);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_8);
|
||||
}
|
||||
|
||||
this->subCamEye.x = player->actor.world.pos.x + 30.0f;
|
||||
|
@ -1367,7 +1367,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
|||
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
|
||||
func_809E344C(this, play);
|
||||
|
@ -1445,7 +1445,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
|
|||
case 0:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 1);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
|
@ -1625,7 +1625,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->csState = 3;
|
||||
func_80165690();
|
||||
Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_INIT_OLD);
|
||||
|
@ -1659,7 +1659,7 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
|
|||
case 0:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 1);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
|
@ -1720,7 +1720,7 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
|
||||
func_809E344C(this, play);
|
||||
this->workTimer[WORK_TIMER_UNK1_A] = 50;
|
||||
|
@ -1750,7 +1750,7 @@ void Boss03_SetupStunned(Boss03* this, PlayState* play) {
|
|||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_AE8 = 101;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = 0;
|
||||
player->csMode = PLAYER_CSMODE_0;
|
||||
func_80165690();
|
||||
}
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
|
|||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_AE8 = 101;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = 0;
|
||||
player->csMode = PLAYER_CSMODE_0;
|
||||
func_80165690();
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
|
|||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
player->actor.world.pos.x = this->unk_6E8;
|
||||
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
|
||||
player->actor.shape.rot.y = 0x7FFF;
|
||||
|
@ -313,7 +313,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
|
|||
if (this->unk_704 == 45) {
|
||||
this->unk_708 = 1;
|
||||
this->unk_704 = 0;
|
||||
func_800B7298(play, &this->actor, 0x15);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
|
||||
this->actor.gravity = 0.0f;
|
||||
break;
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
func_80165690();
|
||||
SET_EVENTINF(EVENTINF_60);
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
|
@ -239,7 +239,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
|
|||
this->unk_1D8 = 0.0f;
|
||||
if (this->unk_1CA == 60) {
|
||||
D_809F4970->unk_154++;
|
||||
func_800B7298(play, &this->actor, 0x84);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_132);
|
||||
player->actor.shape.rot.y = 0;
|
||||
player->actor.world.rot.y = player->actor.shape.rot.y;
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
|
|||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
D_809F4970->unk_151 = 0;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -141,7 +141,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
|||
} else {
|
||||
s32 destinationIdx = DOORANA_GET_ENTRANCE(&this->actor);
|
||||
|
||||
Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_UNK_3, 0x4FF);
|
||||
Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_UNK_3, PLAYER_PARAMS(0xFF, PLAYER_INITMODE_4));
|
||||
|
||||
gSaveContext.respawn[RESPAWN_MODE_UNK_3].pos.y = this->actor.world.pos.y;
|
||||
gSaveContext.respawn[RESPAWN_MODE_UNK_3].yaw = this->actor.home.rot.y;
|
||||
|
|
|
@ -328,7 +328,7 @@ void func_808A0F88(DoorShutter* this, PlayState* play) {
|
|||
} else if (func_808A0E28(this, play)) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
player->doorActor = &this->actor;
|
||||
this->actor.textId = 0x1801;
|
||||
func_80122F28(player);
|
||||
|
@ -357,7 +357,7 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
|||
if (doorDirection != 0) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = 2;
|
||||
player->doorType = PLAYER_DOORTYPE_SLIDING;
|
||||
player->doorDirection = doorDirection;
|
||||
player->doorActor = &this->actor;
|
||||
|
||||
|
@ -369,18 +369,18 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
|||
|
||||
if (this->doorType == 6) {
|
||||
if (gSaveContext.save.playerData.healthCapacity < (DOORSHUTTER_GET_1F(&this->actor) * 0x10)) {
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x14FC;
|
||||
}
|
||||
} else if (this->unk_166 != 0) {
|
||||
if (this->doorType == 5) {
|
||||
if (!CHECK_DUNGEON_ITEM(DUNGEON_BOSS_KEY, gSaveContext.mapIndex)) {
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x1803;
|
||||
}
|
||||
player->doorTimer += 10;
|
||||
} else if (DUNGEON_KEY_COUNT(gSaveContext.mapIndex) <= 0) {
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x1802;
|
||||
} else {
|
||||
player->doorTimer += 10;
|
||||
|
@ -455,7 +455,7 @@ s32 func_808A1478(DoorShutter* this, PlayState* play, f32 arg2) {
|
|||
}
|
||||
|
||||
if ((this->unk_160 != -1) && (ActorCutscene_GetCurrentIndex() == this->unk_160)) {
|
||||
func_800B724C(play, &this->actor, 1);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ void func_808A1548(DoorShutter* this, PlayState* play) {
|
|||
} else if (func_808A0E28(this, play)) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
player->doorActor = &this->actor;
|
||||
this->actor.textId = 0x1800;
|
||||
func_80122F28(player);
|
||||
|
@ -572,7 +572,7 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
|
|||
if (ActorCutscene_GetCurrentIndex() == 0x7D) {
|
||||
func_801226E0(play, ((void)0, gSaveContext.respawn[RESPAWN_MODE_DOWN].data));
|
||||
player->unk_A86 = -1;
|
||||
func_800B7298(play, NULL, 0x73);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_115);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -623,8 +623,8 @@ void func_808A1B48(DoorShutter* this, PlayState* play) {
|
|||
|
||||
void func_808A1C50(DoorShutter* this, PlayState* play) {
|
||||
if (this->unk_167++ > 30) {
|
||||
if (GET_PLAYER(play)->csMode == 0x73) {
|
||||
func_800B7298(play, NULL, 6);
|
||||
if (GET_PLAYER(play)->csMode == PLAYER_CSMODE_115) {
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_6);
|
||||
}
|
||||
DoorShutter_SetupDoor(this, play);
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ void DoorSpiral_Wait(DoorSpiral* this, PlayState* play) {
|
|||
} else if (DoorSpiral_PlayerShouldClimb(this, play)) {
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = 4;
|
||||
player->doorType = PLAYER_DOORTYPE_STAIRCASE;
|
||||
player->doorDirection = this->orientation;
|
||||
player->doorActor = &this->actor;
|
||||
transition = DOORSPIRAL_GET_TRANSITION_ID(&this->actor);
|
||||
|
|
|
@ -344,7 +344,7 @@ void func_808B921C(DoorWarp1* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (func_808B866C(this, play) && !Play_InCsMode(play)) {
|
||||
func_800B7298(play, &this->dyna.actor, 7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
Message_StartTextbox(play, 0xF2, &this->dyna.actor);
|
||||
DoorWarp1_SetupAction(this, func_808B93A0);
|
||||
}
|
||||
|
@ -360,14 +360,14 @@ void func_808B93A0(DoorWarp1* this, PlayState* play) {
|
|||
func_801477B4(play);
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
func_8019F208();
|
||||
func_800B7298(play, &this->dyna.actor, 9);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
|
||||
player->unk_3A0.x = this->dyna.actor.world.pos.x;
|
||||
player->unk_3A0.z = this->dyna.actor.world.pos.z;
|
||||
this->unk_1CA = 1;
|
||||
DoorWarp1_SetupAction(this, func_808B9524);
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800B7298(play, &this->dyna.actor, 6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
DoorWarp1_SetupAction(this, func_808B94A4);
|
||||
}
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ void func_808B977C(DoorWarp1* this, PlayState* play) {
|
|||
|
||||
AudioSfx_PlaySfx(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
func_800B7298(play, &this->dyna.actor, 9);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
|
||||
player->unk_3A0.x = this->dyna.actor.world.pos.x;
|
||||
player->unk_3A0.z = this->dyna.actor.world.pos.z;
|
||||
this->unk_1CA = 1;
|
||||
|
@ -599,7 +599,7 @@ void func_808B9F10(DoorWarp1* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
|
||||
func_800B7298(play, &this->dyna.actor, 9);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
|
||||
player->unk_3A0.x = this->dyna.actor.world.pos.x;
|
||||
player->unk_3A0.z = this->dyna.actor.world.pos.z;
|
||||
this->unk_1CA = 20;
|
||||
|
|
|
@ -394,7 +394,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) {
|
|||
if (this->unk_2D2 & 2) {
|
||||
this->unk_2D2 &= ~2;
|
||||
Rupees_ChangeBy(-this->unk_434);
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
this->actionFunc = func_809C1C9C;
|
||||
|
@ -476,7 +476,7 @@ void func_809C1EC8(EnAob01* this, PlayState* play) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
|
|
|
@ -341,7 +341,7 @@ void EnBaba_UpdateModel(EnBaba* this, PlayState* play) {
|
|||
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer) &&
|
||||
!(this->stateFlags & BOMB_SHOP_LADY_STATE_KNOCKED_OVER)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
|
|
|
@ -111,7 +111,7 @@ void EnBba01_UpdateModel(EnBba01* this, PlayState* play) {
|
|||
EnHy_UpdateSkelAnime(&this->enHy, play);
|
||||
if (SubS_AngleDiffLessEqual(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.trackTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTrackOptions);
|
||||
|
|
|
@ -378,7 +378,7 @@ void EnBigokuta_PlayDeathCutscene(EnBigokuta* this, PlayState* play) {
|
|||
ActorCutscene_Start(this->cutscene, &this->picto.actor);
|
||||
|
||||
if (!CHECK_EVENTINF(EVENTINF_41) && !CHECK_EVENTINF(EVENTINF_35)) {
|
||||
func_800B724C(play, &this->picto.actor, 7);
|
||||
func_800B724C(play, &this->picto.actor, PLAYER_CSMODE_7);
|
||||
} else {
|
||||
player = GET_PLAYER(play);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
|
@ -454,7 +454,7 @@ void EnBigokuta_PlayDeathEffects(EnBigokuta* this, PlayState* play) {
|
|||
Actor_Kill(&this->picto.actor);
|
||||
|
||||
if (!CHECK_EVENTINF(EVENTINF_41) && !CHECK_EVENTINF(EVENTINF_35)) {
|
||||
func_800B724C(play, &this->picto.actor, 6);
|
||||
func_800B724C(play, &this->picto.actor, PLAYER_CSMODE_6);
|
||||
} else {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ void EnBigpo_SetupSpawnCutscene(EnBigpo* this) {
|
|||
void EnBigpo_WaitCutsceneQueue(EnBigpo* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
ActorCutscene_Start(this->actor.cutscene, &this->actor);
|
||||
func_800B724C(play, &this->actor, 7);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->actor.cutscene);
|
||||
if (this->actor.params == ENBIGPO_REGULAR) { // and SUMMONED, got switched earlier
|
||||
EnBigpo_SpawnCutsceneStage1(this, play);
|
||||
|
@ -471,7 +471,7 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, PlayState* play) {
|
|||
} else { // ENBIGPO_REGULAR
|
||||
ActorCutscene_Stop(this->actor.cutscene);
|
||||
}
|
||||
func_800B724C(play, &this->actor, 6);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_6);
|
||||
EnBigpo_SetupIdleFlying(this); // setup idle flying
|
||||
}
|
||||
}
|
||||
|
|
|
@ -849,7 +849,7 @@ void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) {
|
|||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
ActorCutscene_Stop(this->cutscene);
|
||||
this->cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
func_800B724C(play, &this->actor, 6);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -938,7 +938,7 @@ void EnBigslime_SetupCutsceneStartBattle(EnBigslime* this, PlayState* play) {
|
|||
this->bigslimeCollider[0].base.acFlags &= ~AC_ON;
|
||||
|
||||
Math_Vec3f_Copy(&subCam->at, &this->actor.focus.pos);
|
||||
func_800B7298(play, &this->actor, 4);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
|
||||
|
||||
player->actor.shape.rot.y = this->actor.yawTowardsPlayer + 0x8000;
|
||||
player->actor.world.pos.x = Math_SinS(this->actor.yawTowardsPlayer) * 347.0f + this->actor.world.pos.x;
|
||||
|
@ -986,7 +986,7 @@ void EnBigslime_SetupCallMinislime(EnBigslime* this, PlayState* play) {
|
|||
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoCallAnim, 5.0f);
|
||||
EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_FROG_GREET);
|
||||
this->callTimer = 0;
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->actionFunc = EnBigslime_CallMinislime;
|
||||
}
|
||||
|
||||
|
@ -1010,7 +1010,7 @@ void EnBigslime_CallMinislime(EnBigslime* this, PlayState* play) {
|
|||
EnBigslime_InitFallMinislime(this);
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
this->callTimer = 35;
|
||||
func_800B7298(play, &this->actor, 4);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1624,7 +1624,7 @@ void EnBigslime_AttackPlayerInBigslime(EnBigslime* this, PlayState* play) {
|
|||
}
|
||||
|
||||
play->damagePlayer(play, -4);
|
||||
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
|
||||
func_800B8E58(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S);
|
||||
this->gekkoRot.y += (s16)(Rand_S16Offset(0x4000, 0x4000) * (Rand_ZeroOne() < 0.5f ? -1 : 1));
|
||||
this->gekkoPosOffset.x = Math_SinS(this->gekkoRot.y) * -50.0f;
|
||||
this->gekkoPosOffset.z = Math_CosS(this->gekkoRot.y) * -50.0f;
|
||||
|
@ -2543,7 +2543,7 @@ void EnBigslime_PlayCutscene(EnBigslime* this, PlayState* play) {
|
|||
} else if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
|
||||
ActorCutscene_Start(this->cutscene, &this->actor);
|
||||
if (this->actionFuncStored != EnBigslime_SquishFlat) {
|
||||
func_800B724C(play, &this->actor, 7);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_7);
|
||||
}
|
||||
|
||||
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->cutscene);
|
||||
|
|
|
@ -75,7 +75,7 @@ void func_809CCDE0(EnBji01* this, PlayState* play) {
|
|||
s32 pad[2];
|
||||
|
||||
Math_Vec3f_Copy(&pitchTarget, &player->actor.world.pos);
|
||||
pitchTarget.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
pitchTarget.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
SubS_TrackPointStep(&this->actor.world.pos, &this->actor.focus.pos, this->actor.shape.rot.y,
|
||||
&player->actor.world.pos, &pitchTarget, &this->headZRotStep, &this->headXRotStep,
|
||||
&this->torsoZRotStep, &this->torsoXRotStep, 0x1554, 0x1FFE, 0xE38, 0x1C70);
|
||||
|
|
|
@ -228,8 +228,8 @@ void func_80871058(EnBom* this, PlayState* play) {
|
|||
} else {
|
||||
Vec3f* sp58;
|
||||
u32 sp54 = func_800C99D4(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
Vec3f sp48;
|
||||
s16 sp46;
|
||||
Vec3f slopeNormal;
|
||||
s16 downwardSlopeYaw;
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
f32 sp38;
|
||||
|
@ -253,10 +253,10 @@ void func_80871058(EnBom* this, PlayState* play) {
|
|||
|
||||
sp40 = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ;
|
||||
sp3C = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ;
|
||||
func_800B75A0(this->actor.floorPoly, &sp48, &sp46);
|
||||
Actor_GetSlopeDirection(this->actor.floorPoly, &slopeNormal, &downwardSlopeYaw);
|
||||
|
||||
sp40 += 3.0f * sp48.x;
|
||||
sp3C += 3.0f * sp48.z;
|
||||
sp40 += 3.0f * slopeNormal.x;
|
||||
sp3C += 3.0f * slopeNormal.z;
|
||||
sp38 = sqrtf(SQ(sp40) + SQ(sp3C));
|
||||
|
||||
if ((sp38 < this->actor.speedXZ) ||
|
||||
|
|
|
@ -365,7 +365,7 @@ void func_809C5310(EnBomBowlMan* this, PlayState* play) {
|
|||
if (player->actor.world.pos.x < 1510.0f) {
|
||||
if (player->transformation != PLAYER_FORM_DEKU) {
|
||||
if (this->actor.xzDistToPlayer < this->unk_2C8) {
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
func_809C53A4(this);
|
||||
}
|
||||
} else {
|
||||
|
@ -423,7 +423,7 @@ void func_809C5598(EnBomBowlMan* this, PlayState* play) {
|
|||
} else if (this->actor.textId == 0x734) {
|
||||
this->actor.textId = 0x715;
|
||||
} else if (this->actor.textId == 0x715) {
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
func_809C493C(this, 17, 1.0f);
|
||||
func_809C59A4(this, play);
|
||||
return;
|
||||
|
@ -435,7 +435,7 @@ void func_809C5598(EnBomBowlMan* this, PlayState* play) {
|
|||
func_80151BB4(play, 0x24);
|
||||
func_80151BB4(play, 0x25);
|
||||
func_80151BB4(play, 0);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->actionFunc = func_809C5738;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -434,9 +434,9 @@ void func_80868B74(EnBox* this, PlayState* play) {
|
|||
this->unk_1A0++;
|
||||
if ((this->cutsceneIdxA != -1) && ActorCutscene_GetCurrentIndex() == this->cutsceneIdxA) {
|
||||
if (this->unk_1A0 == 2) {
|
||||
func_800B724C(play, &this->dyna.actor, 4);
|
||||
func_800B724C(play, &this->dyna.actor, PLAYER_CSMODE_4);
|
||||
} else if (this->unk_1A0 == 22) {
|
||||
func_800B724C(play, &this->dyna.actor, 1);
|
||||
func_800B724C(play, &this->dyna.actor, PLAYER_CSMODE_1);
|
||||
}
|
||||
}
|
||||
} else if (this->unk_1A0 < 60) {
|
||||
|
|
|
@ -560,7 +560,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
|
|||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
func_800B7298(play, &this->actor, 4);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
|
||||
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
|
||||
this->subCamEye.x = mainCam->eye.x;
|
||||
this->subCamEye.y = mainCam->eye.y;
|
||||
|
@ -586,7 +586,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
|
|||
mainCam->at = this->subCamAt;
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->cameraState = 0;
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
this->activeTimer = 20;
|
||||
|
|
|
@ -103,7 +103,7 @@ void EnCne01_UpdateModel(EnCne01* this, PlayState* play) {
|
|||
EnHy_UpdateSkelAnime(&this->enHy, play);
|
||||
if (SubS_AngleDiffLessEqual(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.trackTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTrackOptions);
|
||||
|
|
|
@ -369,7 +369,7 @@ void func_8089ABF4(EnDinofos* this, PlayState* play) {
|
|||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
ActorCutscene_Stop(this->actor.cutscene);
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
func_800B724C(play, &this->actor, 6);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1206,7 +1206,7 @@ void func_8089D318(EnDinofos* this, PlayState* play) {
|
|||
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
ActorCutscene_Start(this->actor.cutscene, &this->actor);
|
||||
func_800B724C(play, &this->actor, 7);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_7);
|
||||
} else {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
|
||||
}
|
||||
|
|
|
@ -211,10 +211,12 @@ s32 func_80B3CDA4(EnDnp* this, PlayState* play) {
|
|||
|
||||
Math_SmoothStepToS(&this->unk_332, temp_s0, 3, 0x2AA8, 0x1);
|
||||
sp30 = player->actor.world.pos;
|
||||
sp30.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp30.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
sp3C = this->actor.world.pos;
|
||||
sp3C.y += 10.0f;
|
||||
pitch = Math_Vec3f_Pitch(&sp3C, &sp30);
|
||||
|
||||
//! FAKE
|
||||
if (1) {};
|
||||
Math_SmoothStepToS(&this->unk_330, pitch, 3, 0x2AA8, 0x1);
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ s32 func_80A52B68(EnDnq* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
u16 temp = play->msgCtx.currentTextId;
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->targetActor == &this->picto.actor)) {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->talkActor == &this->picto.actor)) {
|
||||
switch (temp) {
|
||||
case 0x89B:
|
||||
func_80A5257C(this, 18);
|
||||
|
|
|
@ -144,7 +144,7 @@ void func_8092C740(EnDns* this, PlayState* play) {
|
|||
this->unk_2CE = CLAMP(this->unk_2CE, -0x3FFC, 0x3FFC);
|
||||
|
||||
Math_Vec3f_Copy(&sp28, &player->actor.world.pos);
|
||||
sp28.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp28.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
Math_Vec3f_Copy(&sp34, &this->actor.world.pos);
|
||||
sp34.y += 10.0f;
|
||||
temp = Math_Vec3f_Pitch(&sp34, &sp28);
|
||||
|
|
|
@ -465,7 +465,7 @@ void func_80866A5C(EnDoor* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80866B20(EnDoor* this, PlayState* play) {
|
||||
static s32 D_80867BC0[4];
|
||||
static s32 D_80867BC0;
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f playerPosRelToDoor;
|
||||
s16 temp_a2;
|
||||
|
@ -475,7 +475,7 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
u8 temp_a1;
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->dyna.actor, &play->state) && (this->dyna.actor.textId == 0x1821)) {
|
||||
D_80867BC0[0] = 1;
|
||||
D_80867BC0 = true;
|
||||
}
|
||||
if (this->unk_1A1 != 0) {
|
||||
this->actionFunc = func_80867144;
|
||||
|
@ -491,25 +491,25 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
} else if (!Player_InCsMode(play)) {
|
||||
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
if ((D_80867BC0[0] != 0) || ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
|
||||
(fabsf(playerPosRelToDoor.z) < 50.0f))) {
|
||||
if (D_80867BC0 || ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
|
||||
(fabsf(playerPosRelToDoor.z) < 50.0f))) {
|
||||
yawDiff = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y;
|
||||
if (playerPosRelToDoor.z > 0.0f) {
|
||||
yawDiff = (0x8000 - yawDiff);
|
||||
}
|
||||
if (ABS_ALT(yawDiff) < 0x3000) {
|
||||
player->doorType = 1;
|
||||
player->doorType = PLAYER_DOORTYPE_HANDLE;
|
||||
player->doorDirection = playerPosRelToDoor.z >= 0.0f ? 1.0f : -1.0f;
|
||||
player->doorActor = &this->dyna.actor;
|
||||
if (this->unk_1A6 != 0) {
|
||||
if (gSaveContext.save.inventory.dungeonKeys[((void)0, gSaveContext.mapIndex)] <= 0) {
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = 0x1802;
|
||||
} else {
|
||||
player->doorTimer = 10;
|
||||
}
|
||||
} else if (this->unk_1A4 == 4) {
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = 0x1800;
|
||||
} else if ((this->unk_1A4 == 0) || (this->unk_1A4 == 2) || (this->unk_1A4 == 3)) {
|
||||
s32 textIdOffset;
|
||||
|
@ -528,16 +528,18 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
|||
} else if (this->unk_1A4 == 2) {
|
||||
baseTextId = 0x181D;
|
||||
}
|
||||
player->doorType = -1;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = baseTextId + textIdOffset;
|
||||
}
|
||||
} else if ((this->unk_1A4 == 5) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
ScheduleOutput sp30;
|
||||
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &sp30) != 0) {
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &sp30)) {
|
||||
this->dyna.actor.textId = sp30.result + 0x1800;
|
||||
|
||||
player->doorType = ((this->dyna.actor.textId == 0x1821) && (D_80867BC0[0] != 0)) ? 5 : -1;
|
||||
player->doorType = ((this->dyna.actor.textId == 0x1821) && D_80867BC0)
|
||||
? PLAYER_DOORTYPE_PROXIMITY
|
||||
: PLAYER_DOORTYPE_TALKING;
|
||||
}
|
||||
}
|
||||
func_80122F28(player);
|
||||
|
|
|
@ -535,7 +535,7 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) {
|
|||
|
||||
if (this->grabTimer > sMaxGrabTimerPerPython[this->pythonIndex]) {
|
||||
if (this->state == DEEP_PYTHON_GRAB_STATE_START) {
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
this->state = DEEP_PYTHON_GRAB_STATE_GRABBED;
|
||||
}
|
||||
|
||||
|
@ -572,7 +572,7 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) {
|
|||
|
||||
//! @bug: This function should only pass Player*: it uses *(this + 0x153), which is meant to be
|
||||
//! player->currentMask, but in this case is garbage in the skelAnime
|
||||
func_800B8E58((Player*)this, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
|
||||
func_800B8E58((Player*)this, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_UTSUBO_BITE);
|
||||
CollisionCheck_GreenBlood(play, NULL, &player->actor.world.pos);
|
||||
}
|
||||
|
|
|
@ -799,7 +799,7 @@ void func_8088E304(EnElf* this, PlayState* play) {
|
|||
this->unk_224.z = Math_SinS(this->unk_248) * -this->unk_254;
|
||||
this->unk_248 += this->unk_24C;
|
||||
|
||||
func_8088D7F8(this, &player->bodyPartsPos[0]);
|
||||
func_8088D7F8(this, &player->bodyPartsPos[PLAYER_BODYPART_WAIST]);
|
||||
this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x);
|
||||
func_8088F5F4(this, play, 0x20);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
|
@ -823,7 +823,7 @@ void func_8088E484(EnElf* this, PlayState* play) {
|
|||
this->unk_254 = 1.0f;
|
||||
}
|
||||
|
||||
func_8088D7F8(this, &player->bodyPartsPos[0]);
|
||||
func_8088D7F8(this, &player->bodyPartsPos[PLAYER_BODYPART_WAIST]);
|
||||
Actor_SetScale(&this->actor, (1.0f - (SQ(this->unk_250) * SQ(1.0f / 9.0f))) * 0.008f);
|
||||
this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x);
|
||||
func_8088F5F4(this, play, 32);
|
||||
|
@ -915,11 +915,11 @@ void func_8088E850(EnElf* this, PlayState* play) {
|
|||
}
|
||||
} else {
|
||||
this->actor.shape.rot.x = 0;
|
||||
distFromLinksHead = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.world.pos);
|
||||
distFromLinksHead = Math_Vec3f_DistXYZ(&player->bodyPartsPos[PLAYER_BODYPART_HAT], &this->actor.world.pos);
|
||||
switch (this->unk_244) {
|
||||
case 5:
|
||||
func_8088D660(this, &player->bodyPartsPos[8], 1.0f - (this->unk_24A * 0.033333335f));
|
||||
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.world.pos);
|
||||
func_8088D660(this, &player->bodyPartsPos[PLAYER_BODYPART_HAT], 1.0f - (this->unk_24A * 0.033333335f));
|
||||
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[PLAYER_BODYPART_HAT], &this->actor.world.pos);
|
||||
|
||||
if (distFromLinksHead < 7.0f) {
|
||||
this->unk_25C = 0;
|
||||
|
@ -935,12 +935,12 @@ void func_8088E850(EnElf* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 6:
|
||||
func_8088D660(this, &player->bodyPartsPos[8], 0.2f);
|
||||
this->actor.world.pos = player->bodyPartsPos[8];
|
||||
func_8088D660(this, &player->bodyPartsPos[PLAYER_BODYPART_HAT], 0.2f);
|
||||
this->actor.world.pos = player->bodyPartsPos[PLAYER_BODYPART_HAT];
|
||||
break;
|
||||
|
||||
case 9:
|
||||
nextPos = player->bodyPartsPos[8];
|
||||
nextPos = player->bodyPartsPos[PLAYER_BODYPART_HAT];
|
||||
nextPos.y += 1500.0f * this->actor.scale.y;
|
||||
|
||||
func_8088D7F8(this, &nextPos);
|
||||
|
@ -967,8 +967,8 @@ void func_8088E850(EnElf* this, PlayState* play) {
|
|||
|
||||
default:
|
||||
arrowPointedActor = play->actorCtx.targetContext.arrowPointedActor;
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->targetActor != NULL)) {
|
||||
Math_Vec3f_Copy(&nextPos, &player->targetActor->focus.pos);
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_40) && (player->talkActor != NULL)) {
|
||||
Math_Vec3f_Copy(&nextPos, &player->talkActor->focus.pos);
|
||||
} else {
|
||||
Math_Vec3f_Copy(&nextPos, &play->actorCtx.targetContext.unk0);
|
||||
}
|
||||
|
@ -1085,10 +1085,10 @@ void func_8088EFA4(EnElf* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->fairyFlags & 1) {
|
||||
if ((arrayPointerActor == NULL) || (player->unk_730 == NULL)) {
|
||||
if ((arrayPointerActor == NULL) || (player->targetedActor == NULL)) {
|
||||
this->fairyFlags ^= 1;
|
||||
}
|
||||
} else if ((arrayPointerActor != NULL) && (player->unk_730 != NULL)) {
|
||||
} else if ((arrayPointerActor != NULL) && (player->targetedActor != NULL)) {
|
||||
u8 temp = this->unk_269;
|
||||
u16 targetSfxId = this->unk_269 == 0 ? NA_SE_PL_WALK_GROUND - SFX_FLAG : NA_SE_PL_WALK_GROUND - SFX_FLAG;
|
||||
|
||||
|
@ -1230,8 +1230,8 @@ void func_8088F214(EnElf* this, PlayState* play) {
|
|||
if (sp34 != this->unk_244) {
|
||||
func_8088C51C(this, sp34);
|
||||
if (sp34 == 9) {
|
||||
this->unk_254 = Math_Vec3f_DistXZ(&player->bodyPartsPos[8], &this->actor.world.pos);
|
||||
this->unk_248 = Math_Vec3f_Yaw(&this->actor.world.pos, &player->bodyPartsPos[8]);
|
||||
this->unk_254 = Math_Vec3f_DistXZ(&player->bodyPartsPos[PLAYER_BODYPART_HAT], &this->actor.world.pos);
|
||||
this->unk_248 = Math_Vec3f_Yaw(&this->actor.world.pos, &player->bodyPartsPos[PLAYER_BODYPART_HAT]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1281,11 +1281,13 @@ void func_8088FA38(EnElf* this, PlayState* play) {
|
|||
if (this->unk_234 != NULL) {
|
||||
refPos = this->unk_234->world.pos;
|
||||
} else {
|
||||
if ((player->unk_730 == NULL) || (&player->actor == player->unk_730) || (&this->actor == player->unk_730) ||
|
||||
(this->unk_264 & 4)) {
|
||||
refPos.x = player->bodyPartsPos[7].x + (Math_SinS(player->actor.shape.rot.y) * 20.0f);
|
||||
refPos.y = player->bodyPartsPos[7].y + 5.0f;
|
||||
refPos.z = player->bodyPartsPos[7].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f);
|
||||
if ((player->targetedActor == NULL) || (&player->actor == player->targetedActor) ||
|
||||
(&this->actor == player->targetedActor) || (this->unk_264 & 4)) {
|
||||
refPos.x =
|
||||
player->bodyPartsPos[PLAYER_BODYPART_HEAD].x + (Math_SinS(player->actor.shape.rot.y) * 20.0f);
|
||||
refPos.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 5.0f;
|
||||
refPos.z =
|
||||
player->bodyPartsPos[PLAYER_BODYPART_HEAD].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f);
|
||||
this->unk_264 &= ~4;
|
||||
}
|
||||
}
|
||||
|
@ -1456,7 +1458,7 @@ void func_8089010C(Actor* thisx, PlayState* play) {
|
|||
gSaveContext.save.playerData.tatlTimer = 0;
|
||||
}
|
||||
|
||||
if ((player->tatlTextId == 0) && (player->unk_730 == NULL)) {
|
||||
if ((player->tatlTextId == 0) && (player->targetedActor == NULL)) {
|
||||
if ((gSaveContext.save.playerData.tatlTimer >= 600) && (gSaveContext.save.playerData.tatlTimer <= 3000)) {
|
||||
player->tatlTextId = QuestHint_GetTatlTextId(play);
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ void EnElforg_TurnInFairy(EnElforg* this, PlayState* play) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
this->actor.shape.yOffset *= 0.9f;
|
||||
this->actor.speedXZ = 5.0f;
|
||||
EnElforg_ApproachTargetYPosition(this, &player->bodyPartsPos[0]);
|
||||
EnElforg_ApproachTargetYPosition(this, &player->bodyPartsPos[PLAYER_BODYPART_WAIST]);
|
||||
|
||||
xzDistToPlayer = this->actor.xzDistToPlayer;
|
||||
if (xzDistToPlayer < 0.0f) {
|
||||
|
@ -393,7 +393,7 @@ void EnElforg_CirclePlayer(EnElforg* this, PlayState* play) {
|
|||
|
||||
this->actor.world.pos.x = (Math_SinS(this->timer << 12) * distanceFromPlayer) + playerActor->world.pos.x;
|
||||
this->actor.world.pos.z = (Math_CosS(this->timer << 12) * distanceFromPlayer) + playerActor->world.pos.z;
|
||||
this->actor.world.pos.y = player->bodyPartsPos[0].y;
|
||||
this->actor.world.pos.y = player->bodyPartsPos[PLAYER_BODYPART_WAIST].y;
|
||||
EnElforg_SpawnSparkles(this, play, 16);
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ void EnElforg_SetupFairyCollected(EnElforg* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->actor.world.pos.x = playerActor->world.pos.x;
|
||||
this->actor.world.pos.y = player->bodyPartsPos[0].y;
|
||||
this->actor.world.pos.y = player->bodyPartsPos[PLAYER_BODYPART_WAIST].y;
|
||||
this->actor.world.pos.z = playerActor->world.pos.z;
|
||||
this->actionFunc = EnElforg_FairyCollected;
|
||||
this->timer = 0;
|
||||
|
@ -452,7 +452,7 @@ void EnElforg_FreeFloating(EnElforg* this, PlayState* play) {
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Player_GetMask(play) == PLAYER_MASK_GREAT_FAIRY) {
|
||||
pos = player->bodyPartsPos[0];
|
||||
pos = player->bodyPartsPos[PLAYER_BODYPART_WAIST];
|
||||
this->targetSpeedXZ = 5.0f;
|
||||
EnElforg_MoveToTarget(this, &pos);
|
||||
} else {
|
||||
|
|
|
@ -3847,9 +3847,12 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
sp10C.y = -10.0f;
|
||||
sp10C.z = 5.0f;
|
||||
Matrix_MultVec3f(&sp10C, &sp100);
|
||||
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[15].x + sp100.x, 1.0f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[15].y + sp100.y, 1.0f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[15].z + sp100.z, 1.0f, 6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[PLAYER_BODYPART_RIGHT_HAND].x + sp100.x, 1.0f,
|
||||
6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[PLAYER_BODYPART_RIGHT_HAND].y + sp100.y, 1.0f,
|
||||
6.0f);
|
||||
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[PLAYER_BODYPART_RIGHT_HAND].z + sp100.z, 1.0f,
|
||||
6.0f);
|
||||
|
||||
D_809101C0 = 188.0f;
|
||||
|
||||
|
@ -5286,7 +5289,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
sSubCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
|
||||
func_800B7298(play, &this->actor, 4);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
|
||||
|
||||
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
|
||||
sSubCamEye.x = mainCam->eye.x;
|
||||
|
@ -5313,7 +5316,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
|
||||
func_80169AFC(play, sSubCamId, 0);
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
D_8090CD4C = 0;
|
||||
sSubCamId = SUB_CAM_ID_DONE;
|
||||
D_8090CD50 = 30;
|
||||
|
@ -5327,7 +5330,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
sSubCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
|
||||
func_800B7298(play, &this->actor, 4);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
|
||||
|
||||
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
|
||||
sSubCamEye.x = mainCam->eye.x;
|
||||
|
@ -5414,7 +5417,8 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
mainCam->at = sSubCamAt;
|
||||
func_80169AFC(play, sSubCamId, 0);
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, 6); // arg2 changed from 7 to 6 in MM
|
||||
func_800B7298(play, &this->actor,
|
||||
PLAYER_CSMODE_6); // arg2 changed from PLAYER_CSMODE_7 to PLAYER_CSMODE_6 in MM
|
||||
D_8090CD4C = 0;
|
||||
sSubCamId = SUB_CAM_ID_DONE;
|
||||
player->unk_B28 = -5;
|
||||
|
|
|
@ -719,7 +719,7 @@ void func_808D217C(EnFloormas* this, Player* player) {
|
|||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
func_808D08D0(this);
|
||||
ptr = &D_808D3900[(void)0, gSaveContext.save.playerForm];
|
||||
ptr = &D_808D3900[GET_PLAYER_FORM];
|
||||
this->actor.home.pos.x = ptr->z * Math_SinS(this->actor.shape.rot.y);
|
||||
this->actor.home.pos.y = CLAMP(-this->actor.playerHeightRel, ptr->x, ptr->y);
|
||||
this->actor.home.pos.z = ptr->z * Math_CosS(this->actor.shape.rot.y);
|
||||
|
@ -762,7 +762,7 @@ void func_808D22C8(EnFloormas* this, PlayState* play) {
|
|||
this->actor.speedXZ = -3.0f;
|
||||
func_808D1740(this);
|
||||
} else if ((this->unk_190 % 20) == 0) {
|
||||
func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92);
|
||||
func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset);
|
||||
play->damagePlayer(play, -4);
|
||||
}
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FLOORMASTER_SM_STICK - SFX_FLAG);
|
||||
|
|
|
@ -996,7 +996,7 @@ void EnFsn_GiveItem(EnFsn* this, PlayState* play) {
|
|||
}
|
||||
this->actor.parent = NULL;
|
||||
if (ENFSN_IS_SHOP(&this->actor) && !this->isSelling) {
|
||||
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
}
|
||||
this->actionFunc = EnFsn_SetupResumeInteraction;
|
||||
} else if (this->isSelling == true) {
|
||||
|
|
|
@ -370,7 +370,7 @@ void func_80B0FE7C(PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B0FEBC(EnGb2* this, PlayState* play) {
|
||||
if ((play->msgCtx.ocarinaMode == OCARINA_SONG_ELEGY) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING)) {
|
||||
if ((play->msgCtx.ocarinaMode == 3) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING)) {
|
||||
play->msgCtx.ocarinaMode = 4;
|
||||
SET_EVENTINF(EVENTINF_47);
|
||||
this->unk_26E = 0x14D1;
|
||||
|
@ -433,7 +433,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
|
|||
Rupees_ChangeBy(-this->unk_288);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
this->actionFunc = func_80B11344;
|
||||
break;
|
||||
|
||||
|
@ -585,7 +585,7 @@ void func_80B10634(EnGb2* this, PlayState* play) {
|
|||
Rupees_ChangeBy(-this->unk_288);
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
this->actionFunc = func_80B11344;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -355,7 +355,7 @@ s32 func_80BB1D64(EnGeg* this, PlayState* play) {
|
|||
sp40 = player->actor.world.pos;
|
||||
} else {
|
||||
sp40 = player->actor.world.pos;
|
||||
sp40.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
}
|
||||
|
||||
sp34 = this->actor.world.pos;
|
||||
|
|
|
@ -123,7 +123,7 @@ s32 func_80B34FB4(EnGg* this, PlayState* play) {
|
|||
s16 pitch;
|
||||
|
||||
sp40 = player->actor.world.pos;
|
||||
sp40.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
sp34 = this->actor.world.pos;
|
||||
sp34.y += 70.0f;
|
||||
pitch = Math_Vec3f_Pitch(&sp34, &sp40);
|
||||
|
|
|
@ -81,7 +81,7 @@ s32 func_80B3AC94(EnGg2* this, PlayState* play) {
|
|||
s16 pitch;
|
||||
|
||||
sp40 = player->actor.world.pos;
|
||||
sp40.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
|
||||
sp34 = this->actor.world.pos;
|
||||
sp34.y += 70.0f;
|
||||
|
|
|
@ -442,7 +442,7 @@ s32 func_80B5100C(EnGk* this, PlayState* play) {
|
|||
this->unk_324 = CLAMP(this->unk_324, -0x1C70, 0x1C70);
|
||||
|
||||
sp40 = player->actor.world.pos;
|
||||
sp40.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
|
||||
sp34 = this->actor.world.pos;
|
||||
sp34.y += 70.0f;
|
||||
|
|
|
@ -860,7 +860,7 @@ void func_8094F3D0(EnGm* this, PlayState* play) {
|
|||
s32 talkState = Message_GetState(&play->msgCtx);
|
||||
s32 textId = play->msgCtx.currentTextId;
|
||||
|
||||
if ((&this->actor == player->targetActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if ((play->state.frames % 3) == 0) {
|
||||
if (this->unk_3AC == 120.0f) {
|
||||
|
|
|
@ -372,7 +372,7 @@ void func_809984F4(EnGs* this, PlayState* play) {
|
|||
}
|
||||
} while (gossipStone != NULL);
|
||||
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->actionFunc = func_809985B8;
|
||||
}
|
||||
|
||||
|
|
|
@ -674,7 +674,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
|
|||
(((this->stateFlags & ENHORSE_FLAG_19) || (this->stateFlags & ENHORSE_FLAG_29)) && !this->inRace) ||
|
||||
(this->action == ENHORSE_ACTION_HBA) || (player->actor.flags & ACTOR_FLAG_100) ||
|
||||
(play->csCtx.state != CS_STATE_0) || (ActorCutscene_GetCurrentIndex() != -1) ||
|
||||
(player->stateFlags1 & PLAYER_STATE1_20) || (player->csMode != 0)) {
|
||||
(player->stateFlags1 & PLAYER_STATE1_20) || (player->csMode != PLAYER_CSMODE_0)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1131,6 +1131,7 @@ void EnHorse_StartMountedIdle(EnHorse* this) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
curFrame = this->skin.skelAnime.curFrame;
|
||||
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, curFrame,
|
||||
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f);
|
||||
|
@ -2920,7 +2921,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) {
|
|||
this->hbaTimer++;
|
||||
}
|
||||
|
||||
sp28 = Audio_IsSequencePlaying(0x41);
|
||||
sp28 = Audio_IsSequencePlaying(NA_BGM_HORSE_GOAL);
|
||||
EnHorse_UpdateHbaRaceInfo(this, play, &sHbaInfo);
|
||||
|
||||
if (((this->hbaFlags & 1) || (this->hbaTimer > 45)) && (sp28 != 1) && (gSaveContext.minigameState != 3)) {
|
||||
|
|
|
@ -225,7 +225,7 @@ void EnHs_SceneTransitToBunnyHoodDialogue(EnHs* this, PlayState* play) {
|
|||
|
||||
void func_80953354(EnHs* this, PlayState* play) {
|
||||
if (!Play_InCsMode(play)) {
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->actionFunc = EnHs_SceneTransitToBunnyHoodDialogue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ void func_808F3414(EnIn* this, PlayState* play) {
|
|||
}
|
||||
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x2710, this->actor.yawTowardsPlayer)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
|
@ -1481,7 +1481,7 @@ void func_808F6334(EnIn* this, PlayState* play) {
|
|||
this->unk4C4 = CLAMP(this->unk4C4, 0.0f, 80.0f);
|
||||
|
||||
Matrix_Translate(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
if ((&this->actor == player->targetActor) &&
|
||||
if ((&this->actor == player->talkActor) &&
|
||||
!((play->msgCtx.currentTextId >= 0xFF) && (play->msgCtx.currentTextId <= 0x200)) &&
|
||||
(talkState == TEXT_STATE_3) && (this->prevTalkState == TEXT_STATE_3)) {
|
||||
if (!(play->state.frames & 1)) {
|
||||
|
|
|
@ -177,7 +177,7 @@ s32 func_80BC1B60(EnJa* this, PlayState* play) {
|
|||
this->unk_35A = CLAMP(this->unk_35A, -0x1C70, 0x1C70);
|
||||
|
||||
if (this->unk_1D8.player->actor.id == ACTOR_PLAYER) {
|
||||
sp40.y = this->unk_1D8.player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = this->unk_1D8.player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
} else {
|
||||
Math_Vec3f_Copy(&sp40, &this->unk_1D8.player->actor.focus.pos);
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ void func_80BC1E40(EnJa* this, PlayState* play) {
|
|||
f32 phi_f0;
|
||||
|
||||
if (((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3) && (&this->actor == player->targetActor)) {
|
||||
(this->prevTalkState == TEXT_STATE_3) && (&this->actor == player->talkActor)) {
|
||||
if ((play->state.frames % 2) == 0) {
|
||||
if (this->unk_348 != 0.0f) {
|
||||
this->unk_348 = 0.0f;
|
||||
|
|
|
@ -409,7 +409,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unkState1A8 == 2 && this->unkState196 == 2) {
|
||||
func_800B7298(play, &this->picto.actor, 0x49);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
|
||||
this->unkState1A8 = 0;
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
if (this->talkState == TEXT_STATE_5) {
|
||||
// bad song input
|
||||
if (this->unkState196 == 2 && this->picto.actor.textId == 0x1647) {
|
||||
func_800B7298(play, &this->picto.actor, 6);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_6);
|
||||
}
|
||||
|
||||
// after timeskip
|
||||
|
@ -445,7 +445,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
|
|||
|
||||
} else if (this->picto.actor.textId == 0x165D || this->picto.actor.textId == 0x165F ||
|
||||
this->picto.actor.textId == 0x1660 || this->picto.actor.textId == 0x1652) {
|
||||
func_800B7298(play, &this->picto.actor, 4);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_4);
|
||||
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
|
||||
ActorCutscene_Stop(0x7C);
|
||||
ActorCutscene_SetIntentToPlay(this->actorCutscenes[0]);
|
||||
|
@ -675,7 +675,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
|||
|
||||
if (this->unk190 == 0) {
|
||||
func_801477B4(play);
|
||||
func_800B7298(play, &this->picto.actor, 0x56);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_86);
|
||||
this->picto.actor.textId = 0x1648;
|
||||
Message_StartTextbox(play, (this->picto.actor.textId), &this->picto.actor);
|
||||
this->unkState1A8 = 0;
|
||||
|
@ -711,7 +711,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->unk22C, &this->picto.actor.home.pos);
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->actorCutscenes[0], &this->picto.actor);
|
||||
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->picto.actor.cutscene);
|
||||
func_800B7298(play, &this->picto.actor, 0x56);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_86);
|
||||
this->unkState1A8 = 1;
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->picto.actor.textId == 0x1648) {
|
||||
func_800B7298(play, &this->picto.actor, 7);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_7);
|
||||
this->picto.actor.textId = 0x1649;
|
||||
if (this->animIndex != ENKAKASI_ANIM_ARMS_CROSSED_ROCKING) {
|
||||
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
|
||||
|
@ -916,7 +916,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
this->unk190++;
|
||||
this->unk204 = 0xA;
|
||||
if (this->unk190 == 0xE) {
|
||||
func_800B7298(play, &this->picto.actor, 0x49);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
|
||||
func_80165690();
|
||||
this->unk204 = 0x14;
|
||||
}
|
||||
|
@ -930,10 +930,12 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
|
|||
player = GET_PLAYER(play);
|
||||
|
||||
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE,
|
||||
0xBFF, &player->unk_3C0, player->unk_3CC);
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &player->unk_3C0, player->unk_3CC);
|
||||
func_80169EFC(&play->state);
|
||||
|
||||
//! FAKE
|
||||
if (0) {}
|
||||
|
||||
if (gSaveContext.save.time > CLOCK_TIME(18, 0) || gSaveContext.save.time < CLOCK_TIME(6, 0)) {
|
||||
gSaveContext.save.time = CLOCK_TIME(6, 0);
|
||||
gSaveContext.respawnFlag = -4;
|
||||
|
@ -1012,7 +1014,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
|
|||
Math_ApproachF(&this->picto.actor.shape.yOffset, -6000.0f, 0.5f, 200.0f);
|
||||
if (fabsf(this->picto.actor.shape.yOffset + 6000.0f) < 10.0f) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_79_08);
|
||||
func_800B7298(play, &this->picto.actor, 6);
|
||||
func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_6);
|
||||
ActorCutscene_Stop(this->actorCutscenes[0]);
|
||||
this->aboveGroundStatus = ENKAKASI_ABOVE_GROUND_TYPE;
|
||||
this->songSummonDist = 80.0f;
|
||||
|
|
|
@ -496,7 +496,7 @@ void func_80B419B0(EnKgy* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
func_80B4163C(this, play);
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->targetActor)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->talkActor)) {
|
||||
func_80B411DC(this, play, 4);
|
||||
func_80B40E18(this, this->actor.textId);
|
||||
if (this->actor.textId == 0xC37) {
|
||||
|
@ -564,7 +564,7 @@ void func_80B41ACC(EnKgy* this, PlayState* play) {
|
|||
void func_80B41C30(EnKgy* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (&this->actor != player->targetActor) {
|
||||
if (&this->actor != player->talkActor) {
|
||||
this->actionFunc = func_80B42508;
|
||||
}
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
|||
|
||||
case 0xC46:
|
||||
case 0xC55:
|
||||
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
player->exchangeItemId = PLAYER_AP_NONE;
|
||||
this->unk_29C &= ~0x8;
|
||||
play->msgCtx.msgLength = 0;
|
||||
|
@ -831,7 +831,7 @@ void func_80B42508(EnKgy* this, PlayState* play) {
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->actor.focus.pos = this->unk_2A8;
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->targetActor)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->talkActor)) {
|
||||
this->actionFunc = func_80B41E18;
|
||||
func_80B411DC(this, play, 4);
|
||||
func_80B40E18(this, this->actor.textId);
|
||||
|
@ -870,7 +870,7 @@ void func_80B42714(EnKgy* this, PlayState* play) {
|
|||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->actor.focus.pos = this->unk_2A8;
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->targetActor)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state) || (&this->actor == player->talkActor)) {
|
||||
func_80B411DC(this, play, 4);
|
||||
func_80B40E18(this, this->actor.textId);
|
||||
if (this->actor.textId == 0xC37) {
|
||||
|
|
|
@ -359,7 +359,7 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->headRotTarget, &gZeroVec3f);
|
||||
this->state = PALACE_GUARD_RUNNING_TO_PLAYER;
|
||||
play_sound(NA_SE_SY_FOUND);
|
||||
func_800B7298(play, &this->actor, 0x1A);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_26);
|
||||
D_80A6862C = 1;
|
||||
this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_10);
|
||||
this->actor.gravity = 0.0f;
|
||||
|
|
|
@ -1068,7 +1068,7 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
|
|||
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE || Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
|
||||
if (Message_ShouldAdvance(play) && Message_GetState(&play->msgCtx) == TEXT_STATE_5) {
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
func_801477B4(play);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,8 +114,8 @@ void func_80965D3C(EnMm* this, PlayState* play) {
|
|||
|
||||
void func_80965DB4(EnMm* this, PlayState* play) {
|
||||
s16 direction;
|
||||
Vec3f sp50;
|
||||
s16 unused;
|
||||
Vec3f slopeNormal;
|
||||
s16 downwardSlopeYaw;
|
||||
f32 temp_f14;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
|
@ -143,9 +143,9 @@ void func_80965DB4(EnMm* this, PlayState* play) {
|
|||
} else {
|
||||
temp_f14 = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ;
|
||||
temp_f12 = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ;
|
||||
func_800B75A0(this->actor.floorPoly, &sp50, &unused);
|
||||
temp_f14 += 3.0f * sp50.x;
|
||||
temp_f12 += 3.0f * sp50.z;
|
||||
Actor_GetSlopeDirection(this->actor.floorPoly, &slopeNormal, &downwardSlopeYaw);
|
||||
temp_f14 += 3.0f * slopeNormal.x;
|
||||
temp_f12 += 3.0f * slopeNormal.z;
|
||||
temp_f2 = sqrtf(SQ(temp_f14) + SQ(temp_f12));
|
||||
|
||||
if ((temp_f2 < this->actor.speedXZ) ||
|
||||
|
|
|
@ -255,7 +255,7 @@ s32 EnMttag_ExitRace(PlayState* play, s32 transitionType, s32 nextTransitionType
|
|||
void EnMttag_ShowFalseStartMessage(EnMttag* this, PlayState* play) {
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
|
||||
Message_StartTextbox(play, 0xE95, NULL); // An entrant made a false start
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Audio_QueueSeqCmd(0x101400FF);
|
||||
this->actionFunc = EnMttag_PotentiallyRestartRace;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ void EnMttag_ShowFalseStartMessage(EnMttag* this, PlayState* play) {
|
|||
*/
|
||||
void EnMttag_ShowCantWinMessage(EnMttag* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0xE97, NULL); // You can't win now...
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
this->actionFunc = EnMttag_HandleCantWinChoice;
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
|
|||
play->transitionType = TRANS_TYPE_02;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_02;
|
||||
func_801477B4(play);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Magic_Add(play, MAGIC_FILL_TO_CAPACITY);
|
||||
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
|
@ -467,7 +467,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) {
|
|||
// Keep racing
|
||||
func_8019F208();
|
||||
func_801477B4(play);
|
||||
func_800B7298(play, &this->actor, 6);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
CLEAR_EVENTINF(EVENTINF_13);
|
||||
this->timer = 100;
|
||||
this->actionFunc = EnMttag_Race;
|
||||
|
|
|
@ -424,7 +424,7 @@ void func_80BC05A8(EnNb* this, PlayState* play) {
|
|||
TextState talkState = Message_GetState(&play->msgCtx);
|
||||
u16 textId = play->msgCtx.currentTextId;
|
||||
|
||||
if ((&this->actor == player->targetActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
if ((&this->actor == player->talkActor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if ((play->state.frames % 3) == 0) {
|
||||
if (this->unk_26C == 120.0f) {
|
||||
|
|
|
@ -342,7 +342,7 @@ void EnPametfrog_StopCutscene(EnPametfrog* this, PlayState* play) {
|
|||
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
ActorCutscene_Stop(this->cutscene);
|
||||
func_800B724C(play, &this->actor, 6);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1005,7 +1005,7 @@ void EnPametfrog_PlayCutscene(EnPametfrog* this, PlayState* play) {
|
|||
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
|
||||
ActorCutscene_Start(this->cutscene, &this->actor);
|
||||
this->subCamId = ActorCutscene_GetCurrentSubCamId(this->cutscene);
|
||||
func_800B724C(play, &this->actor, 7);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_7);
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
if (this->actor.params == GEKKO_PRE_SNAPPER) {
|
||||
EnPametfrog_SetupCallSnapper(this, play);
|
||||
|
|
|
@ -1133,7 +1133,7 @@ void func_80AF8C68(EnPm* this, PlayState* play) {
|
|||
s32 talkState = Message_GetState(&play->msgCtx);
|
||||
u16 textId = play->msgCtx.currentTextId;
|
||||
|
||||
if ((player->targetActor == &this->actor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
if ((player->talkActor == &this->actor) && ((textId < 0xFF) || (textId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if ((play->state.frames % 3) == 0) {
|
||||
if (this->unk_360 == 120.0f) {
|
||||
|
|
|
@ -345,7 +345,7 @@ void func_80A32B20(EnPr* this, PlayState* play) {
|
|||
|
||||
this->actor.speedXZ = BREG(57) + 3.0f;
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51));
|
||||
this->unk_2B8 = D_80A338C0[(void)0, gSaveContext.save.playerForm] + player->actor.world.pos.y;
|
||||
this->unk_2B8 = D_80A338C0[GET_PLAYER_FORM] + player->actor.world.pos.y;
|
||||
func_80A324E0(this, play);
|
||||
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) {
|
||||
|
@ -382,7 +382,7 @@ void func_80A32D28(EnPr* this, PlayState* play) {
|
|||
} else {
|
||||
Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51));
|
||||
func_80A325E4(this);
|
||||
this->unk_2B8 = D_80A338C0[(void)0, gSaveContext.save.playerForm] + player->actor.world.pos.y;
|
||||
this->unk_2B8 = D_80A338C0[GET_PLAYER_FORM] + player->actor.world.pos.y;
|
||||
func_80A324E0(this, play);
|
||||
if (this->unk_2C8 < sqrtf(SQ(player->actor.world.pos.x - this->actor.home.pos.x) +
|
||||
SQ(player->actor.world.pos.z - this->actor.home.pos.z))) {
|
||||
|
|
|
@ -353,7 +353,7 @@ void func_80A767A8(EnPrz* this, PlayState* play) {
|
|||
this->unk_1C8 = 1;
|
||||
}
|
||||
|
||||
this->unk_1D8.y = (player->actor.world.pos.y + D_80A771E0[((void)0, gSaveContext.save.playerForm)]) +
|
||||
this->unk_1D8.y = (player->actor.world.pos.y + D_80A771E0[GET_PLAYER_FORM]) +
|
||||
randPlusMinusPoint5Scaled((2.0f * this->unk_1E6) + 1.0f);
|
||||
func_80A76070(this, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_1D8), play);
|
||||
}
|
||||
|
|
|
@ -430,7 +430,7 @@ void EnRaf_Chew(EnRaf* this, PlayState* play) {
|
|||
switch (this->grabTarget) {
|
||||
case EN_RAF_GRAB_TARGET_PLAYER:
|
||||
play->damagePlayer(play, -2);
|
||||
func_800B8E58((Player*)this, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
|
||||
func_800B8E58((Player*)this, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S);
|
||||
CollisionCheck_GreenBlood(play, NULL, &player->actor.world.pos);
|
||||
if ((this->chewCount > (BREG(53) + 5)) || !(player->stateFlags2 & PLAYER_STATE2_80)) {
|
||||
player->actor.freezeTimer = 10;
|
||||
|
|
|
@ -450,7 +450,7 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) {
|
|||
if (this->grabDamageTimer == 20) {
|
||||
s16 requiredScopeTemp;
|
||||
|
||||
damageSfxId = player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S;
|
||||
damageSfxId = player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S;
|
||||
play->damagePlayer(play, -8);
|
||||
func_800B8E58(player, damageSfxId);
|
||||
Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12);
|
||||
|
|
|
@ -881,7 +881,7 @@ void EnRd_Grab(EnRd* this, PlayState* play) {
|
|||
play->damagePlayer(play, -8);
|
||||
Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12);
|
||||
this->grabDamageTimer = 20;
|
||||
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
|
||||
func_800B8E58(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -963,7 +963,7 @@ s32 EnSGoro_UpdateRotationToPlayer(EnSGoro* this, PlayState* play) {
|
|||
this->bodyRotY = CLAMP(this->bodyRotY, -0x1C70, 0x1C70);
|
||||
|
||||
playerPos = player->actor.world.pos;
|
||||
playerPos.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
playerPos.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
thisPos = this->actor.world.pos;
|
||||
thisPos.y += 70.0f;
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ u8 D_80947AEC[] = {
|
|||
2, 2, 2, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 3,
|
||||
};
|
||||
|
||||
s8 D_80947AFC[] = {
|
||||
2, 9, 10, 11, 12, 13, 14, 0, 15, -1, 3, 4, 5, 6, 7, 8, -1, 1, 0, 0,
|
||||
s8 D_80947AFC[PLAYER_BODYPART_MAX] = {
|
||||
2, 9, 10, 11, 12, 13, 14, 0, 15, -1, 3, 4, 5, 6, 7, 8, -1, 1,
|
||||
};
|
||||
|
||||
Vec3f D_80947B10[] = {
|
||||
|
@ -242,7 +242,7 @@ void func_8094702C(EnSda* this, u8* shadowTexture, Player* player, PlayState* pl
|
|||
|
||||
Matrix_RotateXFNew((BREG(50) + 70) / 100.0f);
|
||||
|
||||
for (i = 0; i < 18; i++) {
|
||||
for (i = 0; i < PLAYER_BODYPART_MAX; i++) {
|
||||
if (D_80947AFC[i] >= 0) {
|
||||
D_80947EA0[D_80947AFC[i]] = player->bodyPartsPos[i];
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ void func_80ADBAB8(EnSellnuts* this, PlayState* play) {
|
|||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
this->actionFunc = func_80ADBBEC;
|
||||
func_800B7298(play, NULL, 0x13);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_19);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ void func_80AE6488(EnShn* this, PlayState* play) {
|
|||
this->unk_2D4 += (this->unk_2D0 != 0.0f) ? 40.0f : -40.0f;
|
||||
this->unk_2D4 = CLAMP(this->unk_2D4, 0.0f, 80.0f);
|
||||
Matrix_Translate(this->unk_2D4, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
if ((&this->actor == player->targetActor) &&
|
||||
if ((&this->actor == player->talkActor) &&
|
||||
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId >= 0x201)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if (play->state.frames % 2 == 0) {
|
||||
|
@ -259,7 +259,7 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) {
|
|||
|
||||
case 6:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6);
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
|
|
@ -346,7 +346,7 @@ void EnStoneheishi_DrinkBottleProcess(EnStoneheishi* this, PlayState* play) {
|
|||
if ((this->timer < 10) && (this->bottleDisplay != EN_STONE_BOTTLE_EMPTY)) {
|
||||
this->bottleDisplay = EN_STONE_BOTTLE_EMPTY;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_NP_DRINK);
|
||||
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
}
|
||||
} else {
|
||||
this->drinkBottleState++;
|
||||
|
|
|
@ -531,7 +531,7 @@ void func_80BAB4F0(EnSuttari* this, PlayState* play) {
|
|||
if (!(this->flags1 & 4) && (Player_GetMask(play) != PLAYER_MASK_STONE)) {
|
||||
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer)) {
|
||||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
|
|
|
@ -1005,7 +1005,7 @@ void EnSyatekiMan_Swamp_StartGame(EnSyatekiMan* this, PlayState* play) {
|
|||
player->actor.world.pos = sSwampPlayerPos;
|
||||
player->actor.shape.rot.y = -0x8000;
|
||||
player->actor.world.rot.y = player->actor.shape.rot.y;
|
||||
play->unk_18790(play, -0x8000, &this->actor);
|
||||
play->unk_18790(play, -0x8000);
|
||||
sGameStartTimer--;
|
||||
} else {
|
||||
sGameStartTimer = 30;
|
||||
|
@ -1215,7 +1215,7 @@ void EnSyatekiMan_Town_StartGame(EnSyatekiMan* this, PlayState* play) {
|
|||
player->actor.prevPos = player->actor.world.pos;
|
||||
player->actor.shape.rot.y = -0x8000;
|
||||
player->actor.world.rot.y = player->actor.shape.rot.y;
|
||||
play->unk_18790(play, -0x8000, &this->actor);
|
||||
play->unk_18790(play, -0x8000);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
sGameStartTimer--;
|
||||
} else if (sGameStartTimer > 0) {
|
||||
|
|
|
@ -268,7 +268,7 @@ void func_80BE0A98(EnTab* this, PlayState* play) {
|
|||
|
||||
Matrix_Translate(this->unk_308, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
if ((&this->actor == player->targetActor) &&
|
||||
if ((&this->actor == player->talkActor) &&
|
||||
((play->msgCtx.currentTextId < 0xFF) || (play->msgCtx.currentTextId > 0x200)) && (talkState == TEXT_STATE_3) &&
|
||||
(this->prevTalkState == TEXT_STATE_3)) {
|
||||
if ((play->state.frames % 2) == 0) {
|
||||
|
|
|
@ -407,7 +407,7 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) {
|
|||
if (this->grabDamageTimer == 20) {
|
||||
s16 requiredScopeTemp;
|
||||
|
||||
damageSfxId = player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S;
|
||||
damageSfxId = player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DAMAGE_S;
|
||||
play->damagePlayer(play, -8);
|
||||
func_800B8E58(player, damageSfxId);
|
||||
Rumble_Request(this->actor.xzDistToPlayer, 240, 1, 12);
|
||||
|
@ -822,7 +822,7 @@ void EnTalkGibud_Talk(EnTalkGibud* this, PlayState* play) {
|
|||
if (!requestedItem->isBottledItem) {
|
||||
Inventory_ChangeAmmo(requestedItem->item, -requestedItem->amount);
|
||||
} else {
|
||||
func_80123D50(play, player, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, player, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
}
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
player->stateFlags1 |= PLAYER_STATE1_20000000;
|
||||
|
|
|
@ -428,8 +428,8 @@ void func_80BB7578(EnTanron2* this, PlayState* play) {
|
|||
func_80BB6B80(this);
|
||||
this->unk_158 = 1;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_IKURA_DAMAGE);
|
||||
if ((player->unk_730 != 0) && (&this->actor != player->unk_730)) {
|
||||
player->unk_730 = &this->actor;
|
||||
if ((player->targetedActor != NULL) && (&this->actor != player->targetedActor)) {
|
||||
player->targetedActor = &this->actor;
|
||||
play->actorCtx.targetContext.arrowPointedActor = &this->actor;
|
||||
play->actorCtx.targetContext.targetedActor = &this->actor;
|
||||
}
|
||||
|
|
|
@ -353,7 +353,7 @@ s32 func_80A3EA30(EnTest3* this, PlayState* play) {
|
|||
Actor* hideoutDoor = SubS_FindActor(play, NULL, ACTORCAT_BG, ACTOR_BG_IKNV_OBJ);
|
||||
|
||||
if (hideoutDoor != NULL) {
|
||||
this->player.unk_730 = hideoutDoor;
|
||||
this->player.targetedActor = hideoutDoor;
|
||||
}
|
||||
}
|
||||
if (this->unk_D78->unk_1 != 0) {
|
||||
|
@ -377,7 +377,7 @@ s32 func_80A3EAF8(EnTest3* this, PlayState* play) {
|
|||
ActorCutscene_Stop(this->unk_D8D);
|
||||
this->unk_D8D = 0x7C;
|
||||
ActorCutscene_SetIntentToPlay(this->unk_D8D);
|
||||
this->player.unk_730 = &GET_PLAYER(play)->actor;
|
||||
this->player.targetedActor = &GET_PLAYER(play)->actor;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ s32 func_80A3EB8C(EnTest3* this, PlayState* play) {
|
|||
Actor* hideoutObject = SubS_FindActor(play, NULL, ACTORCAT_ITEMACTION, ACTOR_OBJ_NOZOKI);
|
||||
|
||||
if (hideoutObject != NULL) {
|
||||
this->player.unk_730 = hideoutObject;
|
||||
this->player.targetedActor = hideoutObject;
|
||||
}
|
||||
play->msgCtx.msgMode = 0x44;
|
||||
return 1;
|
||||
|
@ -653,7 +653,7 @@ s32 func_80A3F62C(EnTest3* this, PlayState* play, struct_80A41828* arg2, Schedul
|
|||
s32 func_80A3F73C(EnTest3* this, PlayState* play) {
|
||||
if (Actor_ProcessTalkRequest(&this->player.actor, &play->state)) {
|
||||
func_80A3E7E0(this, func_80A4084C);
|
||||
this->player.unk_730 = &GET_PLAYER(play)->actor;
|
||||
this->player.targetedActor = &GET_PLAYER(play)->actor;
|
||||
this->player.stateFlags2 &= ~PLAYER_STATE2_40000;
|
||||
D_80A41D5C = true;
|
||||
if ((this->unk_D78->unk_0 == 4) && CHECK_WEEKEVENTREG(WEEKEVENTREG_51_08)) {
|
||||
|
@ -1006,7 +1006,7 @@ void func_80A4084C(EnTest3* this, PlayState* play) {
|
|||
} else {
|
||||
func_80A3E7E0(this, func_80A40678);
|
||||
}
|
||||
this->player.unk_730 = NULL;
|
||||
this->player.targetedActor = NULL;
|
||||
}
|
||||
} else if (func_80A3ED24(this, play)) {
|
||||
func_80A3E7E0(this, func_80A40908);
|
||||
|
@ -1016,7 +1016,7 @@ void func_80A4084C(EnTest3* this, PlayState* play) {
|
|||
void func_80A40908(EnTest3* this, PlayState* play) {
|
||||
if (Actor_ProcessTalkRequest(&this->player.actor, &play->state)) {
|
||||
func_80A3E7E0(this, func_80A4084C);
|
||||
this->player.unk_730 = &GET_PLAYER(play)->actor;
|
||||
this->player.targetedActor = &GET_PLAYER(play)->actor;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_51_08);
|
||||
func_80151BB4(play, 0x19);
|
||||
func_80151BB4(play, 2);
|
||||
|
@ -1190,7 +1190,7 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
|||
leftHandActor->world.pos.z = (this->player.bodyPartsPos[15].z + this->player.leftHandWorld.pos.z) / 2.0f;
|
||||
}
|
||||
} else if (limbIndex == OBJECT_TEST3_LIMB_0B) {
|
||||
Actor* actor730 = this->player.unk_730;
|
||||
Actor* actor730 = this->player.targetedActor;
|
||||
|
||||
if ((*dList1 != NULL) && this->player.currentMask && !(this->player.stateFlags2 & PLAYER_STATE2_1000000)) {
|
||||
// this->player.currentMask != PLAYER_MASK_NONE
|
||||
|
@ -1214,7 +1214,7 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
|||
} else if (limbIndex == OBJECT_TEST3_LIMB_15) {
|
||||
if (D_80A41D60 || CHECK_WEEKEVENTREG(WEEKEVENTREG_50_80) ||
|
||||
(INV_CONTENT(ITEM_PENDANT_OF_MEMORIES) == ITEM_PENDANT_OF_MEMORIES) ||
|
||||
(this->player.unk_B2A - 1 == GID_PENDANT_OF_MEMORIES)) {
|
||||
(this->player.getItemDrawId - 1 == GID_PENDANT_OF_MEMORIES)) {
|
||||
D_80A41D60 = true;
|
||||
} else {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
@ -1295,7 +1295,7 @@ void EnTest3_Draw(Actor* thisx, PlayState* play2) {
|
|||
if (this->player.invincibilityTimer > 0) {
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
}
|
||||
if ((this->player.unk_B2A - 1) != GID_NONE) {
|
||||
if ((this->player.getItemDrawId - 1) != GID_NONE) {
|
||||
Player_DrawGetItem(play, &this->player);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
|
|
@ -398,7 +398,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
|
|||
} else {
|
||||
gSaveContext.screenScale = 0.0f;
|
||||
Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE,
|
||||
0xBFF, &player->unk_3C0, player->unk_3CC);
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &player->unk_3C0, player->unk_3CC);
|
||||
func_80169EFC(&play->state);
|
||||
if (player->stateFlags1 & PLAYER_STATE1_800000) {
|
||||
EnHorse* rideActor = (EnHorse*)player->rideActor;
|
||||
|
@ -442,9 +442,9 @@ void func_80A42AB8(EnTest4* this, PlayState* play) {
|
|||
u32 entrance = gSaveContext.save.entrance;
|
||||
|
||||
if ((play->actorCtx.flags & ACTORCTX_FLAG_1)) {
|
||||
playerParams = 0xCFF;
|
||||
playerParams = PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE);
|
||||
} else {
|
||||
playerParams = 0xBFF;
|
||||
playerParams = PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B);
|
||||
}
|
||||
Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entrance, player->unk_3CE, playerParams,
|
||||
&player->unk_3C0, player->unk_3CC);
|
||||
|
|
|
@ -395,7 +395,7 @@ void func_80A916F0(EnTest6* this, PlayState* play) {
|
|||
player->actor.freezeTimer = 0;
|
||||
play->unk_18844 = 0;
|
||||
ActorCutscene_Stop(play->playerActorCsIds[8]);
|
||||
func_800B7298(play, NULL, 6);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_6);
|
||||
func_80A90C34();
|
||||
Distortion_ClearType(DISTORTION_TYPE_5);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -537,22 +537,22 @@ void func_80A91760(EnTest6* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_286 != 0) {
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
} else {
|
||||
if (this->unk_27A == 90) {
|
||||
func_800B7298(play, NULL, 0x42);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_66);
|
||||
}
|
||||
|
||||
if (this->unk_27A == 70) {
|
||||
func_800B7298(play, NULL, 0x52);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_82);
|
||||
}
|
||||
|
||||
if (this->unk_27A == 30) {
|
||||
func_800B7298(play, NULL, 0x51);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_81);
|
||||
}
|
||||
|
||||
if (this->unk_27A == 5) {
|
||||
func_800B7298(play, NULL, 0x4A);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_74);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ void func_80A92118(EnTest6* this, PlayState* play) {
|
|||
player->actor.freezeTimer = 0;
|
||||
play->unk_18844 = 0;
|
||||
ActorCutscene_Stop(play->playerActorCsIds[8]);
|
||||
func_800B7298(play, NULL, 6);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_6);
|
||||
func_80A90C34();
|
||||
Distortion_ClearType(DISTORTION_TYPE_5);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -764,23 +764,23 @@ void func_80A92188(EnTest6* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case 98:
|
||||
func_800B7298(play, NULL, 0x40);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_64);
|
||||
break;
|
||||
|
||||
case 68:
|
||||
func_800B7298(play, NULL, 0x41);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_65);
|
||||
break;
|
||||
|
||||
case 52:
|
||||
func_800B7298(play, NULL, 0x58);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_88);
|
||||
break;
|
||||
|
||||
case 43:
|
||||
func_800B7298(play, NULL, 0x72);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_114);
|
||||
break;
|
||||
|
||||
case 38:
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
|
@ -972,7 +972,7 @@ void func_80A92950(EnTest6* this, PlayState* play) {
|
|||
|
||||
case 9:
|
||||
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF), player->unk_3CE,
|
||||
0xBFF, &player->unk_3C0, player->unk_3CC);
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &player->unk_3C0, player->unk_3CC);
|
||||
this->unk_276 = 99;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
|
||||
|
@ -1053,7 +1053,8 @@ void func_80A92950(EnTest6* this, PlayState* play) {
|
|||
case 9:
|
||||
if (gSaveContext.save.time > CLOCK_TIME(12, 0)) {
|
||||
Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF),
|
||||
player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC);
|
||||
player->unk_3CE, PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &player->unk_3C0,
|
||||
player->unk_3CC);
|
||||
this->unk_276 = 99;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* Description: Takkuri
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_thiefbird.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_200 | ACTOR_FLAG_1000 | ACTOR_FLAG_80000000)
|
||||
|
@ -130,8 +131,9 @@ static DamageTable sDamageTable = {
|
|||
/* Powder Keg */ DMG_ENTRY(1, 0x0),
|
||||
};
|
||||
|
||||
static s16 D_80C13664[] = { ITEM00_ARROWS_10, ITEM00_BOMBS_B, ITEM00_RUPEE_GREEN,
|
||||
ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_PURPLE };
|
||||
static s16 D_80C13664[] = {
|
||||
ITEM00_ARROWS_10, ITEM00_BOMBS_B, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_PURPLE,
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
|
||||
|
@ -140,8 +142,8 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Vec3f D_80C13920;
|
||||
static s32 D_80C1392C;
|
||||
Vec3f D_80C13920;
|
||||
s32 D_80C1392C;
|
||||
|
||||
void EnThiefbird_Init(Actor* thisx, PlayState* play) {
|
||||
EnThiefbird* this = THIS;
|
||||
|
@ -209,7 +211,11 @@ void func_80C10984(EnThiefbird* this, s32 arg1) {
|
|||
}
|
||||
|
||||
s32 func_80C10B0C(EnThiefbird* this, PlayState* play) {
|
||||
static Gfx* D_80C13680[] = { gTakkuriStolenKokiriSwordDL, gTakkuriStolenRazorSwordDL, gTakkuriStolenGildedSwordDL };
|
||||
static Gfx* D_80C13680[] = {
|
||||
gTakkuriStolenKokiriSwordDL,
|
||||
gTakkuriStolenRazorSwordDL,
|
||||
gTakkuriStolenGildedSwordDL,
|
||||
};
|
||||
s32 isItemFound = false;
|
||||
s32 phi_a3 = 0;
|
||||
s32 slotId = SLOT_BOTTLE_1;
|
||||
|
|
|
@ -274,7 +274,7 @@ void func_80ACA724(EnTimeTag* this, PlayState* play) {
|
|||
|
||||
void func_80ACA7C4(EnTimeTag* this, PlayState* play) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_63_01) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_63_02)) {
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Message_StartTextbox(play, ENTIMETAG_GET_1FE0(&this->actor) + 0x1883, NULL);
|
||||
this->actionFunc = func_80ACA724;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ void func_80ACA840(EnTimeTag* this, PlayState* play) {
|
|||
}
|
||||
} else if ((temp_ft4 == this->actor.home.rot.x) && (temp_hi == this->actor.home.rot.y) &&
|
||||
!Play_InCsMode(play)) {
|
||||
func_800B7298(play, &this->actor, 7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Message_StartTextbox(play, ENTIMETAG_GET_1FE0(&this->actor) + 0x1883, NULL);
|
||||
this->actionFunc = func_80ACA724;
|
||||
}
|
||||
|
|
|
@ -657,7 +657,7 @@ void func_80AED940(EnTk* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Math_Vec3f_Copy(&sp44, &player->actor.world.pos);
|
||||
sp44.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp44.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
temp_v0 = Math_Vec3f_Pitch(&this->actor.focus.pos, &sp44);
|
||||
if (ABS(temp_v0) < 0x800) {
|
||||
Math_SmoothStepToS(&this->unk_31A, temp_v0, 3, 0x16C, 0);
|
||||
|
|
|
@ -83,9 +83,9 @@ void EnTorch2_Destroy(Actor* thisx, PlayState* play) {
|
|||
EnTorch2* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
Play_SetRespawnData(&play->state, this->actor.params + RESPAWN_MODE_GORON - 1, 0xFF, 0, 0xBFF,
|
||||
&this->actor.world.pos, this->actor.shape.rot.y);
|
||||
play->actorCtx.unk254[this->actor.params] = 0;
|
||||
Play_SetRespawnData(&play->state, this->actor.params + RESPAWN_MODE_GORON - 1, 0xFF, 0,
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_B), &this->actor.world.pos, this->actor.shape.rot.y);
|
||||
play->actorCtx.elegyShells[this->actor.params] = NULL;
|
||||
}
|
||||
|
||||
void EnTorch2_Update(Actor* thisx, PlayState* play) {
|
||||
|
|
|
@ -357,7 +357,7 @@ s32 func_80BA3ED4(EnToto* this, PlayState* play) {
|
|||
|
||||
s32 func_80BA3EE8(EnToto* this, PlayState* play) {
|
||||
if (this->text->unk1 == 2) {
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ s32 func_80BA42BC(EnToto* this, PlayState* play) {
|
|||
Vec3s* end = &D_80BA510C[3];
|
||||
|
||||
func_80BA3FB0(this, play);
|
||||
func_800B7298(play, NULL, 6);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_6);
|
||||
if (player->actor.world.pos.z > -310.0f) {
|
||||
if ((player->actor.world.pos.x > -150.0f) || (player->actor.world.pos.z > -172.0f)) {
|
||||
phi_s0 = 3;
|
||||
|
@ -472,7 +472,7 @@ s32 func_80BA42BC(EnToto* this, PlayState* play) {
|
|||
s32 func_80BA43F4(EnToto* this, PlayState* play) {
|
||||
func_80BA3C88(this);
|
||||
if (func_80122760(play, &this->unk_2BC, 60.0f)) {
|
||||
func_800B7298(play, NULL, 0x13);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_19);
|
||||
return func_80BA4204(this, play);
|
||||
}
|
||||
return 0;
|
||||
|
@ -480,7 +480,7 @@ s32 func_80BA43F4(EnToto* this, PlayState* play) {
|
|||
|
||||
s32 func_80BA445C(EnToto* this, PlayState* play) {
|
||||
if (func_80BA4128(this, play)) {
|
||||
func_800B7298(play, NULL, 6);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_6);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -524,13 +524,12 @@ s32 func_80BA4530(EnToto* this, PlayState* play) {
|
|||
return func_80BA407C(this, play);
|
||||
}
|
||||
if (!ENTOTO_WEEK_EVENT_FLAGS) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80BA50DC); i++) {
|
||||
if (func_80BA44D4(&D_80BA50DC[i], player)) {
|
||||
if (this->unk2B1 < 10) {
|
||||
this->unk2B1++;
|
||||
if (this->unk2B1 >= 10) {
|
||||
Message_StartTextbox(play, D_80BA50DC[((void)0, gSaveContext.save.playerForm) - 1].unk2,
|
||||
NULL);
|
||||
Message_StartTextbox(play, D_80BA50DC[GET_PLAYER_FORM - 1].unk2, NULL);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -543,7 +542,7 @@ s32 func_80BA4530(EnToto* this, PlayState* play) {
|
|||
}
|
||||
|
||||
s32 func_80BA46D8(EnToto* this, PlayState* play) {
|
||||
func_800B7298(play, NULL, 0x44);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_68);
|
||||
func_80152434(play, D_80BA5120[CUR_FORM]);
|
||||
return 0;
|
||||
}
|
||||
|
@ -584,10 +583,11 @@ s32 func_80BA47E0(EnToto* this, PlayState* play) {
|
|||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_56_80)) {
|
||||
this->unk2B3 += 8;
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80BA50DC); i++) {
|
||||
if (gSaveContext.save.playerForm != (i + 1) && (D_80BA5128[i] & this->unk2B3)) {
|
||||
Math_Vec3s_ToVec3f(&spawnPos, &D_80BA50DC[i].unk6);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_PLAYER, spawnPos.x, spawnPos.y, spawnPos.z, i + 2, 0, 0, -1);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_PLAYER, spawnPos.x, spawnPos.y, spawnPos.z, i + 2, 0, 0,
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_F) | 0xFFFFF000);
|
||||
}
|
||||
}
|
||||
func_80BA402C(this, play);
|
||||
|
@ -598,7 +598,7 @@ s32 func_80BA47E0(EnToto* this, PlayState* play) {
|
|||
}
|
||||
|
||||
s32 func_80BA49A4(EnToto* this, PlayState* play) {
|
||||
func_800B7298(play, NULL, 0x44);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_68);
|
||||
func_801A31EC(NA_BGM_BALLAD_OF_THE_WIND_FISH, 4, this->unk2B3 ^ 0xF);
|
||||
this->unk2B1 = 4;
|
||||
return 0;
|
||||
|
@ -618,7 +618,7 @@ s32 func_80BA4A00(EnToto* this, PlayState* play) {
|
|||
if (this->spotlights != NULL) {
|
||||
Actor_Kill(this->spotlights);
|
||||
}
|
||||
func_800B7298(play, NULL, 0x45);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_69);
|
||||
if (this->unk2B3 == 0xF) {
|
||||
if (CURRENT_DAY == 1) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_50_01);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue