summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authormzxrules <mzxrules@gmail.com>2024-10-14 15:23:50 -0400
committerGitHub <noreply@github.com>2024-10-14 15:23:50 -0400
commit2f54db142e5a4fbb29607508fe6e7d9f813c8974 (patch)
tree601f3d40a607a334ac4e4ed2555f9c572ef89553 /src/code
parentd0b47258693aa2a9c0bf885ca93bf21841bdbab9 (diff)
Rename RoomBehaviorType1 to RoomType (#2271)
* Rename RoomBehaviorType1 to RoomType * suggestions * Update include/z64scene.h --------- Co-authored-by: fig02 <fig02srl@gmail.com>
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_actor.c2
-rw-r--r--src/code/z_camera.c10
-rw-r--r--src/code/z_kankyo.c2
-rw-r--r--src/code/z_parameter.c5
-rw-r--r--src/code/z_player_lib.c2
-rw-r--r--src/code/z_rcp.c2
-rw-r--r--src/code/z_scene.c2
7 files changed, 12 insertions, 13 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 49ee50fbe..49ee7e943 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -1131,7 +1131,7 @@ void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
}
void func_8002DE74(PlayState* play, Player* player) {
- if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && Play_CamIsNotFixed(play)) {
+ if ((play->roomCtx.curRoom.type != ROOM_TYPE_4) && Play_CamIsNotFixed(play)) {
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
}
}
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 4281b15c0..5a6986dc8 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -7540,18 +7540,18 @@ void func_80057FC4(Camera* camera) {
camera->prevSetting = camera->setting = CAM_SET_FREE0;
camera->stateFlags &= ~CAM_STATE_CHECK_BG;
} else if (camera->play->roomCtx.curRoom.roomShape->base.type != ROOM_SHAPE_TYPE_IMAGE) {
- switch (camera->play->roomCtx.curRoom.behaviorType1) {
- case ROOM_BEHAVIOR_TYPE1_1:
+ switch (camera->play->roomCtx.curRoom.type) {
+ case ROOM_TYPE_DUNGEON:
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_DUNGEON0;
break;
- case ROOM_BEHAVIOR_TYPE1_0:
+ case ROOM_TYPE_NORMAL:
PRINTF("camera: room type: default set field\n");
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
break;
default:
- PRINTF("camera: room type: default set etc (%d)\n", camera->play->roomCtx.curRoom.behaviorType1);
+ PRINTF("camera: room type: default set etc (%d)\n", camera->play->roomCtx.curRoom.type);
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
camera->stateFlags |= CAM_STATE_CHECK_BG;
@@ -8466,7 +8466,7 @@ s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange
break;
case CAM_REQUEST_MODE_SFX_ATTENTION:
- if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) {
+ if (camera->play->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) {
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_URGENCY);
} else {
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_ON);
diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c
index f6cde3a95..8fbbfd662 100644
--- a/src/code/z_kankyo.c
+++ b/src/code/z_kankyo.c
@@ -2531,7 +2531,7 @@ void Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
f32 temp;
s32 i;
- if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && Play_CamIsNotFixed(play)) {
+ if (play->roomCtx.curRoom.type != ROOM_TYPE_BOSS && Play_CamIsNotFixed(play)) {
arg1 = CLAMP_MIN(arg1, 0.0f);
arg1 = CLAMP_MAX(arg1, 1.0f);
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index a2959e0ad..166236177 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -632,7 +632,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;
}
}
@@ -4368,8 +4368,7 @@ void Interface_Update(PlayState* play) {
gTimeSpeed = sPrevTimeSpeed;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
- } else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_1) &&
- (interfaceCtx->restrictions.sunsSong != 3)) {
+ } else if ((play->roomCtx.curRoom.type != ROOM_TYPE_DUNGEON) && (interfaceCtx->restrictions.sunsSong != 3)) {
if ((gSaveContext.save.dayTime >= CLOCK_TIME(6, 30)) &&
(gSaveContext.save.dayTime < CLOCK_TIME(18, 0) + 1)) {
gSaveContext.nextDayTime = NEXT_TIME_NIGHT;
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 5c0318064..114987864 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -599,7 +599,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
IREG(69) = bootRegs[15];
MREG(95) = bootRegs[16];
- if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_2) {
+ if (play->roomCtx.curRoom.type == ROOM_TYPE_INDOORS) {
R_RUN_SPEED_LIMIT = 500;
}
}
diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c
index a4100700b..1e85a8c7e 100644
--- a/src/code/z_rcp.c
+++ b/src/code/z_rcp.c
@@ -1012,7 +1012,7 @@ void func_80093C80(PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
- if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_3) {
+ if (play->roomCtx.curRoom.type == ROOM_TYPE_3) {
OPEN_DISPS(gfxCtx, "../z_rcp.c", 1460);
gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE);
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index 13dce2d48..22d99dda9 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -261,7 +261,7 @@ BAD_RETURN(s32) Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
}
BAD_RETURN(s32) Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
- play->roomCtx.curRoom.behaviorType1 = cmd->roomBehavior.gpFlag1;
+ 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.disableWarpSongs = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;