From d784561d43510216186cda8e248ba948cc554606 Mon Sep 17 00:00:00 2001 From: Hat Kid <6624576+Hat-Kid@users.noreply.github.com> Date: Sat, 16 Sep 2023 13:39:51 +0200 Subject: [PATCH] gsrc: add more `og:preserve-this` comments (#2996) --- goal_src/jak1/engine/camera/cam-states.gc | 46 +++++++++---------- goal_src/jak1/engine/camera/cam-update.gc | 2 +- goal_src/jak1/engine/collide/collide-shape.gc | 4 +- goal_src/jak1/engine/collide/collide-touch.gc | 2 +- goal_src/jak1/engine/common-obs/basebutton.gc | 1 + .../engine/common-obs/collectables-part.gc | 2 +- .../jak1/engine/common-obs/collectables.gc | 10 ++-- .../engine/common-obs/process-drawable.gc | 4 +- .../engine/common-obs/process-taskable.gc | 6 +-- goal_src/jak1/engine/common-obs/rigid-body.gc | 2 +- goal_src/jak1/engine/common-obs/ropebridge.gc | 2 +- goal_src/jak1/engine/debug/anim-tester.gc | 4 +- goal_src/jak1/engine/debug/debug.gc | 1 + goal_src/jak1/engine/debug/menu.gc | 4 +- goal_src/jak1/engine/debug/part-tester.gc | 1 + goal_src/jak1/engine/dma/dma.gc | 2 +- goal_src/jak1/engine/draw/drawable.gc | 8 ++-- goal_src/jak1/engine/entity/ambient.gc | 6 +-- goal_src/jak1/engine/entity/entity-table.gc | 2 +- goal_src/jak1/engine/game/game-save.gc | 1 + goal_src/jak1/engine/game/main.gc | 7 +-- goal_src/jak1/engine/game/settings.gc | 2 +- goal_src/jak1/engine/geometry/geometry.gc | 2 +- goal_src/jak1/engine/gfx/background/wind.gc | 6 +-- goal_src/jak1/engine/gfx/font.gc | 2 +- goal_src/jak1/engine/gfx/foreground/bones.gc | 2 +- goal_src/jak1/engine/gfx/foreground/eye.gc | 2 +- goal_src/jak1/engine/gfx/math-camera.gc | 2 +- goal_src/jak1/engine/gfx/mood/mood.gc | 8 ++-- goal_src/jak1/engine/gfx/ocean/ocean.gc | 4 +- .../jak1/engine/gfx/shadow/shadow-cpu-h.gc | 1 + .../engine/gfx/sprite/sparticle/sparticle.gc | 3 +- .../jak1/engine/gfx/texture/texture-upload.gc | 2 +- goal_src/jak1/engine/level/level.gc | 2 +- goal_src/jak1/engine/level/load-boundary.gc | 2 +- goal_src/jak1/engine/nav/navigate.gc | 2 +- goal_src/jak1/engine/sound/gsound-h.gc | 2 +- goal_src/jak1/engine/target/logic-target.gc | 4 +- goal_src/jak1/engine/target/target-death.gc | 2 +- goal_src/jak1/engine/target/target.gc | 8 ++-- goal_src/jak1/engine/target/target2.gc | 4 +- goal_src/jak1/engine/ui/credits.gc | 2 +- goal_src/jak1/engine/ui/hud-classes.gc | 4 +- .../jak1/engine/ui/progress/progress-draw.gc | 4 +- goal_src/jak1/engine/ui/progress/progress.gc | 4 +- goal_src/jak1/engine/ui/text-h.gc | 1 + goal_src/jak1/engine/ui/text.gc | 4 +- goal_src/jak1/levels/beach/beach-obs.gc | 2 +- goal_src/jak1/levels/beach/mayor.gc | 2 +- goal_src/jak1/levels/beach/seagull.gc | 30 ++++++------ goal_src/jak1/levels/citadel/citadel-obs.gc | 2 +- goal_src/jak1/levels/finalboss/robotboss.gc | 2 +- goal_src/jak1/levels/maincave/baby-spider.gc | 2 +- goal_src/jak1/levels/ogre/flying-lurker.gc | 2 +- goal_src/jak1/levels/ogre/ogreboss.gc | 4 +- .../jak1/levels/racer_common/racer-part.gc | 4 +- .../levels/racer_common/target-racer-h.gc | 2 +- .../jak1/levels/rolling/rolling-robber.gc | 2 +- goal_src/jak1/levels/snow/ice-cube.gc | 2 +- .../jak1/levels/snow/snow-flutflut-obs.gc | 10 ++-- goal_src/jak1/levels/swamp/swamp-obs.gc | 4 +- goal_src/jak1/levels/swamp/swamp-rat.gc | 2 +- goal_src/jak1/levels/title/title-obs.gc | 14 +++--- .../levels/village1/sequence-a-village1.gc | 6 +-- goal_src/jak1/levels/village1/village-obs.gc | 2 +- goal_src/jak1/levels/village1/yakow.gc | 2 +- .../levels/village_common/villagep-obs.gc | 1 + goal_src/jak2/engine/ambient/ambient-h.gc | 20 ++++---- goal_src/jak2/engine/collide/collide-mesh.gc | 2 +- goal_src/jak2/engine/debug/debug.gc | 2 +- goal_src/jak2/engine/draw/drawable.gc | 3 +- goal_src/jak2/engine/game/main.gc | 2 +- goal_src/jak2/engine/game/task/game-task.gc | 18 ++++---- .../jak2/engine/game/task/task-control.gc | 2 +- .../jak2/engine/gfx/background/subdivide.gc | 8 ++-- goal_src/jak2/engine/gfx/hw/display.gc | 2 +- goal_src/jak2/engine/gfx/hw/video.gc | 2 +- goal_src/jak2/engine/gfx/math-camera.gc | 2 +- goal_src/jak2/engine/gfx/shrub/shrubbery.gc | 4 +- .../sprite/particles/sparticle-launcher.gc | 2 +- .../engine/gfx/sprite/particles/sparticle.gc | 3 +- goal_src/jak2/engine/gfx/texture/texture.gc | 2 +- goal_src/jak2/engine/level/level.gc | 9 ++-- goal_src/jak2/engine/load/loader.gc | 4 +- .../process-drawable/process-focusable.gc | 2 +- .../process-drawable/process-taskable.gc | 2 +- goal_src/jak2/engine/ui/hud.gc | 2 +- .../jak2/engine/ui/progress/progress-draw.gc | 4 +- goal_src/jak2/engine/ui/progress/progress.gc | 10 ++-- goal_src/jak2/kernel/gkernel.gc | 1 + goal_src/jak2/levels/gungame/gungame-obs.gc | 4 +- goal_src/jak2/levels/outro/outro-scenes.gc | 2 +- .../jak2/levels/stadium/skate/skatea-obs.gc | 4 +- goal_src/jak2/levels/tomb/tomb-boulder.gc | 6 +-- 94 files changed, 216 insertions(+), 203 deletions(-) diff --git a/goal_src/jak1/engine/camera/cam-states.gc b/goal_src/jak1/engine/camera/cam-states.gc index ac576fa321..703f0bbd86 100644 --- a/goal_src/jak1/engine/camera/cam-states.gc +++ b/goal_src/jak1/engine/camera/cam-states.gc @@ -410,7 +410,7 @@ ) ;; main first-person camera -;; note: modified for high fps +;; og:preserve-this modified for high fps (defstate cam-eye (camera-slave) :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) (case event-type @@ -457,7 +457,7 @@ (s5-0 (new-stack-matrix0)) ) (when *camera-read-analog* - (let ((f30-0 (analog-input-horizontal-first ;; changed for pc port + (let ((f30-0 (analog-input-horizontal-first ;; og:preserve-this changed for pc port (the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx))) (the-as float 0.0) (the-as float 48.0) @@ -465,7 +465,7 @@ (the-as float -1.0) ) ) - (f0-0 (analog-input-vertical-first ;; changed for pc port + (f0-0 (analog-input-vertical-first ;; og:preserve-this changed for pc port (the-as int (+ (-> *cpad-list* cpads 0 righty) -256 (-> *cpad-list* cpads 0 lefty))) (the-as float 0.0) (the-as float 48.0) @@ -474,24 +474,24 @@ ) ) ) - (set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; changed for high fps - (set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; changed for high fps + (set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps + (set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps ) ) (cond - ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 x)) ;; changed for high fps - (set! (-> s4-0 x) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; changed for high fps + ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 x)) ;; og:preserve-this changed for high fps + (set! (-> s4-0 x) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps ) - ((< (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps - (set! (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps + ((< (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps + (set! (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps ) ) (cond - ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 y)) ;; changed for high fps - (set! (-> s4-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; changed for high fps + ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 y)) ;; og:preserve-this changed for high fps + (set! (-> s4-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps ) - ((< (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps - (set! (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps + ((< (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps + (set! (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps ) ) (cond @@ -627,7 +627,7 @@ 0.0 (when *camera-read-analog* (let ((f1-0 - (analog-input-horizontal-first ;; changed for pc port + (analog-input-horizontal-first ;; og:preserve-this changed for pc port (the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx))) (the-as float 0.0) (the-as float 48.0) @@ -636,15 +636,15 @@ ) ) ) - (set! (-> s5-0 y) (- (-> s5-0 y) (* (- f1-0) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))))) ;; changed for high fps + (set! (-> s5-0 y) (- (-> s5-0 y) (* (- f1-0) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))))) ;; og:preserve-this changed for high fps ) ) (cond - ((< (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)) (-> s5-0 y)) ;; changed for high fps - (set! (-> s5-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))) ;; changed for high fps + ((< (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)) (-> s5-0 y)) ;; og:preserve-this changed for high fps + (set! (-> s5-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))) ;; og:preserve-this changed for high fps ) - ((< (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; changed for high fps - (set! (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; changed for high fps + ((< (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps + (set! (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps ) ) (set! (-> s3-0 x) (sin (the-as float 37319.11))) @@ -914,7 +914,7 @@ (s3-0 (new 'stack-no-clear 'matrix)) ) (when *camera-read-analog* - (let ((f24-0 (analog-input-horizontal-third ;; changed for pc port + (let ((f24-0 (analog-input-horizontal-third ;; og:preserve-this changed for pc port (the-as int (-> *cpad-list* cpads 0 rightx)) (the-as float 128.0) (the-as float 32.0) @@ -922,7 +922,7 @@ (* 8192.0 (-> *display* seconds-per-frame)) ) ) - (f1-2 (analog-input-vertical-third ;; changed for pc port + (f1-2 (analog-input-vertical-third ;; og:preserve-this changed for pc port (the-as int (-> *cpad-list* cpads 0 righty)) (the-as float 128.0) (the-as float 32.0) @@ -3100,7 +3100,7 @@ (when (not (paused?)) (when *camera-read-analog* (let ((f0-0 - (analog-input-vertical-third ;; changed for pc port + (analog-input-vertical-third ;; og:preserve-this changed for pc port (the-as int (-> *cpad-list* cpads 0 righty)) (the-as float 128.0) (the-as float 32.0) @@ -3129,7 +3129,7 @@ (lerp (-> *CAM_STICK-bank* min-z) (-> *CAM_STICK-bank* max-z) (-> self view-off-param)) ) (when *camera-read-analog* - (let ((f0-16 (analog-input-horizontal-third ;; changed for pc port + (let ((f0-16 (analog-input-horizontal-third ;; og:preserve-this changed for pc port (the-as int (-> *cpad-list* cpads 0 rightx)) (the-as float 128.0) (the-as float 32.0) diff --git a/goal_src/jak1/engine/camera/cam-update.gc b/goal_src/jak1/engine/camera/cam-update.gc index 4e1e00d0ec..9c638ab95d 100644 --- a/goal_src/jak1/engine/camera/cam-update.gc +++ b/goal_src/jak1/engine/camera/cam-update.gc @@ -276,7 +276,7 @@ arg0 ) -;; PAL patch here (moved from cam-debug) +;; og:preserve-this PAL patch here (moved from cam-debug) (defun external-cam-reset! () (vector-reset! (-> *math-camera* trans)) (matrix-identity! (-> *math-camera* inv-camera-rot)) diff --git a/goal_src/jak1/engine/collide/collide-shape.gc b/goal_src/jak1/engine/collide/collide-shape.gc index a8f721dd75..709abd3769 100644 --- a/goal_src/jak1/engine/collide/collide-shape.gc +++ b/goal_src/jak1/engine/collide/collide-shape.gc @@ -1719,7 +1719,7 @@ ;; only draw collide cache, if we're the target (when (and *display-collide-cache* (= (-> obj process type) target)) (debug-draw *collide-cache*) - ;; NOTE: added + ;; og:preserve-this added (add-debug-box #t (bucket-id debug) (-> s5-0 min) (-> s5-0 max) (new 'static 'rgba :a #x80 :b #x70 :g #x70)) ) ) @@ -1736,7 +1736,7 @@ ;; bounding box of shape ;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; NOTE: these functions don't obey calling conventions, so they are modified for the PC port. +;; og:preserve-this these functions don't obey calling conventions, so they are modified for the PC port. (deftype pc-bounding-box-work (structure) ((reg-vf29 vector :inline) (reg-vf30 vector :inline) diff --git a/goal_src/jak1/engine/collide/collide-touch.gc b/goal_src/jak1/engine/collide/collide-touch.gc index a9748a7ddc..2193faf1bb 100644 --- a/goal_src/jak1/engine/collide/collide-touch.gc +++ b/goal_src/jak1/engine/collide/collide-touch.gc @@ -428,7 +428,7 @@ "Send all events for touching shapes. Note that the order of event sending is basically random. (this could explain lava walks's unreliable behavior)" - + ;; og:preserve-this ;; PC port note : there is a fatal bug here where the processes are NOT SAFE to use without a handle. ;; this can lead to crashes if for example target hits 2 things at once, and one of those things kills the other. ;; e.g.: target hits eco1 and eco2. eco1 gets processed first and kills eco2 as a result. eco2 is now dead, but diff --git a/goal_src/jak1/engine/common-obs/basebutton.gc b/goal_src/jak1/engine/common-obs/basebutton.gc index eaf0963ec5..98228aecf9 100644 --- a/goal_src/jak1/engine/common-obs/basebutton.gc +++ b/goal_src/jak1/engine/common-obs/basebutton.gc @@ -493,6 +493,7 @@ (set! (-> s4-0 param 2) (the-as uint (target-pos 0))) (send-event-function *target* s4-0) ) + ;; og:preserve-this ;; NOTE : added case for "training" here. in the original game, the training level does NOT come ;; with its own code for warp gates and buttons, and uses the villagep-obs imported from village1 ;; instead. opengoal loads files different enough that warp from training to anywhere except village1 diff --git a/goal_src/jak1/engine/common-obs/collectables-part.gc b/goal_src/jak1/engine/common-obs/collectables-part.gc index 0061730740..adb3708878 100644 --- a/goal_src/jak1/engine/common-obs/collectables-part.gc +++ b/goal_src/jak1/engine/common-obs/collectables-part.gc @@ -2053,7 +2053,7 @@ ) ) -;; customized +;; og:preserve-this customized (defpart 238 :init-specs ((:texture (new 'static 'texture-id :index #x2c :page #x2)) (:num 1.0) diff --git a/goal_src/jak1/engine/common-obs/collectables.gc b/goal_src/jak1/engine/common-obs/collectables.gc index c2a4592cae..154b68f0a2 100644 --- a/goal_src/jak1/engine/common-obs/collectables.gc +++ b/goal_src/jak1/engine/common-obs/collectables.gc @@ -129,7 +129,7 @@ (defmethod initialize eco-collectable ((obj eco-collectable)) - (stack-size-set! (-> obj main-thread) 192) ;; hack increased from 128 + (stack-size-set! (-> obj main-thread) 192) ;; og:preserve-this hack increased from 128 (logior! (-> obj mask) (process-mask actor-pause)) (set! (-> obj actor-pause) #t) (set! (-> obj notify-parent) #f) @@ -1036,7 +1036,7 @@ (defmethod initialize eco-pill ((obj eco-pill)) (set! *eco-pill-count* (+ *eco-pill-count* 1)) - (stack-size-set! (-> obj main-thread) 192) ;; hack increased from 192 + (stack-size-set! (-> obj main-thread) 192) ;; og:preserve-this hack increased from 192 (logior! (-> obj mask) (process-mask actor-pause)) (set! (-> obj actor-pause) #t) (set! (-> obj notify-parent) #f) @@ -1133,7 +1133,7 @@ ) ) (ja-post) - ;; added! particle + ;; og:preserve-this added particle! (with-pc (if (-> *pc-settings* money-starburst?) (spawn (-> self part) (-> self root-override root-prim world-sphere)))) @@ -1171,7 +1171,7 @@ ) ) (transform-post) - ;; added! particle + ;; og:preserve-this added particle! (with-pc (if (-> *pc-settings* money-starburst?) (spawn (-> self part) (-> self root-override root-prim world-sphere)))) @@ -1234,7 +1234,7 @@ ) (set-vector! (-> obj draw color-mult) 0.8 0.8 0.8 1.0) (set-vector! (-> obj draw color-emissive) 0.2 0.2 0.2 1.0) - ;; added! money starburst + ;; og:preserve-this added money starburst (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 64) obj)) obj ) diff --git a/goal_src/jak1/engine/common-obs/process-drawable.gc b/goal_src/jak1/engine/common-obs/process-drawable.gc index a88cf557e8..6885866e16 100644 --- a/goal_src/jak1/engine/common-obs/process-drawable.gc +++ b/goal_src/jak1/engine/common-obs/process-drawable.gc @@ -52,7 +52,7 @@ (.lvf vf2 (&-> (-> arg1 bone) transform vector 3 quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) - ;; ADDED + ;; og:preserve-this ADDED ;; there's a bug in swamp-blimp where they vector<-cspace! ;; on some default-initialized-to-zero bones ;; we have to return 0s for this to avoid NaNs getting everywhere. @@ -1007,7 +1007,7 @@ ) ) ) - ;; NOTE : added matrix-engine check for PC port + ;; og:preserve-this added matrix-engine check for PC port (if (< (-> *matrix-engine* length) MATRIX_ENGINE_AMOUNT) (let ((v1-24 *matrix-engine*)) (set! (-> v1-24 (-> v1-24 length)) (process->handle self)) diff --git a/goal_src/jak1/engine/common-obs/process-taskable.gc b/goal_src/jak1/engine/common-obs/process-taskable.gc index b4e9d37036..841d1ddf7c 100644 --- a/goal_src/jak1/engine/common-obs/process-taskable.gc +++ b/goal_src/jak1/engine/common-obs/process-taskable.gc @@ -75,7 +75,7 @@ (print-game-text (-> obj message) a1-2 #f 128 22) ) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (cond ((-> obj only-allow-cancel) (when (-> obj no-msg) @@ -161,7 +161,7 @@ ) (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) (cond - ;; s5-1 can be nan on the first frame after something spawns + ;; og:preserve-this s5-1 can be nan on the first frame after something spawns ((less-than-hack (vector-length s5-1) 102400.0) (when (not (-> obj have-flava)) (set! (-> obj have-flava) #t) @@ -432,7 +432,7 @@ (if (-> self blend-on-exit) (set! (-> self blend-on-exit) arg0) ) - ;; allow cutscene skipping on pc port + ;; og:preserve-this allow cutscene skipping on pc port ;; save a sort of timestamp just so we know if it took at least 1 frame (#when PC_PORT (define *play-anim-time* (current-time))) diff --git a/goal_src/jak1/engine/common-obs/rigid-body.gc b/goal_src/jak1/engine/common-obs/rigid-body.gc index 439a642d4d..176a211baa 100644 --- a/goal_src/jak1/engine/common-obs/rigid-body.gc +++ b/goal_src/jak1/engine/common-obs/rigid-body.gc @@ -451,7 +451,7 @@ (+! (-> obj sim-time-remaining) (* 0.0033333334 (the float (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))) ) - (let ((f30-0 (* DISPLAY_FPS_RATIO 0.016666668)) ;; changed for high fps + (let ((f30-0 (* DISPLAY_FPS_RATIO 0.016666668)) ;; og:preserve-this changed for high fps (f28-0 (* 0.0033333334 (the float (logand #xffffff (-> *display* base-frame-counter))))) ) (while (>= (-> obj sim-time-remaining) (* 0.5 f30-0)) diff --git a/goal_src/jak1/engine/common-obs/ropebridge.gc b/goal_src/jak1/engine/common-obs/ropebridge.gc index 8d33f5ca1a..e5bba1e707 100644 --- a/goal_src/jak1/engine/common-obs/ropebridge.gc +++ b/goal_src/jak1/engine/common-obs/ropebridge.gc @@ -606,7 +606,7 @@ ;; original ;; (do-integration self) - ;; modified to try to fix crazy bridges + ;; og:preserve-this modified to try to fix crazy bridges ;; instead of doing one big step when lagging, do multiple small steps. ;; temporarily change time ratio to 1.0 (like we are 60 fps) (let ((old-time-ratio (the int (-> *display* time-ratio)))) diff --git a/goal_src/jak1/engine/debug/anim-tester.gc b/goal_src/jak1/engine/debug/anim-tester.gc index 82e089bd37..2d3a086746 100644 --- a/goal_src/jak1/engine/debug/anim-tester.gc +++ b/goal_src/jak1/engine/debug/anim-tester.gc @@ -742,7 +742,7 @@ ) (else (let ((v1-1 (the-as anim-test-obj (glst-find-node-by-name (-> self obj-list) (-> self current-obj))))) - ;; NOTE : added this if, sometimes the value is -1 which just crashes the game after here. nice work! + ;; og:preserve-this added this if, sometimes the value is -1 which just crashes the game after here. nice work! (if (< (-> self list-con current-index) 0) (set! (-> self list-con current-index) 0)) @@ -2462,7 +2462,7 @@ (format (clear *temp-string*) "data/~s.obinf" (-> arg0 privname)) (gp-0 s4-0 s3-0 s2-0 *temp-string*) ) - ;; hack + ;; og:preserve-this hack (let ((gp-2 (new 'stack 'file-stream (string-format "data/~s.obinf" (-> arg0 privname)) 'write))) (format gp-2 "major-version 0~%") (format gp-2 "minor-version 0~%") diff --git a/goal_src/jak1/engine/debug/debug.gc b/goal_src/jak1/engine/debug/debug.gc index 1ddafaad5d..2c04a8fec3 100644 --- a/goal_src/jak1/engine/debug/debug.gc +++ b/goal_src/jak1/engine/debug/debug.gc @@ -856,6 +856,7 @@ (defun-debug debug-pad-display ((arg0 cpad-info)) (let ((gp-0 + ;; og:preserve-this (new 'static 'inline-array vector 32 ;; was originally 8, which is too small and would cause memory corruption (new 'static 'vector) (new 'static 'vector) diff --git a/goal_src/jak1/engine/debug/menu.gc b/goal_src/jak1/engine/debug/menu.gc index 9acf4938fa..425d6eb194 100644 --- a/goal_src/jak1/engine/debug/menu.gc +++ b/goal_src/jak1/engine/debug/menu.gc @@ -937,7 +937,7 @@ ) (with-dma-buffer-add-bucket ((s0-0 (-> (current-frame) debug-buf)) (bucket-id debug-no-zbuf)) - ;; PC PORT : fixed for widescreen + ;; og:preserve-this fixed for widescreen (draw-sprite2d-xy s0-0 (correct-x-int x-pos) y-pos (correct-x-int (-> menu pix-width)) (-> menu pix-height) (static-rgba #x00 #x00 #x00 #x40)) ) @@ -966,7 +966,7 @@ ) ;; actually draw the item. - ;; PC PORT note : do not render if text is out of bounds... + ;; og:preserve-this do not render if text is out of bounds... (when (and (< -20 s2-1) (> 256 s2-1)) (debug-menu-item-render (the-as debug-menu-item s0-1) (+ s3-1 12) s2-1 submenus (= s0-1 selected)) ) diff --git a/goal_src/jak1/engine/debug/part-tester.gc b/goal_src/jak1/engine/debug/part-tester.gc index 7372c56107..e8b4299ca6 100644 --- a/goal_src/jak1/engine/debug/part-tester.gc +++ b/goal_src/jak1/engine/debug/part-tester.gc @@ -58,6 +58,7 @@ (the-as rgba (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)) ) + ;; og:preserve-this ;; change this line to change the particle group to test ;; notes: ;; - particles that use aux list won't work (warp parts) diff --git a/goal_src/jak1/engine/dma/dma.gc b/goal_src/jak1/engine/dma/dma.gc index 2b396da20e..f4111c8766 100644 --- a/goal_src/jak1/engine/dma/dma.gc +++ b/goal_src/jak1/engine/dma/dma.gc @@ -350,7 +350,7 @@ (#cond (PC_PORT - ;; on PC Port, just call C mem-move, it's the fastest. + ;; og:preserve-this on PC Port, just call C mem-move, it's the fastest. (__mem-move dst src size-bytes) ) (else diff --git a/goal_src/jak1/engine/draw/drawable.gc b/goal_src/jak1/engine/draw/drawable.gc index 01402fec06..96c04c62c7 100644 --- a/goal_src/jak1/engine/draw/drawable.gc +++ b/goal_src/jak1/engine/draw/drawable.gc @@ -22,7 +22,7 @@ (vf9 :class vf) ) (init-vf0-vector) - ;; NOTE: manually added + ;; og:preserve-this manually added (let ((at-0 *math-camera*)) (.lvf vf20 (&-> at-0 guard-plane 0 quad)) (.lvf vf21 (&-> at-0 guard-plane 1 quad)) @@ -708,7 +708,7 @@ ) ) ) - ;; lod hacks! + ;; og:preserve-this lod hacks! (with-pc (if (not (-> *pc-settings* ps2-lod-dist?)) (set! lod-to-use (minmax (-> *pc-settings* lod-force-actor) 0 (-> arg1 lod-set max-lod)))) @@ -759,7 +759,7 @@ (draw-bones arg1 arg3 cam-dist) ) (when (and (< lod-to-use (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-status has-joint-channels))) - ;; NOTE : added this check for PC port to prevent memory corruption + ;; og:preserve-this added this check for PC port to prevent memory corruption (if (< (-> *matrix-engine* length) MATRIX_ENGINE_AMOUNT) (let ((v1-82 *matrix-engine*)) (set! (-> v1-82 (-> v1-82 length)) (process->handle sv-16)) @@ -1605,7 +1605,7 @@ ;; wait for rendering to finish. (sync-path 0 0) ;; remember when. - ;; NOTE : setting this to 0 to get rid of lag compensation in PC port, since it's not helpful + ;; og:preserve-this setting this to 0 to get rid of lag compensation in PC port, since it's not helpful (set! (-> disp frames (-> disp on-screen) frame run-time) (#if PC_PORT 0 (the-as int (timer-count (the-as timer-bank #x10000800))))) ;; now, do a vsync. If we finished rendering in time, this will just wait until the next. diff --git a/goal_src/jak1/engine/entity/ambient.gc b/goal_src/jak1/engine/entity/ambient.gc index bcf05f04d7..06b2bb6345 100644 --- a/goal_src/jak1/engine/entity/ambient.gc +++ b/goal_src/jak1/engine/entity/ambient.gc @@ -514,7 +514,7 @@ (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) (add-setting! 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) - ;; PAL patch here + ;; og:preserve-this PAL patch here (let ((s5-1 -1) (s3-1 (-> *display* base-frame-counter)) (s4-4 (-> *display* base-frame-counter)) @@ -600,7 +600,7 @@ (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (let ((gp-1 -1) (s4-4 (-> *display* base-frame-counter)) (s5-4 (-> *display* base-frame-counter)) @@ -982,7 +982,7 @@ (when (nonzero? (-> gp-0 ambient-data user-float 1)) (let ((f0-0 (res-lump-float gp-0 'priority :default 10.0))) (when (>= f0-0 (-> *setting-control* default sound-flava-priority)) - ;; TODO this following form has been manually modified to work + ;; og:preserve-this TODO this following form has been manually modified to work (set! (-> *setting-control* default sound-flava) (the-as uint (-> gp-0 ambient-data user-int32 1))) (set! (-> *setting-control* default sound-flava-priority) f0-0) ) diff --git a/goal_src/jak1/engine/entity/entity-table.gc b/goal_src/jak1/engine/entity/entity-table.gc index 9bd5a0a6e3..5c20df498e 100644 --- a/goal_src/jak1/engine/entity/entity-table.gc +++ b/goal_src/jak1/engine/entity/entity-table.gc @@ -140,7 +140,7 @@ :package "game" :art-group '() :pool '*16k-dead-pool* - :heap-size #xc00 ;; CHANGED from 2k!! + :heap-size #xc00 ;; og:preserve-this CHANGED from 2k!! ) (new 'static 'entity-info :ptype (type-ref water-vol :method-count 30) diff --git a/goal_src/jak1/engine/game/game-save.gc b/goal_src/jak1/engine/game/game-save.gc index f5bfaa0213..9aff4d75ed 100644 --- a/goal_src/jak1/engine/game/game-save.gc +++ b/goal_src/jak1/engine/game/game-save.gc @@ -1561,6 +1561,7 @@ ) (let ((gp-0 (the-as object loading-level))) (set! loading-level (-> self buffer)) + ;; og:preserve-this ;; pc port note : the original game used 64K here's which is slightly too small for the save file. ;; the buffer being used here is one of the spool buffers which are much larger ;; this means that the original game only cleared the first 64K of that buffer when allocating diff --git a/goal_src/jak1/engine/game/main.gc b/goal_src/jak1/engine/game/main.gc index 9ba802bd59..b29737814a 100644 --- a/goal_src/jak1/engine/game/main.gc +++ b/goal_src/jak1/engine/game/main.gc @@ -104,7 +104,7 @@ (defun set-master-mode ((new-mode symbol)) "Update pause masks for the given mode, and set *master-mode*" - ;; PAL patch here + ;; og:preserve-this PAL patch here (let ((gp-0 *master-mode*)) (set! *master-mode* new-mode) (if *debug-segment* @@ -202,7 +202,7 @@ (else (cond ;; debug mode pause allowed with select or R2. - ;; pc port note : allow select outside debug mode + ;; og:preserve-this allow select outside debug mode ((or (cpad-hold? 0 select) (and *debug-segment* (cpad-hold? 0 r2))) ;; pushing select or R2, and debug. allow pause. @@ -298,7 +298,7 @@ 'game ) ;; pause -> game - ;; pc port note : changed to allow select pause in retail + ;; og:preserve-this changed to allow select pause in retail ((cpad-hold? 0 start select) 'game ) @@ -846,6 +846,7 @@ (with-profiler "mc-run" (mc-run) ) + ;; og:preserve-this ;; PC port note : this function checks to see if the memory card has been removed or swapped ;; and disabled auto-save if it has. the pc port can only disable auto-save manually through the menu option. ;; the port doesn't use memory cards so those checks will never pass. diff --git a/goal_src/jak1/engine/game/settings.gc b/goal_src/jak1/engine/game/settings.gc index 751c00d5d1..9b1725e953 100644 --- a/goal_src/jak1/engine/game/settings.gc +++ b/goal_src/jak1/engine/game/settings.gc @@ -306,7 +306,7 @@ ) ;; send language change to the IOP. (when (!= (-> gp-0 language) (-> s5-1 language)) - ;; NOTE : pc port added this + ;; og:preserve-this pc port added this (#when PC_PORT (cond ((not *jak1-full-game*) diff --git a/goal_src/jak1/engine/geometry/geometry.gc b/goal_src/jak1/engine/geometry/geometry.gc index 70325702c9..ed89f62e3b 100644 --- a/goal_src/jak1/engine/geometry/geometry.gc +++ b/goal_src/jak1/engine/geometry/geometry.gc @@ -739,7 +739,7 @@ (.add.z.vf vf11 vf11 vf11 :mask #b10) (.add.z.vf vf12 vf12 vf12 :mask #b10) (.add.z.vf vf13 vf13 vf13 :mask #b10) - ;; note: these types were changed to uint to make this copy 64 bits. + ;; og:preserve-this these types were changed to uint to make this copy 64 bits. (.mov v1-0 vf11) (.mov a1-1 vf12) (.mov a0-1 vf13) diff --git a/goal_src/jak1/engine/gfx/background/wind.gc b/goal_src/jak1/engine/gfx/background/wind.gc index bf9be4d966..9e0884023f 100644 --- a/goal_src/jak1/engine/gfx/background/wind.gc +++ b/goal_src/jak1/engine/gfx/background/wind.gc @@ -20,11 +20,11 @@ (set! (-> arg0 wind-normal z) (sin f30-1)) ) (set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1)) - (let* ((s4-0 (logand (the int (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) 63)) ;; changed for high fps + (let* ((s4-0 (logand (the int (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) 63)) ;; og:preserve-this changed for high fps (f0-4 (rand-vu-float-range 0.0 100.0)) - (v1-5 (/ (* (-> *display* time-adjust-ratio) (-> arg0 wind-time)) (the-as uint 120))) ;; changed for high fps + (v1-5 (/ (* (-> *display* time-adjust-ratio) (-> arg0 wind-time)) (the-as uint 120))) ;; og:preserve-this changed for high fps (f1-6 (* 0.008333334 - (the float (mod (the uint (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) (the-as uint 120))) ;; changed for high fps + (the float (mod (the uint (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) (the-as uint 120))) ;; og:preserve-this changed for high fps ) ) (f2-4 (* 0.0625 diff --git a/goal_src/jak1/engine/gfx/font.gc b/goal_src/jak1/engine/gfx/font.gc index f4055d4385..7b0654f932 100644 --- a/goal_src/jak1/engine/gfx/font.gc +++ b/goal_src/jak1/engine/gfx/font.gc @@ -671,7 +671,7 @@ (.lvf vf26 (&-> v1-0 hvdf-off quad)) (.lvf vf27 (&-> v1-0 hvdf-off quad)) ) - ;; PC port modification: adjust shadow x to account for widescreen + ;; og:preserve-this PC port modification: adjust shadow x to account for widescreen (let ((shadow-x 2.) (shadow-y 1.) (correction (-> *video-parms* relative-x-scale)) diff --git a/goal_src/jak1/engine/gfx/foreground/bones.gc b/goal_src/jak1/engine/gfx/foreground/bones.gc index 39d9e9d056..8fac0ff0e1 100644 --- a/goal_src/jak1/engine/gfx/foreground/bones.gc +++ b/goal_src/jak1/engine/gfx/foreground/bones.gc @@ -240,7 +240,7 @@ (defun bones-reset-sqwc () ;; transfer 1, skip 1 - ;; note: not sure what uses this mode?? + ;; og:preserve-this not sure what uses this mode?? (#unless PC_PORT (set! (-> (the-as dma-bank-control #x1000e000) sqwc) (new 'static 'dma-sqwc :sqwc #x1 :tqwc #x1)) ) diff --git a/goal_src/jak1/engine/gfx/foreground/eye.gc b/goal_src/jak1/engine/gfx/foreground/eye.gc index 9430f6148e..45d0b42485 100644 --- a/goal_src/jak1/engine/gfx/foreground/eye.gc +++ b/goal_src/jak1/engine/gfx/foreground/eye.gc @@ -833,7 +833,7 @@ (when (not (paused?)) (cond ((and (>= (-> s5-3 left lid) 0.0) (>= (-> s5-3 right lid) 0.0)) - (set! (-> s5-3 random-time) (the int (* (/ 1.0 (-> *display* time-adjust-ratio)) ;; changed for high fps + (set! (-> s5-3 random-time) (the int (* (/ 1.0 (-> *display* time-adjust-ratio)) ;; og:preserve-this changed for high fps (the-as uint 60)))) (set! (-> s5-3 blink) 0.0) ) diff --git a/goal_src/jak1/engine/gfx/math-camera.gc b/goal_src/jak1/engine/gfx/math-camera.gc index 385c9cc559..54e03458a8 100644 --- a/goal_src/jak1/engine/gfx/math-camera.gc +++ b/goal_src/jak1/engine/gfx/math-camera.gc @@ -225,7 +225,7 @@ (set! (-> math-cam guard z) 1.0) (set! (-> math-cam guard w) 1.0) (set! (-> math-cam isometric vector 3 z) (- 16777215.0 hvdf-z)) - ;; PC HACK! + ;; og:preserve-this PC HACK! ;; for whatever reason, the font renderer ends up computing a depth #x1000000 instead of ;; #xffffffff, which overflows the 24-bit z buffer. ;; cheating this by 1 bit seems to fix it. diff --git a/goal_src/jak1/engine/gfx/mood/mood.gc b/goal_src/jak1/engine/gfx/mood/mood.gc index d731f991f8..f4f89a943f 100644 --- a/goal_src/jak1/engine/gfx/mood/mood.gc +++ b/goal_src/jak1/engine/gfx/mood/mood.gc @@ -54,7 +54,7 @@ (t3-0 uint128) (t3-1 uint128) ) - ;; pc mood debug + ;; og:preserve-this pc mood debug (with-pc (case *mood-override-debug* (('copy #t) @@ -2691,9 +2691,9 @@ (let* ((f2-5 (* 0.000012207031 (+ -409600.0 f0-41))) (f30-2 (- 1.0 (fmax 0.0 (fmin 1.0 f2-5)))) (f28-4 (+ 0.5 - (* 0.125 (cos (the float (* 4000 (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))))) ;; changed for high fps - (* 0.125 (cos (the float (shl (the int (* (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))) 11)))) ;; changed for high fps - (* 0.25 (cos (the float (* 1500 (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))))) ;; changed for high fps + (* 0.125 (cos (the float (* 4000 (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))))) ;; og:preserve-this changed for high fps + (* 0.125 (cos (the float (shl (the int (* (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))) 11)))) ;; og:preserve-this changed for high fps + (* 0.25 (cos (the float (* 1500 (/ (-> *display* time-factor) 5) (-> *display* integral-frame-counter))))) ;; og:preserve-this changed for high fps ) ) (s3-1 (new 'stack-no-clear 'vector)) diff --git a/goal_src/jak1/engine/gfx/ocean/ocean.gc b/goal_src/jak1/engine/gfx/ocean/ocean.gc index c4d21ded5a..ea4a537d12 100644 --- a/goal_src/jak1/engine/gfx/ocean/ocean.gc +++ b/goal_src/jak1/engine/gfx/ocean/ocean.gc @@ -601,7 +601,7 @@ ) ) -;; PC Port hack +;; og:preserve-this PC Port hack (define *ocean-generate-verts-vector* (new 'global 'vector)) (set-vector! *ocean-generate-verts-vector* @@ -616,7 +616,7 @@ (set! *ocean-verts* (the-as (inline-array vector) #f)) (let ((gp-0 (-> *display* frames (-> *display* on-screen) frame global-buf))) (set! *ocean-heights* (the-as ocean-wave-info (-> gp-0 base))) - (ocean-interp-wave *ocean-heights* (the uint (* (/ (-> *display* time-factor) 5.0) (-> *display* integral-frame-counter)))) ;; changed for high fps + (ocean-interp-wave *ocean-heights* (the uint (* (/ (-> *display* time-factor) 5.0) (-> *display* integral-frame-counter)))) ;; og:preserve-this changed for high fps (&+! (-> gp-0 base) 4096) (set! *ocean-verts* (the-as (inline-array vector) (-> gp-0 base))) (ocean-generate-verts *ocean-verts* *ocean-heights*) diff --git a/goal_src/jak1/engine/gfx/shadow/shadow-cpu-h.gc b/goal_src/jak1/engine/gfx/shadow/shadow-cpu-h.gc index 66c3879376..0a3ae21269 100644 --- a/goal_src/jak1/engine/gfx/shadow/shadow-cpu-h.gc +++ b/goal_src/jak1/engine/gfx/shadow/shadow-cpu-h.gc @@ -167,6 +167,7 @@ :flag-assert #x900000002 ) +;; og:preserve-this ;; BUG: ;; the shadow-edge type is multiply defined. ;; it seems like the first definition is not used. diff --git a/goal_src/jak1/engine/gfx/sprite/sparticle/sparticle.gc b/goal_src/jak1/engine/gfx/sprite/sparticle/sparticle.gc index eb70cf3127..1e9ed80834 100644 --- a/goal_src/jak1/engine/gfx/sprite/sparticle/sparticle.gc +++ b/goal_src/jak1/engine/gfx/sprite/sparticle/sparticle.gc @@ -205,6 +205,7 @@ (defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state)) "alloc a particle" + ;; og:preserve-this ;; pc port note : this function originally attempted to find a free sparticle by picking a "random" ;; (actually incremental) starting block and going from there. we disable that completely for pc ;; because it is actually detrimental since we may alloc sparticles spread over way too many blocks @@ -650,7 +651,7 @@ ) ;; process the particles - ;; pc port note : made this not run when paused, since aux sprites wont get added. + ;; og:preserve-this made this not run when paused, since aux sprites wont get added. (unless (paused?) (clear-sprite-aux-list)) (sp-process-particle-system *sp-particle-system-2d* 0 *sprite-array-2d*) diff --git a/goal_src/jak1/engine/gfx/texture/texture-upload.gc b/goal_src/jak1/engine/gfx/texture/texture-upload.gc index 2a2efb37ed..56c1941a1a 100644 --- a/goal_src/jak1/engine/gfx/texture/texture-upload.gc +++ b/goal_src/jak1/engine/gfx/texture/texture-upload.gc @@ -8,7 +8,7 @@ ;; This will happen part way through the list of tpages ;; we already got the font texture, so set that up. -;; NOTE: I added this check so you can load the engine without the font texture. +;; og:preserve-this NOTE: I added this check so you can load the engine without the font texture. (cond ((and *texture-page-dir* (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x4fe))) (setup-font-texture! *texture-pool*) diff --git a/goal_src/jak1/engine/level/level.gc b/goal_src/jak1/engine/level/level.gc index c3eb5583ca..3f8a11f179 100644 --- a/goal_src/jak1/engine/level/level.gc +++ b/goal_src/jak1/engine/level/level.gc @@ -1054,7 +1054,7 @@ (defmethod is-object-visible? level ((obj level) (arg0 int)) "Is arg0 visible? Note that this will return #f if the visibility data is not loaded." - ;; note : pc port added option to show every actor regardless + ;; og:preserve-this pc port added option to show every actor regardless (with-pc (if (not (-> *pc-settings* ps2-actor-vis?)) (return #t))) ;; check the vis bits! diff --git a/goal_src/jak1/engine/level/load-boundary.gc b/goal_src/jak1/engine/level/load-boundary.gc index 5ad6d62b5e..3ad3b6245b 100644 --- a/goal_src/jak1/engine/level/load-boundary.gc +++ b/goal_src/jak1/engine/level/load-boundary.gc @@ -2084,7 +2084,7 @@ ((= v1-4 'setting-unset) (remove-setting! (the-as symbol (command-get-param (car gp-0) #f))) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here ((= v1-4 'sfx-volume) (set-setting! 'sfx-volume (command-get-param (car gp-0) #f) (command-get-float (car (cdr gp-0)) 0.0) 0) ) diff --git a/goal_src/jak1/engine/nav/navigate.gc b/goal_src/jak1/engine/nav/navigate.gc index a070b973ac..3bafe9bd0e 100644 --- a/goal_src/jak1/engine/nav/navigate.gc +++ b/goal_src/jak1/engine/nav/navigate.gc @@ -5,7 +5,7 @@ ;; name in dgo: navigate ;; dgos: GAME, ENGINE -;; note: added this to avoid a bug where enemies with NaN positions end up inside the nav mesh. +;; og:preserve-this added this to avoid a bug where enemies with NaN positions end up inside the nav mesh. ;; it's not clear yet why the enemies have NaN positions, but nothing else seems to go wrong if we ;; ignore them here. It's possible this happens as enemies are spawned/despawned by the visibility system. (defmacro is-nan? (flt) diff --git a/goal_src/jak1/engine/sound/gsound-h.gc b/goal_src/jak1/engine/sound/gsound-h.gc index e08d7fa717..12654066f6 100644 --- a/goal_src/jak1/engine/sound/gsound-h.gc +++ b/goal_src/jak1/engine/sound/gsound-h.gc @@ -419,7 +419,7 @@ :flag-assert #x900000004 ) -; added for mirror mode +;; og:preserve-this added for mirror mode (deftype sound-rpc-set-mirror-mode (sound-rpc-cmd) ((mirror sound-mirror-mode))) diff --git a/goal_src/jak1/engine/target/logic-target.gc b/goal_src/jak1/engine/target/logic-target.gc index b8fefd7a58..f7619f7f97 100644 --- a/goal_src/jak1/engine/target/logic-target.gc +++ b/goal_src/jak1/engine/target/logic-target.gc @@ -1133,7 +1133,7 @@ (set! (-> self control unknown-dword20) (-> *display* base-frame-counter)) ) (when (logtest? (-> self state-flags) (state-flags timed-invulnerable)) - ;; changed for high fps. This fixes the flicker speed when damaged + ;; og:preserve-this changed for high fps. This fixes the flicker speed when damaged (if (< (logand (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) 3) (/ 1.0 (-> *display* time-adjust-ratio))) (logior! (-> self draw status) (draw-status hidden)) (logclear! (-> self draw status) (draw-status hidden)) @@ -2026,7 +2026,7 @@ ) (activate-hud self) (set! (-> self fp-hud) (the-as handle #f)) - ;; PAL patch here + ;; og:preserve-this PAL patch here (set! (-> self burn-proc) (the-as handle #f)) (set! (-> self water) (new 'process 'water-control self 9 0.0 8192.0 2048.0)) (set! (-> self water flags) (water-flags wt04 wt05 wt06 wt07 wt22)) diff --git a/goal_src/jak1/engine/target/target-death.gc b/goal_src/jak1/engine/target/target-death.gc index fc314e45e4..955ffc33a3 100644 --- a/goal_src/jak1/engine/target/target-death.gc +++ b/goal_src/jak1/engine/target/target-death.gc @@ -1096,7 +1096,7 @@ (('none 'instant-death) ) (('ogreboss-super-boulder) - ;; PAL patch here + ;; og:preserve-this PAL patch here (process-spawn part-tracker :init part-tracker-init diff --git a/goal_src/jak1/engine/target/target.gc b/goal_src/jak1/engine/target/target.gc index 6c123c5f18..ae75699f83 100644 --- a/goal_src/jak1/engine/target/target.gc +++ b/goal_src/jak1/engine/target/target.gc @@ -1716,7 +1716,7 @@ ) (case arg2 (('launch) - ;; PAL patch here + ;; og:preserve-this PAL patch here (set! (-> self control unknown-soundid01) (sound-play "launch-fire")) (ja-no-eval :group! eichar-launch-jump-ja :num! (seek! (ja-aframe (the-as float 16.0) 0)) :frame-num 0.0) (until (ja-done? 0) @@ -1774,7 +1774,7 @@ (none) ) :exit target-exit - ;; PAL patch here + ;; og:preserve-this PAL patch here :trans (behavior () ((-> target-high-jump trans)) (case (-> self control unknown-int37) @@ -2721,7 +2721,7 @@ (or (= v1-6 eichar-flop-down-loop-ja) (= v1-6 eichar-moving-flop-down-ja)) ) ) - ;; changed for high fps. This fixes the invisible wall when flopping + ;; og:preserve-this changed for high fps. This fixes the invisible wall when flopping (when (and (or (< (target-move-dist (the time-frame (* (-> *display* time-adjust-ratio) (seconds 0.1)))) (* (-> *display* time-adjust-ratio) 1638.4) ) @@ -2749,7 +2749,7 @@ (lambda ((arg0 target)) (let ((f0-3 (seek (-> arg0 control root-prim local-sphere w) (the-as float 28672.0) - (* 286720.0 DISPLAY_FPS_RATIO 0.016666668) ;; changed for high fps + (* 286720.0 DISPLAY_FPS_RATIO 0.016666668) ;; og:preserve-this changed for high fps ) ) ) diff --git a/goal_src/jak1/engine/target/target2.gc b/goal_src/jak1/engine/target/target2.gc index 116acacbd8..f99e743f13 100644 --- a/goal_src/jak1/engine/target/target2.gc +++ b/goal_src/jak1/engine/target/target2.gc @@ -2621,7 +2621,7 @@ (< (- (-> (the-as target s4-0) control trans y) (-> (the-as target s4-0) control unknown-vector52 y)) arg2) ) (vector-xz-normalize! (-> (the-as target s4-0) control transv) (the-as float 0.0)) - ;; PAL patch here + ;; og:preserve-this PAL patch here (when (< (vector-vector-xz-distance (-> (the-as target s4-0) control trans) sv-40) 20480.0) (let ((v1-16 (vector-! (new-stack-vector0) (-> (the-as target s4-0) control trans) sv-40))) (set! (-> (the-as target s4-0) control trans x) (+ (-> sv-40 x) (fmax -2867.2 (fmin 2867.2 (-> v1-16 x))))) @@ -2698,7 +2698,7 @@ :exit (behavior () (target-exit) (set! (-> self cam-user-mode) 'normal) - ;; PAL patch here + ;; og:preserve-this PAL patch here (logclear! (-> self state-flags) (state-flags invulnerable grabbed)) (none) ) diff --git a/goal_src/jak1/engine/ui/credits.gc b/goal_src/jak1/engine/ui/credits.gc index 89f32cb07b..d861b3f844 100644 --- a/goal_src/jak1/engine/ui/credits.gc +++ b/goal_src/jak1/engine/ui/credits.gc @@ -111,7 +111,7 @@ (defun draw-end-credits ((arg0 int)) (local-vars (v1-13 int)) (#when PC_PORT - ;; pc port note : change text language during credits + ;; og:preserve-this change text language during credits ;; disable the automatic text loading for now (disable-level-text-file-loading) diff --git a/goal_src/jak1/engine/ui/hud-classes.gc b/goal_src/jak1/engine/ui/hud-classes.gc index 536eac408f..70acde1dff 100644 --- a/goal_src/jak1/engine/ui/hud-classes.gc +++ b/goal_src/jak1/engine/ui/hud-classes.gc @@ -297,7 +297,7 @@ (else (let ((f0-3 128.0)) ;; low health flashing - ;; modified to support high fps + ;; og:preserve-this modified to support high fps (when (and *target* (= (-> *target* fact-info-target health) 1.0)) (let* ((scaled-frame-counter (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter)))) (v1-16 (logand scaled-frame-counter 7))) @@ -1709,7 +1709,7 @@ ) ) ;; low eco flashing - ;; modified to support high fps + ;; og:preserve-this modified to support high fps (if (and (< 0.0 arg1) (and (< arg1 0.2) (zero? (logand (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 4)))) (set! arg3 (* arg3 2)) ) diff --git a/goal_src/jak1/engine/ui/progress/progress-draw.gc b/goal_src/jak1/engine/ui/progress/progress-draw.gc index e32ba196f6..b5259d0a2b 100644 --- a/goal_src/jak1/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak1/engine/ui/progress/progress-draw.gc @@ -598,7 +598,7 @@ (let ((v1-5 arg0)) (set! (-> v1-5 height) (the float 110)) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (let ((v1-6 (-> obj card-info))) (when (and (= (-> *setting-control* default language) (language-enum japanese)) v1-6 (zero? (-> v1-6 handle))) (set! (-> arg0 origin y) -15.0) @@ -855,7 +855,7 @@ (let ((v1-133 arg0)) (set! (-> v1-133 width) (the float 350)) ) - ;; pc port stuff here, added YMD + ;; og:preserve-this pc port stuff here, added YMD (case (scf-get-territory) ((GAME_TERRITORY_SCEA) (print-game-text (string-format "~X/~X/20~2X ~2X:~2X" diff --git a/goal_src/jak1/engine/ui/progress/progress.gc b/goal_src/jak1/engine/ui/progress/progress.gc index d2617946ea..953af05ef6 100644 --- a/goal_src/jak1/engine/ui/progress/progress.gc +++ b/goal_src/jak1/engine/ui/progress/progress.gc @@ -1081,7 +1081,7 @@ (sound-play "start-options") (set! (-> obj next-display-state) (progress-screen memcard-creating)) ) - ;; PAL & NTSC-J patch here + ;; og:preserve-this PAL & NTSC-J patch here ((= (-> obj display-state-stack 0) (progress-screen title)) (sound-play "cursor-options") (sound-volume-off) @@ -1182,7 +1182,7 @@ (sound-play "start-options") (set! (-> obj next-display-state) (progress-screen memcard-formatting)) ) - ;; NTSC-J patch here + ;; og:preserve-this NTSC-J patch here ((= (-> obj display-state-stack 0) (progress-screen title)) (sound-play "start-options") (sound-volume-off) diff --git a/goal_src/jak1/engine/ui/text-h.gc b/goal_src/jak1/engine/ui/text-h.gc index 178f45b05e..07ce13a90b 100644 --- a/goal_src/jak1/engine/ui/text-h.gc +++ b/goal_src/jak1/engine/ui/text-h.gc @@ -865,6 +865,7 @@ ;; will store the COMMON text when it is loaded. (define *common-text* (the-as game-text-info #f)) +;; og:preserve-this ;; NOTE - PC PORT difference ;; Partial translations are a thing that we should support. Parts of translating the game are intentionally made ;; difficult for normal translators due to not wanting to make all the strings public (or in the case of subtitles, diff --git a/goal_src/jak1/engine/ui/text.gc b/goal_src/jak1/engine/ui/text.gc index d1afe864e7..cbd1bf9859 100644 --- a/goal_src/jak1/engine/ui/text.gc +++ b/goal_src/jak1/engine/ui/text.gc @@ -158,7 +158,7 @@ (set! load-status 0) (set! heap-free (&- (-> heap top) (the-as uint (-> heap base)))) ;; english -> UK english in PAL - ;; PC port note : no longer necessary. + ;; og:preserve-this no longer necessary. (#unless PC_PORT (if (and (= (scf-get-territory) GAME_TERRITORY_SCEE) (= lang (language-enum english))) (set! lang (language-enum uk-english)) @@ -572,7 +572,7 @@ ) ) (else - ;; PAL patch here + ;; og:preserve-this PAL patch here (if (= sv-176 3) (set! sv-176 32) ) diff --git a/goal_src/jak1/levels/beach/beach-obs.gc b/goal_src/jak1/levels/beach/beach-obs.gc index 87d4164cec..9cb3b2257c 100644 --- a/goal_src/jak1/levels/beach/beach-obs.gc +++ b/goal_src/jak1/levels/beach/beach-obs.gc @@ -1143,7 +1143,7 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (loop (+! (-> self pos) (* (-> self vel) (-> *display* seconds-per-frame))) - ;; PAL patch here + ;; og:preserve-this PAL patch here (set! (-> self vel) (* (-> self vel) (- 1.0 (* 0.05 (-> *display* time-adjust-ratio))))) (move! (-> self wobbler)) (let ((a1-0 (new 'stack-no-clear 'vector))) diff --git a/goal_src/jak1/levels/beach/mayor.gc b/goal_src/jak1/levels/beach/mayor.gc index e1ba9f0e99..c0a77b5db3 100644 --- a/goal_src/jak1/levels/beach/mayor.gc +++ b/goal_src/jak1/levels/beach/mayor.gc @@ -68,7 +68,7 @@ (close-specific-task! (game-task jungle-lurkerm) (task-status need-reward-speech)) (first-any (-> arg0 tasks) #t) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (new 'static 'spool-anim :name "mayor-resolution-beams" :index 7 diff --git a/goal_src/jak1/levels/beach/seagull.gc b/goal_src/jak1/levels/beach/seagull.gc index 0cdce18155..2c3f09bcc2 100644 --- a/goal_src/jak1/levels/beach/seagull.gc +++ b/goal_src/jak1/levels/beach/seagull.gc @@ -308,7 +308,7 @@ ) (let ((f0-28 (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z))))) (set! (-> obj angletan) (/ (- (-> s5-0 y)) (sqrtf f0-28))) - (set! (-> obj target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-28 (* (-> s5-0 y) (-> s5-0 y)))))) ;; changed for high fps + (set! (-> obj target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-28 (* (-> s5-0 y) (-> s5-0 y)))))) ;; og:preserve-this changed for high fps ) ) 0 @@ -471,7 +471,7 @@ ) ) ) - (set! (-> obj root-override transv y) (* DISPLAY_FPS_RATIO f0-0)) ;; changed for high fps + (set! (-> obj root-override transv y) (* DISPLAY_FPS_RATIO f0-0)) ;; og:preserve-this changed for high fps ) 0 (none) @@ -506,8 +506,8 @@ (let ((f30-1 (* arg0 (sin (-> obj heading)))) (f0-4 (* arg0 (cos (-> obj heading)))) ) - (set! (-> obj root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> obj root-override transv x)) (* 0.2 f30-1)))) ;; changed for high fps - (set! (-> obj root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> obj root-override transv z)) (* 0.2 f0-4)))) ;; changed for high fps + (set! (-> obj root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> obj root-override transv x)) (* 0.2 f30-1)))) ;; og:preserve-this changed for high fps + (set! (-> obj root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> obj root-override transv z)) (* 0.2 f0-4)))) ;; og:preserve-this changed for high fps ) 0 (none) @@ -517,8 +517,8 @@ (let ((f30-1 (* arg0 (sin (-> obj heading)))) (f0-4 (* arg0 (cos (-> obj heading)))) ) - (set! (-> obj root-override transv x) (* DISPLAY_FPS_RATIO f30-1)) ;; changed for high fps - (set! (-> obj root-override transv z) (* DISPLAY_FPS_RATIO f0-4)) ;; changed for high fps + (set! (-> obj root-override transv x) (* DISPLAY_FPS_RATIO f30-1)) ;; og:preserve-this changed for high fps + (set! (-> obj root-override transv z) (* DISPLAY_FPS_RATIO f0-4)) ;; og:preserve-this changed for high fps ) 0 (none) @@ -591,7 +591,7 @@ ) ) ) - (set! (-> v1-13 root-override transv y) (* DISPLAY_FPS_RATIO f0-5)) ;; changed for high fps + (set! (-> v1-13 root-override transv y) (* DISPLAY_FPS_RATIO f0-5)) ;; og:preserve-this changed for high fps ) 0 (let* ((gp-1 self) @@ -599,8 +599,8 @@ (f30-2 (* f28-0 (sin (-> gp-1 heading)))) (f0-10 (* f28-0 (cos (-> gp-1 heading)))) ) - (set! (-> gp-1 root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-2)))) ;; changed for high fps - (set! (-> gp-1 root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-10)))) ;; changed for high fps + (set! (-> gp-1 root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-2)))) ;; og:preserve-this changed for high fps + (set! (-> gp-1 root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-10)))) ;; og:preserve-this changed for high fps ) 0 ) @@ -720,7 +720,7 @@ ) (let ((f0-33 (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))) (set! (-> s5-0 angletan) (/ (- (-> s4-0 y)) (sqrtf f0-33))) - (set! (-> s5-0 target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-33 (* (-> s4-0 y) (-> s4-0 y)))))) ;; changed for high fps + (set! (-> s5-0 target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-33 (* (-> s4-0 y) (-> s4-0 y)))))) ;; og:preserve-this changed for high fps ) ) 0 @@ -743,7 +743,7 @@ ) ) ) - (set! (-> v1-44 root-override transv y) (* DISPLAY_FPS_RATIO f0-38)) ;; changed for high fps + (set! (-> v1-44 root-override transv y) (* DISPLAY_FPS_RATIO f0-38)) ;; og:preserve-this changed for high fps ) 0 ) @@ -764,7 +764,7 @@ ) ) ) - (set! (-> v1-48 root-override transv y) (* DISPLAY_FPS_RATIO f0-39)) ;; changed for high fps + (set! (-> v1-48 root-override transv y) (* DISPLAY_FPS_RATIO f0-39)) ;; og:preserve-this changed for high fps ) 0 ) @@ -912,7 +912,7 @@ ) (let ((f0-33 (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z))))) (set! (-> gp-0 angletan) (/ (- (-> s5-0 y)) (sqrtf f0-33))) - (set! (-> gp-0 target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-33 (* (-> s5-0 y) (-> s5-0 y)))))) ;; changed for high fps + (set! (-> gp-0 target-dist) (* DISPLAY_FPS_RATIO (sqrtf (+ f0-33 (* (-> s5-0 y) (-> s5-0 y)))))) ;; og:preserve-this changed for high fps ) ) 0 @@ -925,8 +925,8 @@ (f30-0 (* f28-0 (sin (-> gp-1 heading)))) (f0-41 (* f28-0 (cos (-> gp-1 heading)))) ) - (set! (-> gp-1 root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-0)))) ;; changed for high fps - (set! (-> gp-1 root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-41)))) ;; changed for high fps + (set! (-> gp-1 root-override transv x) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-0)))) ;; og:preserve-this changed for high fps + (set! (-> gp-1 root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-41)))) ;; og:preserve-this changed for high fps ) 0 (seagull-method-27 self) diff --git a/goal_src/jak1/levels/citadel/citadel-obs.gc b/goal_src/jak1/levels/citadel/citadel-obs.gc index bc774af418..71bee347f0 100644 --- a/goal_src/jak1/levels/citadel/citadel-obs.gc +++ b/goal_src/jak1/levels/citadel/citadel-obs.gc @@ -1309,7 +1309,7 @@ :to *entity-pool* ) (sound-play "sagecage-open") - ;; NTSC-J patch here + ;; og:preserve-this NTSC-J patch here ; (if (name= (-> self name) "citb-generator-1") ; (set-continue! *game-info* "citadel-elevator") ; ) diff --git a/goal_src/jak1/levels/finalboss/robotboss.gc b/goal_src/jak1/levels/finalboss/robotboss.gc index 64a134475d..454c5a29a2 100644 --- a/goal_src/jak1/levels/finalboss/robotboss.gc +++ b/goal_src/jak1/levels/finalboss/robotboss.gc @@ -212,7 +212,7 @@ ) ) ) - (when (and arg0 *debug-segment* (cpad-pressed? 0 l3)) ;; NOTE : changed from (cpad-pressed? 1 x) + (when (and arg0 *debug-segment* (cpad-pressed? 0 l3)) ;; og:preserve-this changed from (cpad-pressed? 1 x) (cpad-clear! 0 l3) (go arg0) ) diff --git a/goal_src/jak1/levels/maincave/baby-spider.gc b/goal_src/jak1/levels/maincave/baby-spider.gc index 269e1f66b9..399397c9f3 100644 --- a/goal_src/jak1/levels/maincave/baby-spider.gc +++ b/goal_src/jak1/levels/maincave/baby-spider.gc @@ -265,7 +265,7 @@ baby-spider-default-event-handler ) (defmethod nav-enemy-method-52 baby-spider ((obj baby-spider) (arg0 vector)) - (+! (-> obj wiggle-angle) (* DISPLAY_FPS_RATIO (-> obj delta-wiggle-angle))) ;; changed for high fps + (+! (-> obj wiggle-angle) (* DISPLAY_FPS_RATIO (-> obj delta-wiggle-angle))) ;; og:preserve-this changed for high fps (if (< 65536.0 (-> obj wiggle-angle)) (+! (-> obj wiggle-angle) -65536.0) ) diff --git a/goal_src/jak1/levels/ogre/flying-lurker.gc b/goal_src/jak1/levels/ogre/flying-lurker.gc index 63e9dbcd04..33ddae960e 100644 --- a/goal_src/jak1/levels/ogre/flying-lurker.gc +++ b/goal_src/jak1/levels/ogre/flying-lurker.gc @@ -489,7 +489,7 @@ (set! (-> self speed) (+ (* (+ 0.5 f0-12) (- arg2 arg3)) arg3)) ) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (let ((f0-16 65536.0)) (if (and (< 0.6332 (-> self curve-position)) (< (-> self curve-position) 0.6928)) (set! f0-16 40960.0) diff --git a/goal_src/jak1/levels/ogre/ogreboss.gc b/goal_src/jak1/levels/ogre/ogreboss.gc index 400278acb4..b2bcc32a34 100644 --- a/goal_src/jak1/levels/ogre/ogreboss.gc +++ b/goal_src/jak1/levels/ogre/ogreboss.gc @@ -470,7 +470,7 @@ (defbehavior ogreboss-super-boulder-event-handler ogreboss-super-boulder ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 - ;; PAL patch here + ;; og:preserve-this PAL patch here (('touch 'attack) (when (and *target* ((method-of-type touching-shapes-entry prims-touching?) (the-as touching-shapes-entry (-> arg3 param 0)) @@ -812,7 +812,7 @@ (set! (-> self root-override quat vec quad) (-> self parent-override 0 root quat vec quad)) (vector-identity! (-> self root-override scale)) (initialize-skeleton self *ogreboss-super-boulder-sg* '()) - ;; PAL patch here + ;; og:preserve-this PAL patch here (logclear! (-> self mask) (process-mask actor-pause enemy)) (set! (-> self lava) (entity-actor-lookup (-> self entity) 'water-actor 0)) (logior! (-> self skel effect flags) 1) diff --git a/goal_src/jak1/levels/racer_common/racer-part.gc b/goal_src/jak1/levels/racer_common/racer-part.gc index 0dd68d1899..87d50a5490 100644 --- a/goal_src/jak1/levels/racer_common/racer-part.gc +++ b/goal_src/jak1/levels/racer_common/racer-part.gc @@ -122,7 +122,7 @@ (let ((f0-1 (/ (-> *target* racer heat) (-> *RACER-bank* heat-max)))) (set! (-> arg2 vector 1 z) (* 182.04445 (+ -45.0 (* 215.0 f0-1)))) (cond - ((and (< 0.8 f0-1) (not (logtest? (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 8))) ;; changed for high fps + ((and (< 0.8 f0-1) (not (logtest? (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 8))) ;; og:preserve-this changed for high fps (set! (-> arg2 vector 2 x) 128.0) (set! (-> arg2 vector 2 y) 0.0) (set! (-> arg2 vector 2 z) 0.0) @@ -149,7 +149,7 @@ (set! (-> arg0 vector 2 y) (- 128.0 (* 640.0 (+ -0.6 arg1)))) (set! (-> arg0 vector 2 z) 0.0) ) - ((not (logtest? (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 8)) ;; changed for high fps + ((not (logtest? (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 8)) ;; og:preserve-this changed for high fps (set! (-> arg0 vector 2 x) 128.0) (set! (-> arg0 vector 2 y) 0.0) (set! (-> arg0 vector 2 z) 0.0) diff --git a/goal_src/jak1/levels/racer_common/target-racer-h.gc b/goal_src/jak1/levels/racer_common/target-racer-h.gc index 4f3fe489b3..69628cfb1f 100644 --- a/goal_src/jak1/levels/racer_common/target-racer-h.gc +++ b/goal_src/jak1/levels/racer_common/target-racer-h.gc @@ -160,7 +160,7 @@ ) ) -;; PAL patch here +;; og:preserve-this PAL patch here (defskelgroup *balloon-sg* balloon balloon-lod0-jg balloon-idle-ja ((balloon-lod0-mg (meters 20)) (balloon-lod1-mg (meters 999999))) :bounds (static-spherem 0 0.3 0 6.3) diff --git a/goal_src/jak1/levels/rolling/rolling-robber.gc b/goal_src/jak1/levels/rolling/rolling-robber.gc index 5121e3380d..536c9014b3 100644 --- a/goal_src/jak1/levels/rolling/rolling-robber.gc +++ b/goal_src/jak1/levels/rolling/rolling-robber.gc @@ -24,7 +24,7 @@ (set! (-> *camera-other-root* quad) (-> *math-camera* trans quad)) (set! (-> self state-time) (-> *display* base-frame-counter)) (loop - (*! arg2 (- 1.0 (* 0.05 (-> *display* time-adjust-ratio)))) ;; changed for high fps + (*! arg2 (- 1.0 (* 0.05 (-> *display* time-adjust-ratio)))) ;; og:preserve-this changed for high fps (when (and (< (fabs arg2) 13.653334) (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1.5))) (if *target* (process-release? *target*) diff --git a/goal_src/jak1/levels/snow/ice-cube.gc b/goal_src/jak1/levels/snow/ice-cube.gc index 3642b80e4f..a3d660caa2 100644 --- a/goal_src/jak1/levels/snow/ice-cube.gc +++ b/goal_src/jak1/levels/snow/ice-cube.gc @@ -435,7 +435,7 @@ (= (-> arg0 type) target) ) (set-collide-offense (-> self collide-info) 2 (collide-offense no-offense)) - ;; NOTE fixed decompiler bug + ;; og:preserve-this fixed decompiler bug (logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)) ) ) diff --git a/goal_src/jak1/levels/snow/snow-flutflut-obs.gc b/goal_src/jak1/levels/snow/snow-flutflut-obs.gc index a5740cfa8b..e2a0744c8c 100644 --- a/goal_src/jak1/levels/snow/snow-flutflut-obs.gc +++ b/goal_src/jak1/levels/snow/snow-flutflut-obs.gc @@ -271,7 +271,7 @@ :enter (behavior () (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self wiggled?) #f) - ;; PAL patch here + ;; og:preserve-this PAL patch here (set! (-> self trying-for-fuel-cell?) (not (task-complete? *game-info* (game-task snow-ball)))) (sleep (-> self ticker) (-> self timeout)) (when (-> self prev-button) @@ -297,7 +297,7 @@ (set! (-> self trying-for-fuel-cell?) #f) (go snow-button-deactivate) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (when (reached-delay? (-> self ticker) (-> self delay-til-wiggle)) (when (not (-> self wiggled?)) (set! (-> self wiggled?) #t) @@ -410,7 +410,7 @@ (set! (-> obj prev-button) (entity-actor-lookup arg0 'alt-actor 0)) (set! (-> obj prev-button) #f) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (set! (-> obj trying-for-fuel-cell?) (not (task-complete? *game-info* (game-task snow-ball)))) (ja-channel-set! 1) (let ((s5-1 (-> obj skel root-channel 0))) @@ -823,7 +823,7 @@ (baseplat-method-22 self) (go elevator-idle-at-fort) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (seek! (-> self path-pos) 1.0 (* 0.16 (-> *display* seconds-per-frame))) (eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) (plat-trans) @@ -881,7 +881,7 @@ (baseplat-method-22 self) (go elevator-idle-at-cave) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (seek! (-> self path-pos) 0.0 (* 0.16 (-> *display* seconds-per-frame))) (eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) (plat-trans) diff --git a/goal_src/jak1/levels/swamp/swamp-obs.gc b/goal_src/jak1/levels/swamp/swamp-obs.gc index 012d4321d1..8fe9a4b585 100644 --- a/goal_src/jak1/levels/swamp/swamp-obs.gc +++ b/goal_src/jak1/levels/swamp/swamp-obs.gc @@ -426,7 +426,7 @@ :trans (the-as (function none :behavior balance-plat) rider-trans) :code (behavior () (loop - ;; NOTE: modified for high fps + ;; og:preserve-this modified for high fps (let ((f30-0 (* -0.025 (+ (-> self y-offset) (-> self y-travel)))) (f28-0 (* -0.025 (- (-> self y-offset) (-> self y-travel)))) ) @@ -476,7 +476,7 @@ ) (defmethod init-from-entity! balance-plat ((obj balance-plat) (arg0 entity-actor)) - ;; PAL patch here. usually-hit-by-player -> hit-by-others + ;; og:preserve-this PAL patch here. usually-hit-by-player -> hit-by-others (logior! (-> obj mask) (process-mask platform)) (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/goal_src/jak1/levels/swamp/swamp-rat.gc b/goal_src/jak1/levels/swamp/swamp-rat.gc index dea419e042..86c34ff3d7 100644 --- a/goal_src/jak1/levels/swamp/swamp-rat.gc +++ b/goal_src/jak1/levels/swamp/swamp-rat.gc @@ -172,7 +172,7 @@ swamp-rat-default-event-handler ) (defbehavior swamp-rat-update-wiggle-target swamp-rat ((arg0 vector)) - (+! (-> self wiggle-angle) (* DISPLAY_FPS_RATIO (-> self delta-wiggle-angle))) ;; changed for high fps + (+! (-> self wiggle-angle) (* DISPLAY_FPS_RATIO (-> self delta-wiggle-angle))) ;; og:preserve-this changed for high fps (if (< 65536.0 (-> self wiggle-angle)) (+! (-> self wiggle-angle) -65536.0) ) diff --git a/goal_src/jak1/levels/title/title-obs.gc b/goal_src/jak1/levels/title/title-obs.gc index 8f06ba6853..931439edbc 100644 --- a/goal_src/jak1/levels/title/title-obs.gc +++ b/goal_src/jak1/levels/title/title-obs.gc @@ -297,7 +297,7 @@ (send-event (ppointer->process (-> self parent)) 'wait) (send-event self 'update) (ja-channel-set! 1) - ;; PAL patch here + ;; og:preserve-this PAL patch here (ja-no-eval :group! (-> self draw art-group data 6) :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (logior! (-> self skel status) (janim-status spool)) @@ -399,7 +399,7 @@ ) (set! *spawn-actors* #f) (ja-channel-set! 1) - ;; PAL patch here + ;; og:preserve-this PAL patch here (ja-no-eval :group! (-> self draw art-group data 8) :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (logior! (-> self skel status) (janim-status spool)) @@ -698,7 +698,7 @@ :trans (behavior () (hide-hud-quick) (spool-push *art-control* "ndi-intro" 0 self -1.0) - ;; PAL patch here + ;; og:preserve-this PAL patch here (if *sound-player-enable* (sound-group-pause (sound-group music)) ) @@ -706,7 +706,7 @@ ) :code (behavior () (let ((gp-0 (the-as handle #f))) - ;; PAL patch here + ;; og:preserve-this PAL patch here (cond ((and (= (scf-get-territory) GAME_TERRITORY_SCEI) *first-boot*) (set! *first-boot* #f) @@ -846,7 +846,7 @@ (remove-setting! 'ambient-volume) (remove-setting! 'sfx-volume) (remove-setting! 'music-volume) - ;; PAL patch here (code removal) + ;; og:preserve-this PAL patch here (code removal) (sound-group-continue (sound-group music)) (when *time-of-day-proc* (set! (-> *time-of-day-proc* 0 time-ratio) 18000.0) @@ -859,7 +859,7 @@ (set! (-> *time-of-day-proc* 0 time-ratio) 300.0) (set! *time-of-day-fast* #f) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (remove-setting! 'allow-pause) (remove-setting! 'allow-progress) ((-> target-title exit)) @@ -867,7 +867,7 @@ ) :trans (behavior () (hide-hud-quick) - ;; PAL patch here + ;; og:preserve-this PAL patch here (when (cpad-pressed? 0 start) (set-setting! 'allow-progress #t 0.0 0) (apply-settings *setting-control*) diff --git a/goal_src/jak1/levels/village1/sequence-a-village1.gc b/goal_src/jak1/levels/village1/sequence-a-village1.gc index 927bbdea6d..8093b18066 100644 --- a/goal_src/jak1/levels/village1/sequence-a-village1.gc +++ b/goal_src/jak1/levels/village1/sequence-a-village1.gc @@ -74,7 +74,7 @@ ) ) -;; PAL patch here +;; og:preserve-this PAL patch here (defpartgroup group-sequenceAV-2d-intro-mist :id 688 :flags (screen-space) @@ -221,7 +221,7 @@ (send-event (handle->process (-> obj boat)) 'anim-mode 'clone-anim) (send-event (handle->process (-> obj boat)) 'origin-joint-index 3) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (the-as basic (new 'static 'spool-anim :name "sage-intro-sequence-a" :index 17 @@ -276,7 +276,7 @@ ) ) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (('pause) (let ((v0-2 (the-as object (logior (-> self mask) (process-mask pause))))) (set! (-> self mask) (the-as process-mask v0-2)) diff --git a/goal_src/jak1/levels/village1/village-obs.gc b/goal_src/jak1/levels/village1/village-obs.gc index c7c2051eb3..28a40a350a 100644 --- a/goal_src/jak1/levels/village1/village-obs.gc +++ b/goal_src/jak1/levels/village1/village-obs.gc @@ -499,7 +499,7 @@ (none) ) -;; PAL patch here +;; og:preserve-this PAL patch here (deftype evilplant (process-drawable) () :heap-base #x40 diff --git a/goal_src/jak1/levels/village1/yakow.gc b/goal_src/jak1/levels/village1/yakow.gc index f15f01485e..e389d47f1c 100644 --- a/goal_src/jak1/levels/village1/yakow.gc +++ b/goal_src/jak1/levels/village1/yakow.gc @@ -200,7 +200,7 @@ yakow-default-event-handler (if gp-0 (yakow-cam) ) - ;; PAL patch here + ;; og:preserve-this PAL patch here (process-spawn-function process (lambda :behavior process diff --git a/goal_src/jak1/levels/village_common/villagep-obs.gc b/goal_src/jak1/levels/village_common/villagep-obs.gc index 2eeff87abc..fff63dc973 100644 --- a/goal_src/jak1/levels/village_common/villagep-obs.gc +++ b/goal_src/jak1/levels/village_common/villagep-obs.gc @@ -621,6 +621,7 @@ ) ) ) + ;; og:preserve-this ;; note: they appear to be calling this on the wrong object. ;; this doesn't actually cause any problems but corrupts the type of `float` in the symbol ;; table because they they write to some field of arg0, which is actually #t and not a diff --git a/goal_src/jak2/engine/ambient/ambient-h.gc b/goal_src/jak2/engine/ambient/ambient-h.gc index 8c8c4c73cf..724ee9b891 100644 --- a/goal_src/jak2/engine/ambient/ambient-h.gc +++ b/goal_src/jak2/engine/ambient/ambient-h.gc @@ -1681,7 +1681,7 @@ :flags #xa :speech #xbc :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "ds163" @@ -2513,7 +2513,7 @@ :flags #xa :speech #x14c :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb03int" @@ -2537,7 +2537,7 @@ :flags #xa :speech #x14f :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb05int" @@ -2561,7 +2561,7 @@ :flags #xa :speech #x152 :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb07int" @@ -2585,7 +2585,7 @@ :flags #xa :speech #x155 :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb08int" @@ -2609,7 +2609,7 @@ :flags #xa :speech #x158 :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb10int" @@ -2657,7 +2657,7 @@ :flags #xa :speech #x15e :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb20int" @@ -2681,7 +2681,7 @@ :flags #xa :speech #x161 :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "bb21fail" @@ -2801,7 +2801,7 @@ :flags #xa :speech #x170 :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "cityv153" @@ -3512,7 +3512,7 @@ :flags #xa :speech #x1cd :neg #x1 - :on-close #f ;; '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere + :on-close #f ;; og:preserve-this '(birth-pickup #f skill FACT_SUPER_SKILL_INC flags (suck-in)) ;; patched elsewhere ) (new 'static 'talker-speech-class :name "krew004" diff --git a/goal_src/jak2/engine/collide/collide-mesh.gc b/goal_src/jak2/engine/collide/collide-mesh.gc index e7733066b4..cd43e68d9e 100644 --- a/goal_src/jak2/engine/collide/collide-mesh.gc +++ b/goal_src/jak2/engine/collide/collide-mesh.gc @@ -144,7 +144,7 @@ Another limitation is that triangles don't have per-tri pat info. (a1-7 pat-surface) (a2-1 uint128) (a2-2 uint128) - (a2-4 int) ;; changed + (a2-4 int) ;; og:preserve-this changed (a2-5 float) (a2-7 float) (f0-0 float) diff --git a/goal_src/jak2/engine/debug/debug.gc b/goal_src/jak2/engine/debug/debug.gc index de63cced97..ea89872183 100644 --- a/goal_src/jak2/engine/debug/debug.gc +++ b/goal_src/jak2/engine/debug/debug.gc @@ -37,7 +37,7 @@ Most functions take a boolean as their first argument. If the boolean is set to (init-vf0-vector) (.lvf vf5 (&-> in quad)) - ;; PC patch: get regis from init-for-transform. + ;; og:preserve-this PC patch: get regis from init-for-transform. (.lvf vf1 (&-> *transform-regs* vf1)) (.lvf vf2 (&-> *transform-regs* vf2)) (.lvf vf3 (&-> *transform-regs* vf3)) diff --git a/goal_src/jak2/engine/draw/drawable.gc b/goal_src/jak2/engine/draw/drawable.gc index 5f99f5064c..5f82a71081 100644 --- a/goal_src/jak2/engine/draw/drawable.gc +++ b/goal_src/jak2/engine/draw/drawable.gc @@ -1868,6 +1868,7 @@ (last-dog (fmax 1.0 (fmin 4.0 (-> *display* dog-ratio)))) ) ;; store the amount of ticks that the frame took. + ;; og:preserve-this ;; PC PORT NOTE : the originaly game reads this field in places to check if frames are taking too long and avoid doing potentially laggy things. ;; those numbers are hardcoded for 60fps, they would be a pain to adjust, and the effects in the pc port are negligible. ;; so, we just pretend frames rendered in planck time. @@ -1982,7 +1983,7 @@ ) |# - ;; PC port added: just skip this for now. + ;; og:preserve-this added: just skip this for now. (set! frame-time-ratio (pc-maybe-vsync)) (if (< frame-time-ratio 0.0) diff --git a/goal_src/jak2/engine/game/main.gc b/goal_src/jak2/engine/game/main.gc index 088615aa5d..7b2a203071 100644 --- a/goal_src/jak2/engine/game/main.gc +++ b/goal_src/jak2/engine/game/main.gc @@ -784,7 +784,7 @@ ) (let ((s2-2 (the int (-> *font-context* origin y)))) (cond - ;; pc port note : the console is drawn over the letterbox so this is pointless and has been disabled + ;; og:preserve-this the console is drawn over the letterbox so this is pointless and has been disabled ((#if PC_PORT #f (or (movie?) (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)))) (+! s2-2 56) ) diff --git a/goal_src/jak2/engine/game/task/game-task.gc b/goal_src/jak2/engine/game/task/game-task.gc index 00248eacfa..ac049685bd 100644 --- a/goal_src/jak2/engine/game/task/game-task.gc +++ b/goal_src/jak2/engine/game/task/game-task.gc @@ -9920,7 +9920,7 @@ :event-hook #f :final-node (game-task-node city-burning-bush-ring-1-resolution) :index 1 - :on-complete '(begin (talker-spawn "bb01win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb01win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) @@ -10290,7 +10290,7 @@ :event-hook #f :final-node (game-task-node city-burning-bush-collection-1-resolution) :index 1 - :on-complete '(begin (talker-spawn "bb19win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb19win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) @@ -10366,7 +10366,7 @@ :fail-hook #f :event-hook #f :final-node (game-task-node city-burning-bush-racepoint-1-resolution) - :on-complete '(begin (talker-spawn "bb14win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb14win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '() @@ -10440,7 +10440,7 @@ :event-hook #f :final-node (game-task-node city-burning-bush-ring-2-resolution) :index 2 - :on-complete '(begin (talker-spawn "bb02win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb02win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) @@ -10667,7 +10667,7 @@ :fail-hook #f :event-hook #f :final-node (game-task-node city-burning-bush-shuttle-1-resolution) - :on-complete '(begin (talker-spawn "bb07win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb07win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lshuttle display)) @@ -10962,7 +10962,7 @@ :fail-hook #f :event-hook #f :final-node (game-task-node city-burning-bush-collection-2-resolution) - :on-complete '(begin (talker-spawn "bb20win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb20win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) @@ -11183,7 +11183,7 @@ :fail-hook #f :event-hook #f :final-node (game-task-node city-burning-bush-ring-3-resolution) - :on-complete '(begin (talker-spawn "bb03win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb03win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) @@ -11329,7 +11329,7 @@ :fail-hook #f :event-hook #f :final-node (game-task-node city-burning-bush-bombbot-1-resolution) - :on-complete '(begin (talker-spawn "bb05win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "bb05win") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbombbot display)) @@ -11625,7 +11625,7 @@ :event-hook #f :final-node (game-task-node city-burning-bush-collection-3-resolution) :index 2 - :on-complete '(begin (talker-spawn "cityv154") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; patched + :on-complete '(begin (talker-spawn "cityv154") (apply ,(lambda () (send-event *target* 'get-pickup (pickup-type skill) (-> *FACT-bank* super-skill-inc))))) ;; og:preserve-this patched :on-fail #f ) :borrow '((ctywide 0 lbbush display)) diff --git a/goal_src/jak2/engine/game/task/task-control.gc b/goal_src/jak2/engine/game/task/task-control.gc index fb8f684a24..2c4f57ab14 100644 --- a/goal_src/jak2/engine/game/task/task-control.gc +++ b/goal_src/jak2/engine/game/task/task-control.gc @@ -2194,7 +2194,7 @@ #f (none) ) - ;; PC port note : added this so we can see it during the code-hook + ;; og:preserve-this added this so we can see it during the code-hook :post (behavior () (if *debug-segment* (format *stdcon* "task-manager: alive in code task ~A~%" (game-task->string (-> self node-info task))) diff --git a/goal_src/jak2/engine/gfx/background/subdivide.gc b/goal_src/jak2/engine/gfx/background/subdivide.gc index d0c3f371a8..1a42012fc6 100644 --- a/goal_src/jak2/engine/gfx/background/subdivide.gc +++ b/goal_src/jak2/engine/gfx/background/subdivide.gc @@ -290,7 +290,7 @@ (+! (-> v1-31 0 count) 1) (b! (zero? a0-76) cfg-28 :delay (nop!)) (.mtc0 Perf r0) - (set! *pc-perf-stat-counter* (get-cpu-clock)) ;; patched + (set! *pc-perf-stat-counter* (get-cpu-clock)) ;; og:preserve-this patched (.sync.l) (.sync.p) ;(.mtpc pcr0 r0) @@ -307,7 +307,7 @@ (none) ) -;; this part is patched +;; og:preserve-this this part is patched (if (not *debug-segment*) (set! start-perf-stat-collection (lambda () @@ -329,11 +329,11 @@ (.sync.p) ;(.mfpc a0-1 pcr0) ;(+! (-> v1-1 0 accum0) a0-1) - (+! (-> v1-1 0 accum0) (- (get-cpu-clock) *pc-perf-stat-counter*)) ;; patched + (+! (-> v1-1 0 accum0) (- (get-cpu-clock) *pc-perf-stat-counter*)) ;; og:preserve-this patched ;(.mfpc a0-3 pcr1) ;(+! (-> v1-1 0 accum1) a0-3) - (set! (-> v1-1 0 accum1) 0) ;; ;; patched + (set! (-> v1-1 0 accum1) 0) ;; og:preserve-this patched ) (label cfg-2) 0 diff --git a/goal_src/jak2/engine/gfx/hw/display.gc b/goal_src/jak2/engine/gfx/hw/display.gc index c2db344666..810a08110b 100644 --- a/goal_src/jak2/engine/gfx/hw/display.gc +++ b/goal_src/jak2/engine/gfx/hw/display.gc @@ -34,7 +34,7 @@ (('pal) (set! (-> obj time-factor) 6.0) ) - ;; pc port note: added custom video mode for high fps + ;; og:preserve-this added custom video mode for high fps (('custom) (set! (-> obj time-factor) (/ 300.0 (-> *pc-settings* target-fps))) ) diff --git a/goal_src/jak2/engine/gfx/hw/video.gc b/goal_src/jak2/engine/gfx/hw/video.gc index 72adec2261..7239ac9736 100644 --- a/goal_src/jak2/engine/gfx/hw/video.gc +++ b/goal_src/jak2/engine/gfx/hw/video.gc @@ -33,7 +33,7 @@ Will also set a bunch of common settings related to profiling and the camera to (set! *video-mode* 1) (sound-set-fps 50) ) - ;; pc port note: added custom case + ;; og:preserve-this added custom case (('custom) (sound-set-fps (-> *pc-settings* target-fps)) ) diff --git a/goal_src/jak2/engine/gfx/math-camera.gc b/goal_src/jak2/engine/gfx/math-camera.gc index bafc7f4573..7b6b81f0d7 100644 --- a/goal_src/jak2/engine/gfx/math-camera.gc +++ b/goal_src/jak2/engine/gfx/math-camera.gc @@ -216,7 +216,7 @@ renderers that want a single matrix. (set! (-> arg0 guard z) 1.0) (set! (-> arg0 guard w) 1.0) (set! (-> arg0 isometric trans z) (- 16777215.0 f22-0)) - ;; PC HACK! + ;; og:preserve-this PC HACK! ;; for whatever reason, the font render ends up computing a depth #x1000000 instead of ;; #xffffffff, which overflows the 24-bit z buffer. ;; cheating this by 1 bit seems to fix it. diff --git a/goal_src/jak2/engine/gfx/shrub/shrubbery.gc b/goal_src/jak2/engine/gfx/shrub/shrubbery.gc index 582cb3f15e..b59a354218 100644 --- a/goal_src/jak2/engine/gfx/shrub/shrubbery.gc +++ b/goal_src/jak2/engine/gfx/shrub/shrubbery.gc @@ -460,7 +460,7 @@ (when (nonzero? (-> tree length)) (let ((dma-start (-> *display* frames (-> *display* on-screen) global-buf base))) - ;; remove PS2 drawing + ;; og:preserve-this remove PS2 drawing #| (reset! (-> *perf-stats* data (perf-stat-bucket inst-shrub))) (draw-inline-array-instance-shrub @@ -476,7 +476,7 @@ (read! (-> *perf-stats* data (perf-stat-bucket proto-shrub))) |# - ;; PC port drawing for shrubs + ;; og:preserve-this PC port drawing for shrubs (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask shrubbery)) (let* ((shrub-dma-buff (-> *display* frames (-> *display* on-screen) global-buf)) (dma-start (-> shrub-dma-buff base))) diff --git a/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc b/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc index a1d13f77b0..e3238a891f 100644 --- a/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc +++ b/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc @@ -931,7 +931,7 @@ (#if (not PC_PORT) (sphere-in-view-frustum? (the-as sphere s5-1)) (if (-> *pc-settings* ps2-parts?) - ;; pc port : launchers have larger bsphere if you have ps2 parts off + ;; og:preserve-this launchers have larger bsphere if you have ps2 parts off (sphere-in-view-frustum? (the-as sphere s5-1)) (sphere-in-view-frustum? (the-as sphere (begin (*! (-> s5-1 w) 4.0) s5-1))) ) diff --git a/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc b/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc index e2c7691da5..088dc50dc7 100644 --- a/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc +++ b/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc @@ -180,6 +180,7 @@ ) (defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state)) + ;; og:preserve-this ;; pc port note : this function originally attempted to find a free sparticle by picking a "random" ;; (actually incremental) starting block and going from there. we disable that completely for pc ;; because it is actually detrimental since we may alloc sparticles spread over way too many blocks @@ -690,7 +691,7 @@ (.mfc0 v1-53 Count) (- v1-53 gp-0) (when *display-sprite-info* - ;; pc port note : this is unnecessary + ;; og:preserve-this this is unnecessary ;; (if (movie?) ;; (format *stdcon* "~%~%~%") ;; ) diff --git a/goal_src/jak2/engine/gfx/texture/texture.gc b/goal_src/jak2/engine/gfx/texture/texture.gc index 332597b947..a705d63777 100644 --- a/goal_src/jak2/engine/gfx/texture/texture.gc +++ b/goal_src/jak2/engine/gfx/texture/texture.gc @@ -2181,7 +2181,7 @@ additionally, some texture pages have a chunk system that allows more specific c (set! (-> obj segment 1 dest) (-> obj segment 0 size)) (set! (-> obj segment 2 dest) (+ (-> obj segment 0 size) (-> obj segment 1 size))) - ;; PC port: added texture remap + ;; og:preserve-this added texture remap (dotimes (texture-idx (-> obj length)) (let ((tex (-> obj data texture-idx))) (when (and tex (nonzero? tex)) diff --git a/goal_src/jak2/engine/level/level.gc b/goal_src/jak2/engine/level/level.gc index 9f2be79872..f103ac2786 100644 --- a/goal_src/jak2/engine/level/level.gc +++ b/goal_src/jak2/engine/level/level.gc @@ -942,7 +942,7 @@ into 7 sections, which might explain the weird sizes in the center. (set! (-> v1-44 base) (&+ (-> *level* heap base) (* DEBUG_LEVEL_PAGE_SIZE offset-in-level-heap))) (set! (-> v1-44 current) (-> v1-44 base)) ;(set! (-> v1-44 top-base) (&+ (-> v1-44 base) (+ heap-size (/ heap-size 2)))) - ;; pc port note : modified the math here so we can just use a float to change the size + ;; og:preserve-this modified the math here so we can just use a float to change the size (set! (-> v1-44 top-base) (&+ (-> v1-44 base) (* DEBUG_LEVEL_PAGE_SIZE (/ heap-size LEVEL_PAGE_SIZE)))) (set! (-> v1-44 top) (-> v1-44 top-base)) ) @@ -1689,7 +1689,7 @@ into 7 sections, which might explain the weird sizes in the center. (while a1-23 (+! a0-60 1) (+! v1-103 (-> a1-23 psize)) - ;; PC port note : added this call to kill entities using level types that are being unloaded because of bad entity placement + ;; og:preserve-this added this call to kill entities using level types that are being unloaded because of bad entity placement (kill-by-type a1-23 *active-pool*) (set! (-> a1-23 symbol value) (the-as object 0)) (set! a1-23 (the-as type (-> a1-23 method-table 8))) @@ -2427,6 +2427,7 @@ into 7 sections, which might explain the weird sizes in the center. ) ) + ;; og:preserve-this ;; did we find one to unload? ;; PC NOTE : added an extra check for DGO time and name. If you start a load and discard it on the next frame, ;; you may attempt to start a new load right away before the ISO thread can properly stop the previous load @@ -2950,14 +2951,14 @@ into 7 sections, which might explain the weird sizes in the center. ) ) ) - ;; pc port note : this was hardcoded to the top of EE memory (#x2000000) + ;; og:preserve-this this was hardcoded to the top of EE memory (#x2000000) (let ((v1-186 (&- (-> global top-base) (-> global current)))) (if (and (not *debug-segment*) (< v1-186 (* 64 1024))) (format *stdcon* "~3Lglobal heap fatally low at ~DK free~%~0L" (/ v1-186 (* 1024 1024))) ) ) - ;; pc port added + ;; og:preserve-this added (let ((lev-names (new 'stack-no-clear 'array 'string LEVEL_MAX))) (dotimes (i LEVEL_MAX) (cond diff --git a/goal_src/jak2/engine/load/loader.gc b/goal_src/jak2/engine/load/loader.gc index 2fbd82428d..e4f833699d 100644 --- a/goal_src/jak2/engine/load/loader.gc +++ b/goal_src/jak2/engine/load/loader.gc @@ -1572,7 +1572,7 @@ ) (else (set! (-> s1-0 action) sv-16) - ;; pc port note : fixed naughty dog bug here. was 'play instead of (gui-action play) + ;; og:preserve-this fixed naughty dog bug here. was 'play instead of (gui-action play) (if (and (= sv-16 (gui-action play)) (handle-command-list obj (-> s1-0 channel) s1-0)) (channel-id-set! obj s1-0 (-> s1-0 id)) ) @@ -1865,7 +1865,7 @@ 0 ) -;; pc port note : added for debugging +;; og:preserve-this added for debugging (#when PC_PORT (define *gui-kick-str* #f)) diff --git a/goal_src/jak2/engine/process-drawable/process-focusable.gc b/goal_src/jak2/engine/process-drawable/process-focusable.gc index 754bfe749d..4e3e145f8a 100644 --- a/goal_src/jak2/engine/process-drawable/process-focusable.gc +++ b/goal_src/jak2/engine/process-drawable/process-focusable.gc @@ -76,7 +76,7 @@ (-> (the-as collide-shape-moving gp-0) gspot-pos) ) ((and (or (= arg0 2) (= arg0 3)) (type? gp-0 collide-shape)) - ;; PC PORT NOTE : added check here so we don't use invalid bones + ;; og:preserve-this added check here so we don't use invalid bones (if (logtest? (-> obj draw status) (draw-control-status uninited)) (-> gp-0 trans) (-> gp-0 root-prim prim-core)) diff --git a/goal_src/jak2/engine/process-drawable/process-taskable.gc b/goal_src/jak2/engine/process-drawable/process-taskable.gc index 795cbece39..cd32a96448 100644 --- a/goal_src/jak2/engine/process-drawable/process-taskable.gc +++ b/goal_src/jak2/engine/process-drawable/process-taskable.gc @@ -197,7 +197,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy ) ) ) - ;; PC PORT NOTE : added check so we don't use the wrong position for the distance check + ;; og:preserve-this added check so we don't use the wrong position for the distance check (and (not (logtest? (-> self draw status) (draw-control-status uninited))) (< (vector-vector-distance (target-pos 0) s5-0) f30-0)) ) diff --git a/goal_src/jak2/engine/ui/hud.gc b/goal_src/jak2/engine/ui/hud.gc index 898ac4cd39..3d95fed394 100644 --- a/goal_src/jak2/engine/ui/hud.gc +++ b/goal_src/jak2/engine/ui/hud.gc @@ -749,7 +749,7 @@ ) (defmethod alloc-string-if-needed hud ((obj hud) (arg0 int)) - ;; jp patch here (32 -> 64) + ;; og:preserve-this jp patch here (32 -> 64) (if (not (-> obj strings arg0 text)) (set! (-> obj strings arg0 text) (new 'process 'string 64 (the-as string #f))) ) diff --git a/goal_src/jak2/engine/ui/progress/progress-draw.gc b/goal_src/jak2/engine/ui/progress/progress-draw.gc index 670b3edb4d..96f4f78c1f 100644 --- a/goal_src/jak2/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak2/engine/ui/progress/progress-draw.gc @@ -3449,7 +3449,7 @@ (set! (-> obj real-task-index) sv-64) (set! sv-96 arg1) (set! (-> sv-96 color) (progress-selected 0)) - ;; pc port note : added this check here so we dont double-draw the highlight + ;; og:preserve-this added this check here so we dont double-draw the highlight (when (< (+ s3-0 -1) 0) (draw-highlight (+ s0-0 (#if COMPACT_SELECT_START 22 47)) (#if COMPACT_SELECT_START 25 50) f30-0)) ) @@ -4285,7 +4285,7 @@ (draw-secret-list (-> obj secret-items (+ sv-112 -1)) sv-48 arg1 0 sv-40 sv-108) ) (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) - ;; pc port note : added check so we don't double-draw the highlight + ;; og:preserve-this added check so we don't double-draw the highlight (when (< (+ sv-112 -1) sv-96) (draw-highlight (+ sv-128 22) 22 sv-16)) (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index fe22c1d7c9..8ace4296f1 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -1397,7 +1397,7 @@ 0.2 ) ) - ;; pc port note : added variable + ;; og:preserve-this added variable (speed-mod (if (-> *pc-settings* fast-progress?) (-> *pc-cheat-state* progress-speed) 1.0)) ) (when (hud-hidden?) @@ -1509,7 +1509,7 @@ (symbol->string (-> self current)) ) ) - (case (-> self next) ;; patched to next instead of current because we save synchronously + (case (-> self next) ;; og:preserve-this patched to next instead of current because we save synchronously (('saving) (cond ((= (-> self state-stack 0) 'title) @@ -1614,10 +1614,10 @@ (set-next-state self 'insufficient-space 0) ) (else - (case (-> self next) ;; patched to next instead of current because we save synchronously + (case (-> self next) ;; og:preserve-this patched to next instead of current because we save synchronously (('formatting 'format-card) (set-next-state self 'error-formatting 0) - ) ;; jp patch + ) ;; og:preserve-this jp patch (('creating 'create-game) (set-next-state self 'error-creating 0) ) ;; jp patch @@ -1668,7 +1668,7 @@ (none) ) :trans (behavior () - ;; pc port note : added variable + ;; og:preserve-this added variable (let ((speed-mod (if (-> *pc-settings* fast-progress?) (-> *pc-cheat-state* progress-speed) 1.0))) (seek! (-> self anim-frame) 0.0 (* speed-mod 0.02 (-> self clock time-adjust-ratio))) (cond diff --git a/goal_src/jak2/kernel/gkernel.gc b/goal_src/jak2/kernel/gkernel.gc index d7a12b14b6..1274aa19b4 100644 --- a/goal_src/jak2/kernel/gkernel.gc +++ b/goal_src/jak2/kernel/gkernel.gc @@ -107,6 +107,7 @@ ;; PC Port Scratchpad ;;;;;;;;;;;;;;;;;;;;;;; +;; og:preserve-this ;; DECOMP DEVIATION (#cond (PC_PORT diff --git a/goal_src/jak2/levels/gungame/gungame-obs.gc b/goal_src/jak2/levels/gungame/gungame-obs.gc index 9570c3e563..885dda30ed 100644 --- a/goal_src/jak2/levels/gungame/gungame-obs.gc +++ b/goal_src/jak2/levels/gungame/gungame-obs.gc @@ -1592,7 +1592,7 @@ This commonly includes things such as: ) ) ) - ;; pc port note : give skill directly + ;; og:preserve-this give skill directly (#when PC_PORT (send-event *target* 'get-pickup (pickup-type skill) (* (the float (-> self egg-count)) (-> *FACT-bank* super-skill-inc)))) (go-virtual end-course) @@ -1840,7 +1840,7 @@ This commonly includes things such as: (suspend) ) (when (> (-> self egg-count) 0) - ;; pc port note : skill is given earlier + ;; og:preserve-this skill is given earlier (#unless PC_PORT (let* ((gp-0 (handle->process (-> self voicebox))) (v1-8 (if (type? gp-0 process-drawable) diff --git a/goal_src/jak2/levels/outro/outro-scenes.gc b/goal_src/jak2/levels/outro/outro-scenes.gc index c742ba4843..9333d606d5 100644 --- a/goal_src/jak2/levels/outro/outro-scenes.gc +++ b/goal_src/jak2/levels/outro/outro-scenes.gc @@ -1609,7 +1609,7 @@ ) ) (10000 (apply ,(lambda () (set! (-> hiphog memory-mode) (load-buffer-mode small-edge)) 0 (none))) - (time-of-day -1) ;; pc port note : added this to unfreeze time of day + (time-of-day -1) ;; og:preserve-this added this to unfreeze time of day ) ) :cut-list '(245 diff --git a/goal_src/jak2/levels/stadium/skate/skatea-obs.gc b/goal_src/jak2/levels/stadium/skate/skatea-obs.gc index d6a30db021..f37dea1387 100644 --- a/goal_src/jak2/levels/stadium/skate/skatea-obs.gc +++ b/goal_src/jak2/levels/stadium/skate/skatea-obs.gc @@ -879,7 +879,7 @@ ) ) (game-info-method-28 *game-info* (the-as game-score (-> obj game-score)) (-> obj score)) - ;; pc port note : give skill directly + ;; og:preserve-this give skill directly (#when PC_PORT (send-event *target* 'get-pickup (pickup-type skill) (* (the float (-> obj egg-count)) (-> *FACT-bank* super-skill-inc)))) 0 @@ -1083,7 +1083,7 @@ (while (nonzero? (get-status *gui-control* (the-as sound-id s5-0))) (suspend) ) - ;; pc port note : skill is given in score method + ;; og:preserve-this skill is given in score method (#unless PC_PORT (let* ((s5-1 (handle->process gp-3)) (v1-97 (if (type? s5-1 process-drawable) diff --git a/goal_src/jak2/levels/tomb/tomb-boulder.gc b/goal_src/jak2/levels/tomb/tomb-boulder.gc index ef071e63f2..714fb0f30b 100644 --- a/goal_src/jak2/levels/tomb/tomb-boulder.gc +++ b/goal_src/jak2/levels/tomb/tomb-boulder.gc @@ -127,7 +127,7 @@ ) :code (behavior () (until #f - ;; manually patched + ;; og:preserve-this manually patched (clone-anim-once (ppointer->handle (-> self parent)) #t "spider-") (update-transforms (-> self root)) (suspend) @@ -203,7 +203,7 @@ :virtual #t :code (behavior () (until #f - ;; manually patched + ;; og:preserve-this manually patched (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) (update-transforms (-> self root)) (suspend) @@ -277,7 +277,7 @@ :trans (the-as (function none :behavior tomb-boulder-pillar) rider-trans) :code (behavior () (until #f - ;; manually patched + ;; og:preserve-this manually patched (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) (update-transforms (-> self root)) (pull-riders! (-> self root))