From a409f9064eb7f3eb17801243c35cb4cb91aedead Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Sun, 9 Oct 2022 23:13:34 -0400 Subject: [PATCH] d/jak2: update related gsrc code as well --- decompiler/util/data_decompile.cpp | 4 +- goal_src/jak2/engine/debug/debug-h.gc | 72 +- goal_src/jak2/engine/debug/debug.gc | 41 +- goal_src/jak2/engine/game/game-info-h.gc | 2 +- .../process-drawable/process-focusable.gc | 5 +- .../jak2/engine/target/board/board-states.gc | 139 +- goal_src/jak2/engine/ui/hud-h.gc | 15 +- .../jak2/engine/ui/progress/progress-draw.gc | 109 +- .../jak2/engine/ui/progress/progress-h.gc | 7 +- .../engine/ui/progress/progress-static.gc | 1500 ++++++++--------- goal_src/jak2/engine/ui/progress/progress.gc | 85 +- goal_src/jak2/engine/ui/text.gc | 87 +- goal_src/jak2/engine/util/script.gc | 8 +- .../engine/ui/progress/progress-draw_REF.gc | 20 +- 14 files changed, 1027 insertions(+), 1067 deletions(-) diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index 7b57e04eb7..cf364d97ff 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -1209,11 +1209,11 @@ goos::Object decompile_structure(const TypeSpec& type, if (field.type() == TypeSpec("object")) { field_defs_out.emplace_back( field.name(), - decompile_at_label_guess_type(labels.at(word.label_id()), labels, words, ts, file)); + decompile_at_label_guess_type(labels.at(word.label_id()), labels, words, ts, file, version)); } else { field_defs_out.emplace_back( field.name(), decompile_at_label(field.type(), labels.at(word.label_id()), labels, - words, ts, file)); + words, ts, file, version)); } } else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { // do nothing, the default is zero? diff --git a/goal_src/jak2/engine/debug/debug-h.gc b/goal_src/jak2/engine/debug/debug-h.gc index 7a1ed713b7..ceeddbde95 100644 --- a/goal_src/jak2/engine/debug/debug-h.gc +++ b/goal_src/jak2/engine/debug/debug-h.gc @@ -14,13 +14,16 @@ (define-extern add-debug-x (function symbol bucket-id vector rgba symbol)) (define-extern add-debug-vector (function symbol bucket-id vector vector meters rgba symbol)) -(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol)) +(define-extern add-debug-line2d (function symbol bucket-id vector4w vector4w vector4w symbol)) (define-extern add-debug-text-3d (function symbol bucket-id string vector font-color vector2h symbol)) (define-extern add-debug-text-sphere (function symbol bucket-id vector meters string rgba symbol)) ;; NOTE - for debug (define-extern add-debug-sphere (function symbol bucket-id vector meters rgba symbol)) +;; NOTE - for joint-mod-h +(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix)) + ;; NOTE - for menu ;; +++debug-menu-msg (defenum debug-menu-msg @@ -65,6 +68,7 @@ :flag-assert #x900000010 ) + (deftype debug-vertex (structure) ((trans vector4w :inline :offset-assert 0) (normal vector3h :inline :offset-assert 16) @@ -87,27 +91,47 @@ :flag-assert #x900004b10 ) -(define *color-black* (new 'static 'rgba :a #x80)) -(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)) -(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)) -(define *color-red* (new 'static 'rgba :r #xff :a #x80)) -(define *color-green* (new 'static 'rgba :g #xff :a #x80)) -(define *color-blue* (new 'static 'rgba :b #xff :a #x80)) -(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80)) -(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80)) -(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80)) -(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80)) -(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)) -(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80)) -(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80)) -(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80)) -(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80)) -(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80)) -(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80)) -(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80)) -(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80)) -(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80)) -(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80)) -(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80)) -(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix)) +(define *color-black* (new 'static 'rgba :a #x80)) + +(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)) + +(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)) + +(define *color-red* (new 'static 'rgba :r #xff :a #x80)) + +(define *color-green* (new 'static 'rgba :g #xff :a #x80)) + +(define *color-blue* (new 'static 'rgba :b #xff :a #x80)) + +(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80)) + +(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80)) + +(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80)) + +(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80)) + +(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)) + +(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80)) + +(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80)) + +(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80)) + +(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80)) + +(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80)) + +(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80)) + +(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80)) + +(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80)) + +(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80)) + +(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80)) + +(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80)) diff --git a/goal_src/jak2/engine/debug/debug.gc b/goal_src/jak2/engine/debug/debug.gc index 1ff0cb3b87..2e738de0eb 100644 --- a/goal_src/jak2/engine/debug/debug.gc +++ b/goal_src/jak2/engine/debug/debug.gc @@ -670,8 +670,7 @@ #f ) -(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector)) - "Draw a line in screen coordinates" +(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w)) (if (not enable) (return #f) ) @@ -683,11 +682,11 @@ ) (set! (-> p0 quad) (-> start quad)) (set! (-> p1 quad) (-> end quad)) - (set! (-> p0 x) (* (+ (-> p0 x) 2048) 16)) - (set! (-> p0 y) (* -16 (- 2048 (-> p0 y)))) + (set! (-> p0 x) (the-as int (* (+ (-> p0 x) 2048) 16))) + (set! (-> p0 y) (* -16 (the-as int (- 2048 (the-as int (-> p0 y)))))) (set! (-> p0 z) #x7fffff) - (set! (-> p1 x) (* (+ (-> p1 x) 2048) 16)) - (set! (-> p1 y) (* -16 (- 2048 (-> p1 y)))) + (set! (-> p1 x) (the-as int (* (+ (-> p1 x) 2048) 16))) + (set! (-> p1 y) (* -16 (the-as int (- 2048 (the-as int (-> p1 y)))))) (set! (-> p1 z) #x7fffff) (let ((a0-18 (the-as (pointer uint64) (-> buf base)))) (let* ((a1-7 buf) @@ -701,22 +700,20 @@ (let* ((a1-8 buf) (giftag (the-as gs-gif-tag (-> a1-8 base))) ) - (set! (-> giftag tag) - (new 'static 'gif-tag64 - :nloop #x1 - :eop #x1 - :pre #x1 - :prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1) - :nreg #x4 - ) + (set! (-> giftag tag) (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1) + :nreg #x4 + ) ) - (set! (-> giftag regs) - (new 'static 'gif-tag-regs - :regs0 (gif-reg-id rgbaq) - :regs1 (gif-reg-id xyzf2) - :regs2 (gif-reg-id rgbaq) - :regs3 (gif-reg-id xyzf2) - ) + (set! (-> giftag regs) (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id xyzf2) + :regs2 (gif-reg-id rgbaq) + :regs3 (gif-reg-id xyzf2) + ) ) (set! (-> a1-8 base) (&+ (the-as pointer giftag) 16)) ) @@ -1943,4 +1940,4 @@ ) 0 (none) - ) \ No newline at end of file + ) diff --git a/goal_src/jak2/engine/game/game-info-h.gc b/goal_src/jak2/engine/game/game-info-h.gc index 46e4825ee8..66d2e932b2 100644 --- a/goal_src/jak2/engine/game/game-info-h.gc +++ b/goal_src/jak2/engine/game/game-info-h.gc @@ -257,7 +257,7 @@ (debug-features game-feature :offset-assert 136) (secrets game-secrets :offset-assert 144) (unknown-pad1 uint32 :offset-assert 148) - (purchase-secrets uint32 :offset-assert 152) + (purchase-secrets game-secrets :offset-assert 152) (unknown-pad2 uint32 :offset-assert 156) (gun-type int32 :offset-assert 160) (gun-ammo float 4 :offset-assert 164) diff --git a/goal_src/jak2/engine/process-drawable/process-focusable.gc b/goal_src/jak2/engine/process-drawable/process-focusable.gc index 7c9911197c..d9a74019c8 100644 --- a/goal_src/jak2/engine/process-drawable/process-focusable.gc +++ b/goal_src/jak2/engine/process-drawable/process-focusable.gc @@ -53,7 +53,7 @@ :flag-assert #x1b005000cc (:methods (get-trans (_type_ int) vector 20) - (get-quat (_type_) quaternion 21) + (get-quat (_type_ int) quaternion 21) (get-transv (_type_) vector 22) (process-focusable-method-23 (_type_) none 23) (process-focusable-method-24 (_type_) float 24) @@ -65,6 +65,7 @@ ;; WARN: Return type mismatch structure vs vector. (defmethod get-trans process-focusable ((obj process-focusable) (arg0 int)) + "@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]" (let ((gp-0 (-> obj root))) (the-as vector (cond ((zero? arg0) @@ -88,7 +89,7 @@ (-> obj root transv) ) -(defmethod get-quat process-focusable ((obj process-focusable)) +(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int)) (-> obj root quat) ) diff --git a/goal_src/jak2/engine/target/board/board-states.gc b/goal_src/jak2/engine/target/board/board-states.gc index 4cbecf505d..9f9626ca13 100644 --- a/goal_src/jak2/engine/target/board/board-states.gc +++ b/goal_src/jak2/engine/target/board/board-states.gc @@ -286,8 +286,6 @@ (none) ) -;; definition for function target-board-halfpipe-trans -;; WARN: Return type mismatch int vs none. (defbehavior target-board-halfpipe-trans target () (when (and (logtest? (focus-status halfpipe) (-> self focus-status)) *camera*) (let ((gp-0 (new 'stack-no-clear 'vector))) @@ -318,8 +316,6 @@ (none) ) -;; definition for function target-board-resolve-points -;; WARN: Return type mismatch int vs none. (defbehavior target-board-resolve-points target ((arg0 float) (arg1 float) (arg2 float) (arg3 float)) (when (= (-> self board main mode) (joint-mod-mode rotate)) (let ((f0-1 (fabs (-> self board troty-cum)))) @@ -398,7 +394,7 @@ (t9-8 (the-as vector a0-4) (the-as float a1-0)) ) ) - (when (zero? (logand (-> self control old-status) (cshape-moving-flags on-surface))) + (when (not (logtest? (-> self control old-status) (cshape-moving-flags on-surface))) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self control trans quad)) (set! (-> gp-0 y) (+ 2048.0 (-> gp-0 y))) @@ -491,8 +487,6 @@ (none) ) -;; definition for function target-board-halfpipe-check -;; INFO: Used lq/sq (defbehavior target-board-halfpipe-check target () (local-vars (v0-3 collide-action)) (let ((gp-0 (vector-flatten! @@ -532,7 +526,6 @@ ) ) -;; definition for function target-board-jump-trans (defbehavior target-board-jump-trans target () (when (and (!= (-> self state-time) (-> self clock frame-counter)) (jump-hit-ground-stuck?)) (set! (-> self board jump-land-time) (-> self clock frame-counter)) @@ -544,8 +537,8 @@ (if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x) (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0) (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) - (and (zero? (logand (water-flags touch-water) (-> self water flags))) - (zero? (logand (-> self state-flags) (state-flags sf7))) + (and (not (logtest? (water-flags touch-water) (-> self water flags))) + (not (logtest? (-> self state-flags) (state-flags sf7))) (not (and (-> self next-state) (= (-> self next-state name) 'target-board-wall-kick))) ) ) @@ -555,7 +548,6 @@ (none) ) -;; failed to figure out what this is: (defstate target-board-start (target) :event target-board-handler :exit target-board-exit @@ -568,10 +560,9 @@ :post target-post ) -;; failed to figure out what this is: (defstate target-board-stance (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('lip) (when (and (= (-> self control ground-pat mode) (pat-mode halfpipe)) (< (-> self control poly-angle) 0.5) @@ -588,7 +579,7 @@ ) (set! (-> self board halfpipe-lip-time) (-> self clock frame-counter)) (set! (-> self board halfpipe-side-time) (-> self clock frame-counter)) - (set! (-> self board halfpipe-lip-event) (the-as symbol (-> arg3 param 0))) + (set! (-> self board halfpipe-lip-event) (the-as symbol (-> event param 0))) (let ((v0-2 (the-as object (logior (-> self control root-prim prim-core action) (collide-action no-normal-reset)))) ) (set! (-> self control root-prim prim-core action) (the-as collide-action v0-2)) @@ -599,13 +590,13 @@ (('jump) (go target-board-jump - (the-as meters (-> arg3 param 0)) - (the-as meters (-> arg3 param 1)) - (the-as symbol (-> arg3 param 2)) + (the-as meters (-> event param 0)) + (the-as meters (-> event param 1)) + (the-as symbol (-> event param 2)) ) ) (else - (target-board-handler arg0 arg1 arg2 arg3) + (target-board-handler proc arg1 event-type event) ) ) ) @@ -641,7 +632,7 @@ ) :trans (behavior () (if (and (cpad-hold? (-> self control unknown-cpad-info00 number) l1) - (zero? (logand (-> self state-flags) (state-flags sf9))) + (not (logtest? (-> self state-flags) (state-flags sf9))) (< (- (-> self clock frame-counter) (-> self control unknown-time-frame06)) (the-as time-frame (-> *TARGET-bank* ground-timeout)) ) @@ -826,7 +817,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-duck-stance (target) :event (-> target-board-stance event) :enter (behavior () @@ -840,8 +830,7 @@ (none) ) :trans (behavior () - (if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1)) - ) + (if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1)) (logtest? (-> self state-flags) (state-flags sf9)) (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06)) (the-as time-frame (-> *TARGET-bank* ground-timeout)) @@ -936,13 +925,12 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-jump (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (if (and (= arg2 'edge-grab) (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))) + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (if (and (= event-type 'edge-grab) (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))) (return #f) ) - (target-board-handler arg0 arg1 arg2 arg3) + (target-board-handler proc arg1 event-type event) ) :enter (behavior ((arg0 meters) (arg1 meters) (arg2 symbol)) (local-vars @@ -1154,10 +1142,9 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-halfpipe (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('edge-grab) (format #t @@ -1202,14 +1189,14 @@ ) ) (('grenade) - (if (< (the-as float (-> arg3 param 0)) + (if (< (the-as float (-> event param 0)) (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) ) - (go target-board-grenade (process->handle arg0)) + (go target-board-grenade (process->handle proc)) ) ) (else - (target-board-handler arg0 arg1 arg2 arg3) + (target-board-handler proc arg1 event-type event) ) ) ) @@ -1419,7 +1406,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-falling (target) :event target-board-handler :enter (behavior () @@ -1503,7 +1489,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-jump-kick (target) :event target-board-handler :enter (behavior () @@ -1555,7 +1540,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-wall-kick (target) :event target-board-handler :enter (behavior ((arg0 vector) (arg1 float)) @@ -1605,7 +1589,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-flip (target) :event (-> target-board-jump event) :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) @@ -1698,8 +1681,7 @@ (let ((f0-9 (analog-input (the int (* 128.0 (-> s5-0 z))) 0.0 96.0 110.0 1.0)) (s4-0 0) ) - (while (not (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons r1)) - ) + (while (not (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) r1)) (or (= f0-9 0.0) (jump-hit-ground-stuck?) (< (target-time-to-ground) (seconds 0.5))) ) (nonzero? s4-0) @@ -1788,7 +1770,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-hold (target) :event (-> target-board-jump event) :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) @@ -1865,8 +1846,7 @@ (set! (-> v1-0 z) (* -0.0078125 (+ -128.0 (the float (-> self control unknown-cpad-info00 lefty))))) (set! (-> v1-0 w) 1.0) (let ((f30-0 (analog-input (the int (* 128.0 (-> v1-0 z))) 0.0 96.0 110.0 1.0))) - (while (not (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1)) - ) + (while (not (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1)) (jump-hit-ground-stuck?) (< (target-time-to-ground) (seconds 0.3)) ) @@ -1993,7 +1973,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-trickx (target) :event (-> target-board-jump event) :enter (-> target-board-hold enter) @@ -2032,8 +2011,7 @@ (let ((f0-9 (analog-input (the int (* 128.0 (-> s5-0 z))) 0.0 96.0 110.0 1.0)) (s4-0 0) ) - (while (not (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons r1)) - ) + (while (not (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) r1)) (or (= f0-9 0.0) (jump-hit-ground-stuck?) (< (target-time-to-ground) (seconds 0.5))) ) (nonzero? s4-0) @@ -2103,7 +2081,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-hit-ground (target) :event target-board-handler :enter (behavior () @@ -2188,7 +2165,6 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-turn-to (target) :event target-board-handler :enter (behavior ((arg0 vector) (arg1 time-frame)) @@ -2257,15 +2233,14 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-ride-edge (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('edge-grab 'push-transv 'push-trans) #f ) (('end-mode) - (when (-> arg3 param 0) + (when (-> event param 0) (let ((v1-6 (/ (- (-> self clock frame-counter) (-> self board ride-start-time)) 300))) (if (> v1-6 0) (add-to-trick-list (-> self board) (board-tricks board-rail) (* 100.0 (the float v1-6))) @@ -2275,7 +2250,7 @@ (go target-board-turn-to (-> self control transv) (seconds 0.2)) ) (else - (target-board-handler arg0 arg1 arg2 arg3) + (target-board-handler proc arg1 event-type event) ) ) ) @@ -2531,15 +2506,14 @@ ) ) -;; failed to figure out what this is: (defstate target-board-grenade (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('target) (handle->process (-> self control unknown-handle02)) ) (else - (target-board-handler arg0 arg1 arg2 arg3) + (target-board-handler proc arg1 event-type event) ) ) ) @@ -2642,21 +2616,20 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-get-on (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('attack 'attack-or-shove 'attack-invinc) (target-attacked - arg2 - (the-as attack-info (-> arg3 param 1)) - arg0 - (the-as process (-> arg3 param 0)) + event-type + (the-as attack-info (-> event param 1)) + proc + (the-as process (-> event param 0)) target-hit ) ) (else - (target-generic-event-handler arg0 arg1 arg2 arg3) + (target-generic-event-handler proc arg1 event-type event) ) ) ) @@ -2800,15 +2773,14 @@ :post target-board-post ) -;; failed to figure out what this is: (defstate target-board-pegasus (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (case arg2 + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (case event-type (('end-mode) (go target-jump 16384.0 16384.0 (the-as surface #f)) ) (else - (target-generic-event-handler arg0 arg1 arg2 arg3) + (target-generic-event-handler proc arg1 event-type event) ) ) ) @@ -2844,13 +2816,7 @@ (when s4-1 (set! (-> self control unknown-vector38 quad) (-> (get-trans (the-as process-focusable s4-1) 0) quad)) (set! (-> self control unknown-vector38 y) (+ 4096.0 (-> self control unknown-vector38 y))) - (let* ((s3-2 (-> self control unknown-vector40)) - (a0-15 (the-as process-focusable s4-1)) - (t9-4 (method-of-object a0-15 get-quat)) - ) - 0 - (set! (-> s3-2 quad) (-> (t9-4 a0-15) vec quad)) - ) + (set! (-> self control unknown-vector40 quad) (-> (get-quat (the-as process-focusable s4-1) 0) vec quad)) ) (let ((f28-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 30.0)))) (let ((f26-0 f28-0)) @@ -2904,7 +2870,6 @@ ) ) -;; failed to figure out what this is: (defstate target-board-get-off (target) :event (-> target-board-get-on event) :enter (behavior ((arg0 object) (arg1 symbol)) @@ -3103,23 +3068,22 @@ ) ) -;; failed to figure out what this is: (defstate target-board-grab (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) (cond - ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + ((and (= event-type 'query) (= (-> event param 0) 'mode)) (-> self state name) ) (else - (case arg2 + (case event-type (('end-mode) (go target-board-stance) ) (('clone-anim) - (go target-board-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + (go target-board-clone-anim (process->handle (the-as process (-> event param 0)))) ) (('change-mode) - (case (-> arg3 param 0) + (case (-> event param 0) (('normal) enter-state 'stance @@ -3128,7 +3092,7 @@ ) ) (else - (target-generic-event-handler arg0 arg1 arg2 arg3) + (target-generic-event-handler proc arg1 event-type event) ) ) ) @@ -3169,11 +3133,11 @@ ) (defstate target-board-clone-anim (target) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore)) + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (if (and (= event-type 'trans) (= (-> event param 0) 'restore)) (set! (-> self control unknown-word04) (the-as uint #f)) ) - ((-> target-board-grab event) arg0 arg1 arg2 arg3) + ((-> target-board-grab event) proc arg1 event-type event) ) :enter (-> target-clone-anim enter) :exit (behavior () @@ -3196,7 +3160,6 @@ :post target-no-ja-move-post ) -;; failed to figure out what this is: (defstate target-board-hit (target) :event target-board-handler :exit (behavior () @@ -3258,7 +3221,7 @@ ) self ((method-of-type attack-info attack-info-method-11)) - (when (zero? (logand (-> gp-0 mask) (attack-info-mask vector))) + (when (not (logtest? (-> gp-0 mask) (attack-info-mask vector))) (vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00)) (vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back)))) (set! (-> gp-0 vector y) (-> gp-0 shove-up)) diff --git a/goal_src/jak2/engine/ui/hud-h.gc b/goal_src/jak2/engine/ui/hud-h.gc index 9b123c9b70..644d101d66 100644 --- a/goal_src/jak2/engine/ui/hud-h.gc +++ b/goal_src/jak2/engine/ui/hud-h.gc @@ -13,7 +13,11 @@ ;; NOTE - for progress (define-extern hide-hud (function symbol none)) (define-extern hud-hidden? (function symbol)) -(define-extern set-hud-piece-position! (function basic int int none)) +(declare-type hud-sprite structure) +(define-extern set-hud-piece-position! (function hud-sprite int int none)) +(define-extern show-hud (function object none)) +(declare-type hud process) +(define-extern hud-init-by-other (function object :behavior hud)) ;; DECOMP BEGINS @@ -43,7 +47,7 @@ :size-assert #x34 :flag-assert #xb00000034 (:methods - (hud-sprite-method-9 () none 9) + (hud-sprite-method-9 (_type_ dma-buffer level) none 9) (hud-sprite-method-10 () none 10) ) ) @@ -58,7 +62,7 @@ :size-assert #x20 :flag-assert #x1000000020 (:methods - (hud-box-method-9 () none 9) + (hud-box-method-9 (_type_ dma-buffer) none 9) (hud-box-method-10 () none 10) (hud-box-method-11 () none 11) (hud-box-method-12 () none 12) @@ -557,8 +561,3 @@ :size-assert #xba4 :flag-assert #x1b0b300ba4 ) - - -(define-extern hud-init-by-other (function object :behavior hud)) - -(define-extern show-hud (function object none)) diff --git a/goal_src/jak2/engine/ui/progress/progress-draw.gc b/goal_src/jak2/engine/ui/progress/progress-draw.gc index f011646f96..e3ed3308e7 100644 --- a/goal_src/jak2/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak2/engine/ui/progress/progress-draw.gc @@ -47,7 +47,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) gp-0 (the-as (pointer dma-tag) a3-3) ) @@ -623,7 +623,7 @@ (let ((a0-1 4)) (when (and v1-0 (= (-> v1-0 formatted) 1) (= (-> v1-0 inited) 1)) (dotimes (a1-5 a0-1) - (set! s5-0 (logior (the-as game-secrets s5-0) (-> v1-0 file a1-5 secrets))) + (set! s5-0 (logior s5-0 (-> v1-0 file a1-5 secrets))) ) ) ) @@ -1710,7 +1710,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -1793,7 +1793,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -1893,7 +1893,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -1979,7 +1979,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -2089,7 +2089,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -2248,7 +2248,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s2-4 (the-as (pointer dma-tag) a3-14) ) @@ -2322,7 +2322,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s2-5 (the-as (pointer dma-tag) a3-32) ) @@ -3757,7 +3757,7 @@ (set! sv-48 0) (while (< sv-48 s4-0) (set! sv-64 print-game-text) - (let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options sv-48 box 0 min x)) #f)) + (let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 sv-48 text)) #f)) (a1-16 arg1) (a2-4 #t) (a3-3 44) @@ -3768,55 +3768,54 @@ (set! sv-48 (+ sv-48 1)) ) (let ((s0-1 (- s0-0 (the int f28-0))) - (f28-1 - (cond - ((< (-> arg0 sliding-height) 0.0) - (set! sv-112 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s4-0 box 0 min x)) #f)) - 0.0 - (set! sv-80 print-game-text) - (set! sv-96 format) - (let ((a0-7 (clear *temp-string*)) - (a1-18 "~S") - ) - (sv-96 a0-7 a1-18 sv-112) - ) - (let* ((a0-8 *temp-string*) - (a1-19 arg1) - (a2-7 #t) - (a3-4 44) - (t0-4 320) - (f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4)) + (f28-1 (cond + ((< (-> arg0 sliding-height) 0.0) + (set! sv-112 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s4-0 text)) #f)) + 0.0 + (set! sv-80 print-game-text) + (set! sv-96 format) + (let ((a0-7 (clear *temp-string*)) + (a1-18 "~S") + ) + (sv-96 a0-7 a1-18 sv-112) ) - (* (-> arg0 sliding-height) f0-16) - ) - ) - (else - (set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options (+ s4-0 -1) box 0 min x)) #f)) - 0.0 - (set! sv-128 print-game-text) - (set! sv-144 format) - (let ((a0-11 (clear *temp-string*)) - (a1-21 "~S") + (let* ((a0-8 *temp-string*) + (a1-19 arg1) + (a2-7 #t) + (a3-4 44) + (t0-4 320) + (f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4)) + ) + (* (-> arg0 sliding-height) f0-16) ) - (sv-144 a0-11 a1-21 sv-160) - ) - (let* ((a0-12 *temp-string*) - (a1-22 arg1) - (a2-10 #t) - (a3-5 44) - (t0-5 320) - (f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5)) + ) + (else + (set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 (+ s4-0 -1) text)) #f)) + 0.0 + (set! sv-128 print-game-text) + (set! sv-144 format) + (let ((a0-11 (clear *temp-string*)) + (a1-21 "~S") + ) + (sv-144 a0-11 a1-21 sv-160) ) - (* (-> arg0 sliding-height) f0-18) - ) - ) - ) - ) + (let* ((a0-12 *temp-string*) + (a1-22 arg1) + (a2-10 #t) + (a3-5 44) + (t0-5 320) + (f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5)) + ) + (* (-> arg0 sliding-height) f0-18) + ) + ) + ) + ) ) (set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1)))) (while (< s3-0 (length s2-0)) (set! sv-176 print-game-text) - (let* ((a0-14 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0 min x)) #f)) + (let* ((a0-14 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s3-0 text)) #f)) (a1-24 arg1) (a2-12 #t) (a3-6 44) @@ -3843,7 +3842,7 @@ ) ) (set! sv-224 print-game-text) - (let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0 min x)) #f)) + (let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s3-0 text)) #f)) (a1-28 arg1) (a2-16 #f) (a3-7 44) @@ -7212,7 +7211,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s0-2 (the-as (pointer dma-tag) a3-3) ) @@ -7255,7 +7254,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) gp-1 (the-as (pointer dma-tag) a3-7) ) diff --git a/goal_src/jak2/engine/ui/progress/progress-h.gc b/goal_src/jak2/engine/ui/progress/progress-h.gc index db6c776e10..c62d9cd212 100644 --- a/goal_src/jak2/engine/ui/progress/progress-h.gc +++ b/goal_src/jak2/engine/ui/progress/progress-h.gc @@ -15,7 +15,7 @@ (define-extern *progress-process* (pointer progress)) (define-extern activate-progress (function process symbol none)) -(define-extern memcard-unlocked-secrets? "TODO - returns a bitfield" (function symbol int)) +(define-extern memcard-unlocked-secrets? (function symbol game-secrets)) (define-extern progress-selected (function int int :behavior progress)) (define-extern get-num-highscores (function int)) (define-extern get-next-highscore (function int int)) @@ -192,9 +192,8 @@ (deftype menu-memcard-slot-option (menu-option) - ((sprites hud-sprite 5 :inline :offset-assert 48) - (something-hud-related basic :offset 112) - (pad uint8 32 :offset-assert 368) + ((sprites hud-sprite 5 :inline :offset-assert 48) + (pad uint8 32 :offset-assert 368) ) :method-count-assert 12 :size-assert #x190 diff --git a/goal_src/jak2/engine/ui/progress/progress-static.gc b/goal_src/jak2/engine/ui/progress/progress-static.gc index c52cff927f..1a05dde8c8 100644 --- a/goal_src/jak2/engine/ui/progress/progress-static.gc +++ b/goal_src/jak2/engine/ui/progress/progress-static.gc @@ -174,769 +174,763 @@ (define *hud-select-scene-act1* - (the-as menu-option-list - (new 'static 'boxed-array :type hud-scene-info - (new 'static 'hud-scene-info - :name "intro" - :continue "village1-start" - :info '("intro-samos-hut" "intro-vortex" "intro-city-square" "intro-prison") - :text #x307 - ) - (new 'static 'hud-scene-info - :name "city-help-kid-intro" - :continue "ctyslumb-fort" - :info "city-help-kid-intro" - :text #x28c - ) - (new 'static 'hud-scene-info - :name "city-help-kid-resolution" - :continue "ctyslumb-fort" - :info "city-help-kid-resolution" - :text #x28d - ) - (new 'static 'hud-scene-info - :name "ruins-tower-intro" - :continue "ctysluma-tower-intro" - :info "ruins-tower-intro" - :text #x281 - ) - (new 'static 'hud-scene-info - :name "ruins-tower-victory" - :continue "ruins-hut" - :info "ruins-tower-victory" - :text #x282 - ) - (new 'static 'hud-scene-info :name "atoll-1-int" :continue "hideout-start" :info "atoll-1-int" :text #x2c8) - (new 'static 'hud-scene-info :name "atoll-1-res" :continue "atoll-movie" :info "atoll-1-res" :text #x2c9) - (new 'static 'hud-scene-info - :name "fortress-2-intro" - :continue "hideout-start" - :info "fortress-2-intro" - :text #x2bc - ) - (new 'static 'hud-scene-info - :name "fortress-blow-up-ammo-res-a" - :continue "fordumpc-start" - :info "fortress-blow-up-ammo-res-a" - :text #x2bd - ) - (new 'static 'hud-scene-info - :name "fortress-blow-up-ammo-res-b" - :continue "fordumpc-explode-movie" - :info "fortress-blow-up-ammo-res-b" - :text #x2be - ) - (new 'static 'hud-scene-info - :name "city-krew-delivery-intro" - :continue "hideout-start" - :info "city-krew-delivery-intro" - :text #x28f - ) - (new 'static 'hud-scene-info - :name "krew-delivery-res" - :continue "hiphog-start" - :info "krew-delivery-res" - :text #x290 - ) - (new 'static 'hud-scene-info :name "atoll-2-intro" :continue "hiphog-start" :info "atoll-2-intro" :text #x2ca) - (new 'static 'hud-scene-info - :name "atoll-sig-intro" - :continue "atoll-movie" - :info "atoll-sig-intro" - :text #x2ce - ) - (new 'static 'hud-scene-info - :name "atoll-sig-tank" - :continue "atoll-movie" - :info "atoll-sig-tank" - :text #x2cf - ) - (new 'static 'hud-scene-info - :name "atoll-sniper-a" - :continue "atoll-movie" - :info "atoll-sniper-a" - :text #x2d0 - ) - (new 'static 'hud-scene-info - :name "atoll-sniper-b" - :continue "atoll-movie" - :info "atoll-sniper-b" - :text #x2d1 - ) - (new 'static 'hud-scene-info - :name "atoll-sniper-c" - :continue "atoll-movie" - :info "atoll-sniper-c" - :text #x2d2 - ) - (new 'static 'hud-scene-info - :name "atoll-sniper-d" - :continue "atoll-movie" - :info "atoll-sniper-d" - :text #x2d3 - ) - (new 'static 'hud-scene-info - :name "atoll-sniper-e" - :continue "atoll-movie" - :info "atoll-sniper-e" - :text #x2d4 - ) - (new 'static 'hud-scene-info - :name "city-oracle-intro" - :continue "oracle-start" - :info "city-oracle-intro" - :text #x29d - ) - (new 'static 'hud-scene-info - :name "city-oracle-level-0" - :continue "oracle-start" - :info "city-oracle-level-0" - :text #x29e - ) - (new 'static 'hud-scene-info - :name "city-oracle-level-1" - :continue "oracle-start" - :info "city-oracle-level-1" - :text #x29f - ) - (new 'static 'hud-scene-info - :name "city-oracle-level-2" - :continue "oracle-start" - :info "city-oracle-level-2" - :text #x2a0 - ) - (new 'static 'hud-scene-info - :name "city-oracle-level-3" - :continue "oracle-start" - :info "city-oracle-level-3" - :text #x2a1 - ) - (new 'static 'hud-scene-info :name "sewer-1-intro" :continue "hiphog-start" :info "sewer-1-intro" :text #x2c1) - (new 'static 'hud-scene-info :name "sewer-1-res" :continue "hiphog-start" :info "sewer-1-res" :text #x2c2) - (new 'static 'hud-scene-info - :name "city-get-yellow-gun" - :continue "gungame-movie" - :info "city-get-yellow-gun" - :text #x2b2 - ) - (new 'static 'hud-scene-info - :name "vin-rescue-intro" - :continue "hideout-start" - :info "vin-rescue-intro" - :text #x286 - ) - (new 'static 'hud-scene-info :name "vin-rescue" :continue "strip-start" :info "vin-rescue" :text #x287) - (new 'static 'hud-scene-info - :name "city-keira-delivery-intro" - :continue "hiphog-start" - :info "city-keira-delivery-intro" - :text #x2a7 - ) - (new 'static 'hud-scene-info - :name "city-krew-collection-intro" - :continue "hiphog-start" - :info "city-krew-collection-intro" - :text #x2a2 - ) - (new 'static 'hud-scene-info - :name "city-krew-collection-res" - :continue "hiphog-start" - :info "city-krew-collection-res" - :text #x2a3 - ) - (new 'static 'hud-scene-info - :name "city-keira-hover-challenge-intro" - :continue "garage-start-skate" - :info "city-keira-hover-challenge-intro" - :text #x294 - ) - (new 'static 'hud-scene-info - :name "city-put-hoverboard" - :continue "skatea-start" - :info "city-put-hoverboard" - :text #x2b4 - ) - (new 'static 'hud-scene-info - :name "city-keira-hover-challenge-res" - :continue "garage-start-skate" - :info "city-keira-hover-challenge-res" - :text #x295 - ) - (new 'static 'hud-scene-info - :name "atoll-3-intro" - :continue "hideout-start" - :info "atoll-3-intro" - :text #x2cb - ) - (new 'static 'hud-scene-info - :name "atoll-save-ashelin-res-a" - :continue "atoll-movie" - :info "atoll-save-ashelin-res-a" - :text #x2cc - ) - (new 'static 'hud-scene-info - :name "atoll-save-ashelin-res-b" - :continue "atoll-movie" - :info "atoll-save-ashelin-res-b" - :text #x2cd - ) - (new 'static 'hud-scene-info - :name "drill-kill-metal-heads-intro" - :continue "vinroom-start" - :info "drill-kill-metal-heads-intro" - :text #x2d5 - ) - (new 'static 'hud-scene-info - :name "mountain-finditems-intro" - :continue "onintent-start" - :info "mountain-finditems-intro" - :text #x2d9 - ) - (new 'static 'hud-scene-info - :name "mountain-gear-res" - :continue "mountain-start" - :info "mountain-gear-res" - :text #x2da - ) - (new 'static 'hud-scene-info - :name "mountain-shard-res" - :continue "mountain-start" - :info "mountain-shard-res" - :text #x2db - ) - (new 'static 'hud-scene-info - :name "mountain-lens-res" - :continue "mountain-start" - :info "mountain-lens-res" - :text #x2dc - ) - (new 'static 'hud-scene-info - :name "city-switch-on-power-intro" - :continue "vinroom-start" - :info "city-switch-on-power-intro" - :text #x293 - ) - (new 'static 'hud-scene-info - :name "palace-outside-window-res" - :continue "palroof-throne" - :info "palace-outside-window-res" - :text #x2dd - ) - (new 'static 'hud-scene-info - :name "palace-outside-window-res-b" - :continue "palroof-boss" - :info "palace-outside-window-res-b" - :text #x2de - ) - (new 'static 'hud-scene-info - :name "palace-boss-res" - :continue "palroof-boss" - :info "palace-boss-res" - :text #x2df - ) - (new 'static 'hud-scene-info - :name "city-shuttle-underground-intro" - :continue "hideout-start" - :info "city-shuttle-underground-intro" - :text #x2a8 - ) - (new 'static 'hud-scene-info - :name "ruins-sacred-intro" - :continue "hideout-start" - :info "ruins-sacred-intro" - :text #x283 - ) - (new 'static 'hud-scene-info - :name "ruins-sacred-victory" - :continue "ruins-hut" - :info "ruins-sacred-victory" - :text #x284 - ) + (new 'static 'boxed-array :type hud-scene-info + (new 'static 'hud-scene-info + :name "intro" + :continue "village1-start" + :info '("intro-samos-hut" "intro-vortex" "intro-city-square" "intro-prison") + :text #x307 + ) + (new 'static 'hud-scene-info + :name "city-help-kid-intro" + :continue "ctyslumb-fort" + :info "city-help-kid-intro" + :text #x28c + ) + (new 'static 'hud-scene-info + :name "city-help-kid-resolution" + :continue "ctyslumb-fort" + :info "city-help-kid-resolution" + :text #x28d + ) + (new 'static 'hud-scene-info + :name "ruins-tower-intro" + :continue "ctysluma-tower-intro" + :info "ruins-tower-intro" + :text #x281 + ) + (new 'static 'hud-scene-info + :name "ruins-tower-victory" + :continue "ruins-hut" + :info "ruins-tower-victory" + :text #x282 + ) + (new 'static 'hud-scene-info :name "atoll-1-int" :continue "hideout-start" :info "atoll-1-int" :text #x2c8) + (new 'static 'hud-scene-info :name "atoll-1-res" :continue "atoll-movie" :info "atoll-1-res" :text #x2c9) + (new 'static 'hud-scene-info + :name "fortress-2-intro" + :continue "hideout-start" + :info "fortress-2-intro" + :text #x2bc + ) + (new 'static 'hud-scene-info + :name "fortress-blow-up-ammo-res-a" + :continue "fordumpc-start" + :info "fortress-blow-up-ammo-res-a" + :text #x2bd + ) + (new 'static 'hud-scene-info + :name "fortress-blow-up-ammo-res-b" + :continue "fordumpc-explode-movie" + :info "fortress-blow-up-ammo-res-b" + :text #x2be + ) + (new 'static 'hud-scene-info + :name "city-krew-delivery-intro" + :continue "hideout-start" + :info "city-krew-delivery-intro" + :text #x28f + ) + (new 'static 'hud-scene-info + :name "krew-delivery-res" + :continue "hiphog-start" + :info "krew-delivery-res" + :text #x290 + ) + (new 'static 'hud-scene-info :name "atoll-2-intro" :continue "hiphog-start" :info "atoll-2-intro" :text #x2ca) + (new 'static 'hud-scene-info + :name "atoll-sig-intro" + :continue "atoll-movie" + :info "atoll-sig-intro" + :text #x2ce + ) + (new 'static 'hud-scene-info + :name "atoll-sig-tank" + :continue "atoll-movie" + :info "atoll-sig-tank" + :text #x2cf + ) + (new 'static 'hud-scene-info + :name "atoll-sniper-a" + :continue "atoll-movie" + :info "atoll-sniper-a" + :text #x2d0 + ) + (new 'static 'hud-scene-info + :name "atoll-sniper-b" + :continue "atoll-movie" + :info "atoll-sniper-b" + :text #x2d1 + ) + (new 'static 'hud-scene-info + :name "atoll-sniper-c" + :continue "atoll-movie" + :info "atoll-sniper-c" + :text #x2d2 + ) + (new 'static 'hud-scene-info + :name "atoll-sniper-d" + :continue "atoll-movie" + :info "atoll-sniper-d" + :text #x2d3 + ) + (new 'static 'hud-scene-info + :name "atoll-sniper-e" + :continue "atoll-movie" + :info "atoll-sniper-e" + :text #x2d4 + ) + (new 'static 'hud-scene-info + :name "city-oracle-intro" + :continue "oracle-start" + :info "city-oracle-intro" + :text #x29d + ) + (new 'static 'hud-scene-info + :name "city-oracle-level-0" + :continue "oracle-start" + :info "city-oracle-level-0" + :text #x29e + ) + (new 'static 'hud-scene-info + :name "city-oracle-level-1" + :continue "oracle-start" + :info "city-oracle-level-1" + :text #x29f + ) + (new 'static 'hud-scene-info + :name "city-oracle-level-2" + :continue "oracle-start" + :info "city-oracle-level-2" + :text #x2a0 + ) + (new 'static 'hud-scene-info + :name "city-oracle-level-3" + :continue "oracle-start" + :info "city-oracle-level-3" + :text #x2a1 + ) + (new 'static 'hud-scene-info :name "sewer-1-intro" :continue "hiphog-start" :info "sewer-1-intro" :text #x2c1) + (new 'static 'hud-scene-info :name "sewer-1-res" :continue "hiphog-start" :info "sewer-1-res" :text #x2c2) + (new 'static 'hud-scene-info + :name "city-get-yellow-gun" + :continue "gungame-movie" + :info "city-get-yellow-gun" + :text #x2b2 + ) + (new 'static 'hud-scene-info + :name "vin-rescue-intro" + :continue "hideout-start" + :info "vin-rescue-intro" + :text #x286 + ) + (new 'static 'hud-scene-info :name "vin-rescue" :continue "strip-start" :info "vin-rescue" :text #x287) + (new 'static 'hud-scene-info + :name "city-keira-delivery-intro" + :continue "hiphog-start" + :info "city-keira-delivery-intro" + :text #x2a7 + ) + (new 'static 'hud-scene-info + :name "city-krew-collection-intro" + :continue "hiphog-start" + :info "city-krew-collection-intro" + :text #x2a2 + ) + (new 'static 'hud-scene-info + :name "city-krew-collection-res" + :continue "hiphog-start" + :info "city-krew-collection-res" + :text #x2a3 + ) + (new 'static 'hud-scene-info + :name "city-keira-hover-challenge-intro" + :continue "garage-start-skate" + :info "city-keira-hover-challenge-intro" + :text #x294 + ) + (new 'static 'hud-scene-info + :name "city-put-hoverboard" + :continue "skatea-start" + :info "city-put-hoverboard" + :text #x2b4 + ) + (new 'static 'hud-scene-info + :name "city-keira-hover-challenge-res" + :continue "garage-start-skate" + :info "city-keira-hover-challenge-res" + :text #x295 + ) + (new 'static 'hud-scene-info + :name "atoll-3-intro" + :continue "hideout-start" + :info "atoll-3-intro" + :text #x2cb + ) + (new 'static 'hud-scene-info + :name "atoll-save-ashelin-res-a" + :continue "atoll-movie" + :info "atoll-save-ashelin-res-a" + :text #x2cc + ) + (new 'static 'hud-scene-info + :name "atoll-save-ashelin-res-b" + :continue "atoll-movie" + :info "atoll-save-ashelin-res-b" + :text #x2cd + ) + (new 'static 'hud-scene-info + :name "drill-kill-metal-heads-intro" + :continue "vinroom-start" + :info "drill-kill-metal-heads-intro" + :text #x2d5 + ) + (new 'static 'hud-scene-info + :name "mountain-finditems-intro" + :continue "onintent-start" + :info "mountain-finditems-intro" + :text #x2d9 + ) + (new 'static 'hud-scene-info + :name "mountain-gear-res" + :continue "mountain-start" + :info "mountain-gear-res" + :text #x2da + ) + (new 'static 'hud-scene-info + :name "mountain-shard-res" + :continue "mountain-start" + :info "mountain-shard-res" + :text #x2db + ) + (new 'static 'hud-scene-info + :name "mountain-lens-res" + :continue "mountain-start" + :info "mountain-lens-res" + :text #x2dc + ) + (new 'static 'hud-scene-info + :name "city-switch-on-power-intro" + :continue "vinroom-start" + :info "city-switch-on-power-intro" + :text #x293 + ) + (new 'static 'hud-scene-info + :name "palace-outside-window-res" + :continue "palroof-throne" + :info "palace-outside-window-res" + :text #x2dd + ) + (new 'static 'hud-scene-info + :name "palace-outside-window-res-b" + :continue "palroof-boss" + :info "palace-outside-window-res-b" + :text #x2de + ) + (new 'static 'hud-scene-info + :name "palace-boss-res" + :continue "palroof-boss" + :info "palace-boss-res" + :text #x2df + ) + (new 'static 'hud-scene-info + :name "city-shuttle-underground-intro" + :continue "hideout-start" + :info "city-shuttle-underground-intro" + :text #x2a8 + ) + (new 'static 'hud-scene-info + :name "ruins-sacred-intro" + :continue "hideout-start" + :info "ruins-sacred-intro" + :text #x283 + ) + (new 'static 'hud-scene-info + :name "ruins-sacred-victory" + :continue "ruins-hut" + :info "ruins-sacred-victory" + :text #x284 ) ) ) (define *hud-select-scene-act2* - (the-as menu-option-list - (new 'static 'boxed-array :type hud-scene-info - (new 'static 'hud-scene-info - :name "forest-catch-metal-heads-intro" - :continue "hideout-start" - :info "forest-catch-metal-heads-intro" - :text #x2f1 - ) - (new 'static 'hud-scene-info - :name "city-get-hoverboard" - :continue "ctyfarma-airlock-movie" - :info "city-get-hoverboard" - :text #x2b3 - ) - (new 'static 'hud-scene-info - :name "city-escort-kid-intro" - :continue "escort-kid-intro" - :info "city-escort-kid-intro" - :text #x2a4 - ) - (new 'static 'hud-scene-info - :name "dig-knock-down-scaffolding-intro" - :continue "vinroom-start" - :info "dig-knock-down-scaffolding-intro" - :text #x2f6 - ) - (new 'static 'hud-scene-info - :name "dig-digger-explode" - :continue "dig1-start" - :info "dig-digger-explode" - :text #x2fa - ) - (new 'static 'hud-scene-info - :name "city-intercept-tanker-intro" - :continue "ctymarkb-tanker" - :info "city-intercept-tanker-intro" - :text #x291 - ) - (new 'static 'hud-scene-info - :name "city-intercept-tanker-res" - :continue "ctymarkb-tanker" - :info "city-intercept-tanker-res" - :text #x292 - ) - (new 'static 'hud-scene-info - :name "city-meet-brutter-intro" - :continue "hiphog-start" - :info "city-meet-brutter-intro" - :text #x2a5 - ) - (new 'static 'hud-scene-info - :name "city-meet-brutter-res" - :continue "kiosk-start" - :info "city-meet-brutter-res" - :text #x2a6 - ) - (new 'static 'hud-scene-info :name "sewer-2-intro" :continue "hiphog-start" :info "sewer-2-intro" :text #x2c3) - (new 'static 'hud-scene-info - :name "sewer-drain-res" - :continue "sewer-start" - :info "sewer-drain-res" - :text #x2c4 - ) - (new 'static 'hud-scene-info - :name "ecowells-intro" - :continue "vinroom-start" - :info "ecowells-intro" - :text #x28a - ) - (new 'static 'hud-scene-info - :name "ecowells-victory" - :continue "strip-start" - :info "ecowells-victory" - :text #x28b - ) - (new 'static 'hud-scene-info - :name "drill-destroy-ship-intro" - :continue "vinroom-start" - :info "drill-destroy-ship-intro" - :text #x2d6 - ) - (new 'static 'hud-scene-info - :name "forest-hunt-camo-metal-heads-intro" - :continue "hiphog-start" - :info "forest-hunt-camo-metal-heads-intro" - :text #x2f2 - ) - (new 'static 'hud-scene-info - :name "city-class-3-race-intro" - :continue "garage-class3-movie" - :info "city-class-3-race-intro" - :text #x296 - ) - (new 'static 'hud-scene-info - :name "city-class-3-race-res" - :continue "garage-class3-movie" - :info "city-class-3-race-res" - :text #x297 - ) - (new 'static 'hud-scene-info - :name "city-protect-slums-intro" - :continue "ctyslumc-seal-movie" - :info "city-protect-slums-intro" - :text #x2ba - ) - (new 'static 'hud-scene-info - :name "dig-find-totem-intro" - :continue "onintent-start" - :info "dig-find-totem-intro" - :text #x2f8 - ) - (new 'static 'hud-scene-info - :name "city-air-train-in-caspad" - :continue "ctyport-air-train" - :info "city-air-train-in-caspad" - :text #x2b6 - ) - (new 'static 'hud-scene-info - :name "caspad-air-train-out" - :continue "caspad-warp" - :info "caspad-air-train-out" - :text #x2e5 - ) - (new 'static 'hud-scene-info - :name "dig-find-totem-res" - :continue "dig-totem" - :info "dig-find-totem-res" - :text #x2f9 - ) - (new 'static 'hud-scene-info - :name "caspad-air-train-in" - :continue "caspad-warp" - :info "caspad-air-train-in" - :text #x2e4 - ) - (new 'static 'hud-scene-info - :name "city-air-train-out" - :continue "ctyport-air-train" - :info "city-air-train-out" - :text #x2b8 - ) - (new 'static 'hud-scene-info - :name "city-destroy-guard-vehicles-intro" - :continue "hideout-start" - :info "city-destroy-guard-vehicles-intro" - :text #x28e - ) - (new 'static 'hud-scene-info - :name "city-play-onin-game-intro" - :continue "onintent-start" - :info "city-play-onin-game-intro" - :text #x2a9 - ) - (new 'static 'hud-scene-info - :name "city-play-onin-game-res" - :continue "onintent-start" - :info "city-play-onin-game-res" - :text #x2aa - ) - (new 'static 'hud-scene-info - :name "canyon-insert-items-intro" - :continue "mountain-movie" - :info "canyon-insert-items-intro" - :text #x2fc - ) - (new 'static 'hud-scene-info - :name "canyon-insert-items-res" - :continue "mincan-city" - :info "canyon-insert-items-res" - :text #x2fb - ) - (new 'static 'hud-scene-info - :name "tomb-face-tests-intro" - :continue "tombd-start" - :info "tomb-face-tests-intro" - :text #x2e6 - ) - (new 'static 'hud-scene-info - :name "tomb-boulder-start" - :continue "tomb-boulder" - :info "tomb-boulder-start" - :text #x2ef - ) - (new 'static 'hud-scene-info - :name "tomb-spider-scare" - :continue "tomb-boulder-explode" - :info "tomb-spider-scare" - :text #x2f0 - ) - (new 'static 'hud-scene-info - :name "tomb-unlock-start" - :continue "tomb-water-switch" - :info "tomb-unlock-start" - :text #x2e9 - ) - (new 'static 'hud-scene-info - :name "tomb-unlock-water" - :continue "tomb-water-switch" - :info "tomb-unlock-water" - :text #x2ea - ) - (new 'static 'hud-scene-info - :name "tomb-unlock-poles" - :continue "tomb-poles-switch" - :info "tomb-unlock-poles" - :text #x2eb - ) - (new 'static 'hud-scene-info - :name "tomb-boss-open" - :continue "tombboss-start" - :info "tomb-boss-open" - :text #x2ec - ) - (new 'static 'hud-scene-info - :name "tomb-boss-intro" - :continue "tombboss-start" - :info "tomb-boss-intro" - :text #x2ed - ) - (new 'static 'hud-scene-info - :name "tomb-boss-res" - :continue "tombboss-start" - :info "tomb-boss-res" - :text #x2ee - ) + (new 'static 'boxed-array :type hud-scene-info + (new 'static 'hud-scene-info + :name "forest-catch-metal-heads-intro" + :continue "hideout-start" + :info "forest-catch-metal-heads-intro" + :text #x2f1 + ) + (new 'static 'hud-scene-info + :name "city-get-hoverboard" + :continue "ctyfarma-airlock-movie" + :info "city-get-hoverboard" + :text #x2b3 + ) + (new 'static 'hud-scene-info + :name "city-escort-kid-intro" + :continue "escort-kid-intro" + :info "city-escort-kid-intro" + :text #x2a4 + ) + (new 'static 'hud-scene-info + :name "dig-knock-down-scaffolding-intro" + :continue "vinroom-start" + :info "dig-knock-down-scaffolding-intro" + :text #x2f6 + ) + (new 'static 'hud-scene-info + :name "dig-digger-explode" + :continue "dig1-start" + :info "dig-digger-explode" + :text #x2fa + ) + (new 'static 'hud-scene-info + :name "city-intercept-tanker-intro" + :continue "ctymarkb-tanker" + :info "city-intercept-tanker-intro" + :text #x291 + ) + (new 'static 'hud-scene-info + :name "city-intercept-tanker-res" + :continue "ctymarkb-tanker" + :info "city-intercept-tanker-res" + :text #x292 + ) + (new 'static 'hud-scene-info + :name "city-meet-brutter-intro" + :continue "hiphog-start" + :info "city-meet-brutter-intro" + :text #x2a5 + ) + (new 'static 'hud-scene-info + :name "city-meet-brutter-res" + :continue "kiosk-start" + :info "city-meet-brutter-res" + :text #x2a6 + ) + (new 'static 'hud-scene-info :name "sewer-2-intro" :continue "hiphog-start" :info "sewer-2-intro" :text #x2c3) + (new 'static 'hud-scene-info + :name "sewer-drain-res" + :continue "sewer-start" + :info "sewer-drain-res" + :text #x2c4 + ) + (new 'static 'hud-scene-info + :name "ecowells-intro" + :continue "vinroom-start" + :info "ecowells-intro" + :text #x28a + ) + (new 'static 'hud-scene-info + :name "ecowells-victory" + :continue "strip-start" + :info "ecowells-victory" + :text #x28b + ) + (new 'static 'hud-scene-info + :name "drill-destroy-ship-intro" + :continue "vinroom-start" + :info "drill-destroy-ship-intro" + :text #x2d6 + ) + (new 'static 'hud-scene-info + :name "forest-hunt-camo-metal-heads-intro" + :continue "hiphog-start" + :info "forest-hunt-camo-metal-heads-intro" + :text #x2f2 + ) + (new 'static 'hud-scene-info + :name "city-class-3-race-intro" + :continue "garage-class3-movie" + :info "city-class-3-race-intro" + :text #x296 + ) + (new 'static 'hud-scene-info + :name "city-class-3-race-res" + :continue "garage-class3-movie" + :info "city-class-3-race-res" + :text #x297 + ) + (new 'static 'hud-scene-info + :name "city-protect-slums-intro" + :continue "ctyslumc-seal-movie" + :info "city-protect-slums-intro" + :text #x2ba + ) + (new 'static 'hud-scene-info + :name "dig-find-totem-intro" + :continue "onintent-start" + :info "dig-find-totem-intro" + :text #x2f8 + ) + (new 'static 'hud-scene-info + :name "city-air-train-in-caspad" + :continue "ctyport-air-train" + :info "city-air-train-in-caspad" + :text #x2b6 + ) + (new 'static 'hud-scene-info + :name "caspad-air-train-out" + :continue "caspad-warp" + :info "caspad-air-train-out" + :text #x2e5 + ) + (new 'static 'hud-scene-info + :name "dig-find-totem-res" + :continue "dig-totem" + :info "dig-find-totem-res" + :text #x2f9 + ) + (new 'static 'hud-scene-info + :name "caspad-air-train-in" + :continue "caspad-warp" + :info "caspad-air-train-in" + :text #x2e4 + ) + (new 'static 'hud-scene-info + :name "city-air-train-out" + :continue "ctyport-air-train" + :info "city-air-train-out" + :text #x2b8 + ) + (new 'static 'hud-scene-info + :name "city-destroy-guard-vehicles-intro" + :continue "hideout-start" + :info "city-destroy-guard-vehicles-intro" + :text #x28e + ) + (new 'static 'hud-scene-info + :name "city-play-onin-game-intro" + :continue "onintent-start" + :info "city-play-onin-game-intro" + :text #x2a9 + ) + (new 'static 'hud-scene-info + :name "city-play-onin-game-res" + :continue "onintent-start" + :info "city-play-onin-game-res" + :text #x2aa + ) + (new 'static 'hud-scene-info + :name "canyon-insert-items-intro" + :continue "mountain-movie" + :info "canyon-insert-items-intro" + :text #x2fc + ) + (new 'static 'hud-scene-info + :name "canyon-insert-items-res" + :continue "mincan-city" + :info "canyon-insert-items-res" + :text #x2fb + ) + (new 'static 'hud-scene-info + :name "tomb-face-tests-intro" + :continue "tombd-start" + :info "tomb-face-tests-intro" + :text #x2e6 + ) + (new 'static 'hud-scene-info + :name "tomb-boulder-start" + :continue "tomb-boulder" + :info "tomb-boulder-start" + :text #x2ef + ) + (new 'static 'hud-scene-info + :name "tomb-spider-scare" + :continue "tomb-boulder-explode" + :info "tomb-spider-scare" + :text #x2f0 + ) + (new 'static 'hud-scene-info + :name "tomb-unlock-start" + :continue "tomb-water-switch" + :info "tomb-unlock-start" + :text #x2e9 + ) + (new 'static 'hud-scene-info + :name "tomb-unlock-water" + :continue "tomb-water-switch" + :info "tomb-unlock-water" + :text #x2ea + ) + (new 'static 'hud-scene-info + :name "tomb-unlock-poles" + :continue "tomb-poles-switch" + :info "tomb-unlock-poles" + :text #x2eb + ) + (new 'static 'hud-scene-info + :name "tomb-boss-open" + :continue "tombboss-start" + :info "tomb-boss-open" + :text #x2ec + ) + (new 'static 'hud-scene-info + :name "tomb-boss-intro" + :continue "tombboss-start" + :info "tomb-boss-intro" + :text #x2ed + ) + (new 'static 'hud-scene-info + :name "tomb-boss-res" + :continue "tombboss-start" + :info "tomb-boss-res" + :text #x2ee ) ) ) (define *hud-select-scene-act3* - (the-as menu-option-list - (new 'static 'boxed-array :type hud-scene-info - (new 'static 'hud-scene-info - :name "fortress-save-friends-intro-a" - :continue "hideout-start" - :info "fortress-save-friends-intro-a" - :text #x2bf - ) - (new 'static 'hud-scene-info - :name "fortress-save-friends-res" - :continue "prison-start" - :info "fortress-save-friends-res" - :text #x2c0 - ) - (new 'static 'hud-scene-info - :name "sewer-blow-up-statue-intro" - :continue "hiphog-start" - :info "sewer-blow-up-statue-intro" - :text #x2c5 - ) - (new 'static 'hud-scene-info - :name "sewer-hosehead" - :continue "sewesc-start" - :info "sewer-hosehead" - :text #x2c7 - ) - (new 'static 'hud-scene-info - :name "sewer-blow-up-statue-res" - :continue "sewesc-start" - :info "sewer-blow-up-statue-res" - :text #x2c6 - ) - (new 'static 'hud-scene-info - :name "city-class-2-race-intro" - :continue "garage-class3-movie" - :info "city-class-2-race-intro" - :text #x298 - ) - (new 'static 'hud-scene-info - :name "city-class-2-race-res" - :continue "garage-class3-movie" - :info "city-class-2-race-res" - :text #x299 - ) - (new 'static 'hud-scene-info - :name "city-stop-bomb-bots-intro" - :continue "hideout-start" - :info "city-stop-bomb-bots-intro" - :text #x2ac - ) - (new 'static 'hud-scene-info - :name "city-get-dark-gun" - :continue "gungame-movie" - :info "city-get-dark-gun" - :text #x2b5 - ) - (new 'static 'hud-scene-info - :name "city-errol-challenge-intro" - :continue "hiphog-start" - :info "city-errol-challenge-intro" - :text #x2ad - ) - (new 'static 'hud-scene-info - :name "city-errol-challenge-res" - :continue "garage-start-class3" - :info "city-errol-challenge-res" - :text #x2bb - ) - (new 'static 'hud-scene-info - :name "ruins-get-to-hut-res" - :continue "ruins-hut" - :info "ruins-get-to-hut-res" - :text #x285 - ) - (new 'static 'hud-scene-info - :name "forest-protect-samos-intro-a" - :continue "onintent-start" - :info "forest-protect-samos-intro-a" - :text #x2f3 - ) - (new 'static 'hud-scene-info - :name "forest-protect-samos-intro-b" - :continue "forest-tree" - :info "forest-protect-samos-intro-b" - :text #x2f4 - ) - (new 'static 'hud-scene-info - :name "forest-protect-samos-res" - :continue "forest-tree" - :info "forest-protect-samos-res" - :text #x2f5 - ) - (new 'static 'hud-scene-info :name "crane-intro" :continue "vinroom-start" :info "crane-intro" :text #x288) - (new 'static 'hud-scene-info :name "crane-victory" :continue "strip-start" :info "crane-victory" :text #x289) - (new 'static 'hud-scene-info - :name "drill-destroy-control-tower-intro" - :continue "vinroom-start" - :info "drill-destroy-control-tower-intro" - :text #x2d7 - ) - (new 'static 'hud-scene-info - :name "drill-top-explode" - :continue "drillmid-checkpoint" - :info "drill-top-explode" - :text #x2d8 - ) - (new 'static 'hud-scene-info - :name "city-save-lurkers-intro" - :continue "kiosk-start" - :info "city-save-lurkers-intro" - :text #x2ab - ) - (new 'static 'hud-scene-info - :name "city-class-1-race-intro-a" - :continue "garage-class3-movie" - :info "city-class-1-race-intro-a" - :text #x29a - ) - (new 'static 'hud-scene-info - :name "city-class-1-race-intro-b" - :continue "stadiumd-start" - :info "city-class-1-race-intro-b" - :text #x29b - ) - (new 'static 'hud-scene-info - :name "city-class-1-race-res" - :continue "stadiumd-start" - :info "city-class-1-race-res" - :text #x29c - ) - (new 'static 'hud-scene-info - :name "palace-sneak-in-res" - :continue "palroof-throne" - :info "palace-sneak-in-res" - :text #x2e0 - ) - (new 'static 'hud-scene-info - :name "castle-krew-boss-fight-intro" - :continue "casboss-start" - :info "castle-krew-boss-fight-intro" - :text #x2e2 - ) - (new 'static 'hud-scene-info - :name "castle-krew-boss-fight-res" - :continue "casboss-start" - :info "castle-krew-boss-fight-res" - :text #x2e3 - ) - (new 'static 'hud-scene-info - :name "city-ashelin-drop-off" - :continue "ctyport-air-train-ashelin" - :info "city-ashelin-drop-off" - :text #x2b9 - ) - (new 'static 'hud-scene-info - :name "city-whack-a-metal-intro" - :continue "hiphog-start" - :info "city-whack-a-metal-intro" - :text #x2ae - ) - (new 'static 'hud-scene-info - :name "city-whack-a-metal-res" - :continue "hiphog-start" - :info "city-whack-a-metal-res" - :text #x2af - ) - (new 'static 'hud-scene-info - :name "city-defend-stadium-intro" - :continue "stadium-blimp" - :info "city-defend-stadium-intro" - :text #x2b0 - ) - (new 'static 'hud-scene-info - :name "city-defend-stadium-res" - :continue "stadium-blimp" - :info "city-defend-stadium-res" - :text #x2b1 - ) - (new 'static 'hud-scene-info - :name "under-find-sig-res" - :continue "under-start" - :info "under-find-sig-res" - :text #x2fd - ) - (new 'static 'hud-scene-info - :name "under-centipede-one" - :continue "under-start" - :info "under-centipede-one" - :text #x2fe - ) - (new 'static 'hud-scene-info - :name "under-centipede-two" - :continue "under-start" - :info "under-centipede-two" - :text #x2ff - ) - (new 'static 'hud-scene-info - :name "under-centipede-three" - :continue "under-start" - :info "under-centipede-three" - :text #x300 - ) - (new 'static 'hud-scene-info - :name "under-get-sig-out-res" - :continue "under-start" - :info "under-get-sig-out-res" - :text #x301 - ) - (new 'static 'hud-scene-info - :name "consite-find-baron-res" - :continue "consite-start" - :info "consite-find-baron-res" - :text #x2e1 - ) - (new 'static 'hud-scene-info - :name "nest-break-barrier-res" - :continue "nest-gun" - :info "nest-break-barrier-res" - :text #x302 - ) - (new 'static 'hud-scene-info - :name "nest-air-train-out" - :continue "nest-warp" - :info "nest-air-train-out" - :text #x303 - ) - (new 'static 'hud-scene-info - :name "nest-air-train-in" - :continue "nest-warp" - :info "nest-air-train-in" - :text #x304 - ) - (new 'static 'hud-scene-info - :name "nest-boss-intro" - :continue "nestb-boss" - :info "nest-kor-boss-fight-intro-b" - :text #x306 - ) - (new 'static 'hud-scene-info - :name "nest-boss-mid" - :continue "nestb-boss" - :info "nest-kor-boss-fight-mid" - :text #x305 - ) - (new 'static 'hud-scene-info - :name "outro" - :continue "nestb-outro" - :info '("outro-nest" "outro-palace" "outro-hiphog" "outro-port") - :text #x308 - ) + (new 'static 'boxed-array :type hud-scene-info + (new 'static 'hud-scene-info + :name "fortress-save-friends-intro-a" + :continue "hideout-start" + :info "fortress-save-friends-intro-a" + :text #x2bf + ) + (new 'static 'hud-scene-info + :name "fortress-save-friends-res" + :continue "prison-start" + :info "fortress-save-friends-res" + :text #x2c0 + ) + (new 'static 'hud-scene-info + :name "sewer-blow-up-statue-intro" + :continue "hiphog-start" + :info "sewer-blow-up-statue-intro" + :text #x2c5 + ) + (new 'static 'hud-scene-info + :name "sewer-hosehead" + :continue "sewesc-start" + :info "sewer-hosehead" + :text #x2c7 + ) + (new 'static 'hud-scene-info + :name "sewer-blow-up-statue-res" + :continue "sewesc-start" + :info "sewer-blow-up-statue-res" + :text #x2c6 + ) + (new 'static 'hud-scene-info + :name "city-class-2-race-intro" + :continue "garage-class3-movie" + :info "city-class-2-race-intro" + :text #x298 + ) + (new 'static 'hud-scene-info + :name "city-class-2-race-res" + :continue "garage-class3-movie" + :info "city-class-2-race-res" + :text #x299 + ) + (new 'static 'hud-scene-info + :name "city-stop-bomb-bots-intro" + :continue "hideout-start" + :info "city-stop-bomb-bots-intro" + :text #x2ac + ) + (new 'static 'hud-scene-info + :name "city-get-dark-gun" + :continue "gungame-movie" + :info "city-get-dark-gun" + :text #x2b5 + ) + (new 'static 'hud-scene-info + :name "city-errol-challenge-intro" + :continue "hiphog-start" + :info "city-errol-challenge-intro" + :text #x2ad + ) + (new 'static 'hud-scene-info + :name "city-errol-challenge-res" + :continue "garage-start-class3" + :info "city-errol-challenge-res" + :text #x2bb + ) + (new 'static 'hud-scene-info + :name "ruins-get-to-hut-res" + :continue "ruins-hut" + :info "ruins-get-to-hut-res" + :text #x285 + ) + (new 'static 'hud-scene-info + :name "forest-protect-samos-intro-a" + :continue "onintent-start" + :info "forest-protect-samos-intro-a" + :text #x2f3 + ) + (new 'static 'hud-scene-info + :name "forest-protect-samos-intro-b" + :continue "forest-tree" + :info "forest-protect-samos-intro-b" + :text #x2f4 + ) + (new 'static 'hud-scene-info + :name "forest-protect-samos-res" + :continue "forest-tree" + :info "forest-protect-samos-res" + :text #x2f5 + ) + (new 'static 'hud-scene-info :name "crane-intro" :continue "vinroom-start" :info "crane-intro" :text #x288) + (new 'static 'hud-scene-info :name "crane-victory" :continue "strip-start" :info "crane-victory" :text #x289) + (new 'static 'hud-scene-info + :name "drill-destroy-control-tower-intro" + :continue "vinroom-start" + :info "drill-destroy-control-tower-intro" + :text #x2d7 + ) + (new 'static 'hud-scene-info + :name "drill-top-explode" + :continue "drillmid-checkpoint" + :info "drill-top-explode" + :text #x2d8 + ) + (new 'static 'hud-scene-info + :name "city-save-lurkers-intro" + :continue "kiosk-start" + :info "city-save-lurkers-intro" + :text #x2ab + ) + (new 'static 'hud-scene-info + :name "city-class-1-race-intro-a" + :continue "garage-class3-movie" + :info "city-class-1-race-intro-a" + :text #x29a + ) + (new 'static 'hud-scene-info + :name "city-class-1-race-intro-b" + :continue "stadiumd-start" + :info "city-class-1-race-intro-b" + :text #x29b + ) + (new 'static 'hud-scene-info + :name "city-class-1-race-res" + :continue "stadiumd-start" + :info "city-class-1-race-res" + :text #x29c + ) + (new 'static 'hud-scene-info + :name "palace-sneak-in-res" + :continue "palroof-throne" + :info "palace-sneak-in-res" + :text #x2e0 + ) + (new 'static 'hud-scene-info + :name "castle-krew-boss-fight-intro" + :continue "casboss-start" + :info "castle-krew-boss-fight-intro" + :text #x2e2 + ) + (new 'static 'hud-scene-info + :name "castle-krew-boss-fight-res" + :continue "casboss-start" + :info "castle-krew-boss-fight-res" + :text #x2e3 + ) + (new 'static 'hud-scene-info + :name "city-ashelin-drop-off" + :continue "ctyport-air-train-ashelin" + :info "city-ashelin-drop-off" + :text #x2b9 + ) + (new 'static 'hud-scene-info + :name "city-whack-a-metal-intro" + :continue "hiphog-start" + :info "city-whack-a-metal-intro" + :text #x2ae + ) + (new 'static 'hud-scene-info + :name "city-whack-a-metal-res" + :continue "hiphog-start" + :info "city-whack-a-metal-res" + :text #x2af + ) + (new 'static 'hud-scene-info + :name "city-defend-stadium-intro" + :continue "stadium-blimp" + :info "city-defend-stadium-intro" + :text #x2b0 + ) + (new 'static 'hud-scene-info + :name "city-defend-stadium-res" + :continue "stadium-blimp" + :info "city-defend-stadium-res" + :text #x2b1 + ) + (new 'static 'hud-scene-info + :name "under-find-sig-res" + :continue "under-start" + :info "under-find-sig-res" + :text #x2fd + ) + (new 'static 'hud-scene-info + :name "under-centipede-one" + :continue "under-start" + :info "under-centipede-one" + :text #x2fe + ) + (new 'static 'hud-scene-info + :name "under-centipede-two" + :continue "under-start" + :info "under-centipede-two" + :text #x2ff + ) + (new 'static 'hud-scene-info + :name "under-centipede-three" + :continue "under-start" + :info "under-centipede-three" + :text #x300 + ) + (new 'static 'hud-scene-info + :name "under-get-sig-out-res" + :continue "under-start" + :info "under-get-sig-out-res" + :text #x301 + ) + (new 'static 'hud-scene-info + :name "consite-find-baron-res" + :continue "consite-start" + :info "consite-find-baron-res" + :text #x2e1 + ) + (new 'static 'hud-scene-info + :name "nest-break-barrier-res" + :continue "nest-gun" + :info "nest-break-barrier-res" + :text #x302 + ) + (new 'static 'hud-scene-info + :name "nest-air-train-out" + :continue "nest-warp" + :info "nest-air-train-out" + :text #x303 + ) + (new 'static 'hud-scene-info + :name "nest-air-train-in" + :continue "nest-warp" + :info "nest-air-train-in" + :text #x304 + ) + (new 'static 'hud-scene-info + :name "nest-boss-intro" + :continue "nestb-boss" + :info "nest-kor-boss-fight-intro-b" + :text #x306 + ) + (new 'static 'hud-scene-info + :name "nest-boss-mid" + :continue "nestb-boss" + :info "nest-kor-boss-fight-mid" + :text #x305 + ) + (new 'static 'hud-scene-info + :name "outro" + :continue "nestb-outro" + :info '("outro-nest" "outro-palace" "outro-hiphog" "outro-port") + :text #x308 ) ) ) diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index adb31beca3..e2282ebe24 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -852,7 +852,7 @@ (set! (-> obj current-options) *save-options-title*) ) (('select-save-title-hero) - (logior! (-> *game-info* purchase-secrets) #x8000) + (logior! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) (logior! (-> *game-info* secrets) (game-secrets hero-mode)) (set! (-> obj current-options) *save-options-title*) ) @@ -1334,21 +1334,6 @@ 0 ) -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch -;; WARN: Stack slot offset 148 signed mismatch (defbehavior progress-post progress () (local-vars (sv-144 font-context) (sv-148 int) (sv-152 hud-box) (sv-156 symbol)) (when (-> self current-options) @@ -1503,17 +1488,17 @@ (defstate idle (progress) :virtual #t - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (let ((v1-0 arg2)) + :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + (let ((v1-0 event-type)) (the-as object (when (= v1-0 'notify) (cond - ((= (-> arg3 param 0) 'done) + ((= (-> event param 0) 'done) (let ((t9-0 format) (a0-3 #t) (a1-1 "DONE NOTIFY: ~S ~S~%") - (v1-3 (the-as mc-status-code (-> arg3 param 1))) + (v1-3 (the-as mc-status-code (-> event param 1))) ) (t9-0 a0-3 @@ -1586,7 +1571,7 @@ ((= (-> self state-stack 0) 'title) (let ((gp-1 (-> *setting-control* user-default auto-save))) (sound-volume-off) - (let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000)))) + (let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))))) (set! (-> *setting-control* user-default auto-save) gp-1) v0-0 ) @@ -1608,11 +1593,11 @@ ) ) ) - ((= (-> arg3 param 0) 'error) + ((= (-> event param 0) 'error) (let ((t9-7 format) (a0-18 #t) (a1-5 "ERROR NOTIFY: ~S ~S ~S~%") - (v1-19 (the-as mc-status-code (-> arg3 param 1))) + (v1-19 (the-as mc-status-code (-> event param 1))) ) (t9-7 a0-18 @@ -1680,7 +1665,7 @@ (-> self next) ) ) - (case (-> arg3 param 1) + (case (-> event param 1) ((14) (set-next-state self 'insufficient-space 0) ) @@ -2139,7 +2124,7 @@ ) ) ((= (-> obj name) (game-text-id progress-continue-without-saving)) - (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000)) + (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) ((= (-> obj next-state) 'back) (progress-method-30 arg0) @@ -2157,7 +2142,7 @@ (defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (memcard-unlocked-secrets? #t))) - (set! (-> *game-info* purchase-secrets) (logand -32769 (-> *game-info* purchase-secrets))) + (logclear! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) (logclear! (-> *game-info* secrets) (game-secrets hero-mode)) (when (not (-> *progress-state* secrets-unlocked)) (set! (-> *progress-state* secrets-unlocked) #f) @@ -2169,7 +2154,9 @@ (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (cond - ((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) (logtest? s4-0 512)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) + (logtest? s4-0 (game-secrets scrap-book-1)) + ) (sound-play "generic-beep") (cond ((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 1) @@ -2183,7 +2170,9 @@ ) ) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) (logtest? s4-0 1024)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) + (logtest? s4-0 (game-secrets scrap-book-2)) + ) (sound-play "generic-beep") (cond ((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 2) @@ -2197,7 +2186,9 @@ ) ) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) (logtest? s4-0 2048)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) + (logtest? s4-0 (game-secrets scrap-book-3)) + ) (sound-play "generic-beep") (cond ((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 3) @@ -2211,30 +2202,40 @@ ) ) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) (logtest? s4-0 32)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) + (logtest? s4-0 (game-secrets scene-player-1)) + ) (set! (-> *progress-state* scene-player-act) 1) (sound-play "generic-beep") (progress-method-29 arg0) (set-next-state arg0 'select-scene 0) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) (logtest? s4-0 64)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) + (logtest? s4-0 (game-secrets scene-player-2)) + ) (set! (-> *progress-state* scene-player-act) 2) (sound-play "generic-beep") (progress-method-29 arg0) (set-next-state arg0 'select-scene 0) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) (logtest? s4-0 128)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) + (logtest? s4-0 (game-secrets scene-player-3)) + ) (set! (-> *progress-state* scene-player-act) 3) (sound-play "generic-beep") (progress-method-29 arg0) (set-next-state arg0 'select-scene 0) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) (logtest? s4-0 #x8000)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) + (logtest? s4-0 (game-secrets hero-mode)) + ) (sound-play "generic-beep") (progress-method-29 arg0) (set-next-state arg0 'select-save-title-hero 0) ) - ((and (= (-> obj name) (game-text-id progress-main-secrets-levelselect)) (logtest? s4-0 256)) + ((and (= (-> obj name) (game-text-id progress-main-secrets-levelselect)) + (logtest? s4-0 (game-secrets level-select)) + ) (sound-play "generic-beep") (progress-method-29 arg0) (set-next-state arg0 'select-start 0) @@ -2395,7 +2396,7 @@ ((= (-> arg0 state-stack 0) 'title) (sound-play "generic-beep") (sound-volume-off) - (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000)) + (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) (else (sound-play "generic-beep") @@ -2462,11 +2463,13 @@ (let ((a1-9 'select-save-title-hero)) 'select-save (cond - ((and (= (-> *progress-state* starting-state) 'main) (zero? (logand (-> *game-info* purchase-secrets) #x8000))) + ((and (= (-> *progress-state* starting-state) 'main) + (zero? (logand (-> *game-info* purchase-secrets) (game-secrets hero-mode))) + ) (set! a1-9 'select-save) ) ((and (= (-> *progress-state* starting-state) 'title) - (zero? (logand (-> *game-info* purchase-secrets) #x8000)) + (zero? (logand (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) (set! a1-9 'select-save-title) ) @@ -2489,7 +2492,7 @@ ((= (-> arg0 state-stack 0) 'title) (sound-play "generic-beep") (sound-volume-off) - (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000)) + (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) (else (sound-play "generic-beep") @@ -2856,7 +2859,7 @@ ((= (-> arg0 state-stack 0) 'title) (sound-play "generic-beep") (sound-volume-off) - (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000)) + (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) (else (sound-play "generic-beep") @@ -3035,10 +3038,10 @@ (set! *display-profile* s3-2) ) (set! (-> *game-info* mode) 'play) - (let ((s5-1 (-> s4-0 options (-> obj task-index)))) + (let ((s5-1 (-> s4-0 (-> obj task-index)))) (set! (-> *game-info* demo-state) (the-as uint 100)) (logior! (-> *game-info* secrets) (game-secrets scene-player-1)) - (process-spawn scene-player :init scene-player-init (-> s5-1 unknown) #t (-> s5-1 scale)) + (process-spawn scene-player :init scene-player-init (-> s5-1 info) #t (-> s5-1 continue)) ) (set-master-mode 'game) ) diff --git a/goal_src/jak2/engine/ui/text.gc b/goal_src/jak2/engine/ui/text.gc index d0437fe70a..461ef5ffcf 100644 --- a/goal_src/jak2/engine/ui/text.gc +++ b/goal_src/jak2/engine/ui/text.gc @@ -72,15 +72,15 @@ obj ) -(defun convert-korean-text ((arg0 game-text)) - "Converts the provided [[game-text]] into korean. Returns a [[string]]" +(defun convert-korean-text ((arg0 string)) + "Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]" (local-vars (v1-21 int)) - (let ((gp-0 (&-> arg0 text))) + (let ((gp-0 (-> arg0 data))) *expanded-text-line0* (let ((s4-0 0)) 0 (let ((s1-0 0) - (s5-0 ((method-of-type string length) (the-as string arg0))) + (s5-0 (length arg0)) ) (set! *expand-buf-number* (logxor *expand-buf-number* 1)) (let ((s3-0 (if (zero? *expand-buf-number*) @@ -93,33 +93,26 @@ (clear s3-0) (while (< s4-0 s5-0) (cond - ((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3) + ((= (-> gp-0 s4-0) 3) (+! s4-0 1) - (while (and (< s4-0 s5-0) - (!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3) - (!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4) - ) - (set! (-> s3-0 data s1-0) (-> (the-as (pointer uint8) (&+ gp-0 s4-0)))) + (while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) + (set! (-> s3-0 data s1-0) (-> gp-0 s4-0)) (+! s4-0 1) (+! s1-0 1) ) ) (else (let ((v1-17 (+ s4-0 1))) - (-> (the-as (pointer uint8) (&+ gp-0 v1-17))) + (-> gp-0 v1-17) (set! s4-0 (+ v1-17 1)) ) (set! (-> s3-0 data s1-0) (the-as uint 126)) (let ((v1-19 (+ s1-0 1))) (set! (-> s3-0 data v1-19) (the-as uint 89)) (let ((v1-20 (+ v1-19 1))) - (while (and (< s4-0 s5-0) - (< v1-20 s2-0) - (!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3) - (!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4) - ) + (while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) (cond - ((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 5) + ((= (-> gp-0 s4-0) 5) (set! (-> s3-0 data v1-20) (the-as uint 1)) (+! s4-0 1) (set! v1-21 (+ v1-20 1)) @@ -129,7 +122,7 @@ (set! v1-21 (+ v1-20 1)) ) ) - (set! (-> s3-0 data v1-21) (-> (the-as (pointer uint8) (&+ gp-0 s4-0)))) + (set! (-> s3-0 data v1-21) (-> gp-0 s4-0)) (+! s4-0 1) (let ((v1-22 (+ v1-21 1))) (set! (-> s3-0 data v1-22) (the-as uint 126)) @@ -208,7 +201,7 @@ ) ) ((= (-> obj language-id) 6) - (convert-korean-text (the-as game-text (-> obj data v1-2 text))) + (convert-korean-text (-> obj data v1-2 text)) ) (else (-> obj data v1-2 text) @@ -324,53 +317,41 @@ "Draws some lines" (when *cheat-mode* (let ((s5-0 (new 'static 'vector4w)) - (gp-0 (new 'static 'matrix)) + (gp-0 (new 'static 'vector4w-4)) ) (set-vector! (-> gp-0 vector 0) - (the-as float (the int (+ -256.0 (-> arg0 origin x)))) - (the-as float (the int (+ -208.0 (-> arg0 origin y)))) - 0.0 - (the-as float #x1) + (the int (+ -256.0 (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 origin y))) + 0 + 1 ) (set-vector! (-> gp-0 vector 1) - (the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))) - (the-as float (the int (+ -208.0 (-> arg0 origin y)))) - 0.0 - (the-as float #x1) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 origin y))) + 0 + 1 ) (set-vector! (-> gp-0 vector 2) - (the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))) - (the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))) - 0.0 - (the-as float #x1) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 ) (set-vector! - (-> gp-0 trans) - (the-as float (the int (+ -256.0 (-> arg0 origin x)))) - (the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))) - 0.0 - (the-as float #x1) + (-> gp-0 vector 3) + (the int (+ -256.0 (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 ) (set-vector! s5-0 128 128 128 128) - (add-debug-line2d - #t - (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 vector)) - (-> gp-0 vector 1) - (the-as vector s5-0) - ) - (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) (the-as vector s5-0)) - (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 trans) (the-as vector s5-0)) - (add-debug-line2d - #t - (bucket-id debug-no-zbuf1) - (-> gp-0 trans) - (the-as vector (-> gp-0 vector)) - (the-as vector s5-0) - ) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (the-as vector4w (-> gp-0 vector)) (-> gp-0 vector 1) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 vector 3) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (the-as vector4w (-> gp-0 vector)) s5-0) ) ) 0 diff --git a/goal_src/jak2/engine/util/script.gc b/goal_src/jak2/engine/util/script.gc index 4e243e024a..fbc5f8efbd 100644 --- a/goal_src/jak2/engine/util/script.gc +++ b/goal_src/jak2/engine/util/script.gc @@ -993,7 +993,7 @@ (set! (-> v1-52 name) 'unbox) (set! (-> v1-52 spec) '((return macro (object)) (function macro (symbol)) (value eval (bfloat binteger)))) (set! (-> v1-52 func) (lambda ((arg0 script-context)) (cond - ((zero? (logand (the-as int (-> arg0 param 1)) 7)) + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) (/ (the-as int (-> arg0 param 1)) 8) ) (else @@ -2717,7 +2717,7 @@ "close a task stage." (when (-> arg0 side-effect?) (cond - ((zero? (logand (the-as int (-> arg0 param 1)) 7)) + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) (task-node-close! (the-as game-task-node (command-get-int (-> arg0 param 1) 0))) ) (else @@ -2755,7 +2755,7 @@ "close a task stage." (when (-> arg0 side-effect?) (cond - ((zero? (logand (the-as int (-> arg0 param 1)) 7)) + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) (task-node-open! (the-as game-task-node (command-get-int (-> arg0 param 1) 0))) ) (else @@ -2801,7 +2801,7 @@ (lambda ((arg0 script-context)) "test whether the need resolution stage of a task is closed (actually tests the bit array)" (cond - ((zero? (logand (the-as int (-> arg0 param 1)) 7)) + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) (task-node-closed? (the-as game-task-node (command-get-int (-> arg0 param 1) 0))) ) (else diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc index 6e96222d23..fd10d3d1b7 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc @@ -44,7 +44,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) gp-0 (the-as (pointer dma-tag) a3-3) ) @@ -1764,7 +1764,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -1849,7 +1849,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -1951,7 +1951,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -2039,7 +2039,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -2151,7 +2151,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s1-1 (the-as (pointer dma-tag) a3-5) ) @@ -2403,7 +2403,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s2-4 (the-as (pointer dma-tag) a3-14) ) @@ -2477,7 +2477,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s2-5 (the-as (pointer dma-tag) a3-32) ) @@ -7971,7 +7971,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) s0-2 (the-as (pointer dma-tag) a3-3) ) @@ -8014,7 +8014,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket-313) + (bucket-id particles) gp-1 (the-as (pointer dma-tag) a3-7) )