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:
engineer124
2023-06-10 23:37:43 +10:00
committed by GitHub
parent e19b139504
commit 8672dc0a57
32 changed files with 218 additions and 300 deletions
+3 -4
View File
@@ -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;
+1 -2
View File
@@ -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) {
+18 -15
View File
@@ -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);
+1 -1
View File
@@ -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) {