jak3: map fixes for pc port (#4199)

Three fixes for fullscreen map screens:

**1. Expand scanlines to cover whole screen**
Instead of just the 4:3 square, scales dynamically without overshooting.

**2. Fix map icon stretching**
On a real PS2, map icons squash incorrectly at 16:9, gets worse with
custom aspects. Fixed but preserves original game bug at PS2 16:9.

**3. Stop fast map scrolling at high FPS**
Same map scroll speed regardless of framerate.

Fixes #4195
This commit is contained in:
Grateful Forest
2026-04-13 09:15:05 +09:30
committed by GitHub
parent fedd27ebfd
commit a18d74c6fd
2 changed files with 36 additions and 3 deletions
+5 -3
View File
@@ -298,7 +298,8 @@
(s2-0 (new-stack-vector0))
(s3-2 (new-stack-vector0))
)
(let ((f26-0 (-> *video-params* relative-x-scale))
;; og-preserve-this remove stretch on non-PS2 aspects
(let ((f26-0 (if (-> *pc-settings* use-vis?) (-> *video-params* relative-x-scale) 1.0))
(f28-0 (-> *video-params* relative-x-scale-reciprical))
)
(-> arg1 class)
@@ -700,8 +701,9 @@
(let ((f30-0 (analog-input (the-as int (-> s5-0 leftx)) 128.0 32.0 110.0 4.0))
(f0-0 (analog-input (the-as int (-> s5-0 lefty)) 128.0 32.0 110.0 4.0))
)
(+! (-> this scroll x) f30-0)
(+! (-> this scroll y) f0-0)
;; og:preserve-this high fps map scroll
(+! (-> this scroll x) (* f30-0 DISPLAY_FPS_RATIO))
(+! (-> this scroll y) (* f0-0 DISPLAY_FPS_RATIO))
)
)
)
+31
View File
@@ -293,6 +293,37 @@
(none)
)
(defun begin-scan ((arg0 hud-box) (arg1 progress))
(cond
;; og:preserve-this branch for custom-aspect bigmap
((and (not (-> *pc-settings* use-vis?)) (or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)))
(set! (-> arg0 box min x) (* 256.0 (- 1.0 (/ 1.0 (-> *video-params* relative-x-scale)))))
(set! (-> arg0 box min y) 0.0)
(set! (-> arg0 box max x) (+ 256.0 (* 256.0 (/ 1.0 (-> *video-params* relative-x-scale)))))
(set! (-> arg0 box max y) 416.0)
)
((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap))
(set! (-> arg0 box min x) 0.0)
(set! (-> arg0 box min y) 0.0)
(set! (-> arg0 box max x) 512.0)
(set! (-> arg0 box max y) 416.0)
)
((= (get-aspect-ratio) 'aspect16x9)
(set! (-> arg0 box min x) 79.0)
(set! (-> arg0 box min y) 38.0)
(set! (-> arg0 box max x) 434.0)
(set! (-> arg0 box max y) 362.0)
)
(else
(set! (-> arg0 box min x) 70.0)
(set! (-> arg0 box min y) 72.0)
(set! (-> arg0 box max x) 444.0)
(set! (-> arg0 box max y) 329.0)
)
)
0
)
(defun end-scan ((arg0 hud-box) (arg1 float))
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
(bucket-id bucket582)