From 5b2f8dff67c10448a895e0af2a141691ba7d2c36 Mon Sep 17 00:00:00 2001 From: dallmeyer <2515356+dallmeyer@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:10:41 -0700 Subject: [PATCH] modversion jak 2 --- goal_src/jak2/engine/mods/mod-settings.gc | 7 +++++-- goal_src/jak2/pc/features/speedruns.gc | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/goal_src/jak2/engine/mods/mod-settings.gc b/goal_src/jak2/engine/mods/mod-settings.gc index 5baaeef235..58f3548ade 100644 --- a/goal_src/jak2/engine/mods/mod-settings.gc +++ b/goal_src/jak2/engine/mods/mod-settings.gc @@ -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) \ No newline at end of file +(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%") \ No newline at end of file diff --git a/goal_src/jak2/pc/features/speedruns.gc b/goal_src/jak2/pc/features/speedruns.gc index ebefbf7ade..68aaf801cd 100644 --- a/goal_src/jak2/pc/features/speedruns.gc +++ b/goal_src/jak2/pc/features/speedruns.gc @@ -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)) @@ -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* - "Category: ~S~%Secrets: ~D~%Features: ~D~%Forbidden Features: ~D~%Cheats: ~D~%Version: ~S~%" + "Category: ~S~%Secrets: ~D~%Features: ~D~%Forbidden Features: ~D~%Cheats: ~D~%Mod Version: ~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* - "Category: ~S~%PC Cheats: ~D~%Frame Rate: ~D~%PS2 Actor Vis?: ~S~%Version: ~S~%" + "Category: ~S~%PC Cheats: ~D~%Frame Rate: ~D~%PS2 Actor Vis?: ~S~%Mod Version: ~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