Merge PR #123 from dolent: opt-in crosshair when not aiming (D436)

Video.CrosshairPersistent, F10 Game page after Show crosshair. Merged with
the 2026-10-01 review conditions: both display-mode presets set it off,
tip added, gunDrawSight change is draw-only (Rule 2 sign-off by the
maintainer, 2026-10-06). Default off is pixel-identical (Dam gate PASS).
This commit is contained in:
James Dansereau committed 2026-10-06 21:22:17 -04:00
commit afd86cd7f8
5 files changed
+64

No files matched your search

+3
View File
@@ -412,6 +412,7 @@ static struct Row rows[] = {
{ .key="Game.NoHitFlash", .label="No hit flash", .kind=ROW_TOGGLE, .step=1, .names=kOnOff },
SEP(G2),
{ .key="Video.CrosshairHide", .label="Show crosshair", .kind=ROW_TOGGLE, .step=1, .names=kOnOffRev },
{ .key="Video.CrosshairPersistent", .label="Crosshair when not aiming", .kind=ROW_TOGGLE, .step=1, .names=kOnOff }, /* D436 */
{ .key="Video.CrosshairColor", .label="Crosshair color", .kind=ROW_ENUM, .step=1, .names=kCrosshairColor },
{ .key="Video.CrosshairRed", .label="Red", .kind=ROW_SLIDER, .step=5, .shownWhen="Video.CrosshairColor", .shownValue=8 },
{ .key="Video.CrosshairGreen", .label="Green", .kind=ROW_SLIDER, .step=5, .shownWhen="Video.CrosshairColor", .shownValue=8 },
@@ -2035,6 +2036,7 @@ static const struct { const char *key; double def; } kResetDefaults[] = {
{ "Video.FogDistance", 100 }, /* 1.0x = N64 fog (D540) */
{ "Video.LodDistance", 200 }, /* 2.0x (D546) */
{ "Video.CrosshairHide", 0 }, /* = 0 (on, N64) */
{ "Video.CrosshairPersistent", 0 }, /* D436: off = N64 (aim mode only) */
{ "Video.CrosshairColor", 0 }, /* = 0 (authored red sprite) */
{ "Video.CrosshairRed", 255 },
{ "Video.CrosshairGreen", 255 },
@@ -3753,6 +3755,7 @@ static const struct { const char *key, *help; } kRowHelp[] = {
{ "__DisplayMode", "Modern, original or custom graphics presets." },
{ "Video.AspectMode", "Fill window fits the picture to the whole window." }, /* D560: shown only while Fill window is selected (optionsRowHelp) */
{ "Video.CrosshairHide", "When off, the crosshair stays hidden, even with Sight on screen." },
{ "Video.CrosshairPersistent", "Also shows the crosshair when not aiming. The N64 shows it only in aim mode." },
{ "Video.CrosshairColor", "Original keeps the game's red sight. Custom: set Red, Green and Blue (0-255)." },
{ "Video.CrosshairHealthColor", "The crosshair shifts from green to red as your health drops." },
{ "Video.WidescreenAuto", "This only applies when Native widescreen is off." },
+4
View File
@@ -114,6 +114,8 @@ s32 portNoHitFlash = 0;
* (gunfire.c gunDrawSight, #ifdef PORT). Default keeps the original
* authored red sprite; hide is opt-in. */
s32 portCrosshairHide = 0;
static int cfgCrosshairPersistent = 0; /* D436: 1 = draw the sight outside aim mode too */
int portCrosshairPersistent(void) { return cfgCrosshairPersistent; }
static int cfgCrosshairColor = 0; /* 0 = authored sprite; 8 = custom RGB (D569: old presets 1..7 migrate to 8 at startup) */
static int cfgCrosshairRed = 255, cfgCrosshairGreen = 255, cfgCrosshairBlue = 255;
/* Former named presets (D373/D381), kept for the D569 ini migration. */
@@ -527,6 +529,7 @@ PD_CONSTRUCTOR static void videoConfigInit(void)
configRegisterInt("Game.NoHitFlash", &portNoHitFlash, 0, 1);
configRegisterInt("Game.AIWideView", &cfgAIWideView, 0, 1); /* D468 */
configRegisterInt("Video.CrosshairHide", &portCrosshairHide, 0, 1); /* v0.4.0 M2 (D373) */
configRegisterInt("Video.CrosshairPersistent", &cfgCrosshairPersistent, 0, 1); /* D436 */
configRegisterInt("Video.CrosshairColor", &cfgCrosshairColor, 0, 8); /* 8 = custom; old ini values unchanged */
configRegisterInt("Video.CrosshairRed", &cfgCrosshairRed, 0, 255);
configRegisterInt("Video.CrosshairGreen", &cfgCrosshairGreen, 0, 255);
@@ -775,6 +778,7 @@ static const struct { const char *key; double n64, port; } kVideoPresets[] = {
{ "Game.ScreenShakeIntensity", 1, 1 }, /* D181 */
{ "Game.NoHitFlash", 0, 0 }, /* D232 */
{ "Video.CrosshairHide", 0, 0 }, /* D373 */
{ "Video.CrosshairPersistent", 0, 0 }, /* D436: aim mode only, as the N64 */
{ "Video.CrosshairColor", 0, 0 }, /* authored red sprite */
{ "Video.CrosshairSize", 100, 100 },
{ "Video.CrosshairStyle", 0, 0 },