summaryrefslogtreecommitdiff
path: root/mm/src/code
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2024-11-12 11:46:21 +1100
committerEblo <7004497+Eblo@users.noreply.github.com>2025-09-16 13:15:50 -0400
commitb28f8e090ab756d27cbd93dba006adf43a66fbbf (patch)
treee19964118b3b6534dce7a269bd1bb51b5d86efd7 /mm/src/code
parent7512191d787a81be18625d1400430aec46609af5 (diff)
Document Room Type (#1740)
* roomType * cleanup
Diffstat (limited to 'mm/src/code')
-rw-r--r--mm/src/code/z_actor.c2
-rw-r--r--mm/src/code/z_camera.c12
-rw-r--r--mm/src/code/z_kankyo.c2
-rw-r--r--mm/src/code/z_parameter.c2
-rw-r--r--mm/src/code/z_play.c4
-rw-r--r--mm/src/code/z_player_lib.c4
-rw-r--r--mm/src/code/z_scene.c4
7 files changed, 15 insertions, 15 deletions
diff --git a/mm/src/code/z_actor.c b/mm/src/code/z_actor.c
index 96f5cd7e9..743c6f54b 100644
--- a/mm/src/code/z_actor.c
+++ b/mm/src/code/z_actor.c
@@ -1547,7 +1547,7 @@ bool func_800B715C(PlayState* play) {
}
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;
if ((rideActor != NULL) && !(rideActor->unk_1EC & 0x10)) {
diff --git a/mm/src/code/z_camera.c b/mm/src/code/z_camera.c
index e52243b60..32c51c90c 100644
--- a/mm/src/code/z_camera.c
+++ b/mm/src/code/z_camera.c
@@ -7052,18 +7052,18 @@ void func_800DDFE0(Camera* camera) {
camera->prevSetting = camera->setting = CAM_SET_FREE0;
Camera_UnsetStateFlag(camera, CAM_STATE_2);
} else {
- switch (camera->play->roomCtx.curRoom.behaviorType1) {
- case ROOM_BEHAVIOR_TYPE1_1:
+ switch (camera->play->roomCtx.curRoom.type) {
+ case ROOM_TYPE_DUNGEON:
camera->prevSetting = CAM_SET_DUNGEON0;
Camera_ChangeSettingFlags(camera, CAM_SET_DUNGEON0, CAM_CHANGE_SETTING_1);
break;
- case ROOM_BEHAVIOR_TYPE1_0:
+ case ROOM_TYPE_NORMAL:
camera->prevSetting = CAM_SET_NORMAL0;
Camera_ChangeSettingFlags(camera, CAM_SET_NORMAL0, CAM_CHANGE_SETTING_1);
break;
- case ROOM_BEHAVIOR_TYPE1_2:
+ case ROOM_TYPE_INDOORS:
camera->prevSetting = CAM_SET_ROOM0;
Camera_ChangeSettingFlags(camera, CAM_SET_ROOM0, CAM_CHANGE_SETTING_1);
break;
@@ -7304,7 +7304,7 @@ void Camera_EarthquakeDay3(Camera* camera) {
*/
s32 Camera_UpdateHotRoom(Camera* camera) {
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);
}
return true;
@@ -7765,7 +7765,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
break;
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);
} else {
diff --git a/mm/src/code/z_kankyo.c b/mm/src/code/z_kankyo.c
index 7c0925227..a3de6e704 100644
--- a/mm/src/code/z_kankyo.c
+++ b/mm/src/code/z_kankyo.c
@@ -2999,7 +2999,7 @@ s32 Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
s32 i;
Player* player = GET_PLAYER(play);
- if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5) {
+ if (play->roomCtx.curRoom.type == ROOM_TYPE_BOSS) {
return 0;
}
diff --git a/mm/src/code/z_parameter.c b/mm/src/code/z_parameter.c
index c841389f8..cc52db12a 100644
--- a/mm/src/code/z_parameter.c
+++ b/mm/src/code/z_parameter.c
@@ -2884,7 +2884,7 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
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;
}
}
diff --git a/mm/src/code/z_play.c b/mm/src/code/z_play.c
index 27943a6a9..c5ee590de 100644
--- a/mm/src/code/z_play.c
+++ b/mm/src/code/z_play.c
@@ -2468,8 +2468,8 @@ void Play_Init(GameState* thisx) {
// Busyloop until the room loads
while (!Room_ProcessRoomRequest(this, &this->roomCtx)) {}
- if ((CURRENT_DAY != 0) && ((this->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) ||
- (this->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_5))) {
+ if ((CURRENT_DAY != 0) &&
+ ((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);
}
diff --git a/mm/src/code/z_player_lib.c b/mm/src/code/z_player_lib.c
index e19980fda..e5c491cb8 100644
--- a/mm/src/code/z_player_lib.c
+++ b/mm/src/code/z_player_lib.c
@@ -639,7 +639,7 @@ void func_80123140(PlayState* play, Player* player) {
IREG(69) = bootRegs[16];
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;
}
@@ -1772,7 +1772,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
EnvHazardTextTriggerEntry* triggerEntry;
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;
} else if ((player->transformation != PLAYER_FORM_ZORA) && (player->underwaterTimer > 80)) {
envHazard = PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1;
diff --git a/mm/src/code/z_scene.c b/mm/src/code/z_scene.c
index 8b6db4ecb..778283bdd 100644
--- a/mm/src/code/z_scene.c
+++ b/mm/src/code/z_scene.c
@@ -255,8 +255,8 @@ void Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
// SceneTableEntry Header Command 0x08: Room Behavior
void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
- play->roomCtx.curRoom.behaviorType1 = cmd->roomBehavior.gpFlag1;
- play->roomCtx.curRoom.behaviorType2 = cmd->roomBehavior.gpFlag2 & 0xFF;
+ play->roomCtx.curRoom.type = cmd->roomBehavior.gpFlag1;
+ play->roomCtx.curRoom.environmentType = cmd->roomBehavior.gpFlag2 & 0xFF;
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;