mirror of https://github.com/zeldaret/mm.git
Code_800E8EA0 Docs (#832)
* Start * Add notes from OOT * D_801D0D50 -> gDbgCamEnabled * Rotation Functions * Text function * RotateBack -> RotateForward * Flags functions * Document rotation func returns * Remove comment from play * Rename play function, add notes about Flags, add notes about focus * Update notes a little * Update src/code/code_800E8EA0.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Fix apostrophes * Bring over OoT changes * TurnTo -> Track in SubS systesm * format and remove OoT specific comment * Remove old comments * namefixer Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
parent
6d371502e1
commit
37d3934e2c
|
|
@ -216,7 +216,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
|
|||
Vec3s sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
func_80C100DC(this);
|
||||
}
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ That's probably as much as we can do on functions for now. Next let's think abou
|
|||
- data/bss
|
||||
- intrafunction/stack variables
|
||||
|
||||
and this is roughly the order of preference for naming them (although not necessarily the logical order to determine what they do). This actor is quite limited in the last category: only `sp30` is unnamed at the moment. Even though `func_800E9250` is decomped, the purpose of the argument in which `sp30` is placed is not clear (and, indeed, is not named), so it's probably best to leave it unnamed for now. (With greater experience, you might analyse `func_800E9250` to work out what this argument is for, but let's not worry about that for now.)
|
||||
and this is roughly the order of preference for naming them (although not necessarily the logical order to determine what they do). This actor is quite limited in the last category: only `sp30` is unnamed at the moment. Even though `Actor_TrackPlayer` is decomped, the purpose of the argument in which `sp30` is placed is not clear (and, indeed, is not named), so it's probably best to leave it unnamed for now. (With greater experience, you might analyse `Actor_TrackPlayer` to work out what this argument is for, but let's not worry about that for now.)
|
||||
|
||||
As for the struct, there are two unnamed variables at the moment:
|
||||
```C
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
|
|||
? sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, (Actor *) this, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
|
||||
Actor_TrackPlayer(globalCtx, (Actor *) this, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
|
||||
func_80C100DC(this);
|
||||
}
|
||||
```
|
||||
|
|
@ -440,13 +440,13 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
|
|||
? sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
|
||||
func_80C100DC(this);
|
||||
}
|
||||
```
|
||||
Now, our problem is `func_800E9250`. The arguments all look terrible! Indeed, if we look at the actual function in `src/code/code_800E8EA0.c` (found by searching), we find that it should be
|
||||
Now, our problem is `Actor_TrackPlayer`. The arguments all look terrible! Indeed, if we look at the actual function in `src/code/code_800E8EA0.c` (found by searching), we find that it should be
|
||||
```C
|
||||
s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5)
|
||||
s32 Actor_TrackPlayer(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos)
|
||||
```
|
||||
So mips2c has made a bit of a mess here:
|
||||
- the third argument should be a `Vec3s`. Hence `this + 0x2AE` is a `Vec3s*`, and so `this->unk_2AE` is a `Vec3s`
|
||||
|
|
@ -460,7 +460,7 @@ void EnRecepgirl_Update(EnRecepgirl *this, GlobalContext *globalCtx) {
|
|||
Vec3s sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
func_80C100DC(this);
|
||||
}
|
||||
```
|
||||
|
|
@ -490,7 +490,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
|
|||
Vec3s sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
|
||||
func_80C100DC(this);
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1353,15 +1353,15 @@ void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec
|
|||
void CollisionCheck_SpawnShieldParticlesMetal2(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* v, Vec3f* pos);
|
||||
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos, Vec3f* itemProjPos, Vec3f* out1, Vec3f* out2);
|
||||
void func_800E8EA0(GlobalContext* globalCtx, Actor* actor, u16 textId);
|
||||
s32 nop_800E8ED0(UNK_TYPE4 param_1);
|
||||
void nop_800E8EE0(UNK_TYPE4 param_1);
|
||||
s32 nop_800E8EEC(UNK_TYPE4 param_1);
|
||||
void nop_800E8EFC(UNK_TYPE4 param_1);
|
||||
s32 func_800E8F08(Vec3s* param_1, Vec3s* param_2);
|
||||
s32 func_800E8FA4(Actor* actor, Vec3f* param_2, Vec3s* param_3, Vec3s* param_4);
|
||||
s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, f32 param_5);
|
||||
s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5);
|
||||
void Actor_ContinueText(GlobalContext* globalCtx, Actor* actor, u16 textId);
|
||||
s32 Flags_GetEventChkInf(s32 flag);
|
||||
void Flags_SetEventChkInf(s32 flag);
|
||||
s32 Flags_GetInfTable(s32 flag);
|
||||
void Flags_SetInfTable(s32 flag);
|
||||
s32 Actor_TrackNone(Vec3s* headRot, Vec3s* torsoRot);
|
||||
s32 Actor_TrackPoint(Actor* actor, Vec3f* target, Vec3s* headRot, Vec3s* torsoRot);
|
||||
s32 Actor_TrackPlayerSetFocusHeight(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, f32 focusPosYAdj);
|
||||
s32 Actor_TrackPlayer(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
|
||||
void SaveContext_Init(void);
|
||||
void GameInfo_Init(void);
|
||||
// void DebugDisplay_Init(void);
|
||||
|
|
@ -2392,8 +2392,8 @@ void func_8013A46C(s32 flag);
|
|||
u32 func_8013A4C4(s32 flag);
|
||||
s16 func_8013A504(s16 val);
|
||||
s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError);
|
||||
|
||||
// void func_8013EC10(void);
|
||||
|
||||
void func_8013EC44(f32 a, u8 b, u8 c, u8 d);
|
||||
void func_8013ECE0(f32 xyzDistToPlayerSq, u8 arg1, u8 arg2, u8 arg3);
|
||||
void func_8013ED9C(void);
|
||||
|
|
@ -2678,7 +2678,7 @@ s32 func_80169FFC(GameState* gameState);
|
|||
s32 FrameAdvance_IsEnabled(GameState* gameState);
|
||||
s32 func_8016A02C(GameState* gameState, Actor* actor, s16* yaw);
|
||||
s32 Play_IsUnderwater(GlobalContext* globalCtx, Vec3f* pos);
|
||||
s32 func_8016A168(void);
|
||||
s32 Play_IsDebugCamEnabled(void);
|
||||
void Play_AssignPlayerActorCsIdsFromScene(GameState* gameState, s32 cutscene);
|
||||
void func_8016A268(GameState* gameState, s16 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5);
|
||||
void Play_Init(GameState* gameState);
|
||||
|
|
|
|||
|
|
@ -1503,7 +1503,7 @@ extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
|||
extern const TransitionInit TransitionFade_InitVars;
|
||||
// extern UNK_TYPE1 D_801D0D00;
|
||||
extern const TransitionInit TransitionCircle_InitVars;
|
||||
extern UNK_TYPE4 D_801D0D50;
|
||||
extern s32 gDbgCamEnabled;
|
||||
// extern UNK_TYPE1 D_801D0D54;
|
||||
// extern UNK_TYPE2 D_801D0D58;
|
||||
// extern UNK_TYPE2 D_801D0D5C;
|
||||
|
|
|
|||
|
|
@ -25,19 +25,19 @@ typedef s32 (*VerifyActor)(struct GlobalContext*, Actor*, Actor*, void*);
|
|||
#define SUBS_SHADOW_TEX_HEIGHT 64
|
||||
#define SUBS_SHADOW_TEX_SIZE ((s32)sizeof(u8[SUBS_SHADOW_TEX_HEIGHT][SUBS_SHADOW_TEX_WIDTH]))
|
||||
|
||||
typedef struct TurnOptions {
|
||||
typedef struct TrackOptions {
|
||||
/* 0x0 */ u16 rotMax; // binary angles
|
||||
/* 0x2 */ u16 slowness; // larger for slower rotation, cannot be 0
|
||||
/* 0x4 */ u16 rotStepMin; // degrees
|
||||
/* 0x6 */ u16 rotStepMax; // degrees
|
||||
} TurnOptions; // size = 0x8
|
||||
} TrackOptions; // size = 0x8
|
||||
|
||||
typedef struct TurnOptionsSet {
|
||||
/* 0x00 */ TurnOptions headRotX;
|
||||
/* 0x08 */ TurnOptions headRotY;
|
||||
/* 0x10 */ TurnOptions torsoRotX;
|
||||
/* 0x18 */ TurnOptions torsoRotY;
|
||||
} TurnOptionsSet; // size = 0x20
|
||||
typedef struct TrackOptionsSet {
|
||||
/* 0x00 */ TrackOptions headRotX;
|
||||
/* 0x08 */ TrackOptions headRotY;
|
||||
/* 0x10 */ TrackOptions torsoRotX;
|
||||
/* 0x18 */ TrackOptions torsoRotY;
|
||||
} TrackOptionsSet; // size = 0x20
|
||||
|
||||
#define ACTOR_PATHING_RETURN_TO_START (1 << 0)
|
||||
#define ACTOR_PATHING_SWITCH_DIRECTION (1 << 1)
|
||||
|
|
@ -121,8 +121,8 @@ void SubS_FillShadowTex(s32 startCol, s32 startRow, u8* tex, s32 size);
|
|||
void SubS_GenShadowTex(Vec3f bodyPartsPos[], Vec3f* worldPos, u8* tex, f32 tween, u8 bodyPartsNum, u8 sizes[], s8 parentBodyParts[]);
|
||||
void SubS_DrawShadowTex(Actor* actor, struct GameState* gameState, u8* tex);
|
||||
|
||||
s16 SubS_ComputeTurnToPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax);
|
||||
s32 SubS_TurnToPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* turnTarget, Vec3s* headRot, Vec3s* torsoRot, TurnOptionsSet* options);
|
||||
s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax);
|
||||
s32 SubS_TrackPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* turnTarget, Vec3s* headRot, Vec3s* torsoRot, TrackOptionsSet* options);
|
||||
|
||||
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB);
|
||||
|
||||
|
|
@ -165,6 +165,6 @@ s32 func_8013E748(Actor* actor, struct GlobalContext* globalCtx, f32 xzRange, f3
|
|||
s32 SubS_ActorAndPlayerFaceEachOther(struct GlobalContext* globalCtx, Actor* actor, void* data);
|
||||
s32 func_8013E8F8(Actor* actor, struct GlobalContext* globalCtx, f32 xzRange, f32 yRange, s32 exhangeItemId, s16 playerYawTol, s16 actorYawTol);
|
||||
|
||||
s32 SubS_TurnToPointStep(Vec3f* worldPos, Vec3f* focusPos, s16 shapeYRot, Vec3f* yawTarget, Vec3f* pitchTarget, s16* headZRotStep, s16* headXRotStep, s16* torsoZRotStep, s16* torsoXRotStep, u16 headZRotStepMax, u16 headXRotStepMax, u16 torsoZRotStepMax, u16 torsoXRotStepMax);
|
||||
s32 SubS_TrackPointStep(Vec3f* worldPos, Vec3f* focusPos, s16 shapeYRot, Vec3f* yawTarget, Vec3f* pitchTarget, s16* headZRotStep, s16* headXRotStep, s16* torsoZRotStep, s16* torsoXRotStep, u16 headZRotStepMax, u16 headXRotStepMax, u16 torsoZRotStepMax, u16 torsoXRotStepMax);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ typedef struct EnHy {
|
|||
/* 0x205 */ u8 isRightFootOnGround;
|
||||
/* 0x206 */ Vec3s jointTable[ENHY_LIMB_MAX];
|
||||
/* 0x266 */ Vec3s morphTable[ENHY_LIMB_MAX];
|
||||
/* 0x2C6 */ Vec3s turnTarget;
|
||||
/* 0x2C6 */ Vec3s trackTarget;
|
||||
/* 0x2CC */ Vec3s headRot;
|
||||
/* 0x2D2 */ Vec3s torsoRot;
|
||||
/* 0x2D8 */ Vec3s tmpTurnTarget;
|
||||
/* 0x2D8 */ Vec3s tmptrackTarget;
|
||||
/* 0x2DE */ Vec3s tmpHeadRot;
|
||||
/* 0x2E4 */ Vec3s tmpTorsoRot;
|
||||
/* 0x2EA */ s16 limbRotTableY[16];
|
||||
|
|
|
|||
|
|
@ -1,107 +1,148 @@
|
|||
#include "global.h"
|
||||
|
||||
void func_800E8EA0(GlobalContext* globalCtx, Actor* actor, u16 textId) {
|
||||
void Actor_ContinueText(GlobalContext* globalCtx, Actor* actor, u16 textId) {
|
||||
func_80151938(globalCtx, textId);
|
||||
actor->textId = textId;
|
||||
}
|
||||
|
||||
s32 nop_800E8ED0(UNK_TYPE4 param_1) {
|
||||
return 0;
|
||||
/**
|
||||
* EventCheckInf does not exist, so this always returns false
|
||||
*/
|
||||
s32 Flags_GetEventChkInf(s32 flag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void nop_800E8EE0(UNK_TYPE4 param_1) {
|
||||
/**
|
||||
* EventCheckInf does not exist, so this does nothing
|
||||
*/
|
||||
void Flags_SetEventChkInf(s32 flag) {
|
||||
}
|
||||
|
||||
s32 nop_800E8EEC(UNK_TYPE4 param_1) {
|
||||
return 0;
|
||||
/**
|
||||
* InfTable does not exist, so this always returns false
|
||||
*/
|
||||
s32 Flags_GetInfTable(s32 flag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void nop_800E8EFC(UNK_TYPE4 param_1) {
|
||||
/**
|
||||
* InfTable does not exist, so this does nothing
|
||||
*/
|
||||
void Flags_SetInfTable(s32 flag) {
|
||||
}
|
||||
|
||||
s32 func_800E8F08(Vec3s* param_1, Vec3s* param_2) {
|
||||
Math_SmoothStepToS(¶m_1->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(¶m_1->x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(¶m_2->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(¶m_2->x, 0, 6, 6200, 100);
|
||||
return 1;
|
||||
s32 Actor_TrackNone(Vec3s* headRot, Vec3s* torsoRot) {
|
||||
Math_SmoothStepToS(&headRot->y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&headRot->x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&torsoRot->y, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&torsoRot->x, 0, 6, 0x1838, 0x64);
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_800E8FA4(Actor* actor, Vec3f* param_2, Vec3s* param_3, Vec3s* param_4) {
|
||||
s32 Actor_TrackPoint(Actor* actor, Vec3f* target, Vec3s* headRot, Vec3s* torsoRot) {
|
||||
s16 targetPitch;
|
||||
s16 targetYaw;
|
||||
s16 yawDiffFromTarget;
|
||||
s16 yawDiff;
|
||||
|
||||
targetPitch = Math_Vec3f_Pitch(&actor->focus.pos, param_2);
|
||||
targetYaw = Math_Vec3f_Yaw(&actor->focus.pos, param_2) - actor->world.rot.y;
|
||||
targetPitch = Math_Vec3f_Pitch(&actor->focus.pos, target);
|
||||
targetYaw = Math_Vec3f_Yaw(&actor->focus.pos, target) - actor->world.rot.y;
|
||||
|
||||
Math_SmoothStepToS(¶m_3->x, targetPitch, 6, 2000, 1);
|
||||
param_3->x = CLAMP(param_3->x, -6000, 6000);
|
||||
Math_SmoothStepToS(&headRot->x, targetPitch, 6, 0x7D0, 1);
|
||||
headRot->x = CLAMP(headRot->x, -0x1770, 0x1770);
|
||||
|
||||
yawDiffFromTarget = Math_SmoothStepToS(¶m_3->y, targetYaw, 6, 2000, 1);
|
||||
param_3->y = CLAMP(param_3->y, -8000, 8000);
|
||||
yawDiff = Math_SmoothStepToS(&headRot->y, targetYaw, 6, 0x7D0, 1);
|
||||
headRot->y = CLAMP(headRot->y, -0x1F40, 0x1F40);
|
||||
|
||||
if (yawDiffFromTarget != 0) {
|
||||
if (ABS_ALT(param_3->y) < 8000) {
|
||||
return 0;
|
||||
}
|
||||
if ((yawDiff != 0) && (ABS_ALT(headRot->y) < 0x1F40)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(¶m_4->y, targetYaw - param_3->y, 4, 2000, 1);
|
||||
param_4->y = CLAMP(param_4->y, -12000, 12000);
|
||||
Math_SmoothStepToS(&torsoRot->y, targetYaw - headRot->y, 4, 0x7D0, 1);
|
||||
torsoRot->y = CLAMP(torsoRot->y, -0x2EE0, 0x2EE0);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, f32 param_5) {
|
||||
/**
|
||||
* Same as Actor_TrackPlayer, except use the actor's world position as the focus point, with the height
|
||||
* specified.
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param headRot the computed actor's head's rotation step
|
||||
* @param torsoRot the computed actor's torso's rotation step
|
||||
* @param focusHeight the height of the focus point relative to their world position
|
||||
*
|
||||
* @return true if rotated towards player, false if rotations were stepped back to zero.
|
||||
*
|
||||
* @note same note as Actor_TrackPlayer
|
||||
*/
|
||||
s32 Actor_TrackPlayerSetFocusHeight(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot,
|
||||
f32 focusHeight) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
s16 yaw;
|
||||
Vec3f target;
|
||||
|
||||
actor->focus.pos = actor->world.pos;
|
||||
actor->focus.pos.y += param_5;
|
||||
actor->focus.pos.y += focusHeight;
|
||||
|
||||
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
|
||||
sVar3 = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (sVar3 >= 0x4300) {
|
||||
func_800E8F08(param_3, param_4);
|
||||
return 0;
|
||||
if (!((globalCtx->csCtx.state != 0) || gDbgCamEnabled)) {
|
||||
yaw = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (yaw >= 0x4300) {
|
||||
Actor_TrackNone(headRot, torsoRot);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) {
|
||||
local_14 = globalCtx->view.eye;
|
||||
if ((globalCtx->csCtx.state != 0) || gDbgCamEnabled) {
|
||||
target = globalCtx->view.eye;
|
||||
} else {
|
||||
local_14 = player->actor.focus.pos;
|
||||
target = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_800E8FA4(actor, &local_14, param_3, param_4);
|
||||
Actor_TrackPoint(actor, &target, headRot, torsoRot);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5) {
|
||||
/**
|
||||
* Computes the necessary HeadRot and TorsoRot steps to be added to the normal rotation to smoothly turn an actors's
|
||||
* head and torso towards the player if within a certain yaw, else smoothly returns the rotations back to zero.
|
||||
* Also sets the focus position with the specified point.
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param headRot the computed actor's head's rotation step
|
||||
* @param torsoRot the computed actor's torso's rotation step
|
||||
* @param focusPos the point to set as the actor's focus position
|
||||
*
|
||||
* @return true if rotated towards player, false if rotations were stepped back to zero.
|
||||
*
|
||||
* @note if in a cutscene or debug camera is enabled, the computed rotation will instead turn towards the view eye no
|
||||
* matter the yaw.
|
||||
*/
|
||||
s32 Actor_TrackPlayer(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
s16 yaw;
|
||||
Vec3f target;
|
||||
|
||||
actor->focus.pos = param_5;
|
||||
actor->focus.pos = focusPos;
|
||||
|
||||
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
|
||||
sVar3 = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (sVar3 >= 0x4300) {
|
||||
func_800E8F08(param_3, param_4);
|
||||
return 0;
|
||||
if (!((globalCtx->csCtx.state != 0) || gDbgCamEnabled)) {
|
||||
yaw = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (yaw >= 0x4300) {
|
||||
Actor_TrackNone(headRot, torsoRot);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) {
|
||||
local_14 = globalCtx->view.eye;
|
||||
if ((globalCtx->csCtx.state != 0) || gDbgCamEnabled) {
|
||||
target = globalCtx->view.eye;
|
||||
} else {
|
||||
local_14 = player->actor.focus.pos;
|
||||
target = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_800E8FA4(actor, &local_14, param_3, param_4);
|
||||
Actor_TrackPoint(actor, &target, headRot, torsoRot);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4281,7 +4281,7 @@ s16 func_800BDB6C(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
f32 phi_f2;
|
||||
|
||||
if ((globalCtx->csCtx.state != 0) || (D_801D0D50 != 0)) {
|
||||
if ((globalCtx->csCtx.state != 0) || gDbgCamEnabled) {
|
||||
phi_f2 = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f;
|
||||
} else {
|
||||
phi_f2 = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ s32 Cutscene_Command_Camera(GlobalContext* globalCtx, u8* cmd) {
|
|||
|
||||
bcopy(cmd, &sp1C, sizeof(s32));
|
||||
cmd += sizeof(s32);
|
||||
if (func_8016A168() == 0) {
|
||||
if (!Play_IsDebugCamEnabled()) {
|
||||
func_80161998(cmd, &sCutsceneCameraInfo);
|
||||
}
|
||||
return sp1C + sizeof(s32);
|
||||
|
|
|
|||
|
|
@ -309,10 +309,8 @@ s32 Play_IsUnderwater(GlobalContext* globalCtx, Vec3f* pos) {
|
|||
}
|
||||
}
|
||||
|
||||
// z_demo and EnTest4
|
||||
// This data appears to be a boolean. It is only set by Play_Init.
|
||||
s32 func_8016A168(void) {
|
||||
return D_801D0D50;
|
||||
s32 Play_IsDebugCamEnabled(void) {
|
||||
return gDbgCamEnabled;
|
||||
}
|
||||
|
||||
// A mapping from playerActorCsIds to sGlobalCamDataSettings indices.
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,7 @@ void SubS_DrawShadowTex(Actor* actor, GameState* gameState, u8* tex) {
|
|||
* @param[in] stepMin the minimun step in degrees
|
||||
* @param[in] stepMax the maximum step in degrees
|
||||
*/
|
||||
s16 SubS_ComputeTurnToPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax) {
|
||||
s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax) {
|
||||
s16 prevRot = *rot;
|
||||
f32 step;
|
||||
f32 prevRotStep;
|
||||
|
|
@ -1046,42 +1046,42 @@ s16 SubS_ComputeTurnToPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f
|
|||
/**
|
||||
* Computes the necessary HeadRot and TorsoRot to smoothly turn an actors's head and torso to a point
|
||||
*
|
||||
* @param[in] point the point to turn to
|
||||
* @param[in] target the point to turn to
|
||||
* @param[in] focusPos the actor's focus postion
|
||||
* @param[in] shapeRot the actor's shape rotation
|
||||
* @param[in,out] turnTarget the intermediate target step that headRot and torsoRot step towards
|
||||
* @param[in,out] trackTarget the intermediate target step that headRot and torsoRot step towards
|
||||
* @param[in,out] headRot the computed head rotation
|
||||
* @param[in,out] torsoRot the computed torso rotation
|
||||
* @param[in] options various options to adjust how the actor turns, see SubS_ComputeTurnToPointRot()
|
||||
* @param[in] options various options to adjust how the actor turns, see SubS_ComputeTrackPointRot()
|
||||
*/
|
||||
s32 SubS_TurnToPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* turnTarget, Vec3s* headRot, Vec3s* torsoRot,
|
||||
TurnOptionsSet* options) {
|
||||
s32 SubS_TrackPoint(Vec3f* target, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trackTarget, Vec3s* headRot,
|
||||
Vec3s* torsoRot, TrackOptionsSet* options) {
|
||||
s16 pitch;
|
||||
s16 yaw;
|
||||
s16 pad;
|
||||
s16 targetY;
|
||||
f32 diffX = point->x - focusPos->x;
|
||||
f32 diffX = target->x - focusPos->x;
|
||||
s16 targetX;
|
||||
f32 diffZ = point->z - focusPos->z;
|
||||
f32 diffZ = target->z - focusPos->z;
|
||||
|
||||
yaw = Math_FAtan2F(diffZ, diffX);
|
||||
pitch = Math_FAtan2F(sqrtf(SQ(diffX) + SQ(diffZ)), point->y - focusPos->y);
|
||||
Math_SmoothStepToS(&turnTarget->x, pitch, 4, 0x2710, 0);
|
||||
Math_SmoothStepToS(&turnTarget->y, yaw, 4, 0x2710, 0);
|
||||
pitch = Math_FAtan2F(sqrtf(SQ(diffX) + SQ(diffZ)), target->y - focusPos->y);
|
||||
Math_SmoothStepToS(&trackTarget->x, pitch, 4, 0x2710, 0);
|
||||
Math_SmoothStepToS(&trackTarget->y, yaw, 4, 0x2710, 0);
|
||||
|
||||
targetX =
|
||||
SubS_ComputeTurnToPointRot(&headRot->x, options->headRotX.rotMax, turnTarget->x, options->headRotX.slowness,
|
||||
options->headRotX.rotStepMin, options->headRotX.rotStepMax);
|
||||
SubS_ComputeTrackPointRot(&headRot->x, options->headRotX.rotMax, trackTarget->x, options->headRotX.slowness,
|
||||
options->headRotX.rotStepMin, options->headRotX.rotStepMax);
|
||||
//! @bug: torsoRotX uses headRotX slowness
|
||||
SubS_ComputeTurnToPointRot(&torsoRot->x, options->torsoRotX.rotMax, targetX, options->headRotX.slowness,
|
||||
options->torsoRotX.rotStepMin, options->torsoRotX.rotStepMax);
|
||||
SubS_ComputeTrackPointRot(&torsoRot->x, options->torsoRotX.rotMax, targetX, options->headRotX.slowness,
|
||||
options->torsoRotX.rotStepMin, options->torsoRotX.rotStepMax);
|
||||
|
||||
targetY = turnTarget->y - shapeRot->y;
|
||||
SubS_ComputeTurnToPointRot(&headRot->y, options->headRotY.rotMax, targetY - torsoRot->y, options->headRotY.slowness,
|
||||
options->headRotY.rotStepMin, options->headRotY.rotStepMax);
|
||||
SubS_ComputeTurnToPointRot(&torsoRot->y, options->torsoRotY.rotMax, targetY - headRot->y,
|
||||
options->torsoRotY.slowness, options->torsoRotY.rotStepMin,
|
||||
options->torsoRotY.rotStepMax);
|
||||
targetY = trackTarget->y - shapeRot->y;
|
||||
SubS_ComputeTrackPointRot(&headRot->y, options->headRotY.rotMax, targetY - torsoRot->y, options->headRotY.slowness,
|
||||
options->headRotY.rotStepMin, options->headRotY.rotStepMax);
|
||||
SubS_ComputeTrackPointRot(&torsoRot->y, options->torsoRotY.rotMax, targetY - headRot->y,
|
||||
options->torsoRotY.slowness, options->torsoRotY.rotStepMin,
|
||||
options->torsoRotY.rotStepMax);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1438,7 +1438,6 @@ s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes) {
|
|||
* @param[out] plane the computed plane
|
||||
*
|
||||
* @note the unit input vector is expected to already be normalized (only uses are with the z unit vector)
|
||||
*
|
||||
*/
|
||||
void SubS_ConstructPlane(Vec3f* point, Vec3f* unitVec, Vec3s* rot, Plane* plane) {
|
||||
f32 sin;
|
||||
|
|
@ -1561,9 +1560,9 @@ s32 func_8013E8F8(Actor* actor, GlobalContext* globalCtx, f32 xzRange, f32 yRang
|
|||
* @param[in] torsoZRotStepMax the max torso's Z rotation step
|
||||
* @param[in] torsoXRotStepMax the max torso's X rotation step
|
||||
*/
|
||||
s32 SubS_TurnToPointStep(Vec3f* worldPos, Vec3f* focusPos, s16 shapeYRot, Vec3f* yawTarget, Vec3f* pitchTarget,
|
||||
s16* headZRotStep, s16* headXRotStep, s16* torsoZRotStep, s16* torsoXRotStep,
|
||||
u16 headZRotStepMax, u16 headXRotStepMax, u16 torsoZRotStepMax, u16 torsoXRotStepMax) {
|
||||
s32 SubS_TrackPointStep(Vec3f* worldPos, Vec3f* focusPos, s16 shapeYRot, Vec3f* yawTarget, Vec3f* pitchTarget,
|
||||
s16* headZRotStep, s16* headXRotStep, s16* torsoZRotStep, s16* torsoXRotStep,
|
||||
u16 headZRotStepMax, u16 headXRotStepMax, u16 torsoZRotStepMax, u16 torsoXRotStepMax) {
|
||||
s16 yaw = Math_Vec3f_Yaw(worldPos, yawTarget) - shapeYRot;
|
||||
s16 pad;
|
||||
s16 pad2;
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
this->actionFunc(this, globalCtx);
|
||||
if (this->actor.xzDistToPlayer < 100.0f && !(this->stateFlags & ANI_STATE_CLIMBING)) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRot, &this->chestRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRot, &this->chestRot, this->actor.focus.pos);
|
||||
this->chestRot.x = this->chestRot.y = this->chestRot.z = 0;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 0x6, 0x1838, 0x64);
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_809C1EC8(EnAob01* this, GlobalContext* globalCtx) {
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -476,11 +476,11 @@ void func_809C1EC8(EnAob01* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->turnTarget, &this->headRot,
|
||||
&this->torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
@ -505,7 +505,7 @@ void func_809C2060(EnAob01* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) && (this->unk_2D2 & 0x100)) {
|
||||
this->unk_2D2 &= ~0x100;
|
||||
this->unk_2E6 = this->turnTarget;
|
||||
this->unk_2E6 = this->trackTarget;
|
||||
this->unk_2EC = this->headRot;
|
||||
this->unk_2F2 = this->torsoRot;
|
||||
func_809C16DC(this, globalCtx);
|
||||
|
|
@ -756,7 +756,7 @@ void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->turnTarget = this->unk_2E6;
|
||||
this->trackTarget = this->unk_2E6;
|
||||
this->headRot = this->unk_2EC;
|
||||
this->torsoRot = this->unk_2F2;
|
||||
this->actor.parent = NULL;
|
||||
|
|
@ -827,7 +827,7 @@ void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
|
|||
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
|
||||
this->actionFunc = func_809C2A64;
|
||||
} else {
|
||||
this->turnTarget = this->unk_2E6;
|
||||
this->trackTarget = this->unk_2E6;
|
||||
this->headRot = this->unk_2EC;
|
||||
this->torsoRot = this->unk_2F2;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ typedef struct EnAob01 {
|
|||
/* 0x212 */ Vec3s jointTable[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x272 */ Vec3s morphTable[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x2D2 */ u16 unk_2D2;
|
||||
/* 0x2D4 */ Vec3s turnTarget;
|
||||
/* 0x2D4 */ Vec3s trackTarget;
|
||||
/* 0x2DA */ Vec3s headRot;
|
||||
/* 0x2E0 */ Vec3s torsoRot;
|
||||
/* 0x2E6 */ Vec3s unk_2E6;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static u8 D_80BAA488[] = {
|
|||
|
||||
s32 D_80BAA4A8[] = { -1, -1, 0 };
|
||||
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -300,11 +300,11 @@ void func_80BA8DF4(EnBaba* this, GlobalContext* globalCtx) {
|
|||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
|
||||
SubS_TurnToPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->turnTarget, &this->headRot,
|
||||
&this->torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ typedef struct EnBaba {
|
|||
/* 0x01EA */ UNK_TYPE1 unk1EA[0x1C];
|
||||
/* 0x0206 */ Vec3s jointTable[18];
|
||||
/* 0x0272 */ Vec3s morphTable[18];
|
||||
/* 0x02DE */ Vec3s turnTarget;
|
||||
/* 0x02DE */ Vec3s trackTarget;
|
||||
/* 0x02E4 */ Vec3s headRot;
|
||||
/* 0x02EA */ Vec3s torsoRot;
|
||||
/* 0x02F0 */ UNK_TYPE1 unk2F0[0x12];
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static DamageTable sDamageTable = {
|
|||
/* Powder Keg */ DMG_ENTRY(0, 0),
|
||||
};
|
||||
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -113,11 +113,11 @@ void EnBba01_UpdateModel(EnBba01* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.turnTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.trackTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->enHy.turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
@ -134,7 +134,7 @@ s32 EnBba01_TestIsTalking(EnBba01* this, GlobalContext* globalCtx) {
|
|||
if (Actor_ProcessTalkRequest(&this->enHy.actor, &globalCtx->state)) {
|
||||
isTalking = true;
|
||||
this->enHy.textId = 0x10B9; // Invalid textId, produces empty textbox
|
||||
this->enHy.tmpTurnTarget = this->enHy.turnTarget;
|
||||
this->enHy.tmptrackTarget = this->enHy.trackTarget;
|
||||
this->enHy.tmpHeadRot = this->enHy.headRot;
|
||||
this->enHy.tmpTorsoRot = this->enHy.torsoRot;
|
||||
this->enHy.tmpActionFunc = this->enHy.actionFunc;
|
||||
|
|
@ -197,7 +197,7 @@ void EnBba01_Talk(EnHy* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 2:
|
||||
this->actor.textId = 0;
|
||||
this->turnTarget = this->tmpTurnTarget;
|
||||
this->trackTarget = this->tmptrackTarget;
|
||||
this->headRot = this->tmpHeadRot;
|
||||
this->torsoRot = this->tmpTorsoRot;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ void func_809CCDE0(EnBji01* this, GlobalContext* globalCtx) {
|
|||
|
||||
Math_Vec3f_Copy(&pitchTarget, &player->actor.world.pos);
|
||||
pitchTarget.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
SubS_TurnToPointStep(&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);
|
||||
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);
|
||||
}
|
||||
|
||||
void func_809CCE98(EnBji01* this, GlobalContext* globalCtx) {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ static DamageTable sDamageTable = {
|
|||
/* Powder Keg */ DMG_ENTRY(0, 0),
|
||||
};
|
||||
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -105,11 +105,11 @@ void EnCne01_UpdateModel(EnCne01* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.turnTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->enHy.actor.focus.pos, &this->enHy.actor.shape.rot, &this->enHy.trackTarget,
|
||||
&this->enHy.headRot, &this->enHy.torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->enHy.turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
@ -126,7 +126,7 @@ s32 EnCne01_TestIsTalking(EnCne01* this, GlobalContext* globalCtx) {
|
|||
if (Actor_ProcessTalkRequest(&this->enHy.actor, &globalCtx->state)) {
|
||||
isTalking = true;
|
||||
this->enHy.textId = 0x10B9; // Invalid textId, produces empty textbox
|
||||
this->enHy.tmpTurnTarget = this->enHy.turnTarget;
|
||||
this->enHy.tmptrackTarget = this->enHy.trackTarget;
|
||||
this->enHy.tmpHeadRot = this->enHy.headRot;
|
||||
this->enHy.tmpTorsoRot = this->enHy.torsoRot;
|
||||
this->enHy.tmpActionFunc = this->enHy.actionFunc;
|
||||
|
|
@ -187,7 +187,7 @@ void EnCne01_Talk(EnHy* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 2:
|
||||
this->actor.textId = 0;
|
||||
this->turnTarget = this->tmpTurnTarget;
|
||||
this->trackTarget = this->tmptrackTarget;
|
||||
this->headRot = this->tmpHeadRot;
|
||||
this->torsoRot = this->tmpTorsoRot;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
|
|
|
|||
|
|
@ -1449,7 +1449,7 @@ void EnFsn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->actionFunc(this, globalCtx);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRot, &this->unk27A, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRot, &this->unk27A, this->actor.focus.pos);
|
||||
SubS_FillLimbRotTables(globalCtx, this->limbRotYTable, this->limbRotZTable, ARRAY_COUNT(this->limbRotYTable));
|
||||
EnFsn_Blink(this);
|
||||
if (ENFSN_IS_SHOP(&this->actor) && EnFsn_HasItemsToSell()) {
|
||||
|
|
|
|||
|
|
@ -974,7 +974,7 @@ void EnGb2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (!(this->unk_26C & 0x100)) {
|
||||
func_80B0F5E0(this, globalCtx);
|
||||
}
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_270, &this->unk_276, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_270, &this->unk_276, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnGb2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ void EnGg_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
func_80B35634(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
func_80B351A4(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ void EnGg2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_MoveWithoutGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80B3B8A4(this);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_1E0, &this->unk_1E6, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_1E0, &this->unk_1E6, this->actor.focus.pos);
|
||||
|
||||
if ((this->unk_2EE == 5) || (this->unk_2EE == 7)) {
|
||||
func_800B9010(&this->actor, NA_SE_EN_SHARP_FLOAT - SFX_FLAG);
|
||||
|
|
|
|||
|
|
@ -612,9 +612,9 @@ void EnGinkoMan_SwitchAnimation(EnGinkoMan* this, GlobalContext* globalCtx) {
|
|||
void EnGinkoMan_FacePlayer(EnGinkoMan* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->skelAnime.animation != &object_boj_Anim_004A7C) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->limb15Rot, &this->limb8Rot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->limb15Rot, &this->limb8Rot, this->actor.focus.pos);
|
||||
} else {
|
||||
func_800E8F08(&this->limb15Rot, &this->limb8Rot);
|
||||
Actor_TrackNone(&this->limb15Rot, &this->limb8Rot);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1082,7 +1082,7 @@ void EnGk_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
((ENGK_GET_F(&this->actor) == ENGK_F_0) && !(gSaveContext.save.weekEventReg[22] & 4))) {
|
||||
func_80B507A0(this, globalCtx);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
if (ENGK_GET_F(&this->actor) == ENGK_F_1) {
|
||||
func_80B5123C(this, globalCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ s32 func_80BD0898(EnHgo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80BD0B8C(EnHgo* this, GlobalContext* globalCtx) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_300, &this->unk_306, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_300, &this->unk_306, this->actor.focus.pos);
|
||||
if (this->unk_30E > 2) {
|
||||
this->unk_30E--;
|
||||
} else if (this->unk_30E == 2) {
|
||||
|
|
@ -337,7 +337,7 @@ void EnHgo_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (func_80BD0898(this, globalCtx)) {
|
||||
func_800E8F08(&this->unk_300, &this->unk_306);
|
||||
Actor_TrackNone(&this->unk_300, &this->unk_306);
|
||||
} else if (this->actionFunc != func_80BD0410) {
|
||||
if (this->actionFunc != func_80BD0434) {
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ void EnHoll_VisibleIdle(EnHoll* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnHoll_TransparentIdle(EnHoll* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 useViewEye = D_801D0D50 || globalCtx->csCtx.state != 0;
|
||||
s32 useViewEye = gDbgCamEnabled || globalCtx->csCtx.state != 0;
|
||||
Vec3f transformedPlayerPos;
|
||||
f32 enHollTop;
|
||||
f32 playerDistFromCentralPlane;
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToS(&this->unusedRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unusedRot.y, 0, 6, 0x1838, 0x64);
|
||||
} else if (this->stateFlags & 1) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRot, &this->unusedRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRot, &this->unusedRot, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0x3200, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ static AnimationInfoS sAnimations[] = {
|
|||
{ &object_in_Anim_019EB4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
};
|
||||
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -240,11 +240,11 @@ void func_808F3414(EnIn* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->turnTarget, &this->headRot,
|
||||
&this->torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
@ -585,15 +585,15 @@ s32 func_808F4150(GlobalContext* globalCtx, EnIn* this, s32 arg2, MessageContext
|
|||
} else if (this->unk4AC & 8) {
|
||||
func_808F4108(this, globalCtx, 0x3475);
|
||||
} else {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3475);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3475);
|
||||
}
|
||||
} else {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3473);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3473);
|
||||
}
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3472);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3472);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -608,13 +608,13 @@ s32 func_808F4270(GlobalContext* globalCtx, EnIn* this, s32 arg2, MessageContext
|
|||
func_801159EC(-fee);
|
||||
if (!(gSaveContext.save.weekEventReg[57] & 1)) {
|
||||
if (arg4 != 0) {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3474);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3474);
|
||||
} else {
|
||||
func_808F4108(this, globalCtx, 0x3474);
|
||||
}
|
||||
} else {
|
||||
if (arg4 != 0) {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3475);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3475);
|
||||
} else {
|
||||
func_808F4108(this, globalCtx, 0x3475);
|
||||
}
|
||||
|
|
@ -622,14 +622,14 @@ s32 func_808F4270(GlobalContext* globalCtx, EnIn* this, s32 arg2, MessageContext
|
|||
} else {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
if (arg4 != 0) {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3473);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3473);
|
||||
} else {
|
||||
func_808F4108(this, globalCtx, 0x3473);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3472);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3472);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -649,7 +649,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
|
||||
switch (textId) {
|
||||
case 0x34AF:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34B0);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34B0);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x34A9:
|
||||
|
|
@ -670,11 +670,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
break;
|
||||
case 0x34AD:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34AE);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34AE);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x34B1:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34B2);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34B2);
|
||||
ret = false;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -686,11 +686,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
switch (textId) {
|
||||
case 0x3458:
|
||||
gSaveContext.save.weekEventReg[15] |= 8;
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3459);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3459);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3459:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x345A);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x345A);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x345A:
|
||||
|
|
@ -702,15 +702,15 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = true;
|
||||
break;
|
||||
case 0x345C:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x345D);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x345D);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x345D:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x345E);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x345E);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x345E:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x345F);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x345F);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x345F:
|
||||
|
|
@ -718,11 +718,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = true;
|
||||
break;
|
||||
case 0x3460:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3461);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3461);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3461:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3462);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3462);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3462:
|
||||
|
|
@ -735,15 +735,15 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
switch (textId) {
|
||||
case 0x3463:
|
||||
gSaveContext.save.weekEventReg[15] |= 0x10;
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3464);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3464);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3464:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3465);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3465);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3465:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3466);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3466);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3466:
|
||||
|
|
@ -756,17 +756,17 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_801159EC(-globalCtx->msgCtx.unk1206C);
|
||||
ret = true;
|
||||
} else {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3469);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3469);
|
||||
ret = false;
|
||||
}
|
||||
} else {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3468);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3468);
|
||||
ret = false;
|
||||
}
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3467);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3467);
|
||||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -777,11 +777,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = true;
|
||||
break;
|
||||
case 0x346B:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x346C);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x346C);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x346C:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3466);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3466);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x346A:
|
||||
|
|
@ -797,11 +797,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
break;
|
||||
case 0x3470:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3471);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3483:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3471);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3471:
|
||||
|
|
@ -872,7 +872,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
break;
|
||||
case 0x3476:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3477);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3477);
|
||||
func_808F30B0(&this->skelAnime, 1);
|
||||
func_808F30B0(&this->unk4A4->skelAnime, 7);
|
||||
ret = false;
|
||||
|
|
@ -886,7 +886,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_808F30B0(&this->skelAnime, 1);
|
||||
func_808F30B0(&this->unk4A4->skelAnime, 7);
|
||||
if (INV_CONTENT(ITEM_MASK_GARO) == ITEM_MASK_GARO) {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x347E);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x347E);
|
||||
ret = false;
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[56] |= 8;
|
||||
|
|
@ -901,12 +901,12 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
Actor_PickUp(&this->actor, globalCtx, GI_MILK, 500.0f, 100.0f);
|
||||
ret = true;
|
||||
} else {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x347F);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x347F);
|
||||
ret = false;
|
||||
}
|
||||
break;
|
||||
case 0x347F:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3480);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3480);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3480:
|
||||
|
|
@ -944,12 +944,12 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
case 4:
|
||||
switch (textId) {
|
||||
case 0x3486:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3487);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3487);
|
||||
gSaveContext.save.weekEventReg[16] |= 1;
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3487:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3488);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3488);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3488:
|
||||
|
|
@ -963,11 +963,11 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_80151BB4(globalCtx, 0x11);
|
||||
break;
|
||||
case 0x348B:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x348C);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x348C);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x348C:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x348D);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x348D);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x348D:
|
||||
|
|
@ -985,17 +985,17 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
break;
|
||||
case 0x348E:
|
||||
case 0x34B3:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x348F);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x348F);
|
||||
gSaveContext.save.weekEventReg[16] |= 2;
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3493:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3494);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3494);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x348F:
|
||||
case 0x3494:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3490);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3490);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3490:
|
||||
|
|
@ -1008,17 +1008,17 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_801159EC(-globalCtx->msgCtx.unk1206C);
|
||||
ret = true;
|
||||
} else {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3469);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3469);
|
||||
ret = false;
|
||||
}
|
||||
} else {
|
||||
play_sound(NA_SE_SY_ERROR);
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3468);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3468);
|
||||
ret = false;
|
||||
}
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3491);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3491);
|
||||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1062,7 +1062,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_80151BB4(globalCtx, 0x11);
|
||||
break;
|
||||
case 0x3474:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3475);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3475);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3475:
|
||||
|
|
@ -1077,7 +1077,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
func_808F30B0(&this->skelAnime, 1);
|
||||
func_808F30B0(&this->unk4A4->skelAnime, 7);
|
||||
if (INV_CONTENT(ITEM_MASK_GARO) == ITEM_MASK_GARO) {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34A1);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34A1);
|
||||
ret = false;
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[56] |= 8;
|
||||
|
|
@ -1105,12 +1105,12 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
Actor_PickUp(&this->actor, globalCtx, GI_MILK, 500.0f, 100.0f);
|
||||
ret = true;
|
||||
} else {
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34A2);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34A2);
|
||||
ret = false;
|
||||
}
|
||||
break;
|
||||
case 0x34A2:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x34A3);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x34A3);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x34A3:
|
||||
|
|
@ -1119,13 +1119,13 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = true;
|
||||
break;
|
||||
case 0x3499:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x349A);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x349A);
|
||||
func_808F30B0(&this->skelAnime, 1);
|
||||
func_808F30B0(&this->unk4A4->skelAnime, 7);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x349A:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x349B);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x349B);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x349B:
|
||||
|
|
@ -1134,7 +1134,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
ret = false;
|
||||
} else {
|
||||
func_8019F230();
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x349C);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x349C);
|
||||
ret = false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1154,7 +1154,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
|
|||
break;
|
||||
case 0x3498:
|
||||
case 0x34A6:
|
||||
func_800E8EA0(globalCtx, &this->actor, 0x3471);
|
||||
Actor_ContinueText(globalCtx, &this->actor, 0x3471);
|
||||
ret = false;
|
||||
break;
|
||||
case 0x3471:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef struct EnIn {
|
|||
/* 0x261 */ u8 unk261;
|
||||
/* 0x262 */ Vec3s jointTable[20];
|
||||
/* 0x2DA */ Vec3s morphTable[20];
|
||||
/* 0x352 */ Vec3s turnTarget;
|
||||
/* 0x352 */ Vec3s trackTarget;
|
||||
/* 0x358 */ Vec3s headRot;
|
||||
/* 0x35E */ Vec3s torsoRot;
|
||||
/* 0x364 */ char unk364[0x12];
|
||||
|
|
|
|||
|
|
@ -992,7 +992,8 @@ void EnJg_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnJg_SpawnBreath(this, globalCtx);
|
||||
}
|
||||
|
||||
func_800E9250(globalCtx, &this->actor, &this->unusedRotation1, &this->unusedRotation2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unusedRotation1, &this->unusedRotation2,
|
||||
this->actor.focus.pos);
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ void func_80C14D14(EnJgameTsn* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80C14D58(EnJgameTsn* this, GlobalContext* globalCtx) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2EC, &this->unk_2F2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2EC, &this->unk_2F2, this->actor.focus.pos);
|
||||
|
||||
if (DECR(this->unk_2FA) == 0) {
|
||||
this->unk_2FA = Rand_S16Offset(60, 60);
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ void EnKendoJs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_278, &this->unk_27E, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_278, &this->unk_27E, this->actor.focus.pos);
|
||||
func_80B279AC(this, globalCtx);
|
||||
func_80B27880(this, globalCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1090,7 +1090,7 @@ void EnKgy_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
sp30.z = 0;
|
||||
sp30.y = 0;
|
||||
sp30.x = 0;
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2CC, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2CC, &sp30, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2CC.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_2CC.y, 0, 6, 6200, 100);
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ void EnMk_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if ((this->unk_27A & 1) && !Cutscene_CheckActorAction(globalCtx, 0x7F)) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_270, &sp38, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_270, &sp38, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_270.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_270.y, 0, 6, 0x1838, 0x64);
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ void EnMm3_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->unk_2B0 & 1) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2A0, &this->unk_2A6, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2A0, &this->unk_2A6, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ void EnOsn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
}
|
||||
}
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnOsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
|
||||
|
|
|
|||
|
|
@ -1554,7 +1554,7 @@ void EnOssan_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnOssan_UpdateItemSelectedProperty(this);
|
||||
EnOssan_UpdateStickDirectionPromptAnim(this);
|
||||
EnOssan_UpdateCursorAnim(this);
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRot, &this->unk2CC, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRot, &this->unk2CC, this->actor.focus.pos);
|
||||
this->actionFunc(this, globalCtx);
|
||||
Actor_SetFocus(&this->actor, 90.0f);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
|
|
|||
|
|
@ -511,9 +511,9 @@ void func_80BD94E0(EnPamera* this, GlobalContext* globalCtx) {
|
|||
if ((this->actionFunc != func_80BD8B70) && (this->actionFunc != func_80BD8964) &&
|
||||
(this->actionFunc != func_80BD909C) && (this->actionFunc != func_80BD8D1C) &&
|
||||
((this->actionFunc != func_80BD8DB0) || (this->actor.speedXZ == 3.0f))) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->limb9Rot, &this->limb8Rot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->limb9Rot, &this->limb8Rot, this->actor.focus.pos);
|
||||
} else {
|
||||
func_800E8F08(&this->limb9Rot, &this->limb8Rot);
|
||||
Actor_TrackNone(&this->limb9Rot, &this->limb8Rot);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -856,7 +856,7 @@ void func_80BDA344(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (!(gSaveContext.save.weekEventReg[61] & 4)) {
|
||||
gSaveContext.save.weekEventReg[61] |= 4;
|
||||
}
|
||||
func_800E8F08(&this->limb9Rot, &this->limb8Rot);
|
||||
Actor_TrackNone(&this->limb9Rot, &this->limb8Rot);
|
||||
} else {
|
||||
func_80BD94E0(this, globalCtx);
|
||||
if (this->actionFunc == func_80BD994C) {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ void EnRecepgirl_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3s sp30;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRot, &sp30, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRot, &sp30, this->actor.focus.pos);
|
||||
EnRecepgirl_UpdateEyes(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void EnRsn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk1D8, &this->unk1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk1D8, &this->unk1DE, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnRsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ void func_80B680A8(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (func_80B6703C(this, globalCtx) && !(this->unk_29C & 8) && (this->unk_29A != 5)) {
|
||||
sp38.x = sp38.y = sp38.z = 0;
|
||||
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_294, &sp38, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_294, &sp38, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_294.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_294.y, 0, 6, 6200, 100);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ static DamageTable sDamageTable = {
|
|||
/* Powder Keg */ DMG_ENTRY(1, 0xE),
|
||||
};
|
||||
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -530,11 +530,11 @@ void func_80BAB4F0(EnSuttari* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->turnTarget, &this->headRot,
|
||||
&this->torsoRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->torsoRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->turnTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->turnTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ typedef struct EnSuttari {
|
|||
/* 0x1FC */ UNK_TYPE1 unk_1FC[0x1A];
|
||||
/* 0x216 */ Vec3s jointTable[16];
|
||||
/* 0x276 */ Vec3s morphTable[16];
|
||||
/* 0x2D6 */ Vec3s turnTarget;
|
||||
/* 0x2D6 */ Vec3s trackTarget;
|
||||
/* 0x2DC */ Vec3s headRot;
|
||||
/* 0x2E2 */ Vec3s torsoRot;
|
||||
/* 0x2E8 */ UNK_TYPE1 unk_2E8[0x12];
|
||||
|
|
|
|||
|
|
@ -1225,7 +1225,7 @@ void EnSyatekiMan_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_SetFocus(&this->actor, 70.0f);
|
||||
if (this->unk_26A != 1) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_258, &this->unk_25E, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_258, &this->unk_25E, this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -777,7 +777,8 @@ void EnTalkGibud_PassiveIdle(EnTalkGibud* this, GlobalContext* globalCtx) {
|
|||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM);
|
||||
EnTalkGibud_SetupTalk(this);
|
||||
} else if (this->actor.xzDistToPlayer < 100.0f && !(this->collider.base.acFlags & AC_HIT)) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->headRotation, &this->upperBodyRotation, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->headRotation, &this->upperBodyRotation,
|
||||
this->actor.focus.pos);
|
||||
func_800B8614(&this->actor, globalCtx, 100.0f);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 1, 100, 0);
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ void func_80A42AB8(EnTest4* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((globalCtx->unk_18B4A == 0) && !Play_InCsMode(globalCtx) && (globalCtx->numSetupActors <= 0) &&
|
||||
(globalCtx->roomCtx.unk31 == 0) && (func_8016A168() == 0)) {
|
||||
(globalCtx->roomCtx.unk31 == 0) && (!Play_IsDebugCamEnabled())) {
|
||||
s16 temp_a2;
|
||||
u16 temp_a0 = D_80A43364[this->unk_144];
|
||||
s16 temp_a3;
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ void EnTsn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->unk_220 & 1) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_222, &this->unk_228, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_222, &this->unk_228, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_222.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_222.y, 0, 6, 0x1838, 0x64);
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ void EnZo_UpdateCollider(EnZo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnZo_LookAtPlayer(EnZo* this, GlobalContext* globalCtx) {
|
||||
static TurnOptionsSet sTurnOptions = {
|
||||
static TrackOptionsSet sTrackOptions = {
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
{ 0x1770, 4, 1, 6 },
|
||||
{ 0xFA0, 4, 1, 3 },
|
||||
|
|
@ -187,11 +187,11 @@ void EnZo_LookAtPlayer(EnZo* this, GlobalContext* globalCtx) {
|
|||
point.x = player->actor.world.pos.x;
|
||||
point.y = player->bodyPartsPos[7].y + 3.0f;
|
||||
point.z = player->actor.world.pos.z;
|
||||
SubS_TurnToPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->turnTarget, &this->headRot,
|
||||
&this->upperBodyRot, &sTurnOptions);
|
||||
SubS_TrackPoint(&point, &this->actor.focus.pos, &this->actor.shape.rot, &this->trackTarget, &this->headRot,
|
||||
&this->upperBodyRot, &sTrackOptions);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->turnTarget.x, 0, 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->turnTarget.y, 0, 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.x, 0, 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->trackTarget.y, 0, 4, 1000, 1);
|
||||
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 4, 1000, 1);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 4, 1000, 1);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ typedef struct EnZo {
|
|||
/* 0x01FD */ u8 isRightFootGrounded;
|
||||
/* 0x01FE */ Vec3s jointTable[ZORA_LIMB_MAX];
|
||||
/* 0x0276 */ Vec3s morphTable[ZORA_LIMB_MAX];
|
||||
/* 0x02EE */ Vec3s turnTarget;
|
||||
/* 0x02EE */ Vec3s trackTarget;
|
||||
/* 0x02F4 */ Vec3s headRot;
|
||||
/* 0x02FA */ Vec3s upperBodyRot;
|
||||
/* 0x0300 */ UNK_TYPE1 unk_300[0x12];
|
||||
|
|
|
|||
|
|
@ -726,7 +726,7 @@ void EnZob_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_2F4 & 1) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2F6, &this->unk_2FC, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2F6, &this->unk_2FC, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2F6.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_2F6.y, 0, 6, 6200, 100);
|
||||
|
|
|
|||
|
|
@ -1324,7 +1324,7 @@ void EnZot_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, globalCtx);
|
||||
if (!(this->unk_2F2 & 8)) {
|
||||
if (!(this->unk_2F2 & 4) && func_80B96DF0(this, globalCtx)) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2C4, &this->unk_2CA, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2C4, &this->unk_2CA, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2C4.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_2C4.y, 0, 6, 6200, 100);
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ void EnZov_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((this->unk_320 & 1) && func_80BD15A4(this, globalCtx)) {
|
||||
func_800E9250(globalCtx, &this->actor, &this->unk_2F0, &this->unk_2F6, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2F0, &this->unk_2F6, this->actor.focus.pos);
|
||||
} else {
|
||||
if ((this->unk_320 & 0x10) && (this->unk_322 == 0)) {
|
||||
Math_SmoothStepToS(&this->unk_2F0.x, -0x1B58, 6, 0x1838, 0x64);
|
||||
|
|
|
|||
|
|
@ -1509,15 +1509,15 @@
|
|||
0x800E86C0:("CollisionCheck_SpawnShieldParticlesMetal2",),
|
||||
0x800E86E0:("CollisionCheck_SpawnShieldParticlesWood",),
|
||||
0x800E8784:("CollisionCheck_CylSideVsLineSeg",),
|
||||
0x800E8EA0:("func_800E8EA0",),
|
||||
0x800E8ED0:("nop_800E8ED0",),
|
||||
0x800E8EE0:("nop_800E8EE0",),
|
||||
0x800E8EEC:("nop_800E8EEC",),
|
||||
0x800E8EFC:("nop_800E8EFC",),
|
||||
0x800E8F08:("func_800E8F08",),
|
||||
0x800E8FA4:("func_800E8FA4",),
|
||||
0x800E9138:("func_800E9138",),
|
||||
0x800E9250:("func_800E9250",),
|
||||
0x800E8EA0:("Actor_ContinueText",),
|
||||
0x800E8ED0:("Flags_GetEventChkInf",),
|
||||
0x800E8EE0:("Flags_SetEventChkInf",),
|
||||
0x800E8EEC:("Flags_GetInfTable",),
|
||||
0x800E8EFC:("Flags_SetInfTable",),
|
||||
0x800E8F08:("Actor_TrackNone",),
|
||||
0x800E8FA4:("Actor_TrackPoint",),
|
||||
0x800E9138:("Actor_TrackPlayerSetFocusHeight",),
|
||||
0x800E9250:("Actor_TrackPlayer",),
|
||||
0x800E9360:("SaveContext_Init",),
|
||||
0x800E93E0:("GameInfo_Init",),
|
||||
0x800E9470:("DebugDisplay_Init",),
|
||||
|
|
@ -2679,8 +2679,8 @@
|
|||
0x8013CC2C:("SubS_FillShadowTex",),
|
||||
0x8013CD64:("SubS_GenShadowTex",),
|
||||
0x8013CF04:("SubS_DrawShadowTex",),
|
||||
0x8013D0E0:("SubS_ComputeTurnToPointRot",),
|
||||
0x8013D2E0:("SubS_TurnToPoint",),
|
||||
0x8013D0E0:("SubS_ComputeTrackPointRot",),
|
||||
0x8013D2E0:("SubS_TrackPoint",),
|
||||
0x8013D5E8:("SubS_AngleDiffLessEqual",),
|
||||
0x8013D648:("SubS_GetPathByIndex",),
|
||||
0x8013D68C:("SubS_CopyPointFromPath",),
|
||||
|
|
@ -2709,7 +2709,7 @@
|
|||
0x8013E748:("func_8013E748",),
|
||||
0x8013E7C0:("SubS_ActorAndPlayerFaceEachOther",),
|
||||
0x8013E8F8:("func_8013E8F8",),
|
||||
0x8013E950:("SubS_TurnToPointStep",),
|
||||
0x8013E950:("SubS_TrackPointStep",),
|
||||
0x8013EC10:("func_8013EC10",),
|
||||
0x8013EC44:("func_8013EC44",),
|
||||
0x8013ECE0:("func_8013ECE0",),
|
||||
|
|
@ -3036,7 +3036,7 @@
|
|||
0x8016A01C:("FrameAdvance_IsEnabled",),
|
||||
0x8016A02C:("func_8016A02C",),
|
||||
0x8016A0AC:("Play_IsUnderwater",),
|
||||
0x8016A168:("func_8016A168",),
|
||||
0x8016A168:("Play_IsDebugCamEnabled",),
|
||||
0x8016A178:("Play_AssignPlayerActorCsIdsFromScene",),
|
||||
0x8016A268:("func_8016A268",),
|
||||
0x8016A2C8:("Play_Init",),
|
||||
|
|
|
|||
|
|
@ -2171,7 +2171,7 @@
|
|||
0x801D0CD8:("TransitionFade_InitVars","UNK_PTR","",0x4),
|
||||
0x801D0D00:("D_801D0D00","UNK_TYPE1","",0x1),
|
||||
0x801D0D28:("TransitionCircle_InitVars","UNK_PTR","",0x4),
|
||||
0x801D0D50:("D_801D0D50","UNK_TYPE4","",0x4),
|
||||
0x801D0D50:("gDbgCamEnabled","UNK_TYPE4","",0x4),
|
||||
0x801D0D54:("D_801D0D54","UNK_TYPE1","",0x1),
|
||||
0x801D0D58:("D_801D0D58","UNK_TYPE2","",0x2),
|
||||
0x801D0D5C:("D_801D0D5C","UNK_TYPE2","",0x2),
|
||||
|
|
|
|||
|
|
@ -540,6 +540,10 @@ wordReplace = {
|
|||
"EffectSsKiraKira_SpawnDispersed": "EffectSsKirakira_SpawnDispersed",
|
||||
"EffectSsKiraKira_SpawnFocused": "EffectSsKirakira_SpawnFocused",
|
||||
|
||||
"func_800E8F08": "Actor_TrackNone",
|
||||
"func_800E8FA4": "Actor_TrackPoint",
|
||||
"func_800E9250": "Actor_TrackPlayer",
|
||||
|
||||
# Struct members
|
||||
"skelAnime.unk03": "skelAnime.taper",
|
||||
"skelAnime.animCurrentSeg": "skelAnime.animation",
|
||||
|
|
|
|||
|
|
@ -1023,15 +1023,15 @@ asm/non_matchings/code/z_collision_check/CollisionCheck_SpawnShieldParticlesMeta
|
|||
asm/non_matchings/code/z_collision_check/CollisionCheck_SpawnShieldParticlesMetal2.s,CollisionCheck_SpawnShieldParticlesMetal2,0x800E86C0,0x8
|
||||
asm/non_matchings/code/z_collision_check/CollisionCheck_SpawnShieldParticlesWood.s,CollisionCheck_SpawnShieldParticlesWood,0x800E86E0,0x29
|
||||
asm/non_matchings/code/z_collision_check/CollisionCheck_CylSideVsLineSeg.s,CollisionCheck_CylSideVsLineSeg,0x800E8784,0x1C7
|
||||
asm/non_matchings/code/code_800E8EA0/func_800E8EA0.s,func_800E8EA0,0x800E8EA0,0xC
|
||||
asm/non_matchings/code/code_800E8EA0/nop_800E8ED0.s,nop_800E8ED0,0x800E8ED0,0x4
|
||||
asm/non_matchings/code/code_800E8EA0/nop_800E8EE0.s,nop_800E8EE0,0x800E8EE0,0x3
|
||||
asm/non_matchings/code/code_800E8EA0/nop_800E8EEC.s,nop_800E8EEC,0x800E8EEC,0x4
|
||||
asm/non_matchings/code/code_800E8EA0/nop_800E8EFC.s,nop_800E8EFC,0x800E8EFC,0x3
|
||||
asm/non_matchings/code/code_800E8EA0/func_800E8F08.s,func_800E8F08,0x800E8F08,0x27
|
||||
asm/non_matchings/code/code_800E8EA0/func_800E8FA4.s,func_800E8FA4,0x800E8FA4,0x65
|
||||
asm/non_matchings/code/code_800E8EA0/func_800E9138.s,func_800E9138,0x800E9138,0x46
|
||||
asm/non_matchings/code/code_800E8EA0/func_800E9250.s,func_800E9250,0x800E9250,0x44
|
||||
asm/non_matchings/code/code_800E8EA0/Actor_ContinueText.s,Actor_ContinueText,0x800E8EA0,0xC
|
||||
asm/non_matchings/code/code_800E8EA0/Flags_GetEventChkInf.s,Flags_GetEventChkInf,0x800E8ED0,0x4
|
||||
asm/non_matchings/code/code_800E8EA0/Flags_SetEventChkInf.s,Flags_SetEventChkInf,0x800E8EE0,0x3
|
||||
asm/non_matchings/code/code_800E8EA0/Flags_GetInfTable.s,Flags_GetInfTable,0x800E8EEC,0x4
|
||||
asm/non_matchings/code/code_800E8EA0/Flags_SetInfTable.s,Flags_SetInfTable,0x800E8EFC,0x3
|
||||
asm/non_matchings/code/code_800E8EA0/Actor_TrackNone.s,Actor_TrackNone,0x800E8F08,0x27
|
||||
asm/non_matchings/code/code_800E8EA0/Actor_TrackPoint.s,Actor_TrackPoint,0x800E8FA4,0x65
|
||||
asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayerSetFocusHeight.s,Actor_TrackPlayerSetFocusHeight,0x800E9138,0x46
|
||||
asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayer.s,Actor_TrackPlayer,0x800E9250,0x44
|
||||
asm/non_matchings/code/z_common_data/func_800E9360.s,func_800E9360,0x800E9360,0x20
|
||||
asm/non_matchings/code/z_debug/GameInfo_Init.s,GameInfo_Init,0x800E93E0,0x24
|
||||
asm/non_matchings/code/z_debug_display/DebugDisplay_Init.s,DebugDisplay_Init,0x800E9470,0x6
|
||||
|
|
@ -2193,8 +2193,8 @@ asm/non_matchings/code/z_sub_s/func_8013C964.s,func_8013C964,0x8013C964,0xB2
|
|||
asm/non_matchings/code/z_sub_s/SubS_FillShadowTex.s,SubS_FillShadowTex,0x8013CC2C,0x4E
|
||||
asm/non_matchings/code/z_sub_s/SubS_GenShadowTex.s,SubS_GenShadowTex,0x8013CD64,0x68
|
||||
asm/non_matchings/code/z_sub_s/SubS_DrawShadowTex.s,SubS_DrawShadowTex,0x8013CF04,0x77
|
||||
asm/non_matchings/code/z_sub_s/SubS_ComputeTurnToPointRot.s,SubS_ComputeTurnToPointRot,0x8013D0E0,0x80
|
||||
asm/non_matchings/code/z_sub_s/SubS_TurnToPoint.s,SubS_TurnToPoint,0x8013D2E0,0xC2
|
||||
asm/non_matchings/code/z_sub_s/SubS_ComputeTrackPointRot.s,SubS_ComputeTrackPointRot,0x8013D0E0,0x80
|
||||
asm/non_matchings/code/z_sub_s/SubS_TrackPoint.s,SubS_TrackPoint,0x8013D2E0,0xC2
|
||||
asm/non_matchings/code/z_sub_s/SubS_AngleDiffLessEqual.s,SubS_AngleDiffLessEqual,0x8013D5E8,0x18
|
||||
asm/non_matchings/code/z_sub_s/SubS_GetPathByIndex.s,SubS_GetPathByIndex,0x8013D648,0x11
|
||||
asm/non_matchings/code/z_sub_s/SubS_CopyPointFromPath.s,SubS_CopyPointFromPath,0x8013D68C,0x25
|
||||
|
|
@ -2223,7 +2223,7 @@ asm/non_matchings/code/z_sub_s/SubS_FindActorCustom.s,SubS_FindActorCustom,0x801
|
|||
asm/non_matchings/code/z_sub_s/func_8013E748.s,func_8013E748,0x8013E748,0x1E
|
||||
asm/non_matchings/code/z_sub_s/SubS_ActorAndPlayerFaceEachOther.s,SubS_ActorAndPlayerFaceEachOther,0x8013E7C0,0x4E
|
||||
asm/non_matchings/code/z_sub_s/func_8013E8F8.s,func_8013E8F8,0x8013E8F8,0x16
|
||||
asm/non_matchings/code/z_sub_s/SubS_TurnToPointStep.s,SubS_TurnToPointStep,0x8013E950,0xB0
|
||||
asm/non_matchings/code/z_sub_s/SubS_TrackPointStep.s,SubS_TrackPointStep,0x8013E950,0xB0
|
||||
asm/non_matchings/code/code_8013EC10/func_8013EC10.s,func_8013EC10,0x8013EC10,0xD
|
||||
asm/non_matchings/code/code_8013EC10/func_8013EC44.s,func_8013EC44,0x8013EC44,0x27
|
||||
asm/non_matchings/code/code_8013EC10/func_8013ECE0.s,func_8013ECE0,0x8013ECE0,0x2F
|
||||
|
|
@ -2550,7 +2550,7 @@ asm/non_matchings/code/z_play/func_80169FFC.s,func_80169FFC,0x80169FFC,0x8
|
|||
asm/non_matchings/code/z_play/FrameAdvance_IsEnabled.s,FrameAdvance_IsEnabled,0x8016A01C,0x4
|
||||
asm/non_matchings/code/z_play/func_8016A02C.s,func_8016A02C,0x8016A02C,0x20
|
||||
asm/non_matchings/code/z_play/Play_IsUnderwater.s,Play_IsUnderwater,0x8016A0AC,0x2F
|
||||
asm/non_matchings/code/z_play/func_8016A168.s,func_8016A168,0x8016A168,0x4
|
||||
asm/non_matchings/code/z_play/Play_IsDebugCamEnabled.s,Play_IsDebugCamEnabled,0x8016A168,0x4
|
||||
asm/non_matchings/code/z_play/func_8016A178.s,func_8016A178,0x8016A178,0x3C
|
||||
asm/non_matchings/code/z_play/func_8016A268.s,func_8016A268,0x8016A268,0x18
|
||||
asm/non_matchings/code/z_play/Play_Init.s,Play_Init,0x8016A2C8,0x252
|
||||
|
|
|
|||
|
Loading…
Reference in New Issue