diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 293823bc16..3d7cd98e5e 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -8818,6 +8818,7 @@ Unlike [[engine]], users can use [[engine-pers]] as a parent class." (progress-graphics-msaa-off #x1338) (progress-graphics-display #x1339) (language-name-finnish #x133a) + (progress-hint-subtitles #x133b) ) ;; ---text-id-h:text-id diff --git a/game/assets/jak2/text/game_custom_text_en-US.json b/game/assets/jak2/text/game_custom_text_en-US.json index 22e7d0f8c0..0c4b04f242 100644 --- a/game/assets/jak2/text/game_custom_text_en-US.json +++ b/game/assets/jak2/text/game_custom_text_en-US.json @@ -233,5 +233,6 @@ "1337": "PS2 LOD Distance", "1338": "Off", "1339": "Display", - "133a": " Suomi" + "133a": " Suomi", + "133b": "Hint Subtitles" } diff --git a/goal_src/jak2/engine/ui/text-id-h.gc b/goal_src/jak2/engine/ui/text-id-h.gc index e2c9ca245d..d5940e8ffc 100644 --- a/goal_src/jak2/engine/ui/text-id-h.gc +++ b/goal_src/jak2/engine/ui/text-id-h.gc @@ -829,6 +829,7 @@ (progress-graphics-msaa-off #x1338) (progress-graphics-display #x1339) (language-name-finnish #x133a) + (progress-hint-subtitles #x133b) ) ;; ---text-id diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index bbaf5b584e..18b463d96a 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -102,6 +102,7 @@ (controller-led-status? symbol) (speedrunner-mode-custom-bind uint32) (memcard-subtitles? symbol) + (hint-subtitles? symbol) (text-language pc-language) ;; language for game text ) @@ -168,6 +169,7 @@ (set! (-> obj memcard-volume-dialog) 0.75) (set! (-> obj memcard-vibration?) #t) (set! (-> obj memcard-subtitles?) #f) + (set! (-> obj hint-subtitles?) #t) 0) (defmethod reset-extra ((obj pc-settings-jak2) (call-handlers symbol)) diff --git a/goal_src/jak2/pc/pckernel.gc b/goal_src/jak2/pc/pckernel.gc index e8a6fb928f..85b8031b14 100644 --- a/goal_src/jak2/pc/pckernel.gc +++ b/goal_src/jak2/pc/pckernel.gc @@ -322,6 +322,7 @@ (set! (-> *setting-control* user-default music-volume) (-> obj memcard-volume-music)) (set! (-> *setting-control* user-default dialog-volume) (-> obj memcard-volume-dialog)) (set! (-> *setting-control* user-default vibration) (-> obj memcard-vibration?)) + (set! (-> *setting-control* user-default subtitle) (-> obj memcard-subtitles?)) obj) (defmethod set-game-setting! ((obj pc-settings-jak2) (setting symbol) (value symbol)) @@ -767,6 +768,7 @@ (("cheats-unlocked") (set! (-> obj cheats-unlocked) (the-as pc-cheats (file-stream-read-int file)))) (("cheats-backup") (file-stream-read-int file)) ;; TODO - Don't remove this, parsing code can't handle unexpected keys (("memcard-subtitles?") (set! (-> obj memcard-subtitles?) (file-stream-read-symbol file))) + (("hint-subtitles?") (set! (-> obj hint-subtitles?) (file-stream-read-symbol file))) (("music-unlocked") (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) (bit-array<-int64 (-> obj music-unlocked) (* i 64) (file-stream-read-int file)) @@ -819,6 +821,7 @@ (format file " (cheats-purchased #x~x)~%" (-> obj cheats-purchased)) (format file " (cheats-unlocked #x~x)~%" (-> obj cheats-unlocked)) (format file " (memcard-subtitles? ~A)~%" (-> obj memcard-subtitles?)) + (format file " (hint-subtitles? ~A)~%" (-> obj hint-subtitles?)) (format file " (music-unlocked") (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) diff --git a/goal_src/jak2/pc/progress/progress-static-pc.gc b/goal_src/jak2/pc/progress/progress-static-pc.gc index efbe71ecc6..16d2fc6e32 100644 --- a/goal_src/jak2/pc/progress/progress-static-pc.gc +++ b/goal_src/jak2/pc/progress/progress-static-pc.gc @@ -336,6 +336,17 @@ This gives us more freedom to write code how we want. (pc-settings-save) (set! (-> *setting-control* user-default subtitle) val)))) +(defmacro game-options-pc-hint-subtitle-toggle () + `(new 'static 'menu-generic-boolean-option + :name (text-id progress-hint-subtitles) + :truthy-text (text-id progress-on) + :falsey-text (text-id progress-off) + :get-value-fn (lambda () (-> *pc-settings* hint-subtitles?)) + :should-disable? (lambda () (not (-> *pc-settings* memcard-subtitles?))) + :on-confirm (lambda ((val symbol)) + (set! (-> *pc-settings* hint-subtitles?) val) + (pc-settings-save)))) + (defmacro game-options-pc-subtitle-language () `(new 'static 'menu-generic-carousel-option :name (text-id progress-sound-subtitle-language) @@ -454,6 +465,7 @@ This gives us more freedom to write code how we want. (progress-new-generic-scrolling-page (text-id progress-root-game-options) (game-options-pc-input-options) (game-options-pc-subtitle-toggle) + (game-options-pc-hint-subtitle-toggle) (game-options-pc-subtitle-language) (game-options-pc-sound-language) (game-options-pc-text-language) @@ -466,6 +478,7 @@ This gives us more freedom to write code how we want. (progress-new-generic-scrolling-page (text-id progress-root-game-options) (game-options-pc-input-options) (game-options-pc-subtitle-toggle) + (game-options-pc-hint-subtitle-toggle) (game-options-pc-subtitle-language) (game-options-pc-sound-language) (game-options-pc-text-language) diff --git a/goal_src/jak2/pc/subtitle2.gc b/goal_src/jak2/pc/subtitle2.gc index 5cd84a154f..cc6adda6a9 100644 --- a/goal_src/jak2/pc/subtitle2.gc +++ b/goal_src/jak2/pc/subtitle2.gc @@ -471,7 +471,9 @@ (set! (-> self font origin y) cur-y) ;; check if we should actually draw subtitles and do it - (when (and (-> *setting-control* user-current subtitle) (or *gui-kick-str* (= *master-mode* 'game))) + (when (and (-> *setting-control* user-current subtitle) + (or (-> self movie-mode?) (-> *pc-settings* hint-subtitles?)) + (or *gui-kick-str* (= *master-mode* 'game))) (set-action! *gui-control* (gui-action play) (-> self gui-id) (gui-channel none) (gui-action none) (the-as string #f) (the-as (function gui-connection symbol) #f) (the-as process #f))