Skip to content

Commit

Permalink
port: ifdef around sight scale changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Jan 14, 2024
1 parent 2cb52b7 commit 8e443d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/game/sight.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "video.h"

#define SIGHT_COLOUR PLAYER_EXTCFG().crosshaircolour
#define SIGHT_SCALE PLAYER_EXTCFG().crosshairsize

static inline f32 sightGetScaleX(void)
{
Expand All @@ -39,6 +40,7 @@ static inline s32 sightGetAdjustedX(const f32 x)
#else

#define SIGHT_COLOUR 0x00ff0028
#define SIGHT_SCALE 2
#define sightGetScaleX() 1.f
#define sightGetAdjustedX(x) (x)

Expand Down Expand Up @@ -1471,14 +1473,12 @@ Gfx *sightDrawTarget(Gfx *gdl)

#ifndef PLATFORM_N64
gSPSetExtraGeometryModeEXT(gdl++, G_ASPECT_CENTER_EXT);
#endif

#define SIGHT_SCALE PLAYER_EXTCFG().crosshairsize

if (SIGHT_SCALE == 0) {
// Draw single rectangle to preserve intended opacity
gDPHudRectangle(gdl++, x, y, x, y);
} else {
} else
#endif
{
gDPHudRectangle(gdl++, x + 1 * SIGHT_SCALE, y + 0 * SIGHT_SCALE, x + 3 * SIGHT_SCALE, y + 0 * SIGHT_SCALE);
gDPHudRectangle(gdl++, x + 1 * SIGHT_SCALE, y + 0 * SIGHT_SCALE, x + 2 * SIGHT_SCALE, y + 0 * SIGHT_SCALE);
gDPHudRectangle(gdl++, x - 3 * SIGHT_SCALE, y + 0 * SIGHT_SCALE, x - 1 * SIGHT_SCALE, y + 0 * SIGHT_SCALE);
Expand Down

0 comments on commit 8e443d4

Please sign in to comment.