Document Room Type (#1740)

* roomType

* cleanup
This commit is contained in:
engineer124 2024-11-12 11:46:21 +11:00 committed by GitHub
parent 4337c2a4f2
commit 4663beda1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 57 additions and 66 deletions

View File

@ -311,31 +311,30 @@ typedef union {
RoomShapeCullable cullable; RoomShapeCullable cullable;
} RoomShape; // "Ground Shape" } RoomShape; // "Ground Shape"
// TODO: Check which ones don't exist typedef enum RoomType {
typedef enum { /* 0 */ ROOM_TYPE_NORMAL,
/* 0 */ ROOM_BEHAVIOR_TYPE1_0, /* 1 */ ROOM_TYPE_DUNGEON,
/* 1 */ ROOM_BEHAVIOR_TYPE1_1, /* 2 */ ROOM_TYPE_INDOORS, // Reduces player run speed and blocks player from attacking or jumping.
/* 2 */ ROOM_BEHAVIOR_TYPE1_2, /* 3 */ ROOM_TYPE_3,
/* 3 */ ROOM_BEHAVIOR_TYPE1_3, // unused /* 4 */ ROOM_TYPE_4, // Prevents switching to CAM_SET_HORSE when mounting a horse.
/* 4 */ ROOM_BEHAVIOR_TYPE1_4, /* 5 */ ROOM_TYPE_BOSS // Disables Environment_AdjustLights
/* 5 */ ROOM_BEHAVIOR_TYPE1_5 } RoomType;
} RoomBehaviorType1;
typedef enum { typedef enum RoomEnvironmentType {
/* 0 */ ROOM_BEHAVIOR_TYPE2_0, /* 0 */ ROOM_ENV_DEFAULT,
/* 1 */ ROOM_BEHAVIOR_TYPE2_1, /* 1 */ ROOM_ENV_COLD,
/* 2 */ ROOM_BEHAVIOR_TYPE2_2, /* 2 */ ROOM_ENV_WARM, // Unused.
/* 3 */ ROOM_BEHAVIOR_TYPE2_HOT, /* 3 */ ROOM_ENV_HOT, // Unused.
/* 4 */ ROOM_BEHAVIOR_TYPE2_4, /* 4 */ ROOM_ENV_UNK_STRETCH_1,
/* 5 */ ROOM_BEHAVIOR_TYPE2_5, /* 5 */ ROOM_ENV_UNK_STRETCH_2, // Unused.
/* 6 */ ROOM_BEHAVIOR_TYPE2_6 /* 6 */ ROOM_ENV_UNK_STRETCH_3
} RoomBehaviorType2; } RoomEnvironmentType;
typedef struct { typedef struct {
/* 0x00 */ s8 num; // -1 is invalid room /* 0x00 */ s8 num; // -1 is invalid room
/* 0x01 */ u8 unk1; /* 0x01 */ u8 unk1;
/* 0x02 */ u8 behaviorType2; /* 0x02 */ u8 environmentType;
/* 0x03 */ u8 behaviorType1; /* 0x03 */ u8 type;
/* 0x04 */ s8 echo; /* 0x04 */ s8 echo;
/* 0x05 */ u8 lensMode; /* 0x05 */ u8 lensMode;
/* 0x06 */ u8 enablePosLights; /* 0x06 */ u8 enablePosLights;
@ -802,13 +801,10 @@ typedef enum {
#define SCENE_CMD_SPECIAL_FILES(naviQuestHintFileId, keepObjectId) \ #define SCENE_CMD_SPECIAL_FILES(naviQuestHintFileId, keepObjectId) \
{ SCENE_CMD_ID_SPECIAL_FILES, naviQuestHintFileId, CMD_W(keepObjectId) } { SCENE_CMD_ID_SPECIAL_FILES, naviQuestHintFileId, CMD_W(keepObjectId) }
#define SCENE_CMD_ROOM_BEHAVIOR(curRoomUnk3, curRoomUnk2, curRoomUnk5, msgCtxunk12044, enablePosLights, \ #define SCENE_CMD_ROOM_BEHAVIOR(type, environment, lensMode, msgCtxunk12044, enablePosLights, stormState) \
kankyoContextUnkE2) \ { SCENE_CMD_ID_ROOM_BEHAVIOR, type, \
{ \ environment | _SHIFTL(lensMode, 8, 1) | _SHIFTL(msgCtxunk12044, 10, 1) | _SHIFTL(enablePosLights, 11, 1) | \
SCENE_CMD_ID_ROOM_BEHAVIOR, curRoomUnk3, \ _SHIFTL(stormState, 12, 1) }
curRoomUnk2 | _SHIFTL(curRoomUnk5, 8, 1) | _SHIFTL(msgCtxunk12044, 10, 1) | \
_SHIFTL(enablePosLights, 11, 1) | _SHIFTL(kankyoContextUnkE2, 12, 1) \
}
#define SCENE_CMD_UNK_09() \ #define SCENE_CMD_UNK_09() \
{ SCENE_CMD_ID_UNK_09, 0, CMD_W(0) } { SCENE_CMD_ID_UNK_09, 0, CMD_W(0) }

View File

@ -1423,7 +1423,7 @@ bool func_800B715C(PlayState* play) {
} }
void Player_SetCameraHorseSetting(PlayState* play, Player* player) { void Player_SetCameraHorseSetting(PlayState* play, Player* player) {
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && (player->actor.id == ACTOR_PLAYER)) { if ((play->roomCtx.curRoom.type != ROOM_TYPE_4) && (player->actor.id == ACTOR_PLAYER)) {
EnHorse* rideActor = (EnHorse*)player->rideActor; EnHorse* rideActor = (EnHorse*)player->rideActor;
if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) { if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) {

View File

@ -7027,18 +7027,18 @@ void func_800DDFE0(Camera* camera) {
camera->prevSetting = camera->setting = CAM_SET_FREE0; camera->prevSetting = camera->setting = CAM_SET_FREE0;
Camera_UnsetStateFlag(camera, CAM_STATE_2); Camera_UnsetStateFlag(camera, CAM_STATE_2);
} else { } else {
switch (camera->play->roomCtx.curRoom.behaviorType1) { switch (camera->play->roomCtx.curRoom.type) {
case ROOM_BEHAVIOR_TYPE1_1: case ROOM_TYPE_DUNGEON:
camera->prevSetting = CAM_SET_DUNGEON0; camera->prevSetting = CAM_SET_DUNGEON0;
Camera_ChangeSettingFlags(camera, CAM_SET_DUNGEON0, CAM_CHANGE_SETTING_1); Camera_ChangeSettingFlags(camera, CAM_SET_DUNGEON0, CAM_CHANGE_SETTING_1);
break; break;
case ROOM_BEHAVIOR_TYPE1_0: case ROOM_TYPE_NORMAL:
camera->prevSetting = CAM_SET_NORMAL0; camera->prevSetting = CAM_SET_NORMAL0;
Camera_ChangeSettingFlags(camera, CAM_SET_NORMAL0, CAM_CHANGE_SETTING_1); Camera_ChangeSettingFlags(camera, CAM_SET_NORMAL0, CAM_CHANGE_SETTING_1);
break; break;
case ROOM_BEHAVIOR_TYPE1_2: case ROOM_TYPE_INDOORS:
camera->prevSetting = CAM_SET_ROOM0; camera->prevSetting = CAM_SET_ROOM0;
Camera_ChangeSettingFlags(camera, CAM_SET_ROOM0, CAM_CHANGE_SETTING_1); Camera_ChangeSettingFlags(camera, CAM_SET_ROOM0, CAM_CHANGE_SETTING_1);
break; break;
@ -7279,7 +7279,7 @@ void Camera_EarthquakeDay3(Camera* camera) {
*/ */
s32 Camera_UpdateHotRoom(Camera* camera) { s32 Camera_UpdateHotRoom(Camera* camera) {
Distortion_RemoveRequest(DISTORTION_TYPE_HOT_ROOM); Distortion_RemoveRequest(DISTORTION_TYPE_HOT_ROOM);
if (camera->play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_HOT) { if (camera->play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) {
Distortion_Request(DISTORTION_TYPE_HOT_ROOM); Distortion_Request(DISTORTION_TYPE_HOT_ROOM);
} }
return true; return true;
@ -7736,7 +7736,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
break; break;
case CAM_CHANGE_MODE_1: case CAM_CHANGE_MODE_1:
if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) { if (camera->play->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) {
Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY); Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY);
} else { } else {

View File

@ -2941,7 +2941,7 @@ s32 Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
s32 i; s32 i;
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5) { if (play->roomCtx.curRoom.type == ROOM_TYPE_BOSS) {
return 0; return 0;
} }

View File

@ -1709,7 +1709,7 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
break; break;
} }
if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) && (interfaceCtx->minimapAlpha >= 255)) { if ((play->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) && (interfaceCtx->minimapAlpha >= 255)) {
interfaceCtx->minimapAlpha = 255; interfaceCtx->minimapAlpha = 255;
} }
} }

View File

@ -2316,8 +2316,8 @@ void Play_Init(GameState* thisx) {
// Busyloop until the room loads // Busyloop until the room loads
while (!Room_ProcessRoomRequest(this, &this->roomCtx)) {} while (!Room_ProcessRoomRequest(this, &this->roomCtx)) {}
if ((CURRENT_DAY != 0) && ((this->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) || if ((CURRENT_DAY != 0) &&
(this->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5))) { ((this->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) || (this->roomCtx.curRoom.type == ROOM_TYPE_BOSS))) {
Actor_Spawn(&this->actorCtx, this, ACTOR_EN_TEST4, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0); Actor_Spawn(&this->actorCtx, this, ACTOR_EN_TEST4, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0);
} }

View File

@ -631,7 +631,7 @@ void func_80123140(PlayState* play, Player* player) {
IREG(69) = bootRegs[16]; IREG(69) = bootRegs[16];
MREG(95) = bootRegs[17]; MREG(95) = bootRegs[17];
if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_2) { if (play->roomCtx.curRoom.type == ROOM_TYPE_INDOORS) {
R_RUN_SPEED_LIMIT = 500; R_RUN_SPEED_LIMIT = 500;
} }
@ -1706,7 +1706,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
EnvHazardTextTriggerEntry* triggerEntry; EnvHazardTextTriggerEntry* triggerEntry;
s32 envHazard; s32 envHazard;
if (play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_HOT) { if (play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) {
envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1; envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1;
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->underwaterTimer > 80)) { } else if ((player->transformation != PLAYER_FORM_ZORA) && (player->underwaterTimer > 80)) {
envHazard = PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1; envHazard = PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1;

View File

@ -251,8 +251,8 @@ void Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
// SceneTableEntry Header Command 0x08: Room Behavior // SceneTableEntry Header Command 0x08: Room Behavior
void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) { void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
play->roomCtx.curRoom.behaviorType1 = cmd->roomBehavior.gpFlag1; play->roomCtx.curRoom.type = cmd->roomBehavior.gpFlag1;
play->roomCtx.curRoom.behaviorType2 = cmd->roomBehavior.gpFlag2 & 0xFF; play->roomCtx.curRoom.environmentType = cmd->roomBehavior.gpFlag2 & 0xFF;
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1; play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1; play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1; play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;

View File

@ -695,8 +695,7 @@ void EnKusa_Update(Actor* thisx, PlayState* play2) {
} else { } else {
this->actor.shape.yOffset = 0.0f; this->actor.shape.yOffset = 0.0f;
} }
if ((kusaGameplayFrames != play->gameplayFrames) && if ((kusaGameplayFrames != play->gameplayFrames) && (play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL)) {
(play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0)) {
EnKusa_Sway(); EnKusa_Sway();
kusaGameplayFrames = play->gameplayFrames; kusaGameplayFrames = play->gameplayFrames;
} }
@ -708,9 +707,8 @@ void EnKusa_DrawBush(Actor* thisx, PlayState* play2) {
if ((this->actor.projectedPos.z <= 1200.0f) || ((this->isInWater & 1) && (this->actor.projectedPos.z < 1300.0f))) { if ((this->actor.projectedPos.z <= 1200.0f) || ((this->isInWater & 1) && (this->actor.projectedPos.z < 1300.0f))) {
if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0) && if ((play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) && (this->actionFunc == EnKusa_WaitForInteract) &&
(this->actionFunc == EnKusa_WaitForInteract) && (this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) {
(this->actor.projectedPos.z < 400.0f)) {
EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]); EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]);
} }
@ -738,8 +736,7 @@ void EnKusa_DrawGrass(Actor* thisx, PlayState* play) {
if (this->isCut) { if (this->isCut) {
Gfx_DrawDListOpa(play, gKusaStumpDL); Gfx_DrawDListOpa(play, gKusaStumpDL);
} else { } else {
if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0) && if ((play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) && (this->actionFunc == EnKusa_WaitForInteract)) {
(this->actionFunc == EnKusa_WaitForInteract)) {
if ((this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) { if ((this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) {
EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]); EnKusa_ApplySway(&D_80936AD8[this->kusaMtxIdx]);
} }

View File

@ -1294,7 +1294,7 @@ void func_80A5E604(Actor* thisx, PlayState* play) {
} else { } else {
this->actor.draw = func_80A5E6F0; this->actor.draw = func_80A5E6F0;
if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0) { if (play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) {
func_80A5B508(); func_80A5B508();
} }
func_80A5CAF4(&D_80A5F1C0); func_80A5CAF4(&D_80A5F1C0);
@ -1357,7 +1357,7 @@ void EnKusa2_Draw(Actor* thisx, PlayState* play) {
EnKusa2* this = THIS; EnKusa2* this = THIS;
if (this->actor.projectedPos.z <= 1200.0f) { if (this->actor.projectedPos.z <= 1200.0f) {
if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0) && (this->actor.projectedPos.z > -150.0f) && if ((play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) && (this->actor.projectedPos.z > -150.0f) &&
(this->actor.projectedPos.z < 400.0f)) { (this->actor.projectedPos.z < 400.0f)) {
func_80A5B954(&D_80A60908[this->unk_1CE], 0.0015f); func_80A5B954(&D_80A60908[this->unk_1CE], 0.0015f);
} }

View File

@ -768,7 +768,7 @@ void EnTest7_SetupArriveCs(EnTest7* this, PlayState* play) {
this->flags |= OWL_WARP_FLAGS_DRAW_WIND_CAPSULE; this->flags |= OWL_WARP_FLAGS_DRAW_WIND_CAPSULE;
this->windCapsule.unk_04 = 30.0f; this->windCapsule.unk_04 = 30.0f;
if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_1) { if (play->roomCtx.curRoom.type != ROOM_TYPE_DUNGEON) {
EnTest7_SetupAction(this, EnTest7_StartArriveCs); EnTest7_SetupAction(this, EnTest7_StartArriveCs);
} else { } else {
EnTest7_SetupAction(this, EnTest7_StartArriveCsSkip); EnTest7_SetupAction(this, EnTest7_StartArriveCsSkip);

View File

@ -654,7 +654,7 @@ void ObjFlowerpot_Update(Actor* thisx, PlayState* play2) {
func_80A1C554(this); func_80A1C554(this);
if ((D_80A1D830 != play->gameplayFrames) && (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0)) { if ((D_80A1D830 != play->gameplayFrames) && (play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL)) {
func_80A1B3D0(); func_80A1B3D0();
D_80A1D830 = play->gameplayFrames; D_80A1D830 = play->gameplayFrames;
} }
@ -679,7 +679,7 @@ void ObjFlowerpot_Draw(Actor* thisx, PlayState* play) {
} }
if (!(this->unk_1EA & 2)) { if (!(this->unk_1EA & 2)) {
if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_0) && (this->actionFunc == func_80A1C838)) { if ((play->roomCtx.curRoom.type == ROOM_TYPE_NORMAL) && (this->actionFunc == func_80A1C838)) {
if ((this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) { if ((this->actor.projectedPos.z > -150.0f) && (this->actor.projectedPos.z < 400.0f)) {
func_80A1B840(&D_80A1D838[this->unk_1EB]); func_80A1B840(&D_80A1D838[this->unk_1EB]);

View File

@ -8188,9 +8188,8 @@ s32 func_80839A84(PlayState* play, Player* this) {
} }
s32 Player_ActionHandler_10(Player* this, PlayState* play) { s32 Player_ActionHandler_10(Player* this, PlayState* play) {
if (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A) && if (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A) && (play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) &&
(play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && (sPlayerFloorType != FLOOR_TYPE_7) && (sPlayerFloorType != FLOOR_TYPE_7) && (sPlayerFloorEffect != FLOOR_EFFECT_1)) {
(sPlayerFloorEffect != FLOOR_EFFECT_1)) {
s32 temp_a2 = this->unk_AE3[this->unk_ADE]; s32 temp_a2 = this->unk_AE3[this->unk_ADE];
if (temp_a2 <= 0) { if (temp_a2 <= 0) {
@ -9996,7 +9995,7 @@ void Player_ChooseNextIdleAnim(PlayState* play, Player* this) {
} else { } else {
// Pick fidget type based on room behavior. // Pick fidget type based on room behavior.
// This may be changed below. // This may be changed below.
fidgetType = play->roomCtx.curRoom.behaviorType2; fidgetType = play->roomCtx.curRoom.environmentType;
if (healthIsCritical) { if (healthIsCritical) {
if (this->idleType >= PLAYER_IDLE_DEFAULT) { if (this->idleType >= PLAYER_IDLE_DEFAULT) {
@ -10014,7 +10013,7 @@ void Player_ChooseNextIdleAnim(PlayState* play, Player* this) {
// There is a 4/5 chance that a common fidget type will be considered. // There is a 4/5 chance that a common fidget type will be considered.
// However it may get rejected by the conditions below. // However it may get rejected by the conditions below.
// The type determined by `curRoom.behaviorType2` will be used if a common type is rejected. // The type determined by `curRoom.environmentType` will be used if a common type is rejected.
if (commonType < 4) { if (commonType < 4) {
// `FIDGET_ADJUST_TUNIC` and `FIDGET_TAP_FEET` are accepted unconditionally. // `FIDGET_ADJUST_TUNIC` and `FIDGET_TAP_FEET` are accepted unconditionally.
// The sword and shield related common types have extra restrictions. // The sword and shield related common types have extra restrictions.
@ -11493,10 +11492,10 @@ void Player_SetDoAction(PlayState* play, Player* this) {
(Player_CheckHostileLockOn(this) || (Player_CheckHostileLockOn(this) ||
((sPlayerFloorType != FLOOR_TYPE_7) && ((sPlayerFloorType != FLOOR_TYPE_7) &&
(Player_FriendlyLockOnOrParallel(this) || (Player_FriendlyLockOnOrParallel(this) ||
((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && ((play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) &&
!(this->stateFlags1 & PLAYER_STATE1_400000) && (sp28 == 0)))))) { !(this->stateFlags1 & PLAYER_STATE1_400000) && (sp28 == 0)))))) {
doActionA = DO_ACTION_ATTACK; doActionA = DO_ACTION_ATTACK;
} else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && sp24 && (sp28 > 0)) { } else if ((play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) && sp24 && (sp28 > 0)) {
doActionA = DO_ACTION_JUMP; doActionA = DO_ACTION_JUMP;
} else if ((this->transformation == PLAYER_FORM_DEKU) && !(this->stateFlags1 & PLAYER_STATE1_8000000) && } else if ((this->transformation == PLAYER_FORM_DEKU) && !(this->stateFlags1 & PLAYER_STATE1_8000000) &&
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
@ -11589,8 +11588,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) {
spAC) { spAC) {
updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20; updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND; this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
} else if ((this->stateFlags1 & PLAYER_STATE1_1) && } else if ((this->stateFlags1 & PLAYER_STATE1_1) && (play->roomCtx.curRoom.type != ROOM_TYPE_DUNGEON) &&
(play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_1) &&
((this->unk_D68 - (s32)this->actor.world.pos.y) >= 100)) { ((this->unk_D68 - (s32)this->actor.world.pos.y) >= 100)) {
updBgCheckInfoFlags = updBgCheckInfoFlags =
UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20; UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20;
@ -15047,7 +15045,7 @@ AnimSfxEntry D_8085D60C[] = {
void Player_Action_24(Player* this, PlayState* play) { void Player_Action_24(Player* this, PlayState* play) {
if ((this->transformation != PLAYER_FORM_GORON) && (this->actor.depthInWater <= 0.0f)) { if ((this->transformation != PLAYER_FORM_GORON) && (this->actor.depthInWater <= 0.0f)) {
if ((play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_HOT) || (sPlayerFloorType == FLOOR_TYPE_9) || if ((play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) || (sPlayerFloorType == FLOOR_TYPE_9) ||
((func_808340AC(sPlayerFloorType) >= 0) && ((func_808340AC(sPlayerFloorType) >= 0) &&
!SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId))) { !SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId))) {
func_808344C0(play, this); func_808344C0(play, this);
@ -20337,7 +20335,7 @@ void Player_CsAction_5(PlayState* play, Player* this, CsCmdActorCue* cue) {
this->speedXZ = 2.5f; this->speedXZ = 2.5f;
} }
if ((this->transformation != PLAYER_FORM_HUMAN) && (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5)) { if ((this->transformation != PLAYER_FORM_HUMAN) && (play->roomCtx.curRoom.type == ROOM_TYPE_BOSS)) {
R_PLAY_FILL_SCREEN_ON = 45; R_PLAY_FILL_SCREEN_ON = 45;
R_PLAY_FILL_SCREEN_R = 255; R_PLAY_FILL_SCREEN_R = 255;
R_PLAY_FILL_SCREEN_G = 255; R_PLAY_FILL_SCREEN_G = 255;
@ -20715,7 +20713,7 @@ void Player_CsAction_41(PlayState* play, Player* this, CsCmdActorCue* cue) {
} }
void Player_CsAction_42(PlayState* play, Player* this, CsCmdActorCue* cue) { void Player_CsAction_42(PlayState* play, Player* this, CsCmdActorCue* cue) {
if ((this->transformation != PLAYER_FORM_HUMAN) && (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5)) { if ((this->transformation != PLAYER_FORM_HUMAN) && (play->roomCtx.curRoom.type == ROOM_TYPE_BOSS)) {
R_PLAY_FILL_SCREEN_ON = 45; R_PLAY_FILL_SCREEN_ON = 45;
R_PLAY_FILL_SCREEN_R = 255; R_PLAY_FILL_SCREEN_R = 255;
R_PLAY_FILL_SCREEN_G = 255; R_PLAY_FILL_SCREEN_G = 255;