diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 05b6dd0c7f..230424dc56 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -7412,6 +7412,9 @@ (progress-mouse-options-horz-sens #x129d) (progress-mouse-options-vert-sens #x129e) (progress-mouse-options-player-movement #x129f) + (progress-shadows #x12a0) + (progress-shadows-normal #x12a1) + (progress-shadows-extended #x12a2) (progress-input-options-auto-hide-cursor #x1300) (progress-menu-reassign-binds #x1301) (progress-reassign-binds-controller #x1302) @@ -12937,11 +12940,11 @@ :flag-assert #xf00000060 (:methods (new (symbol type float float float shadow-flags float) _type_) ;; 0 - (clear-offset-bit (shadow-control) int) ;; 9 - (set-offset-bit (shadow-control) int) ;; 10 + (enable-draw (shadow-control) int) ;; 9 + (disable-draw (shadow-control) int) ;; 10 (set-top-plane-offset (shadow-control float) int) ;; 11 (set-bottom-plane-offset (shadow-control float) int) ;; 12 - (shadow-control-method-13 (_type_ vector float float float) none) ;; 13 ;; (unused-13 (_type_) none) ;; 13 + (probe-line-for-shadow (_type_ vector float float float) none) ;; 13 ;; (unused-13 (_type_) none) ;; 13 (shadow-control-method-14 (_type_ vector vector float float float) none) ;; 14 ;; (update-direction-from-time-of-day (_type_) none) ;; 14 ) ) @@ -50009,8 +50012,8 @@ (vehicle-method-99 (_type_ float) none) ;; 99 (vehicle-method-100 (_type_ float vehicle-physics-work) none) ;; 100 (vehicle-method-101 (_type_) none) ;; 101 - (vehicle-method-102 (_type_) none) ;; 102 - (vehicle-method-103 (_type_) none) ;; 103 + (shadow-enable (_type_) none) ;; 102 + (shadow-disable (_type_) none) ;; 103 (vehicle-method-104 (_type_) none) ;; 104 (vehicle-method-105 (_type_) symbol) ;; 105 (vehicle-method-106 (_type_) none) ;; 106 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 67c4e9ac8b..55f695da01 100644 --- a/game/assets/jak2/text/game_custom_text_en-US.json +++ b/game/assets/jak2/text/game_custom_text_en-US.json @@ -139,6 +139,9 @@ "129d": "Horizontal Sensitivity", "129e": "Vertical Sensitivity", "129f": "Player Movement", + "12a0": "Object Shadows", + "12a1": "Normal", + "12a2": "Extended", "1300": "Auto Hide Cursor", "1301": "Reassign Binds", "1302": "Controller Binds", diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index 6930d19eba..202f6e817f 100644 --- a/goal_src/jak1/pc/pckernel-common.gc +++ b/goal_src/jak1/pc/pckernel-common.gc @@ -683,6 +683,7 @@ (("ps2-music?") (set! (-> obj ps2-music?) (file-stream-read-symbol file))) (("ps2-se?") (set! (-> obj ps2-se?) (file-stream-read-symbol file))) (("ps2-hints?") (set! (-> obj ps2-hints?) (file-stream-read-symbol file))) + (("ps2-shadow?") (set! (-> obj ps2-shadow?) (file-stream-read-symbol file))) (("ps2-lod-dist?") (set! (-> obj ps2-lod-dist?) (file-stream-read-symbol file))) (("force-envmap?") (set! (-> obj force-envmap?) (file-stream-read-symbol file))) (("force-actors?") (set! (-> obj ps2-actor-vis?) (not (file-stream-read-symbol file)))) @@ -769,6 +770,7 @@ (format file " (ps2-music? ~A)~%" (-> obj ps2-music?)) (format file " (ps2-se? ~A)~%" (-> obj ps2-se?)) (format file " (ps2-hints? ~A)~%" (-> obj ps2-hints?)) + (format file " (ps2-shadow? ~A)~%" (-> obj ps2-shadow?)) (format file " (ps2-lod-dist? ~A)~%" (-> obj ps2-lod-dist?)) (format file " (force-envmap? ~A)~%" (-> obj force-envmap?)) (format file " (use-vis? ~A)~%" (-> obj use-vis?)) diff --git a/goal_src/jak1/pc/pckernel-h.gc b/goal_src/jak1/pc/pckernel-h.gc index e0df373a3f..77fade7467 100644 --- a/goal_src/jak1/pc/pckernel-h.gc +++ b/goal_src/jak1/pc/pckernel-h.gc @@ -180,6 +180,7 @@ (ps2-hints? symbol) ;; if off, enables extra game hints ;; lod settings + (ps2-shadow? symbol) ;; if off, enables extended object shadows (ps2-lod-dist? symbol) ;; use original lod distances (force-envmap? symbol) ;; dont use envmap fading (force max). (shrub-dist-mod float) ;; shrub render distance modifier @@ -398,6 +399,7 @@ (set! (-> obj ps2-se?) #t) (set! (-> obj ps2-hints?) #t) + (set! (-> obj ps2-shadow?) #f) (set! (-> obj ps2-lod-dist?) #f) (set! (-> obj force-envmap?) #t) (set! (-> obj shrub-dist-mod) 1.0) diff --git a/goal_src/jak2/engine/debug/debug.gc b/goal_src/jak2/engine/debug/debug.gc index ada64d7459..626adb20e9 100644 --- a/goal_src/jak2/engine/debug/debug.gc +++ b/goal_src/jak2/engine/debug/debug.gc @@ -1579,27 +1579,43 @@ Most functions take a boolean as their first argument. If the boolean is set to bucket ) (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) - (let ((v1-7 arg4)) - (draw-string-xy - "X" - buf - (+ x -5) - (+ y -4) - (cond - ((= v1-7 (mouse-buttons left)) - (font-color red) - ) - ((= v1-7 (mouse-buttons right)) - (font-color yellow) - ) - ((= v1-7 (mouse-buttons middle)) - (font-color green) - ) - (else - (font-color default) + (#cond + (PC_PORT + ;; just draw a + with lines at the position + (let ((color (case arg4 + (((mouse-buttons left)) (static-rgba #xff #x00 #x00 #x80)) + (((mouse-buttons right)) (static-rgba #xff #xff #x00 #x80)) + (((mouse-buttons middle)) (static-rgba #x00 #xff #x00 #x80)) + (else (static-rgba #xff #xff #xff #x80)) + ))) + (draw-sprite2d-xy buf (- x 3) (- y 1) 5 1 color) + (draw-sprite2d-xy buf (- x 1) ( - y 3) 1 5 color) + )) + (#t + ;; print an X at the position (roughly) + (let ((v1-7 arg4)) + (draw-string-xy + "X" + buf + (+ x -5) + (+ y -4) + (cond + ((= v1-7 (mouse-buttons left)) + (font-color red) + ) + ((= v1-7 (mouse-buttons right)) + (font-color yellow) + ) + ((= v1-7 (mouse-buttons middle)) + (font-color green) + ) + (else + (font-color default) + ) + ) + (font-flags shadow) ) ) - (font-flags shadow) ) ) ) diff --git a/goal_src/jak2/engine/gfx/foreground/foreground.gc b/goal_src/jak2/engine/gfx/foreground/foreground.gc index 45eb1f9afd..8f606d722c 100644 --- a/goal_src/jak2/engine/gfx/foreground/foreground.gc +++ b/goal_src/jak2/engine/gfx/foreground/foreground.gc @@ -591,6 +591,9 @@ ) ) ) + (#when PC_PORT + (if (not (-> *pc-settings* ps2-shadow?)) + (set! dist 0.0))) (let ((t1-5 (-> shadow-settings flags))) (-> draw-ctrl cur-lod) (when (not (logtest? t1-5 (shadow-flags disable-fade))) diff --git a/goal_src/jak2/engine/gfx/foreground/shadow-cpu-h.gc b/goal_src/jak2/engine/gfx/foreground/shadow-cpu-h.gc index 4b1d0396e2..c89f8d374c 100644 --- a/goal_src/jak2/engine/gfx/foreground/shadow-cpu-h.gc +++ b/goal_src/jak2/engine/gfx/foreground/shadow-cpu-h.gc @@ -50,32 +50,36 @@ :flag-assert #xf00000060 (:methods (new (symbol type float float float shadow-flags float) _type_) - (clear-offset-bit (shadow-control) int) - (set-offset-bit (shadow-control) int) + (enable-draw (shadow-control) int) + (disable-draw (shadow-control) int) (set-top-plane-offset (shadow-control float) int) (set-bottom-plane-offset (shadow-control float) int) - (shadow-control-method-13 (_type_ vector float float float) none) + (probe-line-for-shadow (_type_ vector float float float) none) (shadow-control-method-14 (_type_ vector vector float float float) none) ) ) -(defmethod clear-offset-bit shadow-control ((obj shadow-control)) +(defmethod enable-draw shadow-control ((obj shadow-control)) + (declare (inline)) (logclear! (-> obj settings flags) (shadow-flags disable-draw)) 0 ) -(defmethod set-offset-bit shadow-control ((obj shadow-control)) +(defmethod disable-draw shadow-control ((obj shadow-control)) + (declare (inline)) (logior! (-> obj settings flags) (shadow-flags disable-draw)) 0 ) (defmethod set-bottom-plane-offset shadow-control ((obj shadow-control) (arg0 float)) + (declare (inline)) (set! (-> obj settings bot-plane w) (- arg0)) 0 ) (defmethod set-top-plane-offset shadow-control ((obj shadow-control) (arg0 float)) + (declare (inline)) (set! (-> obj settings top-plane w) (- arg0)) 0 ) diff --git a/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc b/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc index 3c31f5f0ab..16b4438765 100644 --- a/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc +++ b/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc @@ -786,7 +786,7 @@ (none) ) -(defmethod shadow-control-method-13 ((this shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) +(defmethod probe-line-for-shadow ((this shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) (with-pp (let ((s4-0 (new 'stack-no-clear 'collide-query))) (let ((v1-0 pp)) diff --git a/goal_src/jak2/engine/process-drawable/process-taskable.gc b/goal_src/jak2/engine/process-drawable/process-taskable.gc index 072cd06bde..0bdacc82eb 100644 --- a/goal_src/jak2/engine/process-drawable/process-taskable.gc +++ b/goal_src/jak2/engine/process-drawable/process-taskable.gc @@ -63,7 +63,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy (zero? (-> this draw cur-lod)) (logtest? (-> this draw status) (draw-control-status on-screen)) ) - (shadow-control-method-13 v1-1 (-> this draw origin) -4096.0 4096.0 32768.0) + (probe-line-for-shadow v1-1 (-> this draw origin) -4096.0 4096.0 32768.0) ) (else (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) diff --git a/goal_src/jak2/engine/ui/text-id-h.gc b/goal_src/jak2/engine/ui/text-id-h.gc index 5cb5cb2e5e..754ac5146b 100644 --- a/goal_src/jak2/engine/ui/text-id-h.gc +++ b/goal_src/jak2/engine/ui/text-id-h.gc @@ -729,6 +729,9 @@ (progress-mouse-options-horz-sens #x129d) (progress-mouse-options-vert-sens #x129e) (progress-mouse-options-player-movement #x129f) + (progress-shadows #x12a0) + (progress-shadows-normal #x12a1) + (progress-shadows-extended #x12a2) (progress-input-options-auto-hide-cursor #x1300) (progress-menu-reassign-binds #x1301) (progress-reassign-binds-controller #x1302) diff --git a/goal_src/jak2/levels/city/traffic/citizen/citizen.gc b/goal_src/jak2/levels/city/traffic/citizen/citizen.gc index 09d1432fd9..24e42bcb10 100644 --- a/goal_src/jak2/levels/city/traffic/citizen/citizen.gc +++ b/goal_src/jak2/levels/city/traffic/citizen/citizen.gc @@ -405,6 +405,9 @@ (let ((s5-3 (-> this draw shadow-ctrl))) (when (!= *nav-enemy-dummy-shadow-control* s5-3) (let ((f0-7 (vector-vector-distance (camera-pos) (-> this root trans)))) + (#when PC_PORT + (if (not (-> *pc-settings* ps2-shadow?)) + (set! f0-7 0.0))) (cond ((< 163840.0 f0-7) (logior! (-> s5-3 settings flags) (shadow-flags disable-draw)) diff --git a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-h.gc b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-h.gc index 10d93b5bdb..2e0aa0ce7a 100644 --- a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-h.gc +++ b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-h.gc @@ -398,8 +398,8 @@ (vehicle-method-99 (_type_ float) none) (vehicle-method-100 (_type_ float vehicle-physics-work) none) (vehicle-method-101 (_type_) none) - (vehicle-method-102 (_type_) none) - (vehicle-method-103 (_type_) none) + (shadow-enable (_type_) none) + (shadow-disable (_type_) none) (vehicle-method-104 (_type_) none) (vehicle-method-105 (_type_) symbol) (vehicle-method-106 (_type_) none) diff --git a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-states.gc b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-states.gc index 40b3066b07..5f5c480037 100644 --- a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-states.gc +++ b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-states.gc @@ -146,7 +146,7 @@ ) (set! (-> self max-time-step) 0.02) (rigid-body-object-method-38 self) - (vehicle-method-102 self) + (shadow-enable self) (vehicle-method-87 self) (logior! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) (set! (-> self damage-factor) (* 0.7518797 (-> self damage-factor))) @@ -407,7 +407,7 @@ (rigid-body-method-13 (-> gp-4 state)) ) (vehicle-method-110 self) - (vehicle-method-103 self) + (shadow-disable self) (let ((gp-5 (new 'stack-no-clear 'explosion-init-params))) (set! (-> gp-5 spawn-point quad) (-> self root trans quad)) (quaternion-copy! (-> gp-5 spawn-quat) (-> self root quat)) diff --git a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-util.gc b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-util.gc index 9d0a7179d2..4c528ac019 100644 --- a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-util.gc +++ b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-util.gc @@ -681,7 +681,7 @@ This commonly includes things such as: (logclear! (-> this focus-status) (focus-status disable dead inactive)) (rigid-body-object-method-35 this) (rigid-body-object-method-39 this) - (vehicle-method-103 this) + (shadow-disable this) (set! (-> this hit-points) 1.0) (set! (-> this damage-factor) (-> this info damage-factor)) (set! (-> this crash-level) 0) @@ -1016,7 +1016,7 @@ This commonly includes things such as: (none) ) -(defmethod vehicle-method-102 ((this vehicle)) +(defmethod shadow-enable ((this vehicle)) (let ((v1-1 (-> this draw shadow-ctrl))) (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) ) @@ -1025,7 +1025,7 @@ This commonly includes things such as: (none) ) -(defmethod vehicle-method-103 ((this vehicle)) +(defmethod shadow-disable ((this vehicle)) (let ((v1-1 (-> this draw shadow-ctrl))) (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) ) diff --git a/goal_src/jak2/levels/city/traffic/vehicle/vehicle.gc b/goal_src/jak2/levels/city/traffic/vehicle/vehicle.gc index 4afc90e4e8..42d3c1184c 100644 --- a/goal_src/jak2/levels/city/traffic/vehicle/vehicle.gc +++ b/goal_src/jak2/levels/city/traffic/vehicle/vehicle.gc @@ -706,6 +706,9 @@ (let ((s5-0 (-> this draw shadow-ctrl))) (when (!= *vehicle-shadow-control-disabled* s5-0) (let ((f30-0 (vector-vector-xz-distance (camera-pos) (-> this root trans)))) + (#when PC_PORT + (if (not (-> *pc-settings* ps2-shadow?)) + (set! f30-0 0.0))) (cond ((< 245760.0 f30-0) (logior! (-> s5-0 settings flags) (shadow-flags disable-draw)) diff --git a/goal_src/jak2/levels/mountain/mountain-obs.gc b/goal_src/jak2/levels/mountain/mountain-obs.gc index 923b7a18e6..11e8a25633 100644 --- a/goal_src/jak2/levels/mountain/mountain-obs.gc +++ b/goal_src/jak2/levels/mountain/mountain-obs.gc @@ -2008,7 +2008,8 @@ This commonly includes things such as: (set-vector! (-> self root scale) f0-1 f0-1 f0-1 1.0) ) (cond - ((< (vector-vector-distance (math-camera-pos) (-> self root trans)) (-> gp-0 settings fade-dist)) + ((or (< (vector-vector-distance (math-camera-pos) (-> self root trans)) (-> gp-0 settings fade-dist)) + (and PC_PORT (not (-> *pc-settings* ps2-shadow?)))) ;; og:preserve-this extended shadow (let ((s5-2 (new 'stack-no-clear 'collide-query))) (set! (-> s5-2 start-pos quad) (-> self root trans quad)) (+! (-> s5-2 start-pos z) -8192.0) diff --git a/goal_src/jak2/pc/debug/default-menu-pc.gc b/goal_src/jak2/pc/debug/default-menu-pc.gc index c5982f3789..3771a40e96 100644 --- a/goal_src/jak2/pc/debug/default-menu-pc.gc +++ b/goal_src/jak2/pc/debug/default-menu-pc.gc @@ -885,6 +885,7 @@ (menu "PS2 settings" ;(flag "PS2 Load speed" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-read-speed?))) (flag "PS2 Particles" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-parts?))) + (flag "PS2 Shadows" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-shadow?))) ;(flag "PS2 Music" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-music?))) ;(flag "PS2 Sound effects" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-se?))) ;(flag "PS2 Hints" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-hints?))) diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index 516e9148cc..2ff1c36a05 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -11,8 +11,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; version: 0.1.5.2 -(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 1 5 2)) + ;; version: 0.1.6.2 +(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 1 6 2)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; types and enums diff --git a/goal_src/jak2/pc/progress/progress-generic-h-pc.gc b/goal_src/jak2/pc/progress/progress-generic-h-pc.gc index 2697c0cb58..0027269b99 100644 --- a/goal_src/jak2/pc/progress/progress-generic-h-pc.gc +++ b/goal_src/jak2/pc/progress/progress-generic-h-pc.gc @@ -212,7 +212,7 @@ :menu-options (new 'static 'boxed-array :type menu-option ,@options)))))) -(defmacro progress-new-generic-link-to-details-page (title &key (should-disable? #f) &rest entries) +(defmacro progress-new-generic-link-to-keybind-details-page (title &key (should-disable? #f) &key device-type &key entries &key confirm) `(new 'static 'menu-generic-link-option :name ,title :should-disable? ,should-disable? @@ -221,6 +221,37 @@ (new 'static 'menu-generic-details-page :name ,title :entries (new 'static 'boxed-array :type menu-generic-details-entry - ,@entries)))))) + ,@(apply (lambda (x) `(new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind ,x) :device-type (input-device-type ,device-type))) entries) + (new 'static 'menu-generic-details-confirm-entry :name ,(first confirm) :on-confirm ,(second confirm)))))))) + +(defmacro static-progress-generic-pc-settings-lod-default-high-boolean (name field) + `(new 'static 'menu-generic-boolean-option + :name ,name + :truthy-text (text-id progress-lod-default) + :falsey-text (text-id progress-lod-high) + :get-value-fn (lambda () ,field) + :on-confirm (lambda ((val symbol)) + (set! ,field val) + (commit-to-file *pc-settings*)))) + +(defmacro static-progress-generic-pc-settings-on-off-boolean (name field) + `(new 'static 'menu-generic-boolean-option + :name ,name + :truthy-text (text-id progress-on) + :falsey-text (text-id progress-off) + :get-value-fn (lambda () ,field) + :on-confirm (lambda ((val symbol)) + (set! ,field val) + (commit-to-file *pc-settings*)))) + +(defmacro static-progress-generic-pc-settings-shadows-normal-extended-boolean (name field) + `(new 'static 'menu-generic-boolean-option + :name ,name + :truthy-text (text-id progress-shadows-normal) + :falsey-text (text-id progress-shadows-extended) + :get-value-fn (lambda () ,field) + :on-confirm (lambda ((val symbol)) + (set! ,field val) + (commit-to-file *pc-settings*)))) (define *progress-generic-temp-string* (new 'global 'string 512 (the string #f))) \ No newline at end of file diff --git a/goal_src/jak2/pc/progress/progress-generic-pc.gc b/goal_src/jak2/pc/progress/progress-generic-pc.gc index 569acde068..d692d918e3 100644 --- a/goal_src/jak2/pc/progress/progress-generic-pc.gc +++ b/goal_src/jak2/pc/progress/progress-generic-pc.gc @@ -513,7 +513,12 @@ (defmethod get-keybind-string ((this menu-generic-details-keybind-entry)) (case (-> this keybind) (((controller-keybind cross)) - "~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H Cross") + ;; the PS2 TRC says it should be pronounced "ecks", hence why every game that speaks the buttons out loud says X, plus at least 80% of people also already say X (i assume in part because of that). + ;; the official spelling is probably "cross" (see PS2 development reference manuals), but that has less weight in the context of displaying the name to the user, I think? + ;; "cross" seems to be mainly a UK thing (those weirdos) + (if (language? uk-english) + "~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H Cross" + "~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H X")) (((controller-keybind square)) "~Y~22L<~Z~Y~24L#~Z~Y~1L>~Z~Y~23L[~Z~+26H S~+7Vq~-7Vuare") (((controller-keybind circle)) diff --git a/goal_src/jak2/pc/progress/progress-static-pc.gc b/goal_src/jak2/pc/progress/progress-static-pc.gc index fb847370fb..984a828752 100644 --- a/goal_src/jak2/pc/progress/progress-static-pc.gc +++ b/goal_src/jak2/pc/progress/progress-static-pc.gc @@ -65,6 +65,26 @@ This gives us more freedom to write code how we want. ) ) +;; TODO - there is a bug where if you restore default binds and that changes your `X` bind, +;; the next X input is ignored, figure this out eventually / make an issue for it. +(defmacro progress-new-generic-keybinds-page-link () + `(progress-new-generic-link-to-scrolling-page (text-id progress-menu-reassign-binds) + (progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-controller) + :should-disable? (lambda () (<= (pc-get-controller-count) 0)) + :device-type controller + :entries (select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square) + :confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 0)))) + (progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-keyboard) + :should-disable? (lambda () (not (-> *pc-settings* keyboard-enabled?))) + :device-type keyboard + :entries (l-analog-up l-analog-down l-analog-left l-analog-right r-analog-up r-analog-down r-analog-left r-analog-left r-analog-right select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square) + :confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 1)))) + (progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-mouse) + :should-disable? (lambda () (not (-> *pc-settings* mouse-enabled?))) + :device-type mouse + :entries (select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square) + :confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 2)))))) + (define *game-options-pc* (progress-new-generic-scrolling-page (text-id progress-root-game-options) (progress-new-generic-link-to-scrolling-page (text-id progress-menu-input-options) @@ -234,77 +254,7 @@ This gives us more freedom to write code how we want. (set! (-> *pc-settings* auto-hide-cursor?) val) (update-mouse-controls! *pc-settings*) (commit-to-file *pc-settings*))) - ;; TODO - there is a bug where if you restore default binds and that changes your `X` bind, - ;; the next X input is ignored, figure this out eventually / make an issue for it. - (progress-new-generic-link-to-scrolling-page (text-id progress-menu-reassign-binds) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-controller) :should-disable? (lambda () (<= (pc-get-controller-count) 0)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 0)))) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-keyboard) :should-disable? (lambda () (not (-> *pc-settings* keyboard-enabled?))) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 1)))) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-mouse) :should-disable? (lambda () (not (-> *pc-settings* mouse-enabled?))) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 2))))) + (progress-new-generic-keybinds-page-link) (new 'static 'menu-generic-confirm-option :name (text-id progress-restore-defaults) :on-confirm (lambda ((val symbol)) @@ -548,77 +498,7 @@ This gives us more freedom to write code how we want. (set! (-> *pc-settings* auto-hide-cursor?) val) (update-mouse-controls! *pc-settings*) (commit-to-file *pc-settings*))) - ;; TODO - there is a bug where if you restore default binds and that changes your `X` bind, - ;; the next X input is ignored, figure this out eventually / make an issue for it. - (progress-new-generic-link-to-scrolling-page (text-id progress-menu-reassign-binds) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-controller) :should-disable? (lambda () (<= (pc-get-controller-count) 0)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type controller)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 0)))) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-keyboard) :should-disable? (lambda () (not (-> *pc-settings* keyboard-enabled?))) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l-analog-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r-analog-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type keyboard)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 1)))) - (progress-new-generic-link-to-details-page (text-id progress-reassign-binds-mouse) :should-disable? (lambda () (not (-> *pc-settings* mouse-enabled?))) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind select) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l3) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r3) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind start) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-up) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-right) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-down) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind dpad-left) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l2) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r2) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind l1) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind r1) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind triangle) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind circle) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind cross) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind square) :device-type (input-device-type mouse)) - (new 'static 'menu-generic-details-confirm-entry - :name (text-id progress-restore-defaults) - :on-confirm (lambda () (pc-reset-bindings-to-defaults! 0 2))))) + (progress-new-generic-keybinds-page-link) (new 'static 'menu-generic-confirm-option :name (text-id progress-restore-defaults) :on-confirm (lambda ((val symbol)) @@ -716,57 +596,26 @@ This gives us more freedom to write code how we want. (define *graphic-options-pc* (progress-new-generic-scrolling-page (text-id progress-root-graphic-options) (progress-new-generic-link-to-scrolling-page (text-id progress-graphics-ps2) - (new 'static 'menu-generic-carousel-option + (new 'static 'menu-generic-boolean-option :name (text-id progress-lod-bg) - :items (new 'static 'boxed-array :type text-id - (text-id progress-lod-high) - (text-id progress-lod-default) - (text-id progress-lod-low) - ) - :get-item-index-fn (lambda () (-> *pc-settings* lod-force-tfrag)) - :on-confirm (lambda ((index int)) - (set! (-> *pc-settings* lod-force-tfrag) index) - (set! (-> *pc-settings* lod-force-tie) index) - (commit-to-file *pc-settings*) - ) - ) - (new 'static 'menu-generic-carousel-option - :name (text-id progress-lod-fg) - :items (new 'static 'boxed-array :type text-id - (text-id progress-lod-high) - (text-id progress-lod-default) - (text-id progress-lod-low) - ) - :get-item-index-fn (lambda () (-> *pc-settings* lod-force-actor)) - :on-confirm (lambda ((index int)) - (set! (-> *pc-settings* lod-force-actor) index) - (commit-to-file *pc-settings*) - ) - ) - (new 'static 'menu-generic-boolean-option - :name (text-id progress-graphics-ps2-lod-dist) - :truthy-text (text-id progress-on) - :falsey-text (text-id progress-off) - :get-value-fn (lambda () (-> *pc-settings* ps2-lod-dist?)) + :truthy-text (text-id progress-lod-low) + :falsey-text (text-id progress-lod-high) + :get-value-fn (lambda () (> (-> *pc-settings* lod-force-tfrag) 0)) :on-confirm (lambda ((val symbol)) - (set! (-> *pc-settings* ps2-lod-dist?) val) - (commit-to-file *pc-settings*))) - (new 'static 'menu-generic-boolean-option - :name (text-id progress-ps2-parts) - :truthy-text (text-id progress-on) - :falsey-text (text-id progress-off) - :get-value-fn (lambda () (-> *pc-settings* ps2-parts?)) - :on-confirm (lambda ((val symbol)) - (set! (-> *pc-settings* ps2-parts?) val) - (commit-to-file *pc-settings*))) - (new 'static 'menu-generic-boolean-option - :name (text-id progress-hires-sky) - :truthy-text (text-id progress-on) - :falsey-text (text-id progress-off) - :get-value-fn (lambda () (-> *pc-settings* hires-clouds?)) - :on-confirm (lambda ((val symbol)) - (set! (-> *pc-settings* hires-clouds?) val) + (cond + (val + (set! (-> *pc-settings* lod-force-tfrag) 2) + (set! (-> *pc-settings* lod-force-tie) 2) + ) + (else + (set! (-> *pc-settings* lod-force-tfrag) 0) + (set! (-> *pc-settings* lod-force-tie) 0) + )) (commit-to-file *pc-settings*))) + (static-progress-generic-pc-settings-lod-default-high-boolean (text-id progress-lod-fg) (-> *pc-settings* ps2-lod-dist?)) + (static-progress-generic-pc-settings-on-off-boolean (text-id progress-ps2-parts) (-> *pc-settings* ps2-parts?)) + (static-progress-generic-pc-settings-shadows-normal-extended-boolean (text-id progress-shadows) (-> *pc-settings* ps2-shadow?)) + (static-progress-generic-pc-settings-on-off-boolean (text-id progress-hires-sky) (-> *pc-settings* hires-clouds?)) ) (new 'static 'menu-generic-carousel-option :name (text-id progress-graphics-display) @@ -910,9 +759,8 @@ This gives us more freedom to write code how we want. :get-max-size-fn (lambda () (-> *msaa-options* length)) :get-item-label-fn (lambda ((index int)) (if (zero? index) - (lookup-text! *common-text* (text-id progress-graphics-msaa-off) #f) - (string-format (lookup-text! *common-text* (text-id progress-msaa-x) #f) (-> *msaa-options* index)) - ) + (lookup-text! *common-text* (text-id progress-graphics-msaa-off) #f) + (string-format (lookup-text! *common-text* (text-id progress-msaa-x) #f) (-> *msaa-options* index))) ) :on-confirm (lambda ((index int)) (set! (-> *pc-settings* gfx-msaa) (the int (pow 2.0 (the float index)))) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc index 2291c69181..a0e09452d3 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc @@ -874,7 +874,7 @@ ;; definition for method 13 of type shadow-control ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. -(defmethod shadow-control-method-13 ((this shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) +(defmethod probe-line-for-shadow ((this shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) (with-pp (let ((s4-0 (new 'stack-no-clear 'collide-query))) (let ((v1-0 pp)) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc index 2930f597da..7c89bdd409 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc @@ -65,7 +65,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy (zero? (-> this draw cur-lod)) (logtest? (-> this draw status) (draw-control-status on-screen)) ) - (shadow-control-method-13 v1-1 (-> this draw origin) -4096.0 4096.0 32768.0) + (probe-line-for-shadow v1-1 (-> this draw origin) -4096.0 4096.0 32768.0) ) (else (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-h_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-h_REF.gc index 4a6ea851d3..c0391ea309 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-h_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-h_REF.gc @@ -657,8 +657,8 @@ (vehicle-method-99 (_type_ float) none) (vehicle-method-100 (_type_ float vehicle-physics-work) none) (vehicle-method-101 (_type_) none) - (vehicle-method-102 (_type_) none) - (vehicle-method-103 (_type_) none) + (shadow-enable (_type_) none) + (shadow-disable (_type_) none) (vehicle-method-104 (_type_) none) (vehicle-method-105 (_type_) symbol) (vehicle-method-106 (_type_) none) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc index b38776794e..0fd09c25eb 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc @@ -146,7 +146,7 @@ ) (set! (-> self max-time-step) 0.02) (rigid-body-object-method-38 self) - (vehicle-method-102 self) + (shadow-enable self) (vehicle-method-87 self) (logior! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) (set! (-> self damage-factor) (* 0.7518797 (-> self damage-factor))) @@ -412,7 +412,7 @@ (rigid-body-method-13 (-> gp-4 state)) ) (vehicle-method-110 self) - (vehicle-method-103 self) + (shadow-disable self) (let ((gp-5 (new 'stack-no-clear 'explosion-init-params))) (set! (-> gp-5 spawn-point quad) (-> self root trans quad)) (quaternion-copy! (-> gp-5 spawn-quat) (-> self root quat)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc index 6b3dd23487..29931fa2f6 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -760,7 +760,7 @@ This commonly includes things such as: (logclear! (-> this focus-status) (focus-status disable dead inactive)) (rigid-body-object-method-35 this) (rigid-body-object-method-39 this) - (vehicle-method-103 this) + (shadow-disable this) (set! (-> this hit-points) 1.0) (set! (-> this damage-factor) (-> this info damage-factor)) (set! (-> this crash-level) 0) @@ -1140,7 +1140,7 @@ This commonly includes things such as: ;; definition for method 102 of type vehicle ;; WARN: Return type mismatch int vs none. -(defmethod vehicle-method-102 ((this vehicle)) +(defmethod shadow-enable ((this vehicle)) (let ((v1-1 (-> this draw shadow-ctrl))) (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) ) @@ -1151,7 +1151,7 @@ This commonly includes things such as: ;; definition for method 103 of type vehicle ;; WARN: Return type mismatch int vs none. -(defmethod vehicle-method-103 ((this vehicle)) +(defmethod shadow-disable ((this vehicle)) (let ((v1-1 (-> this draw shadow-ctrl))) (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) )