From e291a588e5035165013896bd6c3cd01189149bd2 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 01:02:52 -0300 Subject: [PATCH] LEVELMODE_TURRET --- include/sf64player.h | 2 +- src/engine/fox_display.c | 2 +- src/engine/fox_edisplay.c | 2 +- src/engine/fox_enmy.c | 2 +- src/engine/fox_enmy2.c | 4 ++-- src/engine/fox_hud.c | 2 +- src/engine/fox_play.c | 6 +++--- src/sys/sys_joybus.c | 8 ++++---- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 2e2fecbc..85ad278f 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -54,7 +54,7 @@ typedef enum DrawMode { typedef enum LevelMode { /* 0 */ LEVELMODE_ON_RAILS, /* 1 */ LEVELMODE_ALL_RANGE, - /* 2 */ LEVELMODE_UNK_2, + /* 2 */ LEVELMODE_TURRET, // Unused scrapped turret mode /* 3 */ LEVELMODE_MAX, } LevelMode; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 7ef105e8..b95501e3 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1890,7 +1890,7 @@ void Display_Update(void) { } } - if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { + if ((gLevelMode == LEVELMODE_TURRET) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_Draw(gPlayer); } diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 6c2f8c03..bfc66fcb 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1634,7 +1634,7 @@ void Object_DrawAll(s32 arg0) { } switch (gLevelMode) { case LEVELMODE_ON_RAILS: - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: Matrix_Push(&gGfxMatrix); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 2ee7b60d..a794b8fd 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -146,7 +146,7 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { void Object_SetInfo(ObjectInfo* info, u32 objId) { *info = gObjectInfo[objId]; info->hitbox = SEGMENTED_TO_VIRTUAL(gObjectInfo[objId].hitbox); - if (gLevelMode == LEVELMODE_UNK_2) { + if (gLevelMode == LEVELMODE_TURRET) { info->cullDistance += 200.0f; } } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index ee920c7e..d3333906 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2237,7 +2237,7 @@ void ActorEvent_800701E0(ActorEvent* this) { func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 1.5f); } - if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && + if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_TURRET)) && (this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23)) { this->fwork[13] = 20.0f; if (this->obj.pos.x < this->hitPos.x) { @@ -3362,7 +3362,7 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->iwork[6] != 0) { - if ((gLevelMode == LEVELMODE_UNK_2) && (this->eventType == EVID_200)) { + if ((gLevelMode == LEVELMODE_TURRET) && (this->eventType == EVID_200)) { Math_SmoothStepToAngle(&this->obj.rot.x, this->rot_0F4.x, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_0F4.y, 0.1f, 10.0f, 0.00001f); } else { diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 1589f979..8149d6ea 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -3514,7 +3514,7 @@ void func_hud_8008F96C(void) { RCP_SetupDL_36(); - if ((gLevelMode != LEVELMODE_UNK_2) && (D_hud_80161708 != 0)) { + if ((gLevelMode != LEVELMODE_TURRET) && (D_hud_80161708 != 0)) { func_hud_8008D4F0(246.0f, 28.0f); func_hud_8008EA14(250.0f, 38.0f); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 7fc39ca5..3589f2ea 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -5422,7 +5422,7 @@ void Player_UpdateEffects(Player* player) { player->xShake = 0.0f; } - if ((gLevelMode != LEVELMODE_UNK_2) && + if ((gLevelMode != LEVELMODE_TURRET) && ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && ((player->dmgType >= 40) || (player->dmgType == 21))) { player->boostCooldown = true; @@ -5843,7 +5843,7 @@ void Player_Update(Player* player) { } break; - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: gLoadLevelObjects = true; Turret_Update(player); Player_CollisionCheck(player); @@ -6531,7 +6531,7 @@ void Camera_Update(Player* player) { Camera_Update360(player, false); break; - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: Turret_UpdateCamera(player); break; } diff --git a/src/sys/sys_joybus.c b/src/sys/sys_joybus.c index 46ba7fb2..ef4c4e26 100644 --- a/src/sys/sys_joybus.c +++ b/src/sys/sys_joybus.c @@ -5,10 +5,10 @@ OSContPad gControllerPress[4]; u8 gControllerPlugged[4]; u32 gControllerLock; u8 gControllerRumbleEnabled[4]; -OSContPad sNextController[4]; // -OSContPad sPrevController[4]; // -OSContStatus sControllerStatus[4]; // -OSPfs sControllerMotor[4]; // +OSContPad sNextController[4]; +OSContPad sPrevController[4]; +OSContStatus sControllerStatus[4]; +OSPfs sControllerMotor[4]; void Controller_AddDeadZone(s32 contrNum) { s32 temp_v0 = gControllerHold[contrNum].stick_x;