Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sauraen committed Jun 2, 2024
1 parent 5c133c6 commit db15bde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/code/z_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ extern u16 (*gWorkBuf)[SCREEN_WIDTH * SCREEN_HEIGHT];

static u8 sMotionBlurStatus;

typedef enum {
typedef enum
{
/* 0 */ MOTION_BLUR_OFF,
/* 1 */ MOTION_BLUR_SETUP,
/* 2 */ MOTION_BLUR_PROCESS
Expand Down Expand Up @@ -1377,7 +1378,7 @@ void Play_Draw(PlayState* this) {
if (!IS_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SKYBOX_FILTERS)) {
Environment_DrawSkyboxFilters(this);
}

// The Z buffer has to be cleared at some point before anything using it
// is drawn (lighting strike is the first which does). But if we are
// using F3DEX3's SPMemset to clear it, it should be done as late as
Expand Down
8 changes: 4 additions & 4 deletions src/code/z_rcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,18 +1557,18 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, s32 clearFB, u8 r, u8 g, u8 b) {
void Gfx_ClearZBuffer(GraphicsContext* gfxCtx) {
s32 letterboxSize = Letterbox_GetSize();
OPEN_DISPS(gfxCtx, "../z_rcp.c", __LINE__);

// Set the whole z buffer to maximum depth
// Don't bother with pixels that are being covered by the letterbox
#if ENABLE_F3DEX3
if (gUseMemsetForZBuffer) {
s32 w2 = gScreenWidth * 2; // 2 bytes per pixel
if(letterboxSize < 0 || letterboxSize > 100){
if (letterboxSize < 0 || letterboxSize > 100) {
letterboxSize = 0;
}
gSPMemset(POLY_OPA_DISP++, (u8*)gZBuffer + letterboxSize * w2, GPACK_ZDZ(G_MAXFBZ, 0),
(gScreenHeight - 2 * letterboxSize) * w2);
}else{
(gScreenHeight - 2 * letterboxSize) * w2);
} else {
#endif
gSPDisplayList(POLY_OPA_DISP++, sFillSetupDL);
gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, gZBuffer);
Expand Down
2 changes: 1 addition & 1 deletion src/debug/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void Menu_Update(Menu* this) {
u8 pressDLeft = CHECK_BTN_ALL(pressBtn, BTN_DLEFT);
u8 pressDRight = CHECK_BTN_ALL(pressBtn, BTN_DRIGHT);
u8 i;

if (isHoldingR && CHECK_BTN_ALL(pressBtn, BTN_L)) {
this->bShow ^= 1;
}
Expand Down

0 comments on commit db15bde

Please sign in to comment.