mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-13 04:35:16 -04:00
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:
@@ -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 */
|
||||
|
||||
+43
-38
@@ -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
-1
@@ -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];
|
||||
|
||||
+39
-44
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
+5
-4
@@ -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;
|
||||
|
||||
+11
-11
@@ -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);
|
||||
|
||||
@@ -349,7 +349,7 @@ void EnTrt_GetMushroom(EnTrt* this, PlayState* play) {
|
||||
this->textId = 0x884;
|
||||
Message_StartTextbox(play, this->textId, &this->actor);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_53_08);
|
||||
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
break;
|
||||
case 0x888:
|
||||
this->textId = 0x889;
|
||||
@@ -375,7 +375,7 @@ void EnTrt_GetMushroom(EnTrt* this, PlayState* play) {
|
||||
void EnTrt_PayForMushroom(EnTrt* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actor.parent = NULL;
|
||||
func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
this->actionFunc = EnTrt_SetupItemGiven;
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, play, GI_RUPEE_RED, 300.0f, 300.0f);
|
||||
@@ -1711,7 +1711,7 @@ void EnTrt_TrackPlayer(EnTrt* this, PlayState* play) {
|
||||
this->headYaw = CLAMP(this->headYaw, -0x38E0, 0x38E0);
|
||||
|
||||
playerPos = player->actor.world.pos;
|
||||
playerPos.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
playerPos.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
pos = this->actor.world.pos;
|
||||
Math_SmoothStepToS(&this->headPitch, Math_Vec3f_Pitch(&pos, &playerPos), 4, 0x1C70, 1);
|
||||
this->headPitch = CLAMP(this->headPitch, -0x1C70, 0x1C70);
|
||||
|
||||
@@ -850,9 +850,9 @@ void func_80AD5234(EnTrt2* this, PlayState* play) {
|
||||
sp40 = player->actor.world.pos;
|
||||
|
||||
if (this->unk_3B2 == 8) {
|
||||
sp40.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
} else {
|
||||
sp40.y = player->bodyPartsPos[7].y + 45.0f;
|
||||
sp40.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 45.0f;
|
||||
}
|
||||
|
||||
sp34 = this->actor.world.pos;
|
||||
|
||||
@@ -465,7 +465,7 @@ s32 func_80A869DC(EnTru* this, PlayState* play) {
|
||||
Math_ApproachS(&this->unk_368, this->actor.yawTowardsPlayer - this->actor.shape.rot.y, 4, 0x2AA8);
|
||||
this->unk_368 = CLAMP(this->unk_368, -0x1FFE, 0x1FFE);
|
||||
Math_Vec3f_Copy(&sp38, &player->actor.world.pos);
|
||||
sp38.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
sp38.y = player->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
|
||||
Math_Vec3f_Copy(&sp2C, &this->actor.focus.pos);
|
||||
sp2C.y -= 30.0f;
|
||||
Math_ApproachS(&this->unk_366, Math_Vec3f_Pitch(&sp2C, &sp38), 4, 0x2AA8);
|
||||
@@ -899,7 +899,7 @@ s32 func_80A87880(Actor* thisx, PlayState* play) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 12.0f) && !(this->unk_34E & 0x800)) {
|
||||
this->unk_34E |= 0x400;
|
||||
this->unk_34E |= 0x800;
|
||||
Player_SetModels(player, 3);
|
||||
Player_SetModels(player, PLAYER_MODELGROUP_DEFAULT);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -912,7 +912,7 @@ s32 func_80A87880(Actor* thisx, PlayState* play) {
|
||||
Animation_OnFrame(&this->skelAnime, 52.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 52.0f)) {
|
||||
this->unk_34E &= ~0x400;
|
||||
func_80123D50(play, player, 18, 21);
|
||||
Player_UpdateBottleHeld(play, player, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
}
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KOUME_DRINK);
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 90.0f)) {
|
||||
|
||||
@@ -318,7 +318,7 @@ void func_80B7679C(EnTruMt* this, PlayState* play) {
|
||||
this->unk_34A = CLAMP(this->unk_34A, -0x38E0, 0x38E0);
|
||||
|
||||
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 += 30.0f;
|
||||
|
||||
@@ -459,14 +459,14 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->yTarget = this->actor.playerHeightRel;
|
||||
func_800B724C(play, &this->actor, 18);
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_18);
|
||||
}
|
||||
|
||||
void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, 1.0f)) {
|
||||
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);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FALL_CATCH);
|
||||
}
|
||||
|
||||
@@ -480,9 +480,9 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
|
||||
this->actor.world.pos.y += 10.0f;
|
||||
}
|
||||
|
||||
player->actor.world.pos.y = this->actor.world.pos.y - sYOffsetPerForm[((void)0, gSaveContext.save.playerForm)];
|
||||
player->actor.world.pos.y = this->actor.world.pos.y - sYOffsetPerForm[GET_PLAYER_FORM];
|
||||
if (this->timer == -30) {
|
||||
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_TAKEN_AWAY);
|
||||
func_800B8E58(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_TAKEN_AWAY);
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
@@ -491,8 +491,7 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
|
||||
|
||||
this->timer += 2;
|
||||
} else {
|
||||
Math_StepToF(&this->actor.world.pos.y,
|
||||
sYOffsetPerForm[((void)0, gSaveContext.save.playerForm)] + player->actor.world.pos.y, 5.0f);
|
||||
Math_StepToF(&this->actor.world.pos.y, sYOffsetPerForm[GET_PLAYER_FORM] + player->actor.world.pos.y, 5.0f);
|
||||
}
|
||||
|
||||
Math_StepToF(&this->actor.world.pos.x, player->actor.world.pos.x, 3.0f);
|
||||
|
||||
@@ -94,10 +94,10 @@ void EnWarpTag_WaitForPlayer(EnWarptag* this, PlayState* play) {
|
||||
if (!Player_InCsMode(play) && (this->dyna.actor.xzDistToPlayer <= 30.0f) &&
|
||||
(this->dyna.actor.playerHeightRel <= 10.0f)) {
|
||||
if (WARPTAG_GET_INVISIBLE(&this->dyna.actor)) {
|
||||
func_800B7298(play, NULL, 0x51);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_81);
|
||||
this->actionFunc = EnWarpTag_GrottoReturn;
|
||||
} else {
|
||||
func_800B7298(play, NULL, 0xF);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_15);
|
||||
this->actionFunc = EnWarpTag_RespawnPlayer;
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ void EnWarpTag_Unused809C09A0(EnWarptag* this, PlayState* play) {
|
||||
*/
|
||||
void EnWarpTag_Unused809C0A20(EnWarptag* this, PlayState* play) {
|
||||
if (play->msgCtx.ocarinaMode == 9) {
|
||||
func_800B7298(play, NULL, 7);
|
||||
func_800B7298(play, NULL, PLAYER_CSMODE_7);
|
||||
this->actionFunc = EnWarpTag_RespawnPlayer;
|
||||
ActorCutscene_Stop(ActorCutscene_GetCurrentIndex());
|
||||
|
||||
@@ -201,9 +201,9 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) {
|
||||
newRespawnPos.z = playerActorEntry->pos.z;
|
||||
|
||||
if (WARPTAG_GET_3C0_MAX(&this->dyna.actor) == WARPTAG_3C0_MAX) {
|
||||
playerParams = 0x9FF;
|
||||
playerParams = PLAYER_PARAMS(0xFF, PLAYER_INITMODE_9);
|
||||
} else { // not used by any known variant
|
||||
playerParams = 0x8FF;
|
||||
playerParams = PLAYER_PARAMS(0xFF, PLAYER_INITMODE_8);
|
||||
}
|
||||
|
||||
// why are we getting player home rotation from the room data? doesnt player have home.rot.y?
|
||||
|
||||
@@ -482,7 +482,7 @@ void func_80A59C04(Actor* thisx, PlayState* play2) {
|
||||
player->flameTimers[j] = Rand_S16Offset(0, 200);
|
||||
}
|
||||
player->isBurning = true;
|
||||
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_DEMO_DAMAGE);
|
||||
func_800B8E58(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_DEMO_DAMAGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ void EnZo_LookAtPlayer(EnZo* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
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->upperBodyRot, &sTrackOptions);
|
||||
|
||||
@@ -876,7 +876,7 @@ void func_80B94E34(EnZog* this, PlayState* play) {
|
||||
|
||||
if ((player->actor.speedXZ > 3.0f) && (this->unk_324 == 0)) {
|
||||
this->unk_324 = 25;
|
||||
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_PUSH);
|
||||
func_800B8E58(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_PUSH);
|
||||
}
|
||||
}
|
||||
this->actor.speedXZ *= 0.3f;
|
||||
|
||||
@@ -591,7 +591,7 @@ void func_809381C4(ObjBean* this, 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, 1);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_1);
|
||||
}
|
||||
this->unk_1E4 = 2;
|
||||
func_80938284(this);
|
||||
@@ -748,7 +748,7 @@ void func_80938780(ObjBean* this, 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, 1);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_1);
|
||||
}
|
||||
this->unk_1B4 = 36;
|
||||
func_80937130(this);
|
||||
|
||||
@@ -124,7 +124,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) {
|
||||
sp3C = this->unk_15D * (OBJBOAT_GET_4000(thisx) ? 5.0f : 3.0f);
|
||||
}
|
||||
}
|
||||
if (player->csMode != 0x1A) {
|
||||
if (player->csMode != PLAYER_CSMODE_26) {
|
||||
Math_ScaledStepToS(&this->dyna.actor.shape.rot.y, sp3A, (s16)(s32)(fabsf(this->dyna.actor.speedXZ) * 40.0f));
|
||||
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y;
|
||||
Math_StepToF(&this->dyna.actor.speedXZ, sp3C, 0.05f);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user