From 2ef23b27863c3bf851cf918f133bf073e05d434c Mon Sep 17 00:00:00 2001 From: Hat Kid <6624576+Hat-Kid@users.noreply.github.com> Date: Sat, 6 Apr 2024 00:44:09 +0200 Subject: [PATCH] nonzero checks and fixes --- goal_src/jak3/engine/target/gun/gun-red-shot.gc | 3 ++- goal_src/jak3/engine/target/logic-target.gc | 2 +- goal_src/jak3/engine/ui/hud-classes.gc | 4 ++-- goal_src/jak3/engine/ui/progress/progress.gc | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/goal_src/jak3/engine/target/gun/gun-red-shot.gc b/goal_src/jak3/engine/target/gun/gun-red-shot.gc index db30608193..87569238b8 100644 --- a/goal_src/jak3/engine/target/gun/gun-red-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-red-shot.gc @@ -107,7 +107,8 @@ ) (defmethod projectile-method-40 ((this gun-red-3-grenade)) - 256 + ;; og:preserve-this increased stack size from 256 + 512 ) (defmethod init-proj-settings! ((this gun-red-3-grenade)) diff --git a/goal_src/jak3/engine/target/logic-target.gc b/goal_src/jak3/engine/target/logic-target.gc index f88f12766e..5074108f82 100644 --- a/goal_src/jak3/engine/target/logic-target.gc +++ b/goal_src/jak3/engine/target/logic-target.gc @@ -3231,7 +3231,7 @@ (if (and *debug-segment* (!= (-> this tobot?) 'tobot)) (add-connection *debug-engine* this target-print-stats this *stdcon0* #f) ) - ;; (activate-hud this) + (activate-hud this) (set! (-> this fp-hud) (the-as handle #f)) (set! (-> this burn-proc) (the-as handle #f)) (set! (-> this water) (new 'process 'water-control this 10 0.0 8192.0 2048.0)) diff --git a/goal_src/jak3/engine/ui/hud-classes.gc b/goal_src/jak3/engine/ui/hud-classes.gc index 877fae6072..af430ad166 100644 --- a/goal_src/jak3/engine/ui/hud-classes.gc +++ b/goal_src/jak3/engine/ui/hud-classes.gc @@ -71,7 +71,7 @@ (defmethod update-values! ((this hud-map)) (cond - ((update! *minimap*) + ((and (nonzero? *minimap*) (update! *minimap*)) (logior! (-> this flags) (hud-flags show)) (let ((t9-1 (method-of-type hud update-values!))) (t9-1 this) @@ -110,7 +110,7 @@ (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) (set! (-> this sprites 1 pos z) #xffff00) (set! (-> this values 0 current) 0) - (update! *minimap*) + (if (nonzero? *minimap*) (update! *minimap*)) 0 (none) ) diff --git a/goal_src/jak3/engine/ui/progress/progress.gc b/goal_src/jak3/engine/ui/progress/progress.gc index 3d1f019c02..c87194a928 100644 --- a/goal_src/jak3/engine/ui/progress/progress.gc +++ b/goal_src/jak3/engine/ui/progress/progress.gc @@ -453,7 +453,9 @@ (process-spawn hud-ring-cell 11 (* -1.0 f30-0) 9 :name "hud-ring-cell" :to self) ) (clear *stdcon1*) - (enable-drawing *bigmap*) + (if (nonzero? *bigmap*) + (enable-drawing *bigmap*) + ) (set-setting! 'scanlines 'abs 0.0 0) (go-virtual come-in) )