diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2024-11-12 11:46:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-11 16:46:21 -0800 |
| commit | 4663beda1a3e22788ea4e9218c40147022fd3936 (patch) | |
| tree | 19a4fd815a35b82ac7ee25f8c63e86f9ca917fd4 /src/code | |
| parent | 4337c2a4f29034a576c5fbcef00f27e468df9579 (diff) | |
Document Room Type (#1740)
* roomType
* cleanup
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 2 | ||||
| -rw-r--r-- | src/code/z_camera.c | 12 | ||||
| -rw-r--r-- | src/code/z_kankyo.c | 2 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 2 | ||||
| -rw-r--r-- | src/code/z_play.c | 4 | ||||
| -rw-r--r-- | src/code/z_player_lib.c | 4 | ||||
| -rw-r--r-- | src/code/z_scene.c | 4 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 532aecd65..a7c9a497b 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1423,7 +1423,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/src/code/z_camera.c b/src/code/z_camera.c index b2570386f..72e017e50 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7027,18 +7027,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; @@ -7279,7 +7279,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; @@ -7736,7 +7736,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/src/code/z_kankyo.c b/src/code/z_kankyo.c index ac579560d..5be8576f6 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -2941,7 +2941,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/src/code/z_parameter.c b/src/code/z_parameter.c index bcbf27f8e..7171a661b 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1709,7 +1709,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/src/code/z_play.c b/src/code/z_play.c index 49a902547..ae387114f 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -2316,8 +2316,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/src/code/z_player_lib.c b/src/code/z_player_lib.c index 5f799e822..5e51a9903 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -631,7 +631,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; } @@ -1706,7 +1706,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/src/code/z_scene.c b/src/code/z_scene.c index 20d2c528d..624916357 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -251,8 +251,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; |
