summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Overton <tom-overton@users.noreply.github.com>2023-11-09 17:08:28 -0800
committerGitHub <noreply@github.com>2023-11-09 18:08:28 -0700
commit583faf9088293b6c467c263176fb6018e2ac2693 (patch)
treefe0aafd0c1d708376b70bca373acdbfdc96ea75e
parent9e081075d0318b13b77d56c4089da65c747a7b9b (diff)
Update `OPEN_DISPS` to include `do {} while (0)` (#115)
-rw-r--r--include/gfx.h3
-rw-r--r--src/overlays/actors/ovl_Mbg/ac_mbg.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/include/gfx.h b/include/gfx.h
index fb89873..f92a104 100644
--- a/include/gfx.h
+++ b/include/gfx.h
@@ -47,7 +47,8 @@ typedef struct GraphicsContext {
#define OPEN_DISPS(gfxCtx) \
{ \
GraphicsContext* __gfxCtx = gfxCtx; \
- s32 __dispPad UNUSED
+ s32 __dispPad UNUSED; \
+ do {} while (0)
#define CLOSE_DISPS(gfxCtx) \
(void)0; \
diff --git a/src/overlays/actors/ovl_Mbg/ac_mbg.c b/src/overlays/actors/ovl_Mbg/ac_mbg.c
index edd96ed..77002a1 100644
--- a/src/overlays/actors/ovl_Mbg/ac_mbg.c
+++ b/src/overlays/actors/ovl_Mbg/ac_mbg.c
@@ -54,9 +54,8 @@ void Mbg_Actor_draw(Actor* thisx, Game_Play* game_play) {
sp3C = thisx->world.pos;
sp3A = thisx->shape.rot.y;
OPEN_DISPS(game_play->state.gfxCtx);
- if (1) {}
_texture_z_light_fog_prim(game_play->state.gfxCtx);
- Matrix_translate(sp3C.x, sp3C.y, sp3C.z, 0U);
+ Matrix_translate(sp3C.x, sp3C.y, sp3C.z, MTXMODE_NEW);
Matrix_RotateY(sp3A, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(game_play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);