Skip to content

Commit

Permalink
modversion jak 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmeyer committed Aug 29, 2024
1 parent 28baf7e commit 5b2f8df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions goal_src/jak2/engine/mods/mod-settings.gc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ if the result of rand-vu-int-range is 1, then DANCE! if it is not 1, then Don't
;; Define Settings to use in mods
;;;;;;;;;;;;;;;;;;;;;;;;;;

(define startingDebugContinuePoint "village1-hut")

;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Define Custom Settings Variables to use in mods
;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Change #f to #t here to show the input display by default
(define *show-input-display* #f)
(define *show-input-display* #f)

;; do NOT change %MODVERSIONPLACEHOLDER% below, otherwise the mod-bundling-tools
;; will be unable to automatically add version info to the speedrun display
(define *mod-version-text* "%MODVERSIONPLACEHOLDER%")
10 changes: 6 additions & 4 deletions goal_src/jak2/pc/features/speedruns.gc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

;; TODO later - customize menu open keybind

(define-extern *mod-version-text* string)

(define-extern task-close! (function string symbol))

(define *speedrun-info* (new 'static 'speedrun-info))
Expand Down Expand Up @@ -428,21 +430,21 @@
((= (-> this category) (speedrun-category custom))
(pc-sr-mode-get-custom-category-name (-> this active-custom-category index) *pc-cpp-temp-string*)
(format *temp-string*
"<COLOR_WHITE>Category: <COLOR_GREEN>~S~%<COLOR_WHITE>Secrets: <COLOR_GREEN>~D~%<COLOR_WHITE>Features: <COLOR_GREEN>~D~%<COLOR_WHITE>Forbidden Features: <COLOR_GREEN>~D~%<COLOR_WHITE>Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Version: <COLOR_GREEN>~S~%"
"<COLOR_WHITE>Category: <COLOR_GREEN>~S~%<COLOR_WHITE>Secrets: <COLOR_GREEN>~D~%<COLOR_WHITE>Features: <COLOR_GREEN>~D~%<COLOR_WHITE>Forbidden Features: <COLOR_GREEN>~D~%<COLOR_WHITE>Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Mod Version: <COLOR_GREEN>~S~%"
*pc-cpp-temp-string*
(-> this active-custom-category secrets)
(-> this active-custom-category features)
(-> this active-custom-category forbidden-features)
(-> this active-custom-category pc-cheats)
*pc-settings-built-sha*))
*mod-version-text*))
(else
(format *temp-string*
"<COLOR_WHITE>Category: <COLOR_GREEN>~S~%<COLOR_WHITE>PC Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Frame Rate: <COLOR_GREEN>~D~%<COLOR_WHITE>PS2 Actor Vis?: <COLOR_GREEN>~S~%<COLOR_WHITE>Version: <COLOR_GREEN>~S~%"
"<COLOR_WHITE>Category: <COLOR_GREEN>~S~%<COLOR_WHITE>PC Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Frame Rate: <COLOR_GREEN>~D~%<COLOR_WHITE>PS2 Actor Vis?: <COLOR_GREEN>~S~%<COLOR_WHITE>Mod Version: <COLOR_GREEN>~S~%"
(enum->string speedrun-category (-> this category))
(the-as int (-> *pc-settings* cheats))
(-> *pc-settings* target-fps)
(if (-> *pc-settings* ps2-actor-vis?) "true" "false")
*pc-settings-built-sha*)))
*mod-version-text*)))
(pc-encode-utf8-string *temp-string* *pc-encoded-temp-string*)
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id debug-no-zbuf2))
;; reset bucket settings prior to drawing - font won't do this for us, and
Expand Down

0 comments on commit 5b2f8df

Please sign in to comment.