Document Target_Draw [Target Docs 2/?] (#2115)

* document Target_Draw

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* fix missed renames

* retail fix

* another fix

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
fig02 2024-09-01 16:02:13 -04:00 committed by GitHub
parent a21a59c4b5
commit 2b25c31588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 98 additions and 86 deletions

View File

@ -310,7 +310,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play);
void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex, void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
Vec3f* rightFootPos); Vec3f* rightFootPos);
void Actor_ProjectPos(PlayState* play, Vec3f* src, Vec3f* xyzDest, f32* cappedInvWDest); void Actor_ProjectPos(PlayState* play, Vec3f* src, Vec3f* xyzDest, f32* cappedInvWDest);
void func_8002C124(TargetContext* targetCtx, PlayState* play); void Target_Draw(TargetContext* targetCtx, PlayState* play);
s32 Flags_GetSwitch(PlayState* play, s32 flag); s32 Flags_GetSwitch(PlayState* play, s32 flag);
void Flags_SetSwitch(PlayState* play, s32 flag); void Flags_SetSwitch(PlayState* play, s32 flag);
void Flags_UnsetSwitch(PlayState* play, s32 flag); void Flags_UnsetSwitch(PlayState* play, s32 flag);

View File

@ -580,22 +580,22 @@ typedef struct LockOnReticle {
typedef struct TargetContext { typedef struct TargetContext {
/* 0x00 */ Vec3f naviRefPos; // possibly wrong /* 0x00 */ Vec3f naviRefPos; // possibly wrong
/* 0x0C */ Vec3f targetCenterPos; /* 0x0C */ Vec3f lockOnPos;
/* 0x18 */ Color_RGBAf naviInner; /* 0x18 */ Color_RGBAf naviInner;
/* 0x28 */ Color_RGBAf naviOuter; /* 0x28 */ Color_RGBAf naviOuter;
/* 0x38 */ Actor* arrowPointedActor; /* 0x38 */ Actor* arrowPointedActor;
/* 0x3C */ Actor* targetedActor; /* 0x3C */ Actor* lockOnActor;
/* 0x40 */ f32 unk_40; /* 0x40 */ f32 unk_40;
/* 0x44 */ f32 reticleRadius; /* 0x44 */ f32 reticleRadius;
/* 0x48 */ s16 unk_48; /* 0x48 */ s16 reticleFadeAlphaControl;
/* 0x4A */ u8 activeCategory; /* 0x4A */ u8 activeCategory;
/* 0x4B */ u8 unk_4B; /* 0x4B */ u8 reticleSpinCounter;
/* 0x4C */ s8 unk_4C; /* 0x4C */ s8 curReticle; // indexes lockOnReticles[]
/* 0x4D */ char unk_4D[0x03]; /* 0x4D */ char unk_4D[0x03];
/* 0x50 */ LockOnReticle lockOnReticles[3]; /* 0x50 */ LockOnReticle lockOnReticles[3];
/* 0x8C */ Actor* unk_8C; /* 0x8C */ Actor* unk_8C;
/* 0x90 */ Actor* bgmEnemy; // The nearest enemy to player with the right flags that will trigger NA_BGM_ENEMY /* 0x90 */ Actor* bgmEnemy; // The nearest enemy to player with the right flags that will trigger NA_BGM_ENEMY
/* 0x94 */ Actor* unk_94; /* 0x94 */ Actor* arrowHoverActor;
} TargetContext; // size = 0x98 } TargetContext; // size = 0x98
typedef struct TitleCardContext { typedef struct TitleCardContext {

View File

@ -275,10 +275,10 @@ void Target_InitReticle(TargetContext* targetCtx, s32 actorCategory, PlayState*
TargetColor* reticleColor = &sTargetColorList[actorCategory]; TargetColor* reticleColor = &sTargetColorList[actorCategory];
s32 i; s32 i;
Math_Vec3f_Copy(&targetCtx->targetCenterPos, &play->view.eye); Math_Vec3f_Copy(&targetCtx->lockOnPos, &play->view.eye);
targetCtx->reticleRadius = 500.0f; targetCtx->reticleRadius = 500.0f;
targetCtx->unk_48 = 256; targetCtx->reticleFadeAlphaControl = 256;
reticle = &targetCtx->lockOnReticles[0]; reticle = &targetCtx->lockOnReticles[0];
@ -310,97 +310,107 @@ void Target_SetNaviState(TargetContext* targetCtx, Actor* actor, s32 actorCatego
} }
void Target_Init(TargetContext* targetCtx, Actor* actor, PlayState* play) { void Target_Init(TargetContext* targetCtx, Actor* actor, PlayState* play) {
targetCtx->arrowPointedActor = targetCtx->targetedActor = targetCtx->unk_8C = targetCtx->bgmEnemy = NULL; targetCtx->arrowPointedActor = targetCtx->lockOnActor = targetCtx->unk_8C = targetCtx->bgmEnemy = NULL;
targetCtx->unk_4B = 0; targetCtx->reticleSpinCounter = 0;
targetCtx->unk_4C = 0; targetCtx->curReticle = 0;
targetCtx->unk_40 = 0.0f; targetCtx->unk_40 = 0.0f;
Target_SetNaviState(targetCtx, actor, actor->category, play); Target_SetNaviState(targetCtx, actor, actor->category, play);
Target_InitReticle(targetCtx, actor->category, play); Target_InitReticle(targetCtx, actor->category, play);
} }
void func_8002C124(TargetContext* targetCtx, PlayState* play) { void Target_Draw(TargetContext* targetCtx, PlayState* play) {
Actor* actor = targetCtx->targetedActor; Actor* actor = targetCtx->lockOnActor;
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 2029); OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 2029);
if (targetCtx->unk_48 != 0) { if (targetCtx->reticleFadeAlphaControl != 0) {
LockOnReticle* entry; LockOnReticle* reticle;
Player* player; Player* player = GET_PLAYER(play);
s16 spCE; s16 alpha;
f32 var1; f32 projectdPosScale;
Vec3f projTargetCenter; Vec3f projectedPos;
s32 spB8; s32 numReticles;
f32 projTargetCappedInvW; f32 invW;
s32 spB0;
s32 spAC;
f32 var2;
s32 i; s32 i;
s32 curReticle;
f32 lockOnScaleX;
s32 triangleIndex;
player = GET_PLAYER(play); alpha = 255;
projectdPosScale = 1.0f;
spCE = 0xFF; if (targetCtx->reticleSpinCounter != 0) {
var1 = 1.0f; // Reticle is spinning so it is active, only need to draw one
numReticles = 1;
if (targetCtx->unk_4B != 0) {
spB8 = 1;
} else { } else {
spB8 = 3; // Use multiple reticles for the motion blur effect from the reticle
// quickly zooming in on an actor from off screen
numReticles = ARRAY_COUNT(targetCtx->lockOnReticles);
} }
if (actor != NULL) { if (actor != NULL) {
Math_Vec3f_Copy(&targetCtx->targetCenterPos, &actor->focus.pos); Math_Vec3f_Copy(&targetCtx->lockOnPos, &actor->focus.pos);
var1 = (500.0f - targetCtx->reticleRadius) / 420.0f; projectdPosScale = (500.0f - targetCtx->reticleRadius) / 420.0f;
} else { } else {
targetCtx->unk_48 -= 120; // Not locked on, start fading out
if (targetCtx->unk_48 < 0) { targetCtx->reticleFadeAlphaControl -= 120;
targetCtx->unk_48 = 0;
if (targetCtx->reticleFadeAlphaControl < 0) {
targetCtx->reticleFadeAlphaControl = 0;
} }
spCE = targetCtx->unk_48;
// `reticleFadeAlphaControl` is only used as an alpha when fading out.
// Otherwise it defaults to 255, set above.
alpha = targetCtx->reticleFadeAlphaControl;
} }
Actor_ProjectPos(play, &targetCtx->targetCenterPos, &projTargetCenter, &projTargetCappedInvW); Actor_ProjectPos(play, &targetCtx->lockOnPos, &projectedPos, &invW);
projTargetCenter.x = (160 * (projTargetCenter.x * projTargetCappedInvW)) * var1; projectedPos.x = ((SCREEN_WIDTH / 2) * (projectedPos.x * invW)) * projectdPosScale;
projTargetCenter.x = CLAMP(projTargetCenter.x, -320.0f, 320.0f); projectedPos.x = CLAMP(projectedPos.x, -SCREEN_WIDTH, SCREEN_WIDTH);
projTargetCenter.y = (120 * (projTargetCenter.y * projTargetCappedInvW)) * var1; projectedPos.y = ((SCREEN_HEIGHT / 2) * (projectedPos.y * invW)) * projectdPosScale;
projTargetCenter.y = CLAMP(projTargetCenter.y, -240.0f, 240.0f); projectedPos.y = CLAMP(projectedPos.y, -SCREEN_HEIGHT, SCREEN_HEIGHT);
projTargetCenter.z = projTargetCenter.z * var1; projectedPos.z *= projectdPosScale;
targetCtx->unk_4C--; targetCtx->curReticle--;
if (targetCtx->unk_4C < 0) {
targetCtx->unk_4C = 2; if (targetCtx->curReticle < 0) {
targetCtx->curReticle = ARRAY_COUNT(targetCtx->lockOnReticles) - 1;
} }
Target_SetReticlePos(targetCtx, targetCtx->unk_4C, projTargetCenter.x, projTargetCenter.y, projTargetCenter.z); Target_SetReticlePos(targetCtx, targetCtx->curReticle, projectedPos.x, projectedPos.y, projectedPos.z);
if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->unk_664)) { if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->unk_664)) {
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_57); OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_57);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { for (i = 0, curReticle = targetCtx->curReticle; i < numReticles;
entry = &targetCtx->lockOnReticles[spAC]; i++, curReticle = (curReticle + 1) % ARRAY_COUNT(targetCtx->lockOnReticles)) {
reticle = &targetCtx->lockOnReticles[curReticle];
if (entry->radius < 500.0f) { if (reticle->radius < 500.0f) {
if (entry->radius <= 120.0f) { if (reticle->radius <= 120.0f) {
var2 = 0.15f; lockOnScaleX = 0.15f;
} else { } else {
var2 = ((entry->radius - 120.0f) * 0.001f) + 0.15f; lockOnScaleX = ((reticle->radius - 120.0f) * 0.001f) + 0.15f;
} }
Matrix_Translate(entry->pos.x, entry->pos.y, 0.0f, MTXMODE_NEW); Matrix_Translate(reticle->pos.x, reticle->pos.y, 0.0f, MTXMODE_NEW);
Matrix_Scale(var2, 0.15f, 1.0f, MTXMODE_APPLY); Matrix_Scale(lockOnScaleX, 0.15f, 1.0f, MTXMODE_APPLY);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, entry->color.r, entry->color.g, entry->color.b, (u8)spCE); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, reticle->color.r, reticle->color.g, reticle->color.b,
(u8)alpha);
Matrix_RotateZ((targetCtx->unk_4B & 0x7F) * (M_PI / 64), MTXMODE_APPLY); Matrix_RotateZ((targetCtx->reticleSpinCounter & 0x7F) * (M_PI / 64), MTXMODE_APPLY);
for (i = 0; i < 4; i++) { // Draw the 4 triangles that make up the reticle
for (triangleIndex = 0; triangleIndex < 4; triangleIndex++) {
Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY); Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
Matrix_Push(); Matrix_Push();
Matrix_Translate(entry->radius, entry->radius, 0.0f, MTXMODE_APPLY); Matrix_Translate(reticle->radius, reticle->radius, 0.0f, MTXMODE_APPLY);
gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2116), gSPMatrix(OVERLAY_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2116),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(OVERLAY_DISP++, gZTargetLockOnTriangleDL); gSPDisplayList(OVERLAY_DISP++, gZTargetLockOnTriangleDL);
@ -408,17 +418,19 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
} }
} }
spCE -= 0xFF / 3; alpha -= 255 / ARRAY_COUNT(targetCtx->lockOnReticles);
if (spCE < 0) {
spCE = 0; if (alpha < 0) {
alpha = 0;
} }
} }
} }
} }
actor = targetCtx->unk_94; actor = targetCtx->arrowHoverActor;
if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) { if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) {
TargetColor* naviColor = &sTargetColorList[actor->category]; TargetColor* arrowColor = &sTargetColorList[actor->category];
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_7); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_7);
@ -427,7 +439,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
Matrix_RotateY(BINANG_TO_RAD((u16)(play->gameplayFrames * 3000)), MTXMODE_APPLY); Matrix_RotateY(BINANG_TO_RAD((u16)(play->gameplayFrames * 3000)), MTXMODE_APPLY);
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, arrowColor->inner.r, arrowColor->inner.g, arrowColor->inner.b, 255);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL); gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL);
} }
@ -446,10 +458,10 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
if ((player->unk_664 != NULL) && if ((player->unk_664 != NULL) &&
(player->controlStickDirections[player->controlStickDataIndex] == PLAYER_STICK_DIR_BACKWARD)) { (player->controlStickDirections[player->controlStickDataIndex] == PLAYER_STICK_DIR_BACKWARD)) {
targetCtx->unk_94 = NULL; targetCtx->arrowHoverActor = NULL;
} else { } else {
func_80032AF0(play, &play->actorCtx, &unkActor, player); func_80032AF0(play, &play->actorCtx, &unkActor, player);
targetCtx->unk_94 = unkActor; targetCtx->arrowHoverActor = unkActor;
} }
if (targetCtx->unk_8C != NULL) { if (targetCtx->unk_8C != NULL) {
@ -489,7 +501,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
Target_SetNaviState(targetCtx, unkActor, actorCategory, play); Target_SetNaviState(targetCtx, unkActor, actorCategory, play);
} }
if ((actorArg != NULL) && (targetCtx->unk_4B == 0)) { if ((actorArg != NULL) && (targetCtx->reticleSpinCounter == 0)) {
Actor_ProjectPos(play, &actorArg->focus.pos, &projectedFocusPos, &cappedInvWDest); Actor_ProjectPos(play, &actorArg->focus.pos, &projectedFocusPos, &cappedInvWDest);
if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) || if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) ||
(1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) { (1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) {
@ -498,14 +510,14 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
} }
if (actorArg != NULL) { if (actorArg != NULL) {
if (actorArg != targetCtx->targetedActor) { if (actorArg != targetCtx->lockOnActor) {
s32 lockOnSfxId; s32 lockOnSfxId;
Target_InitReticle(targetCtx, actorArg->category, play); Target_InitReticle(targetCtx, actorArg->category, play);
targetCtx->targetedActor = actorArg; targetCtx->lockOnActor = actorArg;
if (actorArg->id == ACTOR_EN_BOOM) { if (actorArg->id == ACTOR_EN_BOOM) {
targetCtx->unk_48 = 0; targetCtx->reticleFadeAlphaControl = 0;
} }
lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON
@ -513,23 +525,23 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
Sfx_PlaySfxCentered(lockOnSfxId); Sfx_PlaySfxCentered(lockOnSfxId);
} }
targetCtx->targetCenterPos.x = actorArg->world.pos.x; targetCtx->lockOnPos.x = actorArg->world.pos.x;
targetCtx->targetCenterPos.y = actorArg->world.pos.y - (actorArg->shape.yOffset * actorArg->scale.y); targetCtx->lockOnPos.y = actorArg->world.pos.y - (actorArg->shape.yOffset * actorArg->scale.y);
targetCtx->targetCenterPos.z = actorArg->world.pos.z; targetCtx->lockOnPos.z = actorArg->world.pos.z;
if (targetCtx->unk_4B == 0) { if (targetCtx->reticleSpinCounter == 0) {
f32 temp5 = (500.0f - targetCtx->reticleRadius) * 3.0f; f32 temp5 = (500.0f - targetCtx->reticleRadius) * 3.0f;
f32 temp6 = (temp5 < 30.0f) ? 30.0f : ((100.0f < temp5) ? 100.0f : temp5); f32 temp6 = (temp5 < 30.0f) ? 30.0f : ((100.0f < temp5) ? 100.0f : temp5);
if (Math_StepToF(&targetCtx->reticleRadius, 80.0f, temp6) != 0) { if (Math_StepToF(&targetCtx->reticleRadius, 80.0f, temp6) != 0) {
targetCtx->unk_4B++; targetCtx->reticleSpinCounter++;
} }
} else { } else {
targetCtx->unk_4B = (targetCtx->unk_4B + 3) | 0x80; targetCtx->reticleSpinCounter = (targetCtx->reticleSpinCounter + 3) | 0x80;
targetCtx->reticleRadius = 120.0f; targetCtx->reticleRadius = 120.0f;
} }
} else { } else {
targetCtx->targetedActor = NULL; targetCtx->lockOnActor = NULL;
Math_StepToF(&targetCtx->reticleRadius, 500.0f, 80.0f); Math_StepToF(&targetCtx->reticleRadius, 500.0f, 80.0f);
} }
} }
@ -2313,8 +2325,8 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
if ((actor == NULL) || (player->unk_66C < 5)) { if ((actor == NULL) || (player->unk_66C < 5)) {
actor = NULL; actor = NULL;
if (actorCtx->targetCtx.unk_4B != 0) { if (actorCtx->targetCtx.reticleSpinCounter != 0) {
actorCtx->targetCtx.unk_4B = 0; actorCtx->targetCtx.reticleSpinCounter = 0;
Sfx_PlaySfxCentered(NA_SE_SY_LOCK_OFF); Sfx_PlaySfxCentered(NA_SE_SY_LOCK_OFF);
} }
} }

View File

@ -3272,7 +3272,7 @@ void Interface_Draw(PlayState* play) {
if ((R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_PROCESS) && if ((R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_PROCESS) &&
(R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_READY)) { (R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_READY)) {
func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target Target_Draw(&play->actorCtx.targetCtx, play);
} }
Gfx_SetupDL_39Overlay(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);

View File

@ -3480,7 +3480,7 @@ void Player_UpdateShapeYaw(Player* this, PlayState* play) {
Actor* unk_664 = this->unk_664; Actor* unk_664 = this->unk_664;
if ((unk_664 != NULL) && if ((unk_664 != NULL) &&
((play->actorCtx.targetCtx.unk_4B != 0) || (this->actor.category != ACTORCAT_PLAYER))) { ((play->actorCtx.targetCtx.reticleSpinCounter != 0) || (this->actor.category != ACTORCAT_PLAYER))) {
Math_ScaledStepToS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &unk_664->focus.pos), Math_ScaledStepToS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &unk_664->focus.pos),
4000); 4000);
} else if ((this->stateFlags1 & PLAYER_STATE1_17) && } else if ((this->stateFlags1 & PLAYER_STATE1_17) &&
@ -3588,7 +3588,7 @@ void func_80836BEC(Player* this, PlayState* play) {
if ((actorToTarget != NULL) && !(actorToTarget->flags & ACTOR_FLAG_27)) { if ((actorToTarget != NULL) && !(actorToTarget->flags & ACTOR_FLAG_27)) {
if ((actorToTarget == this->unk_664) && (this->actor.category == ACTORCAT_PLAYER)) { if ((actorToTarget == this->unk_664) && (this->actor.category == ACTORCAT_PLAYER)) {
actorToTarget = play->actorCtx.targetCtx.unk_94; actorToTarget = play->actorCtx.targetCtx.arrowHoverActor;
} }
if (actorToTarget != this->unk_664) { if (actorToTarget != this->unk_664) {
@ -3749,7 +3749,7 @@ s32 Player_GetMovementSpeedAndYaw(Player* this, f32* outSpeedTarget, s16* outYaw
*outYawTarget = this->actor.shape.rot.y; *outYawTarget = this->actor.shape.rot.y;
if (this->unk_664 != NULL) { if (this->unk_664 != NULL) {
if ((play->actorCtx.targetCtx.unk_4B != 0) && !(this->stateFlags2 & PLAYER_STATE2_6)) { if ((play->actorCtx.targetCtx.reticleSpinCounter != 0) && !(this->stateFlags2 & PLAYER_STATE2_6)) {
*outYawTarget = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_664->focus.pos); *outYawTarget = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_664->focus.pos);
return false; return false;
} }

View File

@ -323,7 +323,7 @@ Target_SetReticlePos = 0x8001FE44; // type:func
Target_InitReticle = 0x8001FE7C; // type:func Target_InitReticle = 0x8001FE7C; // type:func
Target_SetNaviState = 0x8001FF44; // type:func Target_SetNaviState = 0x8001FF44; // type:func
Target_Init = 0x800200A8; // type:func Target_Init = 0x800200A8; // type:func
func_8002C124 = 0x8002010C; // type:func Target_Draw = 0x8002010C; // type:func
func_8002C7BC = 0x80020748; // type:func func_8002C7BC = 0x80020748; // type:func
Flags_GetSwitch = 0x80020ADC; // type:func Flags_GetSwitch = 0x80020ADC; // type:func
Flags_SetSwitch = 0x80020B10; // type:func Flags_SetSwitch = 0x80020B10; // type:func