feat: HD Remaster toggle with 4x canvas render path

G.hdRemaster persisted in localStorage (meatslicer_hd_remaster), toggled
from the title screen via H key or the bottom-left tag; activation reloads
so the asset tier and canvas resolution swap at boot. draw() applies a
uniform hdScale() transform, the room-layer cache renders at render scale,
and image smoothing follows the tier.
This commit is contained in:
Quintine committed 2026-08-12 10:04:49 +10:00
1 parent 24c1958f2b
commit ea354d0153
3 files changed
+35 -7

No files matched your search

+3
View File
@@ -49,6 +49,7 @@ const G = {
sfxVol: 0.45,
musicVol: 0.55,
hudAlpha: 1,
hdRemaster: false,
imagesLoaded: false,
roomLayer: null,
roomLayerKey: '',
@@ -70,6 +71,8 @@ const PRESSURE_DROP_BASE = 3; // dial 0 == 0.03 relief base
const DEATH_LOCK = 3;
const PRESSURE_DIAL_MIN = -10, PRESSURE_DIAL_MAX = 10;
function hdScale() { return G.hdRemaster ? 4 : 1; }
// Preserve the old -5 / 0 / +5 balance while adding genuinely wider extremes.
function pressureGainUnits(dial) {
const d = clamp(dial, PRESSURE_DIAL_MIN, PRESSURE_DIAL_MAX);