mirror of https://github.com/zeldaret/mm.git
Misc Cleanup 4 (#1271)
* begin next cleanup * more cleanup * climbAnim * more cleanup * more * quick, a few more before anyone looks * PR * another fix * table * another small cleanup * PR Suggestion
This commit is contained in:
parent
e19b139504
commit
8672dc0a57
|
@ -1305,11 +1305,11 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) {
|
|||
if (((sampleBankId1 != 0xFF) && (entry->sampleBankId == sampleBankId1)) ||
|
||||
((sampleBankId2 != 0xFF) && (entry->sampleBankId == sampleBankId2)) || (entry->sampleBankId == 0) ||
|
||||
(entry->sampleBankId == 0xFE)) {
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, fontId) != NULL) {
|
||||
if (1) {}
|
||||
if (AudioLoad_IsFontLoadComplete(fontId) != 0) {
|
||||
AudioHeap_UnapplySampleCacheForFont(entry, fontId);
|
||||
}
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, fontId) == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (AudioLoad_IsFontLoadComplete(fontId) != 0) {
|
||||
AudioHeap_UnapplySampleCacheForFont(entry, fontId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1844,8 +1844,6 @@ void Camera_CalcDefaultSwing(Camera* camera, VecGeo* arg1, VecGeo* arg2, f32 arg
|
|||
|
||||
if (swing->unk_64 == 1) {
|
||||
if (arg3 < (sp88 = OLib_Vec3fDist(at, &swing->collisionClosePoint))) {
|
||||
//! FAKE:
|
||||
dummy:;
|
||||
swing->unk_64 = 0;
|
||||
} else if ((sp88 = Math3D_SignedDistanceFromPlane(swing->eyeAtColChk.norm.x, swing->eyeAtColChk.norm.y,
|
||||
swing->eyeAtColChk.norm.z, swing->eyeAtColChk.poly->dist,
|
||||
|
@ -6325,8 +6323,9 @@ s32 Camera_Demo4(Camera* camera) {
|
|||
sCameraInterfaceFlags = roData->interfaceFlags;
|
||||
|
||||
switch (camera->animState) {
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
default:
|
||||
break;
|
||||
|
||||
case 0:
|
||||
camera->animState++;
|
||||
rwData->timer = 0;
|
||||
|
|
|
@ -67,8 +67,7 @@ void FireObj_StepSize(FireObj* fire) {
|
|||
if (Math_StepToF(&fire->dynamicSize, 1.0f, fire->dynamicSizeStep)) {
|
||||
FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_FULLY_LIT);
|
||||
}
|
||||
} else if ((fire->state == FIRE_STATE_SHRINKING) &&
|
||||
(Math_StepToF(&fire->dynamicSize, 0.0f, fire->dynamicSizeStep))) {
|
||||
} else if ((fire->state == FIRE_STATE_SHRINKING) && Math_StepToF(&fire->dynamicSize, 0.0f, fire->dynamicSizeStep)) {
|
||||
FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_NOT_LIT);
|
||||
}
|
||||
if (fire->sizeGrowsCos2 == 1) {
|
||||
|
|
|
@ -1117,7 +1117,7 @@ void Play_PostWorldDraw(PlayState* this) {
|
|||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Stack issues and 1 small issue around Play_PostWorldDraw
|
||||
// Something weird going on with the stack of the unused arg0 of `Camera_Update`
|
||||
void Play_DrawMain(PlayState* this) {
|
||||
GraphicsContext* gfxCtx = this->state.gfxCtx;
|
||||
Lights* sp268;
|
||||
|
@ -1270,7 +1270,7 @@ void Play_DrawMain(PlayState* this) {
|
|||
|
||||
if (!this->unk_18844) {
|
||||
if (1) {
|
||||
if ((this->skyboxId != SKYBOX_NONE) && !this->envCtx.skyboxDisabled) {
|
||||
if (((u32)this->skyboxId != SKYBOX_NONE) && !this->envCtx.skyboxDisabled) {
|
||||
if ((this->skyboxId == SKYBOX_NORMAL_SKY) || (this->skyboxId == SKYBOX_3)) {
|
||||
Environment_UpdateSkybox(this->skyboxId, &this->envCtx, &this->skyboxCtx);
|
||||
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, this->envCtx.skyboxBlend,
|
||||
|
@ -1306,10 +1306,11 @@ void Play_DrawMain(PlayState* this) {
|
|||
if (this->skyboxCtx.skyboxShouldDraw) {
|
||||
Vec3f sp78;
|
||||
|
||||
if (1) {}
|
||||
Camera_GetQuakeOffset(&sp78, GET_ACTIVE_CAM(this));
|
||||
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x + sp78.x,
|
||||
this->view.eye.y + sp78.y, this->view.eye.z + sp78.z);
|
||||
if (1) {
|
||||
Camera_GetQuakeOffset(&sp78, GET_ACTIVE_CAM(this));
|
||||
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x + sp78.x,
|
||||
this->view.eye.y + sp78.y, this->view.eye.z + sp78.z);
|
||||
}
|
||||
}
|
||||
|
||||
// envCtx.precipitation[PRECIP_RAIN_CUR]
|
||||
|
@ -1370,9 +1371,8 @@ void Play_DrawMain(PlayState* this) {
|
|||
|
||||
Play_DrawMotionBlur(this);
|
||||
|
||||
if (((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) ||
|
||||
(gTransitionTileState == TRANS_TILE_SETUP)) ||
|
||||
(R_PICTO_PHOTO_STATE == PICTO_PHOTO_STATE_SETUP)) {
|
||||
if ((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) ||
|
||||
(gTransitionTileState == TRANS_TILE_SETUP) || (R_PICTO_PHOTO_STATE == PICTO_PHOTO_STATE_SETUP)) {
|
||||
Gfx* sp74;
|
||||
Gfx* sp70 = POLY_OPA_DISP;
|
||||
|
||||
|
@ -1405,15 +1405,18 @@ void Play_DrawMain(PlayState* this) {
|
|||
POLY_OPA_DISP = sp74;
|
||||
this->unk_18B49 = 2;
|
||||
SREG(33) |= 1;
|
||||
} else {
|
||||
PostWorldDraw:
|
||||
if (1) {
|
||||
Play_PostWorldDraw(this);
|
||||
}
|
||||
goto SkipPostWorldDraw;
|
||||
}
|
||||
|
||||
PostWorldDraw:
|
||||
if (1) {
|
||||
Play_PostWorldDraw(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SkipPostWorldDraw:
|
||||
|
||||
if ((this->view.unk164 != 0) && !gDbgCamEnabled) {
|
||||
Vec3s sp4C;
|
||||
|
||||
|
@ -1429,7 +1432,7 @@ void Play_DrawMain(PlayState* this) {
|
|||
func_800FE3E0(this);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(this->state.gfxCtx);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
#else
|
||||
void Play_DrawMain(PlayState* this);
|
||||
|
|
|
@ -188,7 +188,7 @@ s32 SubS_UpdateLimb(s16 newRotZ, s16 newRotY, Vec3f* pos, Vec3s* rot, s32 stepRo
|
|||
|
||||
Matrix_MultVec3f(&zeroVec, &newPos);
|
||||
Matrix_Get(&curState);
|
||||
Matrix_MtxFToYXZRot(&curState, &newRot, MTXMODE_NEW);
|
||||
Matrix_MtxFToYXZRot(&curState, &newRot, false);
|
||||
*pos = newPos;
|
||||
|
||||
if (!stepRot && !overrideRot) {
|
||||
|
|
|
@ -266,8 +266,6 @@ s32 __osGetId(OSPfs* pfs) {
|
|||
|
||||
bcopy(id, pfs->id, BLOCKSIZE);
|
||||
|
||||
if (0) {}
|
||||
|
||||
pfs->version = id->version;
|
||||
|
||||
pfs->banks = id->banks;
|
||||
|
|
|
@ -131,8 +131,8 @@ void func_80AAB710(DmChar03* this, PlayState* play) {
|
|||
void func_80AAB838(DmChar03* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_MASK_BOUND_0);
|
||||
} else if ((Animation_OnFrame(&this->skelAnime, 10.0f)) || (Animation_OnFrame(&this->skelAnime, 18.0f)) ||
|
||||
(Animation_OnFrame(&this->skelAnime, 30.0f)) || (Animation_OnFrame(&this->skelAnime, 38.0f))) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 10.0f) || Animation_OnFrame(&this->skelAnime, 18.0f) ||
|
||||
Animation_OnFrame(&this->skelAnime, 30.0f) || Animation_OnFrame(&this->skelAnime, 38.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_MASK_BOUND_1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ void func_808B0208(EnAm* this, PlayState* play) {
|
|||
this->actor.world.pos.z += this->actor.speed * Math_CosS(this->actor.world.rot.y);
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f) != 0) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
this->actor.speed = this->speed;
|
||||
this->actor.velocity.y = 12.0f;
|
||||
} else if (this->skelAnime.curFrame > 11.0f) {
|
||||
|
|
|
@ -667,7 +667,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) {
|
|||
Matrix_Translate(0.0f, 0.0f, 460.0f, MTXMODE_APPLY);
|
||||
|
||||
if (this->actor.speed == 0.0f) {
|
||||
func_800B8118(&this->actor, play, MTXMODE_NEW);
|
||||
func_800B8118(&this->actor, play, 0);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_06F380);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2);
|
||||
|
|
|
@ -256,7 +256,7 @@ void EnBb_FlyIdle(EnBb* this, PlayState* play) {
|
|||
|
||||
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_WING);
|
||||
} else if ((Animation_OnFrame(&this->skelAnime, 0.0f)) && (Rand_ZeroOne() < 0.1f)) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 0.0f) && (Rand_ZeroOne() < 0.1f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_LAUGH);
|
||||
}
|
||||
|
||||
|
@ -287,11 +287,11 @@ void EnBb_Attack(EnBb* this, PlayState* play) {
|
|||
this->targetYRotation = this->actor.yawTowardsPlayer;
|
||||
EnBb_UpdateStateForFlying(this);
|
||||
|
||||
if ((Animation_OnFrame(&this->skelAnime, 0.0f)) || (Animation_OnFrame(&this->skelAnime, 5.0f))) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_MOUTH);
|
||||
} else if ((Animation_OnFrame(&this->skelAnime, 2.0f)) || (Animation_OnFrame(&this->skelAnime, 7.0f))) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_WING);
|
||||
} else if ((Animation_OnFrame(&this->skelAnime, 0.0f)) && (Rand_ZeroOne() < 0.1f)) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 0.0f) && (Rand_ZeroOne() < 0.1f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_LAUGH);
|
||||
}
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ void EnCrow_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_SetFocus(&this->actor, height);
|
||||
|
||||
if ((this->actor.colChkInfo.health != 0) && (Animation_OnFrame(&this->skelAnime, 3.0f))) {
|
||||
if ((this->actor.colChkInfo.health != 0) && Animation_OnFrame(&this->skelAnime, 3.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_KAICHO_FLUTTER);
|
||||
}
|
||||
if (this->drawDmgEffAlpha > 0.0f) {
|
||||
|
|
|
@ -943,12 +943,16 @@ void func_80A73408(EnDno* this, PlayState* play) {
|
|||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
|
||||
if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) &&
|
||||
(this->animIndex == EN_DNO_ANIM_SHOCK_START)) {
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
switch (this->animIndex) {
|
||||
case EN_DNO_ANIM_SHOCK_START:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, EN_DNO_ANIM_SHOCK_LOOP,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, EN_DNO_ANIM_SHOCK_LOOP, &this->animIndex);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,77 +110,6 @@ typedef enum EnGoAnimationIndex {
|
|||
/* 21 */ ENGO_ANIM_LOOK_AROUND_LOOPED
|
||||
} EnGoAnimationIndex;
|
||||
|
||||
EnGoEffect* EnGo_InitSteam(EnGoEffect effect[], Vec3f pos, Vec3f accel, Vec3f velocity, f32 scale, f32 deltaScale,
|
||||
s32 maxFrames);
|
||||
void EnGo_DrawSteam(EnGoEffect effect[], PlayState* play2);
|
||||
|
||||
void EnGo_InitDust(EnGoEffect effect[], Vec3f pos, Vec3f accel, Vec3f vel, f32 scale, f32 deltaScale, s32 maxFrames,
|
||||
EnGoEffectType parentEffectType);
|
||||
void EnGo_DrawDust(EnGoEffect effect[], PlayState* play2);
|
||||
|
||||
void EnGo_InitSnow(EnGoEffect effect[], Vec3f pos);
|
||||
void EnGo_UpdateSnow(EnGoEffect* effect, f32 dustConversionHeight);
|
||||
void EnGo_DrawSnow(EnGoEffect effect[], PlayState* play, Gfx* material, Gfx* model, u8 effectType);
|
||||
|
||||
void EnGo_UpdateEffects(EnGo* this);
|
||||
void EnGo_DrawEffects(EnGo* this, PlayState* play);
|
||||
|
||||
s32 EnGo_CanSnowballHurtPlayer(PlayState* play);
|
||||
s32 EnGo_IsFallingAsleep(EnGo* this, PlayState* play);
|
||||
|
||||
s32 EnGo_UpdateFocus(EnGo* this);
|
||||
|
||||
void EnGo_UpdateSnowballCollider(EnGo* this, PlayState* play);
|
||||
void EnGo_UpdateMedigoronCollider(EnGo* this, PlayState* play);
|
||||
void EnGo_UpdateRolledUpCollider(EnGo* this, PlayState* play);
|
||||
void EnGo_UpdateFrozenCollider(EnGo* this, PlayState* play);
|
||||
void EnGo_UpdateStandingCollider(EnGo* this, PlayState* play);
|
||||
void EnGo_UpdateCollider(EnGo* this, PlayState* play);
|
||||
|
||||
s32 EnGo_UpdateTalking(EnGo* this, PlayState* play);
|
||||
s32 EnGo_DetectCollisions(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateSpringArrivalCutscene(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateAnimationToCurrent(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateSfx(EnGo* this, PlayState* play);
|
||||
s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimationIndex animIndex);
|
||||
void EnGo_UpdateEyes(EnGo* this);
|
||||
|
||||
void EnGo_UpdateShiverSurprisedAnimation(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateGraveyardAttentionTargetAndReactions(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateRotationToTarget(EnGo* this, PlayState* play);
|
||||
s32 EnGo_UpdateAttentionTargetAndReactions(EnGo* this, PlayState* play);
|
||||
|
||||
void EnGo_GravemakerIdle(EnGo* this, PlayState* play);
|
||||
void EnGo_FrozenIdle(EnGo* this, PlayState* play);
|
||||
Actor* EnGo_FindGravemaker(EnGo* this, PlayState* play);
|
||||
|
||||
void EnGo_UpdateMedigoronColliderRadius(EnGo* this, PlayState* play, s32 isGivenPowderKeg);
|
||||
s32 EnGo_ChangeCutscene(EnGo* this, s16 csId);
|
||||
|
||||
s32 EnGo_HandleGatekeeperPoundCutscene(EnGo* this, f32 initialVelocity, f32 maxDistortion, s32 maxHangtime);
|
||||
void EnGo_AddGatekeeperPoundQuake(PlayState* play, s16 speed, s16 verticalMag, s16 countdown);
|
||||
void EnGo_CreateGatekeeperPoundEffects(EnGo* this, PlayState* play);
|
||||
void EnGo_DrawIceBlockWhenFrozen(EnGo* this, PlayState* play, f32 scale, f32 alpha);
|
||||
void EnGo_MakeSteam(EnGo* this);
|
||||
|
||||
s32 EnGo_HandleOpenShrineCutscene(Actor* thisx, PlayState* play);
|
||||
s32 EnGo_HandleGivePowderKegCutscene(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnGo_ChangeToStretchingAnimation(EnGo* this, PlayState* play);
|
||||
void EnGo_ChangeToSpectatingAnimation(EnGo* this, PlayState* play);
|
||||
void EnGo_ChangeToFrozenAnimation(EnGo* this, PlayState* play);
|
||||
void EnGo_ChangeToSnowballAnimation(EnGo* this, PlayState* play);
|
||||
void EnGo_ChangeToCoveringEarsAnimation(EnGo* this, PlayState* play);
|
||||
void EnGo_ChangeToShiveringAnimation(EnGo* this, PlayState* play);
|
||||
|
||||
void EnGo_SetupAthletic(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupSpectator(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupGatekeeper(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupGraveyardGoron(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupShrineGoron(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupMedigoron(EnGo* this, PlayState* play);
|
||||
void EnGo_SetupInitialAction(EnGo* this, PlayState* play);
|
||||
|
||||
void EnGo_Idle(EnGo* this, PlayState* play);
|
||||
void EnGo_Sleep(EnGo* this, PlayState* play);
|
||||
void EnGo_Frozen(EnGo* this, PlayState* play);
|
||||
|
@ -191,8 +120,6 @@ void EnGo_HandleSpringArrivalCutscene(EnGo* this, PlayState* play);
|
|||
|
||||
void EnGo_Snowball(EnGo* this, PlayState* play);
|
||||
|
||||
s32* EnGo_GetMsgEventScript(EnGo* this, PlayState* play);
|
||||
|
||||
void EnGo_Talk(EnGo* this, PlayState* play);
|
||||
|
||||
// MsgEvent script for the Goron who made Darmani's grave in the mountain village.
|
||||
|
@ -461,6 +388,7 @@ void EnGo_DrawSteam(EnGoEffect effect[ENGO_EFFECT_COUNT], PlayState* play2) {
|
|||
f32 alpha;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
for (i = 0; i < ENGO_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != ENGO_EFFECT_STEAM) {
|
||||
|
@ -554,6 +482,7 @@ void EnGo_DrawDust(EnGoEffect effect[ENGO_EFFECT_COUNT], PlayState* play2) {
|
|||
f32 alpha;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
for (i = 0; i < ENGO_EFFECT_COUNT; i++, effect++) {
|
||||
if ((effect->type < ENGO_EFFECT_DUST_MIN) || (effect->type >= ENGO_EFFECT_STEAM_MIN)) {
|
||||
|
@ -599,14 +528,13 @@ void EnGo_DrawDust(EnGoEffect effect[ENGO_EFFECT_COUNT], PlayState* play2) {
|
|||
* @param effect The EnGoEffect table
|
||||
* @param pos Position around which the effects appear
|
||||
*/
|
||||
void EnGo_InitSnow(EnGoEffect effect[ENGO_EFFECT_COUNT], Vec3f pos) {
|
||||
static u8 effectIndexToSnowEffectTable[] = {
|
||||
void EnGo_InitSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], Vec3f pos) {
|
||||
static u8 effectIndexToSnowEffectTable[ENGO_SNOW_EFFECT_COUNT] = {
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
ENGO_EFFECT_SNOW3, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW1, ENGO_EFFECT_SNOW2,
|
||||
};
|
||||
|
||||
EnGoEffect* dustEffects = &effect[ENGO_SNOW_EFFECT_COUNT];
|
||||
s32 i;
|
||||
Vec3f randRelativeToWorldPos;
|
||||
|
@ -722,7 +650,9 @@ void EnGo_DrawSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], PlayState* play, G
|
|||
u8 isMaterialSet = false;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ENGO_SNOW_EFFECT_COUNT; i++, effect++) {
|
||||
if (effect->type != effectType) {
|
||||
continue;
|
||||
|
@ -1021,7 +951,7 @@ s32 EnGo_UpdateSpringArrivalCutscene(EnGo* this, PlayState* play) {
|
|||
if ((ENGO_GET_TYPE(&this->actor) == ENGO_GRAVEYARD) && (play->csCtx.state != CS_STATE_IDLE) &&
|
||||
(this->actor.draw != NULL) && (play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneLayer == 1) &&
|
||||
(play->csCtx.scriptIndex == 0)) {
|
||||
if (this->springArrivalCutsceneActive == false) {
|
||||
if (!this->springArrivalCutsceneActive) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->springArrivalCueId = 255;
|
||||
this->springArrivalCutsceneActive = true;
|
||||
|
|
|
@ -328,7 +328,7 @@ void EnGuardNuts_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if ((this->animIndex == WALK_ANIM) &&
|
||||
((Animation_OnFrame(&this->skelAnime, 1.0f)) || (Animation_OnFrame(&this->skelAnime, 5.0f)))) {
|
||||
(Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 5.0f))) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
|
||||
|
|
|
@ -317,8 +317,7 @@ s32 EnHgo_HandleCsAction(EnHgo* this, PlayState* play) {
|
|||
} else if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
switch (this->animIndex) {
|
||||
case HGO_ANIM_ASTONISHED:
|
||||
if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) &&
|
||||
(this->isInCutscene == false)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) && !this->isInCutscene) {
|
||||
this->isInCutscene = true;
|
||||
if ((gSaveContext.sceneLayer == 0) &&
|
||||
((play->csCtx.scriptIndex == 2) || (play->csCtx.scriptIndex == 4))) {
|
||||
|
|
|
@ -537,7 +537,7 @@ void EnIk_HorizontalDoubleAttack(EnIk* this, PlayState* play) {
|
|||
f32 phi_f2;
|
||||
|
||||
this->timer++;
|
||||
if ((Animation_OnFrame(&this->skelAnime, 1.0f)) || (Animation_OnFrame(&this->skelAnime, 13.0f))) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 13.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_IRONNACK_SWING_AXE);
|
||||
}
|
||||
if (((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 9.0f)) ||
|
||||
|
|
|
@ -305,8 +305,8 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->grog->actor.home.rot.z >= 20 && // all 10 chicks have been found
|
||||
(this->hasGrownUp & 1) == false) {
|
||||
if ((this->grog->actor.home.rot.z >= 20) && // all 10 chicks have been found
|
||||
!(this->hasGrownUp & 1)) {
|
||||
this->transformTimer += 2;
|
||||
if (this->transformTimer >= (s32)(s16)((this->actor.home.rot.z * 0x1E) + 0x1E)) {
|
||||
// it is our turn to transform
|
||||
|
|
|
@ -423,7 +423,7 @@ void func_80BF68E0(EnOsk* this) {
|
|||
break;
|
||||
|
||||
case 5:
|
||||
if ((Animation_OnFrame(&this->skelAnime, 6.0f)) || Animation_OnFrame(&this->skelAnime, 11.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 6.0f) || Animation_OnFrame(&this->skelAnime, 11.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_DEBU_HEAD_UP);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -869,9 +869,9 @@ void EnOsn_HandleCsAction(EnOsn* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((this->animIndex == OSN_ANIM_WALK_AWAY) &&
|
||||
(((Animation_OnFrame(&this->skelAnime, 17.0f))) || (Animation_OnFrame(&this->skelAnime, 27.0f)) ||
|
||||
(Animation_OnFrame(&this->skelAnime, 37.0f)) || (Animation_OnFrame(&this->skelAnime, 47.0f)) ||
|
||||
(Animation_OnFrame(&this->skelAnime, 57.0f)) || (Animation_OnFrame(&this->skelAnime, 67.0f)))) {
|
||||
(Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 27.0f) ||
|
||||
Animation_OnFrame(&this->skelAnime, 37.0f) || Animation_OnFrame(&this->skelAnime, 47.0f) ||
|
||||
Animation_OnFrame(&this->skelAnime, 57.0f) || Animation_OnFrame(&this->skelAnime, 67.0f))) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_OMENYA_WALK);
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
|
|
|
@ -296,10 +296,6 @@ void EnPp_Init(Actor* thisx, PlayState* play) {
|
|||
this->bodyCollider.elements[0].dim.modelSphere.center.y = -400;
|
||||
this->bodyColliderElements[0].info.bumperFlags |= BUMP_HOOKABLE;
|
||||
this->maskCollider.elements[0].info.toucher.damage = 0x10;
|
||||
//! FAKE: Needed to fix some regs
|
||||
//! https://decomp.me/scratch/6Yd1B
|
||||
if (this->actor.world.rot.z) {}
|
||||
if (this->actor.world.rot.z) {}
|
||||
}
|
||||
|
||||
Collider_InitQuad(play, &this->hornCollider);
|
||||
|
|
|
@ -1350,7 +1350,7 @@ s32 EnSGoro_UpdateLimb(s16 newRotZ, s16 newRotY, Vec3f* pos, Vec3s* rot, s32 ste
|
|||
|
||||
Matrix_MultVec3f(&zeroVec, &newPos);
|
||||
Matrix_Get(&curState);
|
||||
Matrix_MtxFToYXZRot(&curState, &newRot, MTXMODE_NEW);
|
||||
Matrix_MtxFToYXZRot(&curState, &newRot, false);
|
||||
|
||||
*pos = newPos;
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ void EnSb_UpdateDamage(EnSb* this, PlayState* play) {
|
|||
}
|
||||
if (hitPlayer) {
|
||||
this->unk_252 = 0;
|
||||
if ((this->actor.draw != NULL) && (this->isDrawn == false)) {
|
||||
if ((this->actor.draw != NULL) && !this->isDrawn) {
|
||||
this->isDrawn = true;
|
||||
}
|
||||
this->isDead = true;
|
||||
|
|
|
@ -1295,7 +1295,7 @@ void EnSw_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->unk_410 & 4) {
|
||||
if (ENSW_GET_3(&this->actor)) {
|
||||
func_800B8050(&this->actor, play, MTXMODE_NEW);
|
||||
func_800B8050(&this->actor, play, 0);
|
||||
}
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
Matrix_RotateXS(-0x3C72, MTXMODE_APPLY);
|
||||
|
|
|
@ -190,13 +190,12 @@ void func_80A36360(EnSyatekiOkuta* this) {
|
|||
}
|
||||
|
||||
void func_80A363B4(EnSyatekiOkuta* this, PlayState* play) {
|
||||
if ((Animation_OnFrame(&this->skelAnime, 2.0f)) || (Animation_OnFrame(&this->skelAnime, 15.0f))) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 15.0f)) {
|
||||
if (func_80A361F4(this)) {
|
||||
return;
|
||||
} else {
|
||||
func_80A361B0(this, play);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_OCTAROCK_JUMP);
|
||||
}
|
||||
func_80A361B0(this, play);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_OCTAROCK_JUMP);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
|
|
|
@ -650,7 +650,7 @@ void EnWallmas_Update(Actor* thisx, PlayState* play) {
|
|||
Math_StepToF(&this->drawDmgEffAlpha, 0.0f, 0.05f);
|
||||
this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.275f;
|
||||
this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f);
|
||||
} else if (Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.01375f) == 0) {
|
||||
} else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.01375f)) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -824,7 +824,7 @@ void EnWiz_Dance(EnWiz* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->animLoopCounter >= 3) && (!this->hasActiveProjectile)) {
|
||||
if ((this->animLoopCounter >= 3) && !this->hasActiveProjectile) {
|
||||
this->targetPlatformLightAlpha = 0;
|
||||
EnWiz_SetupWindUp(this);
|
||||
}
|
||||
|
@ -962,7 +962,7 @@ void EnWiz_Attack(EnWiz* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
if ((Animation_OnFrame(&this->skelAnime, 6.0f)) && (!this->hasActiveProjectile)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 6.0f) && !this->hasActiveProjectile) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f pos;
|
||||
s32 type = this->type;
|
||||
|
|
|
@ -170,31 +170,33 @@ void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnYb_ChangeAnim(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f32 morphFrames) {
|
||||
if ((animIndex >= 0) && (animIndex < 3)) {
|
||||
if ((animIndex != this->animIndex) || (animMode != ANIMMODE_LOOP)) {
|
||||
if (animIndex > 0) {
|
||||
if (animMode == ANIMMODE_LOOP) {
|
||||
PlayerAnimation_Change(play, &this->skelAnime, gPlayerAnimations[animIndex - 1], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(gPlayerAnimations[animIndex - 1]), ANIMMODE_LOOP,
|
||||
morphFrames);
|
||||
} else {
|
||||
// unused case, (only called once with animMode = ANIMMODE_LOOP)
|
||||
PlayerAnimation_Change(play, &this->skelAnime, gPlayerAnimations[animIndex - 1], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(gPlayerAnimations[animIndex - 1]), ANIMMODE_LOOP,
|
||||
morphFrames);
|
||||
}
|
||||
} else {
|
||||
// unused case, (only called once with animIndex = 2)
|
||||
AnimationHeader* animationPtr = gYbUnusedAnimations[animIndex];
|
||||
s32 pad;
|
||||
|
||||
if (1) {}
|
||||
|
||||
Animation_Change(&this->skelAnime, gYbUnusedAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(animationPtr), animMode, morphFrames);
|
||||
}
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
if ((animIndex < 0) || (animIndex > 2)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((animIndex == this->animIndex) && (animMode == ANIMMODE_LOOP)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (animIndex > 0) {
|
||||
if (animMode == ANIMMODE_LOOP) {
|
||||
PlayerAnimation_Change(play, &this->skelAnime, gPlayerAnimations[animIndex - 1], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(gPlayerAnimations[animIndex - 1]), ANIMMODE_LOOP,
|
||||
morphFrames);
|
||||
} else {
|
||||
// unused case, (only called once with animMode = ANIMMODE_LOOP)
|
||||
PlayerAnimation_Change(play, &this->skelAnime, gPlayerAnimations[animIndex - 1], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(gPlayerAnimations[animIndex - 1]), ANIMMODE_LOOP,
|
||||
morphFrames);
|
||||
}
|
||||
} else {
|
||||
// unused case, (only called once with animIndex = 2)
|
||||
Animation_Change(&this->skelAnime, gYbUnusedAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(gYbUnusedAnimations[animIndex]), animMode, morphFrames);
|
||||
}
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
|
||||
s32 EnYb_CanTalk(EnYb* this, PlayState* play) {
|
||||
|
|
|
@ -414,86 +414,85 @@ void func_80BBB8AC(EnZos* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.currentTextId) {
|
||||
case 0x1237:
|
||||
player->exchangeItemId = PLAYER_IA_NONE;
|
||||
if ((Message_GetState(&play->msgCtx) != TEXT_STATE_5) || !Message_ShouldAdvance(play)) {
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x1238:
|
||||
case 0x123A:
|
||||
case 0x123B:
|
||||
case 0x123C:
|
||||
case 0x123E:
|
||||
case 0x123F:
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
switch (play->msgCtx.currentTextId) {
|
||||
case 0x1237:
|
||||
player->exchangeItemId = PLAYER_IA_NONE;
|
||||
// fallthrough
|
||||
case 0x1238:
|
||||
case 0x123A:
|
||||
case 0x123B:
|
||||
case 0x123C:
|
||||
case 0x123E:
|
||||
case 0x123F:
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1244:
|
||||
this->unk_2B6 &= ~0x10;
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
case 0x1244:
|
||||
this->unk_2B6 &= ~0x10;
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1232:
|
||||
case 0x1241:
|
||||
player->exchangeItemId = PLAYER_IA_NONE;
|
||||
case 0x1232:
|
||||
case 0x1241:
|
||||
player->exchangeItemId = PLAYER_IA_NONE;
|
||||
// fallthrough
|
||||
case 0x1239:
|
||||
case 0x1246:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1239:
|
||||
case 0x1246:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
case 0x1233:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_ARMS_OUT, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1233:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_ARMS_OUT, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
case 0x1245:
|
||||
case 0x1248:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_FOOT_TAP, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1245:
|
||||
case 0x1248:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_TALK_FOOT_TAP, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
case 0x1231:
|
||||
Message_ContinueTextbox(play, 0xFF);
|
||||
this->actionFunc = func_80BBB718;
|
||||
break;
|
||||
|
||||
case 0x1231:
|
||||
Message_ContinueTextbox(play, 0xFF);
|
||||
this->actionFunc = func_80BBB718;
|
||||
break;
|
||||
case 0x1243:
|
||||
case 0x1249:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
|
||||
case 0x1243:
|
||||
case 0x1249:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
case 0x1234:
|
||||
case 0x123D:
|
||||
case 0x1242:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Actor_ProcessTalkRequest(&this->actor, &play->state);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
|
||||
case 0x1234:
|
||||
case 0x123D:
|
||||
case 0x1242:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Actor_ProcessTalkRequest(&this->actor, &play->state);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
case 0x1236:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
|
||||
case 0x1236:
|
||||
EnZos_ChangeAnim(this, EN_ZOS_ANIM_HANDS_ON_HIPS, ANIMMODE_LOOP);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BBBDE0;
|
||||
this->unk_2B6 |= 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1275,8 +1275,7 @@ void func_80B99160(EnZot* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80B991E4(EnZot* this, PlayState* play) {
|
||||
if (1) {
|
||||
do { } while (0); }
|
||||
if (1) {}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0x800, 0x100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
|
|
@ -93,7 +93,7 @@ void ObjJgameLight_Destroy(Actor* thisx, PlayState* play) {
|
|||
void func_80C15474(ObjJgameLight* this, PlayState* play) {
|
||||
u8 temp_a1;
|
||||
|
||||
if ((this->actor.colChkInfo.health & OBJLUPYGAMELIFT_IGNITE_FIRE) && (this->isOn == false)) {
|
||||
if ((this->actor.colChkInfo.health & OBJLUPYGAMELIFT_IGNITE_FIRE) && !this->isOn) {
|
||||
if (this->lightRadius < 160) {
|
||||
this->lightRadius += 40;
|
||||
} else {
|
||||
|
|
|
@ -397,7 +397,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) {
|
|||
this->dyna.actor.flags |= 0x80;
|
||||
}
|
||||
if (type == OBJSWITCH_TYPE_EYE) {
|
||||
if (sIsSegmentTableInit == false) {
|
||||
if (!sIsSegmentTableInit) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
|
|
|
@ -41,14 +41,14 @@ void Player_Destroy(Actor* thisx, PlayState* play);
|
|||
void Player_Update(Actor* thisx, PlayState* play);
|
||||
void Player_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
s32 Player_GrabPlayer(PlayState* play, Player* player);
|
||||
s32 Player_GrabPlayer(PlayState* play, Player* this);
|
||||
s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode);
|
||||
void func_8085B384(Player* this, PlayState* play);
|
||||
s32 Player_InflictDamage(PlayState* play, s32 damage);
|
||||
void Player_TalkWithPlayer(PlayState* play, Actor* actor);
|
||||
void func_8085B74C(PlayState* play);
|
||||
void func_8085B820(PlayState* play, s16 arg1);
|
||||
PlayerItemAction func_8085B854(PlayState* play, Player* player, ItemId itemId);
|
||||
PlayerItemAction func_8085B854(PlayState* play, Player* this, ItemId itemId);
|
||||
s32 func_8085B930(PlayState* play, PlayerAnimationHeader* talkAnim, AnimationMode animMode);
|
||||
|
||||
void Player_UpdateCommon(Player* this, PlayState* play, Input* input);
|
||||
|
@ -5495,29 +5495,29 @@ s32 func_80834600(Player* this, PlayState* play) {
|
|||
return false;
|
||||
} else {
|
||||
s32 sp58 = func_808340AC(sPlayerCurrentFloorType);
|
||||
u32 sp54 = SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
s32 var_a1 = 0;
|
||||
u32 isSurfaceWallDamage = SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
s32 var_a1 = false;
|
||||
s32 var_v1_2;
|
||||
s32 pad48;
|
||||
|
||||
if ((sp58 < 0) ||
|
||||
((sp54 == 0) && (this->transformation == PLAYER_FORM_GORON) && !(this->actor.depthInWater > 0.0f))) {
|
||||
if ((sp58 < 0) || (!isSurfaceWallDamage && (this->transformation == PLAYER_FORM_GORON) &&
|
||||
!(this->actor.depthInWater > 0.0f))) {
|
||||
var_a1 = (this->actor.wallPoly != NULL) &&
|
||||
SurfaceType_IsWallDamage(&play->colCtx, this->actor.wallPoly, this->actor.wallBgId);
|
||||
if (var_a1 == 0) {
|
||||
if (!var_a1) {
|
||||
//! FAKE?
|
||||
goto label;
|
||||
}
|
||||
}
|
||||
var_v1_2 = (var_a1 != 0) ? this->actor.wallBgId : this->actor.floorBgId;
|
||||
var_v1_2 = var_a1 ? this->actor.wallBgId : this->actor.floorBgId;
|
||||
if (((this->transformation == PLAYER_FORM_DEKU) || (this->transformation == PLAYER_FORM_ZORA)) &&
|
||||
((sp58 >= 0) && (sp54 == 0) && !(this->stateFlags1 & PLAYER_STATE1_8000000) &&
|
||||
((sp58 >= 0) && !isSurfaceWallDamage && !(this->stateFlags1 & PLAYER_STATE1_8000000) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.depthInWater < -30.0f))) {
|
||||
func_80834534(play, this);
|
||||
} else {
|
||||
this->actor.colChkInfo.damage = 4;
|
||||
func_80833B18(play, this, (var_v1_2 == BGCHECK_SCENE) ? 0 : 1, 4.0f, 5.0f,
|
||||
(var_a1 != 0) ? this->actor.wallYaw : this->actor.shape.rot.y, 20);
|
||||
var_a1 ? this->actor.wallYaw : this->actor.shape.rot.y, 20);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -7115,7 +7115,7 @@ s32 func_80838A90(Player* this, PlayState* play) {
|
|||
PlayerMask maskId = GET_MASK_FROM_IA(this->itemAction);
|
||||
|
||||
this->prevMask = this->currentMask;
|
||||
if (((maskId == this->currentMask) != 0) || (this->itemAction < PLAYER_IA_MASK_GIANT) ||
|
||||
if ((u32)(maskId == this->currentMask) || (this->itemAction < PLAYER_IA_MASK_GIANT) ||
|
||||
((this->itemAction == PLAYER_IA_MASK_GIANT) && (this->transformation != PLAYER_FORM_HUMAN))) {
|
||||
if (maskId == this->currentMask) {
|
||||
this->currentMask = PLAYER_MASK_NONE;
|
||||
|
@ -8467,8 +8467,7 @@ void func_8083C85C(Player* this) {
|
|||
}
|
||||
|
||||
void func_8083C8E8(Player* this, PlayState* play) {
|
||||
if ((func_800B7128(this) == 0) && (func_8082EF20(this) == 0) &&
|
||||
((this->linearVelocity > 5.0f) || (D_80862B3C != 0.0f))) {
|
||||
if (!func_800B7128(this) && !func_8082EF20(this) && ((this->linearVelocity > 5.0f) || (D_80862B3C != 0.0f))) {
|
||||
s16 temp1;
|
||||
s16 temp2;
|
||||
|
||||
|
@ -8511,7 +8510,7 @@ s32 func_8083CBC4(Player* this, f32 arg1, s16 arg2, f32 arg3, f32 arg4, f32 arg5
|
|||
}
|
||||
|
||||
if (ABS_ALT(temp_v0) > 0x6000) {
|
||||
if (Math_StepToF(&this->linearVelocity, 0.0f, arg3) == 0) {
|
||||
if (!Math_StepToF(&this->linearVelocity, 0.0f, arg3)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -9414,7 +9413,7 @@ void func_8083F27C(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
void func_8083F358(Player* this, s32 arg1, PlayState* play) {
|
||||
PlayerAnimationHeader* var_v0;
|
||||
PlayerAnimationHeader* climbAnim;
|
||||
f32 var_fv1;
|
||||
s16 var_a1;
|
||||
|
||||
|
@ -9448,18 +9447,18 @@ void func_8083F358(Player* this, s32 arg1, PlayState* play) {
|
|||
}
|
||||
|
||||
if (var_fv1 < 0.0f) {
|
||||
var_v0 = &gPlayerAnim_link_normal_climb_down;
|
||||
climbAnim = &gPlayerAnim_link_normal_climb_down;
|
||||
var_fv1 = -var_fv1;
|
||||
} else {
|
||||
var_v0 = &gPlayerAnim_link_normal_climb_up;
|
||||
climbAnim = &gPlayerAnim_link_normal_climb_up;
|
||||
}
|
||||
|
||||
if (arg1 == 0) {
|
||||
PlayerAnimation_BlendToJoint(play, &this->skelAnime, D_8085BE84[PLAYER_ANIMGROUP_1][this->modelAnimType],
|
||||
this->unk_B38, var_v0, this->unk_B38, var_fv1, this->blendTableBuffer);
|
||||
this->unk_B38, climbAnim, this->unk_B38, var_fv1, this->blendTableBuffer);
|
||||
} else {
|
||||
PlayerAnimation_BlendToMorph(play, &this->skelAnime, D_8085BE84[PLAYER_ANIMGROUP_1][this->modelAnimType],
|
||||
this->unk_B38, var_v0, this->unk_B38, var_fv1, this->blendTableBuffer);
|
||||
this->unk_B38, climbAnim, this->unk_B38, var_fv1, this->blendTableBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11392,7 +11391,7 @@ void func_80844784(PlayState* play, Player* this) {
|
|||
var_a3 += 0x8000;
|
||||
}
|
||||
|
||||
if ((Math_StepToF(&this->actor.speed, var_fv0, 0.35f) != 0) && (var_fv0 == 0.0f)) {
|
||||
if (Math_StepToF(&this->actor.speed, var_fv0, 0.35f) && (var_fv0 == 0.0f)) {
|
||||
this->actor.world.rot.y = this->currentYaw;
|
||||
}
|
||||
|
||||
|
@ -13853,7 +13852,7 @@ void func_8084B0EC(Player* this, PlayState* play) {
|
|||
|
||||
func_80832F78(this, &sp2C, &sp2A, 0.0f, play);
|
||||
if (!func_8083A4A4(this, &sp2C, &sp2A, REG(43) / 100.0f)) {
|
||||
if (((func_80123434(this) != 0) && (sp2C != 0) && (func_8083E514(this, &sp2C, &sp2A, play) <= 0)) ||
|
||||
if ((func_80123434(this) && (sp2C != 0) && (func_8083E514(this, &sp2C, &sp2A, play) <= 0)) ||
|
||||
(!func_80123434(this) && (func_8083E404(this, sp2C, sp2A) <= 0))) {
|
||||
func_80836988(this, play);
|
||||
} else {
|
||||
|
@ -14007,7 +14006,7 @@ void func_8084B5C0(Player* this, PlayState* play) {
|
|||
this->unk_AE7 = 0;
|
||||
}
|
||||
} else if (!func_8083FE38(this, play)) {
|
||||
if (func_8083A274(this, play) != 0) {
|
||||
if (func_8083A274(this, play)) {
|
||||
func_8083FD80(this, play);
|
||||
} else {
|
||||
this->stateFlags1 &= ~PLAYER_STATE1_400000;
|
||||
|
@ -14211,7 +14210,7 @@ void func_8084C16C(Player* this, PlayState* play) {
|
|||
s16 sp42;
|
||||
Actor* heldActor;
|
||||
|
||||
if (func_80123420(this) != 0) {
|
||||
if (func_80123420(this)) {
|
||||
this->actor.gravity = -1.2f;
|
||||
}
|
||||
|
||||
|
@ -15020,9 +15019,6 @@ void func_8084E65C(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8084E724(Player* this, PlayState* play) {
|
||||
u8 temp_v1;
|
||||
u32 new_var;
|
||||
|
||||
if (this->stateFlags1 & PLAYER_STATE1_8000000) {
|
||||
func_808475B4(this);
|
||||
func_8084748C(this, &this->linearVelocity, 0.0f, this->actor.shape.rot.y);
|
||||
|
@ -15036,21 +15032,16 @@ void func_8084E724(Player* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
temp_v1 = this->unk_AA5;
|
||||
new_var = temp_v1;
|
||||
|
||||
if (((temp_v1 == PLAYER_UNKAA5_2) && !(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) ||
|
||||
((temp_v1 != PLAYER_UNKAA5_2) &&
|
||||
(((((((((this->csMode != PLAYER_CSMODE_0) || (new_var == 0)) || (temp_v1 >= PLAYER_UNKAA5_5)) ||
|
||||
(func_8082FB68(this) != 0)) ||
|
||||
(this->targetedActor != NULL)) ||
|
||||
(func_8083868C(play, this) == 0)) ||
|
||||
if (((this->unk_AA5 == PLAYER_UNKAA5_2) && !(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) ||
|
||||
((this->unk_AA5 != PLAYER_UNKAA5_2) &&
|
||||
((((this->csMode != PLAYER_CSMODE_0) || ((u32)this->unk_AA5 == PLAYER_UNKAA5_0) ||
|
||||
(this->unk_AA5 >= PLAYER_UNKAA5_5) || func_8082FB68(this) || (this->targetedActor != NULL) ||
|
||||
(func_8083868C(play, this) == CAM_MODE_NORMAL) ||
|
||||
((this->unk_AA5 == PLAYER_UNKAA5_3) &&
|
||||
(((((Player_ItemToItemAction(this, Inventory_GetBtnBItem(play)) != this->heldItemAction) &&
|
||||
CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_B)) ||
|
||||
CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_R | BTN_A)) ||
|
||||
(func_80123434(this) != 0)) ||
|
||||
(!func_800B7128(this) && (func_8082EF20(this) == 0))))) ||
|
||||
(((Player_ItemToItemAction(this, Inventory_GetBtnBItem(play)) != this->heldItemAction) &&
|
||||
CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_B)) ||
|
||||
CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_R | BTN_A) || func_80123434(this) ||
|
||||
(!func_800B7128(this) && !func_8082EF20(this))))) ||
|
||||
((this->unk_AA5 == PLAYER_UNKAA5_1) &&
|
||||
CHECK_BTN_ANY(sPlayerControlInput->press.button,
|
||||
BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP | BTN_R | BTN_B | BTN_A))) ||
|
||||
|
@ -18458,7 +18449,7 @@ void func_80857BE8(Player* this, PlayState* play) {
|
|||
if ((this->stateFlags3 & PLAYER_STATE3_80000) && (!CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_A) ||
|
||||
(gSaveContext.save.saveInfo.playerData.magic == 0) ||
|
||||
((this->unk_AE7 == 4) && (this->unk_B08 < 12.0f)))) {
|
||||
if (Math_StepToS(&this->unk_B86[1], 0, 1) != 0) {
|
||||
if (Math_StepToS(&this->unk_B86[1], 0, 1)) {
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_80000;
|
||||
Magic_Reset(play);
|
||||
Player_PlaySfx(this, NA_SE_PL_GORON_BALL_CHARGE_FAILED);
|
||||
|
@ -20003,12 +19994,12 @@ void func_8085B170(PlayState* play, Player* this) {
|
|||
Player_AnimSfx_PlayVoice(this, NA_SE_VO_LI_HELD);
|
||||
}
|
||||
|
||||
s32 Player_GrabPlayer(PlayState* play, Player* player) {
|
||||
if (!Player_InBlockingCsMode(play, player) && (player->invincibilityTimer >= 0) && !func_801240DC(player)) {
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_100000 |
|
||||
PLAYER_STATE1_200000 | PLAYER_STATE1_800000))) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_80) && !(player->stateFlags3 & PLAYER_STATE3_80)) {
|
||||
func_8085B170(play, player);
|
||||
s32 Player_GrabPlayer(PlayState* play, Player* this) {
|
||||
if (!Player_InBlockingCsMode(play, this) && (this->invincibilityTimer >= 0) && !func_801240DC(this)) {
|
||||
if (!(this->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_100000 |
|
||||
PLAYER_STATE1_200000 | PLAYER_STATE1_800000))) {
|
||||
if (!(this->stateFlags2 & PLAYER_STATE2_80) && !(this->stateFlags3 & PLAYER_STATE3_80)) {
|
||||
func_8085B170(play, this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20169,11 +20160,11 @@ void func_8085B820(PlayState* play, s16 arg1) {
|
|||
func_80836D8C(player);
|
||||
}
|
||||
|
||||
PlayerItemAction func_8085B854(PlayState* play, Player* player, ItemId itemId) {
|
||||
PlayerItemAction itemAction = Player_ItemToItemAction(player, itemId);
|
||||
PlayerItemAction func_8085B854(PlayState* play, Player* this, ItemId itemId) {
|
||||
PlayerItemAction itemAction = Player_ItemToItemAction(this, itemId);
|
||||
|
||||
if ((itemAction >= PLAYER_IA_MASK_MIN) && (itemAction <= PLAYER_IA_MASK_MAX) &&
|
||||
(itemAction == GET_IA_FROM_MASK(player->currentMask))) {
|
||||
(itemAction == GET_IA_FROM_MASK(this->currentMask))) {
|
||||
itemAction = PLAYER_IA_NONE;
|
||||
}
|
||||
|
||||
|
@ -20181,15 +20172,15 @@ PlayerItemAction func_8085B854(PlayState* play, Player* player, ItemId itemId) {
|
|||
return PLAYER_IA_MINUS1;
|
||||
}
|
||||
|
||||
player->itemAction = PLAYER_IA_NONE;
|
||||
player->actionFunc = NULL;
|
||||
func_80831760(play, player, func_80853A5C, 0);
|
||||
player->csId = CS_ID_GLOBAL_TALK;
|
||||
player->itemAction = itemAction;
|
||||
Player_AnimationPlayOnce(play, player, &gPlayerAnim_link_normal_give_other);
|
||||
player->stateFlags1 |= (PLAYER_STATE1_40 | PLAYER_STATE1_20000000);
|
||||
player->getItemDrawIdPlusOne = GID_NONE + 1;
|
||||
player->exchangeItemId = itemAction;
|
||||
this->itemAction = PLAYER_IA_NONE;
|
||||
this->actionFunc = NULL;
|
||||
func_80831760(play, this, func_80853A5C, 0);
|
||||
this->csId = CS_ID_GLOBAL_TALK;
|
||||
this->itemAction = itemAction;
|
||||
Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_give_other);
|
||||
this->stateFlags1 |= (PLAYER_STATE1_40 | PLAYER_STATE1_20000000);
|
||||
this->getItemDrawIdPlusOne = GID_NONE + 1;
|
||||
this->exchangeItemId = itemAction;
|
||||
|
||||
return itemAction;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue