mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
Name player's generic actionVar
s (#1538)
* name player generic vars * format
This commit is contained in:
parent
ba07f21e9d
commit
6c3e8d63cf
7 changed files with 327 additions and 322 deletions
|
@ -707,8 +707,8 @@ typedef struct Player {
|
|||
/* 0x0846 */ u8 unk_846;
|
||||
/* 0x0847 */ s8 unk_847[4];
|
||||
/* 0x084B */ s8 unk_84B[4];
|
||||
/* 0x084F */ s8 unk_84F;
|
||||
/* 0x0850 */ s16 unk_850; // multipurpose timer
|
||||
/* 0x084F */ s8 actionVar1; // context dependent variable that has different meanings depending on what action is currently running
|
||||
/* 0x0850 */ s16 actionVar2; // context dependent variable that has different meanings depending on what action is currently running
|
||||
/* 0x0854 */ f32 unk_854;
|
||||
/* 0x0858 */ f32 unk_858;
|
||||
/* 0x085C */ f32 unk_85C; // stick length among other things
|
||||
|
|
|
@ -756,7 +756,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if (this->work[MO_TENT_ACTION_STATE] == MO_TENT_GRAB) {
|
||||
player->unk_850 = 0xA;
|
||||
player->actionVar2 = 0xA;
|
||||
player->actor.speed = player->actor.velocity.y = 0;
|
||||
Math_ApproachF(&player->actor.world.pos.x, this->grabPosRot.pos.x, 0.5f, 20.0f);
|
||||
Math_ApproachF(&player->actor.world.pos.y, this->grabPosRot.pos.y, 0.5f, 20.0f);
|
||||
|
@ -814,7 +814,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
Math_ApproachS(&this->tentRot[indS1].z, tempf2, 1.0f / this->tentMaxAngle, this->tentSpeed);
|
||||
}
|
||||
}
|
||||
player->unk_850 = 0xA;
|
||||
player->actionVar2 = 0xA;
|
||||
player->actor.world.pos.x = this->grabPosRot.pos.x;
|
||||
player->actor.world.pos.y = this->grabPosRot.pos.y;
|
||||
player->actor.world.pos.z = this->grabPosRot.pos.z;
|
||||
|
@ -833,7 +833,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
this->work[MO_TENT_ACTION_STATE] = MO_TENT_RETREAT;
|
||||
this->work[MO_TENT_INVINC_TIMER] = 50;
|
||||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_850 = 0x65;
|
||||
player->actionVar2 = 0x65;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = PLAYER_CSMODE_NONE;
|
||||
if (this->timers[0] == 0) {
|
||||
|
@ -863,7 +863,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
case MO_TENT_CUT:
|
||||
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EV_WATER_WALL - SFX_FLAG);
|
||||
if (&this->actor == player->actor.parent) {
|
||||
player->unk_850 = 0x65;
|
||||
player->actionVar2 = 0x65;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = PLAYER_CSMODE_NONE;
|
||||
}
|
||||
|
@ -1784,7 +1784,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
|
|||
sMorphaTent2->tent2KillTimer = 1;
|
||||
}
|
||||
if (player->actor.parent != NULL) {
|
||||
player->unk_850 = 0x65;
|
||||
player->actionVar2 = 0x65;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = PLAYER_CSMODE_NONE;
|
||||
}
|
||||
|
@ -1803,7 +1803,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
|
|||
sMorphaTent1->timers[0] = 40;
|
||||
sMorphaTent1->actor.flags &= ~ACTOR_FLAG_0;
|
||||
if (player->actor.parent == &sMorphaTent1->actor) {
|
||||
player->unk_850 = 0x65;
|
||||
player->actionVar2 = 0x65;
|
||||
player->actor.parent = NULL;
|
||||
player->csMode = PLAYER_CSMODE_NONE;
|
||||
}
|
||||
|
|
|
@ -1749,7 +1749,7 @@ void BossSst_HandClap(BossSst* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (player->actor.parent == &this->actor) {
|
||||
player->unk_850 = 0;
|
||||
player->actionVar2 = 0;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
}
|
||||
}
|
||||
|
@ -1844,7 +1844,7 @@ void BossSst_HandGrab(BossSst* this, PlayState* play) {
|
|||
this->actor.world.pos.x += this->actor.speed * Math_SinS(this->actor.world.rot.y);
|
||||
this->actor.world.pos.z += this->actor.speed * Math_CosS(this->actor.world.rot.y);
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->unk_850 = 0;
|
||||
player->actionVar2 = 0;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
player->actor.shape.rot.y = this->actor.shape.rot.y;
|
||||
}
|
||||
|
@ -1938,7 +1938,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->unk_850 = 0;
|
||||
player->actionVar2 = 0;
|
||||
Math_Vec3f_Copy(&player->actor.world.pos, &this->actor.world.pos);
|
||||
player->actor.shape.rot.x = this->actor.shape.rot.x;
|
||||
player->actor.shape.rot.z = (this->vParity * -0x4000) + this->actor.shape.rot.z;
|
||||
|
@ -2422,7 +2422,7 @@ void BossSst_HandReleasePlayer(BossSst* this, PlayState* play, s32 dropPlayer) {
|
|||
|
||||
if (player->actor.parent == &this->actor) {
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 100;
|
||||
player->actionVar2 = 100;
|
||||
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
OTHER_HAND(this)->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
if (dropPlayer) {
|
||||
|
|
|
@ -129,7 +129,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
|
|||
player = GET_PLAYER(play);
|
||||
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
|
||||
if ((this->actor.targetMode != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(player->stateFlags1 & PLAYER_STATE1_31) && (player->unk_84F == 0)) {
|
||||
(player->stateFlags1 & PLAYER_STATE1_31) && (player->actionVar1 == 0)) {
|
||||
destinationIdx = ((this->actor.params >> 0xC) & 7) - 1;
|
||||
Play_SetupRespawnPoint(play, RESPAWN_MODE_RETURN, 0x4FF);
|
||||
gSaveContext.respawn[RESPAWN_MODE_RETURN].pos.y = this->actor.world.pos.y;
|
||||
|
|
|
@ -245,7 +245,7 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
}
|
||||
|
||||
if (this->actor.home.rot.z != 0) {
|
||||
|
@ -285,7 +285,7 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
}
|
||||
|
||||
this->actor.home.rot.z = 1;
|
||||
|
@ -306,7 +306,7 @@ void EnDha_TakeDamage(EnDha* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 2000, 0);
|
||||
|
@ -344,7 +344,7 @@ void EnDha_Die(EnDha* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 0x7D0, 0);
|
||||
|
|
|
@ -604,7 +604,7 @@ void EnMb_Stunned(EnMb* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
this->attack = ENMB_ATTACK_NONE;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
}
|
||||
|
||||
|
@ -936,7 +936,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
|
|||
hasHitPlayer = true;
|
||||
player->actor.world.pos.z = this->actor.world.pos.z + Math_SinS(this->actor.shape.rot.y) * 10.0f +
|
||||
Math_CosS(this->actor.shape.rot.y) * 89.0f;
|
||||
player->unk_850 = 0;
|
||||
player->actionVar2 = 0;
|
||||
player->actor.speed = 0.0f;
|
||||
player->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
@ -947,7 +947,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
|
|||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
}
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
|
|||
hasHitPlayer = true;
|
||||
player->actor.world.pos.z = this->actor.world.pos.z + Math_SinS(this->actor.shape.rot.y) * 10.0f +
|
||||
Math_CosS(this->actor.shape.rot.y) * 89.0f;
|
||||
player->unk_850 = 0;
|
||||
player->actionVar2 = 0;
|
||||
player->actor.speed = 0.0f;
|
||||
player->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
@ -1016,7 +1016,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
|
|||
if (player->stateFlags2 & PLAYER_STATE2_7) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
}
|
||||
this->attack = ENMB_ATTACK_NONE;
|
||||
|
@ -1298,7 +1298,7 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
this->attack = ENMB_ATTACK_NONE;
|
||||
}
|
||||
|
@ -1381,7 +1381,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
|
|||
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_7;
|
||||
player->actor.parent = NULL;
|
||||
player->unk_850 = 200;
|
||||
player->actionVar2 = 200;
|
||||
func_8002F71C(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
|
||||
}
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue