From 0126dd833d85ce17d0f6f3fe4037a5d96bab5732 Mon Sep 17 00:00:00 2001 From: water111 Date: Sat, 26 Jul 2025 14:50:17 -0400 Subject: [PATCH] goal format --- goal_src/jak1/engine/gfx/foreground/bones.gc | 24 +++++++++---------- goal_src/jak1/engine/gfx/shadow/shadow-cpu.gc | 4 ++-- goal_src/jak2/engine/draw/drawable.gc | 4 ++-- .../jak2/engine/gfx/foreground/foreground.gc | 24 +++++++++---------- .../jak2/engine/gfx/foreground/shadow-cpu.gc | 12 +++++----- goal_src/jak3/engine/draw/drawable.gc | 2 +- .../jak3/engine/gfx/foreground/foreground.gc | 24 +++++++++---------- .../jak3/engine/gfx/foreground/shadow-cpu.gc | 12 +++++----- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/goal_src/jak1/engine/gfx/foreground/bones.gc b/goal_src/jak1/engine/gfx/foreground/bones.gc index ae92c94137..7ef71dfc91 100644 --- a/goal_src/jak1/engine/gfx/foreground/bones.gc +++ b/goal_src/jak1/engine/gfx/foreground/bones.gc @@ -350,7 +350,7 @@ ;; og:preserve-this (set! (-> *pc-shadow-queue* run (-> *pc-shadow-queue* cur-run) first) (the pc-shadow-request 0)) (set! (-> *pc-shadow-queue* run (-> *pc-shadow-queue* cur-run) next) (the (pointer pc-shadow-request) 0)) - + 0 (none)) @@ -694,7 +694,7 @@ (settings (if (-> dc shadow-ctrl) (-> dc shadow-ctrl settings) *default-shadow-settings*)) (flags (-> settings flags)) ) - + ;; if fade is enabled, and we're all the way faded out, disable draw (when (not (logtest? flags (shadow-flags disable-fade))) (let ((dist (-> (scratchpad-object terrain-context) work foreground bone-mem work distance w))) @@ -703,29 +703,29 @@ ) ) ) - + ;; if disabled, early return (if (logtest? flags (shadow-flags disable-draw)) (return dma-ptr) ) - - + + ;; settings (mem-copy! (the pointer (-> pse settings)) (the pointer settings) (size-of shadow-settings)) - + ;; update the "center" position. (let ((center-pos (-> dc skeleton bones (-> dc shadow-joint-index) position))) (set! (-> pse settings center x) (-> center-pos x)) (set! (-> pse settings center y) (-> center-pos y)) (set! (-> pse settings center z) (-> center-pos z)) ) - + ;; set the other properties (set! (-> pse geo-name) (-> sgeo name)) (set! (-> pse mtx) mtx) (set! (-> pse num-joints) (-> sgeo header num-joints)) (vector-copy! (-> pse color) (-> *time-of-day-context* current-shadow-color)) - + ;; set up linked list. (let* ((run (-> *pc-shadow-queue* run (-> *pc-shadow-queue* cur-run))) (next (-> run next)) @@ -733,13 +733,13 @@ ;; if we're the first in the list, store in the run (if (zero? (-> run first)) (set! (-> run first) pse)) - + ;; patch next pointer of previous (if (nonzero? next) (set! (-> next 0) pse)) - + ;; remember where to patch for the next one (set! (-> run next) (&-> pse next)) - + ;; clear our next pointer in case we're last (set! (-> pse next) (the pc-shadow-request 0)) @@ -752,7 +752,7 @@ (set! (-> pse dma-next vif0) (new 'static 'vif-tag)) (set! (-> pse dma-next vif1) (new 'static 'vif-tag)) ) - + dma-ptr ) ) diff --git a/goal_src/jak1/engine/gfx/shadow/shadow-cpu.gc b/goal_src/jak1/engine/gfx/shadow/shadow-cpu.gc index d6474108be..3f07ade932 100644 --- a/goal_src/jak1/engine/gfx/shadow/shadow-cpu.gc +++ b/goal_src/jak1/engine/gfx/shadow/shadow-cpu.gc @@ -393,12 +393,12 @@ ;; og:preserve-this (defun pc-shadow-execute-all () "Send PC shadow queue to the PC shadow renderer." - + ;; bail if disabled (if (not (logtest? *vu1-enable-user* (vu1-renderer-mask shadow))) (return #f) ) - + ;; TODO: plus1 here? (dotimes (run-idx (-> *pc-shadow-queue* cur-run)) (when (nonzero? (-> *pc-shadow-queue* run run-idx first)) diff --git a/goal_src/jak2/engine/draw/drawable.gc b/goal_src/jak2/engine/draw/drawable.gc index 535514c25e..bad9fa22e8 100644 --- a/goal_src/jak2/engine/draw/drawable.gc +++ b/goal_src/jak2/engine/draw/drawable.gc @@ -1449,7 +1449,7 @@ ) ) ) - + ;; og:preserve-this (let ((v1-0 *pc-shadow-globals*)) (dotimes (a0-0 2) @@ -1465,7 +1465,7 @@ ) ) ) - + (none) ) diff --git a/goal_src/jak2/engine/gfx/foreground/foreground.gc b/goal_src/jak2/engine/gfx/foreground/foreground.gc index cfe8df49cc..28872599bb 100644 --- a/goal_src/jak2/engine/gfx/foreground/foreground.gc +++ b/goal_src/jak2/engine/gfx/foreground/foreground.gc @@ -570,7 +570,7 @@ "Add shadows for this draw-control to the *pc-shadow-queue* to be drawn in pc-shadow-execute-all. This places a pc-shadow-request in the DMA buffer and adds it to the linked list of requests for the currently selected run in *pc-shadow-queue*" - + (when (-> dc shadow-ctrl) ;; update the "center" position of the shadow control, I guess to let some other thing look at it? (let ((center-pos (-> dc skeleton bones (-> dc shadow-joint-index) position)) @@ -586,7 +586,7 @@ (settings (if (-> dc shadow-ctrl) (-> dc shadow-ctrl settings) *default-shadow-settings*)) (flags (-> settings flags)) ) - + ;; if fade is enabled, and we're all the way faded out, disable draw (when (not (logtest? flags (shadow-flags disable-fade))) (let ((dist (-> (scratchpad-object foreground-work) distance w))) @@ -598,16 +598,16 @@ ) ) ) - + ;; if disabled, early return (if (logtest? flags (shadow-flags disable-draw)) (return dma-ptr) ) - - + + ;; settings (mem-copy! (the pointer (-> pse settings)) (the pointer settings) (size-of shadow-settings)) - + ;; update the "center" position. (let ((center-pos (-> dc skeleton bones (-> dc shadow-joint-index) position))) (set! (-> pse settings center x) (-> center-pos x)) @@ -621,22 +621,22 @@ (set! (-> pse num-joints) (-> sgeo num-joints)) ;; TODO: this is probably the wrong color!!! (vector-copy! (-> pse color) (-> *time-of-day-context* current-shadow-color)) - + ;; set up linked list. (let* ((run (-> *pc-shadow-globals* bucket (-> settings shadow-type))) (next (-> run next)) ) ;; if we're the first in the list, store in the run - (when (zero? (-> run first)) + (when (zero? (-> run first)) (set! (-> run first) (the pointer pse))) - + ;; patch next pointer of previous (if (nonzero? next) (set! (-> (the (pointer structure) next) 0) pse)) - + ;; remember where to patch for the next one (set! (-> run next) (&-> pse next)) - + ;; clear our next pointer in case we're last (set! (-> pse next) (the pc-shadow-request 0)) @@ -649,7 +649,7 @@ (set! (-> pse dma-next vif0) (new 'static 'vif-tag)) (set! (-> pse dma-next vif1) (new 'static 'vif-tag)) ) - + dma-ptr ) ) diff --git a/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc b/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc index d225726a73..1043355e73 100644 --- a/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc +++ b/goal_src/jak2/engine/gfx/foreground/shadow-cpu.gc @@ -644,19 +644,19 @@ ;; og:preserve-this (defun pc-shadow-execute-all () "Send PC shadow queue to the PC shadow renderer." - + ;; bail if disabled (if (not (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask shadow))) (return #f) ) - + (dotimes (i 2) (when (nonzero? (-> *pc-shadow-globals* bucket i first)) ;; patch the color of each request. (let ((iter (the pc-shadow-request (-> *pc-shadow-globals* bucket i first))) (color (new-stack-vector0)) ) - + (cond ((= i 0) (vector-float*! color (-> *time-of-day-context* current-shadow-color) 128.0) @@ -669,16 +669,16 @@ ) ) ) - + (set! (-> color w) (the float (-> *pc-shadow-globals* bucket i shadow-color a))) - + (while (nonzero? iter) ;(vector-copy! (-> iter color) color) (set! (-> iter color quad) (-> color quad)) (set! iter (-> iter next)) ) ) - + (with-dma-buffer-add-bucket ((dma-buf (-> (current-frame) global-buf)) (if (zero? i) (bucket-id shadow) (bucket-id shadow2))) (dma-buffer-add-ref-vif2 dma-buf diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index df072aa454..591ac497b7 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -1441,7 +1441,7 @@ ) ) ) - + ;; og:preserve-this (let ((v1-0 *pc-shadow-globals*)) (dotimes (a0-0 3) diff --git a/goal_src/jak3/engine/gfx/foreground/foreground.gc b/goal_src/jak3/engine/gfx/foreground/foreground.gc index f527493038..3879ffad67 100644 --- a/goal_src/jak3/engine/gfx/foreground/foreground.gc +++ b/goal_src/jak3/engine/gfx/foreground/foreground.gc @@ -833,7 +833,7 @@ "Add shadows for this draw-control to the *pc-shadow-queue* to be drawn in pc-shadow-execute-all. This places a pc-shadow-request in the DMA buffer and adds it to the linked list of requests for the currently selected run in *pc-shadow-queue*" - + (when (-> dc shadow-ctrl) ;; update the "center" position of the shadow control, I guess to let some other thing look at it? (let ((center-pos (-> dc skeleton bones (-> dc shadow-joint-index) position)) @@ -849,7 +849,7 @@ (settings (if (-> dc shadow-ctrl) (-> dc shadow-ctrl settings) *default-shadow-settings*)) (flags (-> settings flags)) ) - + ;; if fade is enabled, and we're all the way faded out, disable draw (when (not (logtest? flags (shadow-flags disable-fade))) (let ((dist (-> (scratchpad-object foreground-work) distance w))) @@ -861,16 +861,16 @@ ) ) ) - + ;; if disabled, early return (if (logtest? flags (shadow-flags disable-draw)) (return dma-ptr) ) - - + + ;; settings (mem-copy! (the pointer (-> pse settings)) (the pointer settings) (size-of shadow-settings)) - + ;; update the "center" position. (let ((center-pos (-> dc skeleton bones (-> dc shadow-joint-index) position))) (set! (-> pse settings center x) (-> center-pos x)) @@ -884,22 +884,22 @@ (set! (-> pse num-joints) (-> sgeo num-joints)) ;; TODO: this is probably the wrong color!!! (vector-copy! (-> pse color) (-> *time-of-day-context* current-shadow-color)) - + ;; set up linked list. (let* ((run (-> *pc-shadow-globals* bucket (-> settings shadow-type))) (next (-> run next)) ) ;; if we're the first in the list, store in the run - (when (zero? (-> run first)) + (when (zero? (-> run first)) (set! (-> run first) (the pointer pse))) - + ;; patch next pointer of previous (if (nonzero? next) (set! (-> (the (pointer structure) next) 0) pse)) - + ;; remember where to patch for the next one (set! (-> run next) (&-> pse next)) - + ;; clear our next pointer in case we're last (set! (-> pse next) (the pc-shadow-request 0)) @@ -912,7 +912,7 @@ (set! (-> pse dma-next vif0) (new 'static 'vif-tag)) (set! (-> pse dma-next vif1) (new 'static 'vif-tag)) ) - + dma-ptr ) ) diff --git a/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc b/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc index 64f9ed800e..9e0b0fc54b 100644 --- a/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc +++ b/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc @@ -662,19 +662,19 @@ ;; og:preserve-this (defun pc-shadow-execute-all () "Send PC shadow queue to the PC shadow renderer." - + ;; bail if disabled (if (not (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask rn32))) (return #f) ) - + (dotimes (i 3) (when (nonzero? (-> *pc-shadow-globals* bucket i first)) ;; patch the color of each request. (let ((iter (the pc-shadow-request (-> *pc-shadow-globals* bucket i first))) (color (new-stack-vector0)) ) - + (cond ((= i 0) (vector-float*! color (-> *time-of-day-context* current-shadow-color) 128.0) @@ -687,16 +687,16 @@ ) ) ) - + (set! (-> color w) (the float (-> *pc-shadow-globals* bucket i shadow-color a))) - + (while (nonzero? iter) ;(vector-copy! (-> iter color) color) (set! (-> iter color quad) (-> color quad)) (set! iter (-> iter next)) ) ) - + (with-dma-buffer-add-bucket ((dma-buf (-> (current-frame) global-buf)) (-> *pc-shadow-globals* bucket i bucket-id)) (dma-buffer-add-ref-vif2 dma-buf