[jak3] Fix secrets option on title screen (#4194)

Fixes 2 things:
- secrets option on title screen not hidden if no secrets unlocked
(missing check, we just always drew it)
- off-by-one bug in the "skip over secrets option" logic


https://github.com/user-attachments/assets/0f94f310-ca23-4ba8-91d5-7c2c10793c33

This approach mirrors what we did in Jak 2, but feels a bit hacky... I
have another branch
[here](https://github.com/open-goal/jak-project/compare/master...dallmeyer:jak-project:b/title-secrets?expand=1)
which takes the ND approach of just switching between 2 static menus
like:
```lisp
     (if (memcard-unlocked-secrets? #f #f)
      (set! (-> this current-options) *title-secrets-pc*)
      (set! (-> this current-options) *title-pc*))
```
This commit is contained in:
Matt Dallmeyer
2026-04-09 17:14:43 -07:00
committed by GitHub
parent cfe3ec9229
commit c31662ef89
2 changed files with 31 additions and 22 deletions
+30 -21
View File
@@ -1802,37 +1802,46 @@
(none))
(defmethod draw-option ((this menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))))
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(offset-y (-> this offset-y)))
(set! (-> arg1 alpha) f30-0)
(set-scale! arg1 0.85)
(adjust-font-origin-y arg0 arg1 (-> this offset-y))
(cond
((= (-> arg0 option-index) arg2)
(draw-highlight-bar arg0 arg1 (the int (+ -6.0 (-> arg1 origin y))) 35 f30-0)
(let ((a0-4 arg1)) (set! (-> a0-4 color) (font-color font-color-33))))
(else (let ((a0-5 arg1)) (set! (-> a0-5 color) (font-color font-color-32))))))
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha))
;; adjust for potentially hidden secrets menu
(when (and (= *title-pc* (-> arg0 current-options))
(not (memcard-unlocked-secrets? #f #f)))
;; above secrets, shift down
(+! offset-y 0.08)
)
(adjust-font-origin-y arg0 arg1 offset-y)
(when (not (and (= (-> this name) (text-id progress-secrets))
(= *title-pc* (-> arg0 current-options))
(not (memcard-unlocked-secrets? #f #f))
))
(cond
((= (-> arg0 option-index) arg2)
(draw-highlight-bar arg0 arg1 (the int (+ -6.0 (-> arg1 origin y))) 35 f30-0)
(let ((a0-4 arg1)) (set! (-> a0-4 color) (font-color font-color-33))))
(else (let ((a0-5 arg1)) (set! (-> a0-5 color) (font-color font-color-32)))))
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
0
(none))
(defmethod draw-option ((this menu-exit-game-option) (progress progress) (fnt font-context) (arg2 int) (selected symbol))
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition))))
(y (the int (+ -1.0 (-> fnt origin y))))
(offset-y (-> this offset-y))
(height 22))
(if (< alpha 0.0) (set! alpha 0.0))
(set! (-> fnt alpha) alpha)
(set-scale! fnt 0.85)
; (set! (-> fnt height) 25.0)
; (set! height 28)
(adjust-font-origin-y progress fnt (-> this offset-y))
; (when (not (memcard-unlocked-secrets? #f #f))
; (-! (-> fnt origin y) 45.0)
; (-! y 49)
; )
; (when (memcard-unlocked-secrets? #f #f)
; (-! (-> fnt origin y) 35.0)
; (-! y 38)
; )
;; adjust for potentially hidden secrets menu
(when (not (memcard-unlocked-secrets? #f #f))
;; below secrets, shift up
(-! offset-y 0.07)
)
(adjust-font-origin-y progress fnt offset-y)
(when (nonzero? (-> this name))
(set-color! fnt (if (= arg2 (-> progress option-index)) (font-color font-color-32) (font-color font-color-33)))
(cond
@@ -1853,8 +1862,8 @@
(+! (-> fnt origin y) 29.0)
(set-scale! fnt 0.55))
(when (not (memcard-unlocked-secrets? #f #f))
(draw-highlight-bar progress fnt (the int (+ 23.0 (-> fnt origin y))) 23 alpha)
(+! (-> fnt origin y) 23.0)
(draw-highlight-bar progress fnt (the int (+ 29.0 (-> fnt origin y))) 23 alpha)
(+! (-> fnt origin y) 29.0)
(set-scale! fnt 0.60))
(cond
((-> choice 0)
@@ -223,7 +223,7 @@
((!= (length option-array) 1)
(sound-play "roll-over")))
;; skip over hidden secrets menu
(if (and (= *title-pc* (-> this current-options)) (not (memcard-unlocked-secrets? #f #f)) (= (-> this option-index) 3))
(if (and (= *title-pc* (-> this current-options)) (not (memcard-unlocked-secrets? #f #f)) (= (-> this option-index) 4))
(set! (-> this option-index) 3))
(cond
((> (-> this want-option-index) 0)