summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-10-21 18:57:30 -0400
committerGitHub <noreply@github.com>2022-10-21 18:57:30 -0400
commita715bf63d06d72f7832dbc28d4a53629fe43469a (patch)
tree3fdb67d68f28da2378ac5b77529297ee278be782 /src/code
parent26d6028ff1808204aa2978c6c0fe79e5cea9f2bd (diff)
improve matches (#1413)
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_actor.c2
-rw-r--r--src/code/z_eff_ss_dead.c2
-rw-r--r--src/code/z_lights.c9
-rw-r--r--src/code/z_map_exp.c1
-rw-r--r--src/code/z_player_lib.c5
-rw-r--r--src/code/z_scene.c1
6 files changed, 4 insertions, 16 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index e81004620..a6c607243 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -5478,8 +5478,6 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
Actor_GetScreenPos(play, actor, &sp2C, &sp2A);
- if (0) {} // Necessary to match
-
if ((sp2C < 0) || (sp2C > SCREEN_WIDTH) || (sp2A < 0) || (sp2A > SCREEN_HEIGHT)) {
return false;
}
diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c
index 444712d6b..be283f773 100644
--- a/src/code/z_eff_ss_dead.c
+++ b/src/code/z_eff_ss_dead.c
@@ -104,8 +104,6 @@ void func_80026860(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
POLY_XLU_DISP = displayListHead;
- if (1) {} // Necessary to match
-
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 212);
}
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index d0679c56f..4d91bf462 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -68,16 +68,13 @@ void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx) {
light = &lights->l.l[0];
while (i < lights->numLights) {
- i++;
- gSPLight(POLY_OPA_DISP++, light, i);
+ gSPLight(POLY_OPA_DISP++, light, ++i);
gSPLight(POLY_XLU_DISP++, light, i);
light++;
}
- if (0) {}
-
- i++; // ambient light is total number of lights + 1
- gSPLight(POLY_OPA_DISP++, &lights->l.a, i);
+ // ambient light is total number of lights + 1
+ gSPLight(POLY_OPA_DISP++, &lights->l.a, ++i);
gSPLight(POLY_XLU_DISP++, &lights->l.a, i);
CLOSE_DISPS(gfxCtx, "../z_lights.c", 352);
diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c
index c631cc3dc..9820a20fd 100644
--- a/src/code/z_map_exp.c
+++ b/src/code/z_map_exp.c
@@ -551,7 +551,6 @@ void Map_Update(PlayState* play) {
if (R_MAP_TEX_INDEX != (R_MAP_TEX_INDEX_BASE + Map_GetFloorTextIndexOffset(mapIndex, floor))) {
R_MAP_TEX_INDEX = R_MAP_TEX_INDEX_BASE + Map_GetFloorTextIndexOffset(mapIndex, floor);
}
- if (1) {} // Appears to be necessary to match
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
// "Current floor = %d Current room = %x Number of rooms = %d"
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 1dd2a13bc..be8e2a40d 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -795,11 +795,8 @@ s32 func_8008F2F8(PlayState* play) {
}
// Trigger general textboxes under certain conditions, like "It's so hot in here!"
+ triggerEntry = &sTextTriggers[var];
if (!Player_InCsMode(play)) {
- triggerEntry = &sTextTriggers[var];
-
- if (0) {}
-
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON)) ||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index 7f8598fa7..3f029ff66 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -148,7 +148,6 @@ void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId) {
osSyncPrintf("OBJECT EXCHANGE NO=%2d BANK=%3d SIZE=%8.3fK\n", bankIndex, objectId, size / 1024.0f);
nextPtr = (void*)ALIGN16((s32)status->segment + size);
- if (1) {} // Necessary to match
ASSERT(nextPtr < objectCtx->spaceEnd, "nextptr < this->endSegment", "../z_scene.c", 381);