From fffd7657c6e8df5f7a8c098609e907a65c98a16d Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Sun, 9 Oct 2022 21:43:26 -0400 Subject: [PATCH] d/jak2: address almost all feedback, blocked on `progress-static` issue for now --- decompiler/config/jak2/all-types.gc | 50 +- decompiler/config/jak2/hacks.jsonc | 4 +- decompiler/config/jak2/inputs.jsonc | 8 +- decompiler/config/jak2/label_types.jsonc | 2 +- decompiler/config/jak2/stack_structures.jsonc | 1 - decompiler/config/jak2/type_casts.jsonc | 20 +- decompiler/util/data_decompile.cpp | 7 +- game/overlord/stream.cpp | 2 + goal_src/jak2/engine/camera/cam-master.gc | 255 ++- .../jak2/engine/ui/progress/progress-draw.gc | 935 ++-------- .../jak2/engine/camera/cam-master_REF.gc | 179 +- .../reference/jak2/engine/debug/debug_REF.gc | 2 +- .../jak2/engine/game/game-info-h_REF.gc | 2 +- .../jak2/engine/math/vector-h_REF.gc | 6 +- .../process-drawable/process-focusable_REF.gc | 4 +- .../engine/target/board/board-states_REF.gc | 8 +- .../reference/jak2/engine/ui/hud-h_REF.gc | 4 +- .../engine/ui/progress/progress-draw_REF.gc | 443 ++--- .../jak2/engine/ui/progress/progress-h_REF.gc | 5 +- .../engine/ui/progress/progress-static_REF.gc | 1506 ++++++++--------- .../jak2/engine/ui/progress/progress_REF.gc | 56 +- .../reference/jak2/engine/ui/text_REF.gc | 87 +- 22 files changed, 1390 insertions(+), 2196 deletions(-) diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index e8e767a46d..c31063a793 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -1127,7 +1127,7 @@ (deftype vector4w-4 (structure) ((data int32 16 :offset-assert 0) (quad uint128 4 :offset 0) - (vector vector4w 4 :inline :offset 0) + (vector vector4w 4 :inline :offset 0 :score 999) ) :method-count-assert 9 :size-assert #x40 @@ -5057,7 +5057,7 @@ (deftype texture-page-translate-item (structure) ((bucket bucket-id :offset-assert 0) - (level-index uint32 :offset-assert 4) ;; TODO - this is an enum + (level-index uint32 :offset-assert 4) (level-texture-page tpage-category-u32 :offset-assert 8) (texture-user texture-enable-mask-u32 :offset-assert 12) ) @@ -12594,7 +12594,7 @@ (debug-features game-feature :offset-assert 136) (secrets game-secrets :offset-assert 144) (unknown-pad1 uint32) - (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) @@ -17023,7 +17023,7 @@ (get-trans "@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]" (_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) @@ -20337,7 +20337,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) ) ) @@ -20351,7 +20351,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) @@ -21040,8 +21040,7 @@ ) (deftype menu-memcard-slot-option (menu-option) - ((sprites hud-sprite 5 :inline :offset-assert 48) ;; total guess - (something-hud-related basic :offset 112) + ((sprites hud-sprite 5 :inline :offset-assert 48 :score 999) ;; total guess (pad uint8 32) ) :method-count-assert 12 @@ -23042,7 +23041,7 @@ (define-extern debug-reset-buffers (function symbol)) (define-extern debug-draw-buffers (function symbol)) (define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol 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-box (function symbol bucket-id vector vector rgba symbol)) (define-extern add-debug-box-with-transform (function symbol bucket-id bounding-box matrix rgba symbol)) ;; unsure if arg2 is bounding-box (define-extern add-debug-x (function symbol bucket-id vector rgba symbol)) @@ -25896,8 +25895,8 @@ (define-extern *expanded-text-line1* string) (define-extern *level-text-file-load-flag* symbol) (define-extern convert-korean-text - "Converts the provided [[game-text]] into korean. Returns a [[string]]" - (function game-text string)) + "Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]" + (function string string)) (define-extern text-is-loading symbol) (define-extern load-game-text-info "Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for @@ -29884,7 +29883,7 @@ (define-extern hide-hud-quick (function symbol none)) (define-extern show-hud (function object none)) (define-extern hud-hidden? (function symbol)) -(define-extern set-hud-piece-position! (function basic int int none)) +(define-extern set-hud-piece-position! (function hud-sprite int int none)) ;; (define-extern set-as-offset-from! function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -29958,9 +29957,9 @@ (define-extern *hud-ring-graphic-remap* (array uint64)) ;; these are probably bitfields of some kind (define-extern *hud-ring-kiosk-graphic-remap* (array uint64)) (define-extern *hud-ring-demo-graphic-remap* (array uint64)) -(define-extern *hud-select-scene-act1* menu-option-list) -(define-extern *hud-select-scene-act2* menu-option-list) -(define-extern *hud-select-scene-act3* menu-option-list) +(define-extern *hud-select-scene-act1* (array hud-scene-info)) +(define-extern *hud-select-scene-act2* (array hud-scene-info)) +(define-extern *hud-select-scene-act3* (array hud-scene-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; progress ;; @@ -30085,21 +30084,20 @@ (define-extern draw-scene-up-down (function font-context none)) (define-extern begin-scissor (function hud-box progress none)) (define-extern end-scissor (function hud-box float none)) -(define-extern begin-scissor-secret (function hud-box none)) +(define-extern begin-scissor-secret (function hud-box progress none)) (define-extern end-scissor-secret (function hud-box float none)) (define-extern begin-scissor-missions (function hud-box float none)) -(define-extern end-scissor-missions (function hud-box none)) +(define-extern end-scissor-missions (function hud-box float none)) (define-extern begin-scissor-scene (function hud-box none)) (define-extern end-scissor-scene (function hud-box float none)) (define-extern begin-scissor-level (function hud-box none)) -(define-extern end-scissor-level (function hud-box none)) +(define-extern end-scissor-level (function hud-box float none)) (define-extern print-language-name (function game-text-id font-context int symbol none)) -(define-extern unlocked-secret-menu? (function int symbol)) -(define-extern memcard-unlocked-secrets? "TODO - returns a bitfield" (function symbol int)) +(define-extern unlocked-secret-menu? (function game-secrets symbol)) +(define-extern memcard-unlocked-secrets? (function symbol game-secrets)) (define-extern num-unlocked-secret? - "TODO - bitfield - @returns The number of secrets currently unlocked" - (function int int)) + "@returns The number of secrets currently unlocked" + (function game-secrets int)) (define-extern print-menu-text (function string float font-context progress none)) (define-extern draw-yes-no (function progress font-context pointer)) (define-extern draw-continue-retry (function progress font-context pointer)) @@ -30131,7 +30129,7 @@ (define-extern get-next-highscore (function int int)) (define-extern get-prev-highscore (function int int)) (define-extern get-highscore-icon-scale "TODO - takes an enum?" (function int float)) -(define-extern get-highscore-icon-xoffset (function int)) +(define-extern get-highscore-icon-xoffset (function int int)) (define-extern get-highscore-icon-yoffset "TODO - takes an enum?" (function int int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -32917,7 +32915,7 @@ ;; elevator ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +++elevator-flags +;; +++elevator:elevator-flags (defenum elevator-flags :type uint64 :bitfield #t @@ -32930,7 +32928,7 @@ (elevator-flags-6) (elevator-flags-7) ) -;; ---elevator-flags +;; ---elevator:elevator-flags (deftype elevator-params (structure) ((xz-threshold float :offset-assert 0) diff --git a/decompiler/config/jak2/hacks.jsonc b/decompiler/config/jak2/hacks.jsonc index 36d1c3c9ab..9b05202c82 100644 --- a/decompiler/config/jak2/hacks.jsonc +++ b/decompiler/config/jak2/hacks.jsonc @@ -344,7 +344,9 @@ ], "(method 27 conveyor)": [5, 14, 22], "(method 44 nav-graph)": [1, 3, 6, 13, 17], - "(method 11 sparticle-launch-control)": [18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95] + "(method 11 sparticle-launch-control)": [ + 18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95 + ] }, // Sometimes the game might use format strings that are fetched dynamically, diff --git a/decompiler/config/jak2/inputs.jsonc b/decompiler/config/jak2/inputs.jsonc index d23d3bae87..c53a7a1351 100644 --- a/decompiler/config/jak2/inputs.jsonc +++ b/decompiler/config/jak2/inputs.jsonc @@ -184,5 +184,11 @@ "streamed_audio_file_names": [], - "levels_to_extract": ["PRI.DGO", "CTA.DGO", "CWI.DGO", "LWIDEA.DGO", "VI1.DGO"] + "levels_to_extract": [ + "PRI.DGO", + "CTA.DGO", + "CWI.DGO", + "LWIDEA.DGO", + "VI1.DGO" + ] } diff --git a/decompiler/config/jak2/label_types.jsonc b/decompiler/config/jak2/label_types.jsonc index ea7bc69fb9..dcccc3528d 100644 --- a/decompiler/config/jak2/label_types.jsonc +++ b/decompiler/config/jak2/label_types.jsonc @@ -103,7 +103,7 @@ ], "text": [ ["L96", "vector4"], - ["L95", "matrix"], + ["L95", "vector4w-4"], ["L96", "vector4w"] ], "joint-mod": [["L189", "(inline-array quaternion)", 3]], diff --git a/decompiler/config/jak2/stack_structures.jsonc b/decompiler/config/jak2/stack_structures.jsonc index bcb284b2e0..b4dcc24ab1 100644 --- a/decompiler/config/jak2/stack_structures.jsonc +++ b/decompiler/config/jak2/stack_structures.jsonc @@ -928,7 +928,6 @@ [16, "vector"], [32, "vector"] ], - "target-board-pre-move": [[112, "vector"]], "progress-post": [[112, "hud-box"]], "(method 10 menu-missions-option)": [[224, "hud-box"]], "(method 10 menu-secret-option)": [[64, "hud-box"]], diff --git a/decompiler/config/jak2/type_casts.jsonc b/decompiler/config/jak2/type_casts.jsonc index 79bb7faddc..4bdb463712 100644 --- a/decompiler/config/jak2/type_casts.jsonc +++ b/decompiler/config/jak2/type_casts.jsonc @@ -965,7 +965,10 @@ [5, "s5", "glst-named-node"], [6, "v1", "glst-named-node"] ], - "(event time-of-day-tick)": [[10, "v1", "float"], [148, "v1", "float"]], + "(event time-of-day-tick)": [ + [10, "v1", "float"], + [148, "v1", "float"] + ], "cam-slave-get-vector-with-offset": [[[52, 61], "s3", "vector"]], "cam-slave-get-interp-time": [[43, "f0", "float"]], "cam-standard-event-handler": [ @@ -994,7 +997,7 @@ [606, "v1", "float"] ], "master-track-target": [[[53, 526], "gp", "target"]], - "reset-target-tracking": [[[14, 152], "gp", "process-focusable"]], + "reset-target-tracking": [[[14, 138], "gp", "process-focusable"]], "reset-follow": [[[12, 18], "a0", "process-focusable"]], "(code cam-pov)": [ [15, "a1", "pov-camera"], @@ -2766,12 +2769,8 @@ [[171, 193], "s2", "(pointer uint8)"], [227, "v1", "(pointer uint8)"] ], - "set-fog-height!": [ - [2, "v1", "(array texture-anim)"] - ], - "unpack-comp-huf": [ - [[21,23], "t3", "(pointer uint16)"] - ], + "set-fog-height!": [[2, "v1", "(array texture-anim)"]], + "unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]], "(method 10 elec-gate)": [[13, "t9", "(function process-drawable none)"]], "(method 11 elec-gate)": [ [180, "a0", "vector"], @@ -3045,5 +3044,8 @@ "(method 10 progress)": [[45, "t9", "(function progress none)"]], "load-game-text-info": [[4, "v1", "game-text-info"]], "(method 16 camera-master)": [[[11, 15], "a2", "target"]], - "master-choose-entity": [[[87, 247], "s3", "(pointer camera-slave)"]] + "master-choose-entity": [ + ["_stack_", 96, "res-tag"], + [[87, 247], "s3", "(pointer camera-slave)"] + ] } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index db4e05dfb8..331989c308 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -978,7 +978,12 @@ goos::Object decompile_structure(const TypeSpec& type, } if (all_zero) { - // field has nothing in it, just skip it. + // special case for dynamic arrays at the end of a type + // TODO - this causes an assert in Type.hL240 + // if (!(field_start == field_end && field.is_dynamic())) { + // // field has nothing in it, just skip it. + // continue; + //} continue; } diff --git a/game/overlord/stream.cpp b/game/overlord/stream.cpp index af8f96133f..be000e95c2 100644 --- a/game/overlord/stream.cpp +++ b/game/overlord/stream.cpp @@ -71,6 +71,8 @@ u32 STRThread() { } else if (g_game_version == GameVersion::Jak2) { sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR_jak2, &sSTRBufJak2, nullptr, nullptr, &dq); + } else { + ASSERT_MSG(false, "unsupported game version in STRThread initialization!"); } CpuEnableIntr(); diff --git a/goal_src/jak2/engine/camera/cam-master.gc b/goal_src/jak2/engine/camera/cam-master.gc index 2dadf0ae66..6df57da2e0 100644 --- a/goal_src/jak2/engine/camera/cam-master.gc +++ b/goal_src/jak2/engine/camera/cam-master.gc @@ -5,6 +5,8 @@ ;; name in dgo: cam-master ;; dgos: ENGINE, GAME +;; TODO - waiting for particle code for cam-master-effect and such, two instances of commented out code here + ;;og:ignore-form:camera-master-method-16 ;; DECOMP BEGINS @@ -34,22 +36,8 @@ (set! (-> self tpos-old-adj quad) (-> self tpos-old quad)) (set! (-> self tpos-curr-adj quad) (-> self tpos-old quad)) (set! (-> self tpos-tgt quad) (-> self tpos-old quad)) - (let* ((s5-1 quaternion->matrix) - (s4-0 (-> self tgt-rot-mat)) - (a0-12 (the-as process-focusable gp-0)) - (t9-1 (method-of-object a0-12 get-quat)) - ) - 2 - (s5-1 s4-0 (t9-1 a0-12)) - ) - (let* ((s5-2 quaternion->matrix) - (s4-1 (-> self tgt-face-mat)) - (a0-14 (the-as process-focusable gp-0)) - (t9-3 (method-of-object a0-14 get-quat)) - ) - 1 - (s5-2 s4-1 (t9-3 a0-14)) - ) + (quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2)) + (quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1)) (vector-reset! (-> self pitch-off)) (set! (-> self upspeed) 0.0) (set! (-> self on-ground) @@ -85,14 +73,9 @@ 0 ) ) - (let ((gp-1 (the-as process-focusable (new 'stack-no-clear 'vector)))) - (vector--float*! - (the-as vector gp-1) - (-> self tpos-curr-adj) - (-> self local-down) - (-> self settings target-height) - ) - (tracking-spline-method-10 (-> self target-spline) (the-as vector gp-1)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self settings target-height)) + (tracking-spline-method-10 (-> self target-spline) gp-1) ) ) ) @@ -149,22 +132,8 @@ ) (set! (-> self tpos-old quad) (-> self tpos-curr quad)) (set! (-> self tpos-old-adj quad) (-> self tpos-curr-adj quad)) - (let* ((s5-1 quaternion->matrix) - (s4-0 (-> self tgt-rot-mat)) - (a0-12 (the-as target gp-0)) - (t9-4 (method-of-object a0-12 get-quat)) - ) - 2 - (s5-1 s4-0 (t9-4 a0-12)) - ) - (let* ((s5-2 quaternion->matrix) - (s4-1 (-> self tgt-face-mat)) - (a0-14 (the-as target gp-0)) - (t9-6 (method-of-object a0-14 get-quat)) - ) - 1 - (s5-2 s4-1 (t9-6 a0-14)) - ) + (quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as target gp-0) 2)) + (quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as target gp-0) 1)) (cond ((< (-> self ease-t) 1.0) (new 'stack-no-clear 'vector) @@ -304,7 +273,7 @@ ) ) ) - (if (zero? (logand (-> self settings slave-options) (cam-slave-options JUMP_PITCHES))) + (if (not (logtest? (-> self settings slave-options) (cam-slave-options JUMP_PITCHES))) (reset-follow) ) (when (and (logtest? (-> (the-as target gp-0) focus-status) (focus-status on-water under-water)) @@ -367,10 +336,8 @@ (defbehavior master-choose-entity camera-master ((arg0 cam-setting-data)) (local-vars - (r0-0 uint128) (v1-22 symbol) - (v1-52 uint128) - (sv-96 int) + (sv-96 res-tag) (sv-112 process) (sv-128 (pointer process)) (sv-144 int) @@ -394,8 +361,8 @@ (format 0 "ERROR : camera entity '~S' didn't produce a state~%" (res-lump-struct s5-0 'name structure)) ) ) - (set! sv-96 0) - (let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (the-as (pointer res-tag) (& sv-96))))) + (set! sv-96 (new 'static 'res-tag)) + (let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (& sv-96)))) (when s4-1 (let* ((s1-1 (get-process *camera-dead-pool* camera-slave #x4000)) (s3-1 (when s1-1 @@ -416,86 +383,78 @@ (setup-slave-for-hopefull (the-as camera-slave (ppointer->process s3-1))) (format 0 "ERROR : primary region activate failed~%") ) - (let ((s2-1 0)) - (while (begin - (let ((v1-51 (the-as uint128 sv-96))) - (.pcpyud v1-52 v1-51 r0-0) - ) - (< s2-1 (shr (* (the-as int v1-52) 2) 49)) - ) - (let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))))) - (cond - (s0-0 - (let ((s1-2 (cam-state-from-entity s0-0))) - (cond - (s1-2 - (set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000)) - (set! v1-22 (when sv-112 - (set! sv-128 (the-as (pointer process) v1-22)) - (let ((t9-14 (method-of-type camera-slave activate))) - (t9-14 - (the-as camera-slave sv-112) - *camera* - (symbol->string (-> camera-slave symbol)) - (the-as pointer #x70004000) - ) + (dotimes (s2-1 (the-as int (-> sv-96 elt-count))) + (let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))))) + (cond + (s0-0 + (let ((s1-2 (cam-state-from-entity s0-0))) + (cond + (s1-2 + (set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000)) + (set! v1-22 (when sv-112 + (set! sv-128 (the-as (pointer process) v1-22)) + (let ((t9-14 (method-of-type camera-slave activate))) + (t9-14 + (the-as camera-slave sv-112) + *camera* + (symbol->string (-> camera-slave symbol)) + (the-as pointer #x70004000) ) - (run-now-in-process sv-112 cam-slave-init s1-2 s0-0) - (set! sv-128 (-> sv-112 ppointer)) - v1-22 ) - ) - (cond - (sv-128 - (setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128))) - (cond - ((master-is-hopeful-better? - (the-as camera-slave (ppointer->process s3-1)) - (the-as camera-slave (ppointer->process sv-128)) - ) - (if s3-1 - (deactivate (-> s3-1 0)) - ) - (set! s3-1 (the-as (pointer camera-slave) sv-128)) - (set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))) - (set! (-> arg0 cam-mode) (the-as symbol s1-2)) - ) - (else - (deactivate (-> sv-128 0)) - ) - ) + (run-now-in-process sv-112 cam-slave-init s1-2 s0-0) + (set! sv-128 (-> sv-112 ppointer)) + v1-22 + ) ) - (else - (format 0 "ERROR : alternate region activate failed~%") + (cond + (sv-128 + (setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128))) + (cond + ((master-is-hopeful-better? + (the-as camera-slave (ppointer->process s3-1)) + (the-as camera-slave (ppointer->process sv-128)) + ) + (if s3-1 + (deactivate (-> s3-1 0)) + ) + (set! s3-1 (the-as (pointer camera-slave) sv-128)) + (set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))) + (set! (-> arg0 cam-mode) (the-as symbol s1-2)) + ) + (else + (deactivate (-> sv-128 0)) + ) ) ) - ) - (else - (let ((s1-5 format)) - (set! sv-144 0) - (set! sv-160 "ERROR : alternate camera region '~S' didn't produce a state~%") - (let ((a2-14 (res-lump-struct s0-0 'name structure))) - (s1-5 sv-144 sv-160 a2-14) - ) + (else + (format 0 "ERROR : alternate region activate failed~%") ) ) ) - ) - ) - (else - (let ((s1-7 format) - (s0-1 0) + (else + (let ((s1-5 format)) + (set! sv-144 0) + (set! sv-160 "ERROR : alternate camera region '~S' didn't produce a state~%") + (let ((a2-14 (res-lump-struct s0-0 'name structure))) + (s1-5 sv-144 sv-160 a2-14) + ) ) - (set! sv-176 "ERROR : alternate '~S' not found for '~S'~%") - (set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))) - (let ((a3-8 (res-lump-struct s5-0 'name structure))) - (s1-7 s0-1 sv-176 sv-192 a3-8) ) ) ) ) + (else + (let ((s1-7 format) + (s0-1 0) + ) + (set! sv-176 "ERROR : alternate '~S' not found for '~S'~%") + (set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))) + (let ((a3-8 (res-lump-struct s5-0 'name structure))) + (s1-7 s0-1 sv-176 sv-192 a3-8) + ) + ) + ) ) - (+! s2-1 1) ) ) (if s3-1 @@ -625,11 +584,11 @@ ) (defstate cam-master-active (camera-master) - :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)) (local-vars (v0-0 none) (v1-125 uint)) (rlet ((vf0 :class vf)) (init-vf0-vector) - (let ((v1-0 arg2)) + (let ((v1-0 event-type)) (the-as object (cond @@ -666,14 +625,14 @@ (format 0 "ERROR : *camera* clear-entity event not supported anymore~%") ) ((= v1-0 'no-intro) - (format 0 "ERROR : *camera* no-intro event not supported anymore '~S'~%" (-> arg3 param 0)) + (format 0 "ERROR : *camera* no-intro event not supported anymore '~S'~%" (-> event param 0)) ) ((= v1-0 'force-blend) - (format 0 "ERROR : *camera* force-blend event not supported anymore '~S'~%" (-> arg3 param 0)) + (format 0 "ERROR : *camera* force-blend event not supported anymore '~S'~%" (-> event param 0)) ) ((= v1-0 'teleport-to-transformq) (when (> arg1 0) - (let ((gp-1 (the-as object (-> arg3 param 0)))) + (let ((gp-1 (the-as object (-> event param 0)))) (when (-> self slave) (deactivate (-> self slave 0)) (set! (-> self slave) (the-as (pointer camera-slave) #f)) @@ -702,7 +661,7 @@ ) ((= v1-0 'teleport-to-vector-start-string) (when (> arg1 0) - (let ((s5-0 (the-as object (-> arg3 param 0))) + (let ((s5-0 (the-as object (-> event param 0))) (gp-3 (new 'stack-no-clear 'vector)) ) (when (-> self slave) @@ -719,7 +678,7 @@ ) ) ((= v1-0 'change-target) - (let ((a1-15 (-> arg3 param 0))) + (let ((a1-15 (-> event param 0))) (cond ((not a1-15) (clear-focused (-> self focus)) @@ -739,20 +698,20 @@ (or (not (-> self slave)) (>= (-> self slave 0 intro-t) 1.0)) ) ((= v1-0 'query-state) - (and (-> self slave) (= (-> self slave 0 next-state) (-> arg3 param 0))) + (and (-> self slave) (= (-> self slave 0 next-state) (-> event param 0))) ) ((= v1-0 'change-to-entity-by-name) (format 0 "ERROR : *camera* change-to-entity-by-name event not supported anymore '~S'~%" - (-> arg3 param 0) + (-> event param 0) ) ) ((= v1-0 'change-state) - (format 0 "ERROR : *camera* change-state event not supported anymore ~A~%" (-> arg3 param 0)) + (format 0 "ERROR : *camera* change-state event not supported anymore ~A~%" (-> event param 0)) ) ((= v1-0 'set-slave) - (let ((s5-1 (process->ppointer (the-as process (-> arg3 param 0)))) + (let ((s5-1 (process->ppointer (the-as process (-> event param 0)))) (s4-0 (-> self settings interp-time)) (gp-4 (-> self slave)) ) @@ -861,16 +820,16 @@ (set! (-> self master-options) (logand -9 (-> self master-options))) ) ((< arg1 2) - (if (< (the-as float (-> arg3 param 0)) (-> self ease-t)) - (set! (-> self ease-t) (the-as float (-> arg3 param 0))) + (if (< (the-as float (-> event param 0)) (-> self ease-t)) + (set! (-> self ease-t) (the-as float (-> event param 0))) ) (set! (-> self master-options) (logand -9 (-> self master-options))) ) (else - (if (< (the-as float (-> arg3 param 0)) (-> self ease-t)) - (set! (-> self ease-t) (the-as float (-> arg3 param 0))) + (if (< (the-as float (-> event param 0)) (-> self ease-t)) + (set! (-> self ease-t) (the-as float (-> event param 0))) ) - (set! (-> self ease-to quad) (-> (the-as vector (-> arg3 param 1)) quad)) + (set! (-> self ease-to quad) (-> (the-as vector (-> event param 1)) quad)) (logior! (-> self master-options) 8) ) ) @@ -888,34 +847,34 @@ ((= v1-0 'teleport) (reset-target-tracking) (if (-> self slave) - (send-event (ppointer->process (-> self slave)) arg2) + (send-event (ppointer->process (-> self slave)) event-type) ) - (send-event *camera-combiner* arg2) + (send-event *camera-combiner* event-type) ) ((= v1-0 'toggle-slave-option) - (logxor! (-> self slave-options) (-> arg3 param 0)) + (logxor! (-> self slave-options) (-> event param 0)) (if (-> self slave) - (logxor! (-> self slave 0 options) (-> arg3 param 0)) + (logxor! (-> self slave 0 options) (-> event param 0)) ) (when (-> self decel) - (set! v0-0 (the-as none (logxor (-> self decel 0 options) (-> arg3 param 0)))) + (set! v0-0 (the-as none (logxor (-> self decel 0 options) (-> event param 0)))) (set! (-> self decel 0 options) (the-as uint v0-0)) v0-0 ) ) ((= v1-0 'slave-option?) - (and (-> self slave) (logtest? (-> self slave 0 options) (-> arg3 param 0))) + (and (-> self slave) (logtest? (-> self slave 0 options) (-> event param 0))) ) ((= v1-0 'set-slave-option) (when (-> self slave) - (set! v0-0 (the-as none (logior (-> self slave 0 options) (-> arg3 param 0)))) + (set! v0-0 (the-as none (logior (-> self slave 0 options) (-> event param 0)))) (set! (-> self slave 0 options) (the-as uint v0-0)) v0-0 ) ) ((= v1-0 'clear-slave-option) (when (-> self slave) - (set! v0-0 (the-as none (logclear (-> self slave 0 options) (-> arg3 param 0)))) + (set! v0-0 (the-as none (logclear (-> self slave 0 options) (-> event param 0)))) (set! (-> self slave 0 options) (the-as uint v0-0)) v0-0 ) @@ -942,7 +901,7 @@ (a0-101 0) (a1-35 "ERROR : *camera* blend-from-as-fixed event not supported anymore~%") ) - (-> arg3 param 0) + (-> event param 0) (t9-42 a0-101 a1-35) ) ) @@ -951,26 +910,26 @@ (a0-102 0) (a1-36 "ERROR : *camera* point-of-interest event not supported anymore~%") ) - (-> arg3 param 0) + (-> event param 0) (t9-43 a0-102 a1-36) ) ) ((= v1-0 'part-water-drip) (set! (-> self water-drip-time) (-> self clock frame-counter)) - (set! (-> self water-drip-mult) (the-as float (-> arg3 param 0))) - (set! (-> self water-drip-speed) (the-as float (-> arg3 param 1))) + (set! (-> self water-drip-mult) (the-as float (-> event param 0))) + (set! (-> self water-drip-speed) (the-as float (-> event param 1))) ) (else (and (-> self slave) (let ((v1-237 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-237 from) (process->ppointer arg0)) + (set! (-> v1-237 from) (process->ppointer proc)) (set! (-> v1-237 num-params) arg1) - (set! (-> v1-237 message) arg2) - (set! (-> v1-237 param 0) (-> arg3 param 0)) - (set! (-> v1-237 param 1) (-> arg3 param 1)) - (set! (-> v1-237 param 2) (-> arg3 param 2)) - (set! (-> v1-237 param 3) (-> arg3 param 3)) - (set! (-> v1-237 param 4) (-> arg3 param 4)) - (set! (-> v1-237 param 5) (-> arg3 param 5)) + (set! (-> v1-237 message) event-type) + (set! (-> v1-237 param 0) (-> event param 0)) + (set! (-> v1-237 param 1) (-> event param 1)) + (set! (-> v1-237 param 2) (-> event param 2)) + (set! (-> v1-237 param 3) (-> event param 3)) + (set! (-> v1-237 param 4) (-> event param 4)) + (set! (-> v1-237 param 5) (-> event param 5)) (send-event-function (ppointer->process (-> self slave)) v1-237) ) ) diff --git a/goal_src/jak2/engine/ui/progress/progress-draw.gc b/goal_src/jak2/engine/ui/progress/progress-draw.gc index f94484d1f0..f011646f96 100644 --- a/goal_src/jak2/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak2/engine/ui/progress/progress-draw.gc @@ -336,7 +336,7 @@ (none) ) -(defun begin-scissor-secret ((arg0 hud-box)) +(defun begin-scissor-secret ((arg0 hud-box) (arg1 progress)) (cond ((= (get-aspect-ratio) 'aspect16x9) (set! (-> arg0 min x) 79.0) @@ -436,7 +436,7 @@ (none) ) -(defun end-scissor-missions ((arg0 hud-box)) +(defun end-scissor-missions ((arg0 hud-box) (arg1 float)) (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) @@ -560,7 +560,7 @@ (none) ) -(defun end-scissor-level ((arg0 hud-box)) +(defun end-scissor-level ((arg0 hud-box) (arg1 float)) (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) @@ -603,31 +603,31 @@ (none) ) -(defun unlocked-secret-menu? ((arg0 int)) - (or (logtest? arg0 32) - (logtest? arg0 64) - (logtest? arg0 128) - (logtest? arg0 256) - (logtest? arg0 512) - (logtest? arg0 1024) - (logtest? arg0 2048) - (logtest? arg0 #x8000) +(defun unlocked-secret-menu? ((arg0 game-secrets)) + (or (logtest? arg0 (game-secrets scene-player-1)) + (logtest? arg0 (game-secrets scene-player-2)) + (logtest? arg0 (game-secrets scene-player-3)) + (logtest? arg0 (game-secrets level-select)) + (logtest? arg0 (game-secrets scrap-book-1)) + (logtest? arg0 (game-secrets scrap-book-2)) + (logtest? arg0 (game-secrets scrap-book-3)) + (logtest? arg0 (game-secrets hero-mode)) ) ) +;; WARN: Return type mismatch int vs game-secrets. (defun memcard-unlocked-secrets? ((arg0 symbol)) - "TODO - returns a bitfield" (let ((v1-0 *progress-save-info*) (s5-0 0) ) (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 s5-0 (-> v1-0 file a1-5 secrets))) + (set! s5-0 (logior (the-as game-secrets s5-0) (-> v1-0 file a1-5 secrets))) ) ) ) - (if (unlocked-secret-menu? s5-0) + (if (unlocked-secret-menu? (the-as game-secrets s5-0)) (set! (-> *progress-state* secrets-unlocked) #t) (set! (-> *progress-state* secrets-unlocked) #f) ) @@ -635,44 +635,44 @@ (set! (-> *progress-state* secrets-unlocked) #t) (set! s5-0 (logior s5-0 #x8fe0)) ) - (cond - (arg0 - (empty) - s5-0 - ) - (else - (the-as int (unlocked-secret-menu? s5-0)) - ) - ) + (the-as game-secrets (cond + (arg0 + (empty) + s5-0 + ) + (else + (the-as int (unlocked-secret-menu? (the-as game-secrets s5-0))) + ) + ) + ) ) ) -(defun num-unlocked-secret? ((arg0 int)) - "TODO - bitfield - @returns The number of secrets currently unlocked" +(defun num-unlocked-secret? ((arg0 game-secrets)) + "@returns The number of secrets currently unlocked" (let ((v0-0 0)) - (if (logtest? arg0 32) + (if (logtest? arg0 (game-secrets scene-player-1)) (+! v0-0 1) ) - (if (logtest? arg0 64) + (if (logtest? arg0 (game-secrets scene-player-2)) (+! v0-0 1) ) - (if (logtest? arg0 128) + (if (logtest? arg0 (game-secrets scene-player-3)) (+! v0-0 1) ) - (if (logtest? arg0 256) + (if (logtest? arg0 (game-secrets level-select)) (+! v0-0 1) ) - (if (logtest? arg0 512) + (if (logtest? arg0 (game-secrets scrap-book-1)) (+! v0-0 1) ) - (if (logtest? arg0 1024) + (if (logtest? arg0 (game-secrets scrap-book-2)) (+! v0-0 1) ) - (if (logtest? arg0 2048) + (if (logtest? arg0 (game-secrets scrap-book-3)) (+! v0-0 1) ) - (if (logtest? arg0 #x8000) + (if (logtest? arg0 (game-secrets hero-mode)) (+! v0-0 1) ) v0-0 @@ -994,7 +994,7 @@ (cond ((= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) (cond - ((logtest? s5-0 512) + ((logtest? s5-0 (game-secrets scrap-book-1)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook) #f) arg1 @@ -1013,7 +1013,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) (cond - ((logtest? s5-0 1024) + ((logtest? s5-0 (game-secrets scrap-book-2)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-mega-scrapbook) #f) arg1 @@ -1032,7 +1032,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) (cond - ((logtest? s5-0 2048) + ((logtest? s5-0 (game-secrets scrap-book-3)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook-3) #f) arg1 @@ -1051,7 +1051,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) (cond - ((logtest? s5-0 32) + ((logtest? s5-0 (game-secrets scene-player-1)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-1) #f) arg1 @@ -1070,7 +1070,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) (cond - ((logtest? s5-0 64) + ((logtest? s5-0 (game-secrets scene-player-2)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-2) #f) arg1 @@ -1089,7 +1089,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) (cond - ((logtest? s5-0 128) + ((logtest? s5-0 (game-secrets scene-player-3)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-3) #f) arg1 @@ -1108,7 +1108,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) (cond - ((logtest? s5-0 #x8000) + ((logtest? s5-0 (game-secrets hero-mode)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-hero-mode) #f) arg1 @@ -1127,7 +1127,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-levelselect)) (cond - ((logtest? s5-0 256) + ((logtest? s5-0 (game-secrets level-select)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-levelselect) #f) arg1 @@ -1321,8 +1321,7 @@ (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) - (-> arg0 box) - ((method-of-type hud-box hud-box-method-9)) + ((method-of-type hud-box hud-box-method-9) (the-as hud-box (-> arg0 box)) s5-0) (let ((a3-1 (-> s5-0 base))) (let ((v1-7 (the-as object (-> s5-0 base)))) (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2101,96 +2100,6 @@ ) ) -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 24 signed mismatch -;; WARN: Stack slot offset 28 signed mismatch -;; WARN: Stack slot offset 32 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch (defmethod menu-option-method-10 menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (local-vars (v0-74 pointer) @@ -2478,51 +2387,35 @@ (set! (-> obj sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 (the-as int s2-8)))) (set! (-> obj sprites 1 scale-x) 1.0) (set! (-> obj sprites 1 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (&-> obj something-hud-related)) sv-40 sv-48) + (set-hud-piece-position! (-> obj sprites 1) sv-40 sv-48) (set-vector! (-> obj sprites 2 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 2 pos z) #xffffff) (set! (-> obj sprites 2 pos w) 1) (set! (-> obj sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 (the-as int s2-8)))) (set! (-> obj sprites 2 scale-x) 1.0) (set! (-> obj sprites 2 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (+ sv-40 sv-56) sv-48) + (set-hud-piece-position! (-> obj sprites 2) (+ sv-40 sv-56) sv-48) (set-vector! (-> obj sprites 3 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 1) (set! (-> obj sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 (the-as int s2-8)))) (set! (-> obj sprites 3 scale-x) 1.0) (set! (-> obj sprites 3 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) sv-40 (+ sv-48 64)) + (set-hud-piece-position! (-> obj sprites 3) sv-40 (+ sv-48 64)) (set-vector! (-> obj sprites 4 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 4 pos z) #xffffff) (set! (-> obj sprites 4 pos w) 1) (set! (-> obj sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 (the-as int s2-8)))) (set! (-> obj sprites 4 scale-x) 1.0) (set! (-> obj sprites 4 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 4)) (+ sv-40 sv-56) (+ sv-48 64)) + (set-hud-piece-position! (-> obj sprites 4) (+ sv-40 sv-56) (+ sv-48 64)) (let* ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-9 (-> s1-7 base)) ) - (&-> obj something-hud-related) - (let ((t9-38 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-38) - ) - (-> obj sprites 2) - (let ((t9-39 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-39) - ) - (-> obj sprites 3) - (let ((t9-40 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-40) - ) - (-> obj sprites 4) - (let ((t9-41 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-41) - ) + (hud-sprite-method-9 (-> obj sprites 1) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 4) s1-7 (-> *level* default-level)) (let ((a3-35 (-> s1-7 base))) (let ((v1-237 (the-as object (-> s1-7 base)))) (set! (-> (the-as dma-packet v1-237) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2548,15 +2441,15 @@ (set! (-> obj sprites 0 scale-x) 0.7) (set! (-> obj sprites 0 scale-y) 0.7) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 265 263) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 265 263) (let* ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-10 (-> s1-8 base)) ) - (-> obj sprites) - (let ((t9-45 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-45) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-8 + (-> *level* default-level) + ) (let ((a3-36 (-> s1-8 base))) (let ((v1-260 (the-as object (-> s1-8 base)))) (set! (-> (the-as dma-packet v1-260) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2585,15 +2478,15 @@ ) ) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 263) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 263) (let* ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-12 (-> s1-10 base)) ) - (-> obj sprites) - (let ((t9-52 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-52) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-10 + (-> *level* default-level) + ) (let ((a3-39 (-> s1-10 base))) (let ((v1-285 (the-as object (-> s1-10 base)))) (set! (-> (the-as dma-packet v1-285) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2615,15 +2508,15 @@ (s2-13 *temp-string* arg1 #f 44 320) ) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 289) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 289) (let* ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-14 (-> s1-12 base)) ) - (-> obj sprites) - (let ((t9-59 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-59) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-12 + (-> *level* default-level) + ) (let ((a3-41 (-> s1-12 base))) (let ((v1-304 (the-as object (-> s1-12 base)))) (set! (-> (the-as dma-packet v1-304) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2647,15 +2540,15 @@ (set! (-> obj sprites 0 scale-x) 0.6) (set! (-> obj sprites 0 scale-y) 0.6) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 253 290) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 253 290) (let* ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-16 (-> s1-14 base)) ) - (-> obj sprites) - (let ((t9-66 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-66) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-14 + (-> *level* default-level) + ) (let ((a3-43 (-> s1-14 base))) (let ((v1-325 (the-as object (-> s1-14 base)))) (set! (-> (the-as dma-packet v1-325) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -3219,15 +3112,15 @@ (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 (- 1.0 (-> arg0 menu-transition))))) (set! (-> obj sprites 0 pos z) #xffffff) (set! (-> obj sprites 0 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 240 160) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 240 160) (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (s4-1 (-> s3-0 base)) ) - (-> obj sprites) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s3-0 + (-> *level* default-level) + ) (let ((a3-1 (-> s3-0 base))) (let ((v1-16 (the-as object (-> s3-0 base)))) (set! (-> (the-as dma-packet v1-16) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -3784,9 +3677,10 @@ (+! s2-0 1) ) ) - (let ((t9-10 end-scissor-level)) - #x3f800000 - (t9-10 sv-128) + (let ((t9-10 end-scissor-level) + (a1-13 1.0) + ) + (t9-10 sv-128 a1-13) ) (draw-scene-up-down arg1) 0 @@ -4110,81 +4004,6 @@ ) ) -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 260 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch (defmethod menu-option-method-10 menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (local-vars (f0-50 float) @@ -4421,12 +4240,7 @@ (print-game-text (lookup-text! *common-text* (game-text-id progress-missions-none) #f) arg1 #f 44 320) ) ) - (let ((t9-39 end-scissor-missions) - (a0-93 sv-276) - ) - #x3f800000 - (t9-39 a0-93) - ) + (end-scissor-missions sv-276 1.0) (draw-missions-up-down arg1) 0 (none) @@ -4582,306 +4396,6 @@ ) ) -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 116 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 116 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 116 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 36 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 116 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 16 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 112 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch (defmethod menu-option-method-10 menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (local-vars (sv-16 float) @@ -4938,15 +4452,15 @@ (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 0 pos z) #xffffff) (set! (-> obj sprites 0 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 100 128) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 100 128) (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (s4-0 (-> s3-0 base)) ) - (-> obj sprites) - (let ((t9-3 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-3) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s3-0 + (-> *level* default-level) + ) (let ((a3-1 (-> s3-0 base))) (let ((v1-42 (the-as object (-> s3-0 base)))) (set! (-> (the-as dma-packet v1-42) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -5026,12 +4540,7 @@ (s4-1 *temp-string* arg1 #f 44 320) ) (set! (-> arg1 origin x) 100.0) - (let ((t9-11 begin-scissor-secret) - (a0-39 sv-120) - ) - sv-48 - (t9-11 a0-39) - ) + (begin-scissor-secret sv-120 sv-48) (case (get-aspect-ratio) (('aspect16x9) (set! sv-128 195) @@ -5131,15 +4640,15 @@ (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1))) (set! (-> arg0 sprites 0 scale-x) arg4) (set! (-> arg0 sprites 0 scale-y) arg4) - (set-hud-piece-position! (the-as basic (-> arg0 sprites)) arg2 arg3) + (set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3) (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-1 (-> s4-1 base)) ) - (-> arg0 sprites) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> arg0 sprites)) + s4-1 + (-> *level* default-level) + ) (let ((a3-1 (-> s4-1 base))) (let ((v1-8 (the-as object (-> s4-1 base)))) (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -5184,15 +4693,15 @@ (set! (-> arg0 data 0) (lookup-texture-by-id (the-as texture-id a0-1))) (set! (-> arg0 pad 12) (the-as uint arg4)) (set! (-> arg0 pad 13) (the-as uint arg4)) - (set-hud-piece-position! (the-as basic (&-> arg0 pad 3)) arg2 arg3) + (set-hud-piece-position! (the-as hud-sprite (&-> arg0 pad 3)) arg2 arg3) (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (s5-1 (-> s4-1 base)) ) - (&-> arg0 pad 3) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (&-> arg0 pad 3)) + s4-1 + (-> *level* default-level) + ) (let ((a3-1 (-> s4-1 base))) (let ((v1-20 (the-as object (-> s4-1 base)))) (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -5287,38 +4796,6 @@ *temp-string* ) -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch -;; WARN: Stack slot offset 20 signed mismatch (defun print-highscore ((arg0 print-highscore-obj)) (local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int) (sv-40 print-highscore-obj)) (set! sv-16 (-> arg0 context)) @@ -5898,7 +5375,7 @@ ) ) -(defun get-highscore-icon-xoffset () +(defun get-highscore-icon-xoffset ((arg0 int)) (if (= (get-aspect-ratio) 'aspect4x3) 435 410 @@ -5965,86 +5442,6 @@ ) ) -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 104 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 100 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 124 signed mismatch -;; WARN: Stack slot offset 96 signed mismatch -;; WARN: Stack slot offset 120 signed mismatch -;; WARN: Stack slot offset 108 signed mismatch (defmethod menu-option-method-10 menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (local-vars (sv-96 float) @@ -6177,19 +5574,12 @@ ) (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120))) (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) - (let ((gp-3 draw-highscore-icon) - (s5-3 sv-144) - (s4-3 (get-highscore-icon (-> sv-144 page-index))) - (t9-17 get-highscore-icon-xoffset) - ) - (-> sv-144 page-index) - (gp-3 - s5-3 - s4-3 - (the int (+ (the float (t9-17)) sv-120)) - (get-highscore-icon-yoffset (-> sv-144 page-index)) - (get-highscore-icon-scale (-> sv-144 page-index)) - ) + (draw-highscore-icon + sv-144 + (get-highscore-icon (-> sv-144 page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-120)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) ) (set! sv-108 (-> sv-140 origin x)) (let ((a0-54 sv-140)) @@ -6298,19 +5688,12 @@ ) (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124))) (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) - (let ((gp-8 draw-highscore-icon) - (s5-8 sv-144) - (s4-6 (get-highscore-icon (-> sv-144 prev-page-index))) - (t9-36 get-highscore-icon-xoffset) - ) - (-> sv-144 page-index) - (gp-8 - s5-8 - s4-6 - (the int (+ (the float (t9-36)) sv-124)) - (get-highscore-icon-yoffset (-> sv-144 page-index)) - (get-highscore-icon-scale (-> sv-144 page-index)) - ) + (draw-highscore-icon + sv-144 + (get-highscore-icon (-> sv-144 prev-page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-124)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) ) (set! sv-108 (-> sv-140 origin x)) (let ((a0-105 sv-140)) @@ -7415,22 +6798,21 @@ (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0) (set-hud-piece-position! - (the-as basic (-> obj sprites 1)) + (-> obj sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) (+ s2-0 -4) ) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-192 (-> sv-176 base)) - (-> obj sprites) - (let ((t9-13 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-13) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + sv-176 + (-> *level* default-level) + ) (draw-sprite2d-xy sv-176 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) @@ -7439,24 +6821,9 @@ 9 (the-as rgba sv-160) ) - (-> obj sprites 1) - (let ((t9-15 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-15) - ) - (-> obj sprites 2) - (let ((t9-16 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-16) - ) - (-> obj sprites 3) - (let ((t9-17 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-17) - ) + (hud-sprite-method-9 (-> obj sprites 1) sv-176 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) sv-176 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) sv-176 (-> *level* default-level)) (let ((a3-6 (-> sv-176 base))) (let ((v1-100 (the-as object (-> sv-176 base)))) (set! (-> (the-as dma-packet v1-100) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -7546,22 +6913,21 @@ (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0) (set-hud-piece-position! - (the-as basic (-> obj sprites 1)) + (-> obj sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) (+ s2-0 -4) ) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-272 (-> sv-256 base)) - (-> obj sprites) - (let ((t9-33 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-33) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + sv-256 + (-> *level* default-level) + ) (draw-sprite2d-xy sv-256 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) @@ -7570,24 +6936,9 @@ 9 (the-as rgba sv-240) ) - (-> obj sprites 1) - (let ((t9-35 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-35) - ) - (-> obj sprites 2) - (let ((t9-36 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-36) - ) - (-> obj sprites 3) - (let ((t9-37 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-37) - ) + (hud-sprite-method-9 (-> obj sprites 1) sv-256 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) sv-256 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) sv-256 (-> *level* default-level)) (let ((a3-13 (-> sv-256 base))) (let ((v1-183 (the-as object (-> sv-256 base)))) (set! (-> (the-as dma-packet v1-183) dma) (new 'static 'dma-tag :id (dma-tag-id next))) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-master_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-master_REF.gc index 352ca88ed1..151a159a48 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-master_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-master_REF.gc @@ -46,22 +46,8 @@ (set! (-> self tpos-old-adj quad) (-> self tpos-old quad)) (set! (-> self tpos-curr-adj quad) (-> self tpos-old quad)) (set! (-> self tpos-tgt quad) (-> self tpos-old quad)) - (let* ((s5-1 quaternion->matrix) - (s4-0 (-> self tgt-rot-mat)) - (a0-12 (the-as process-focusable gp-0)) - (t9-1 (method-of-object a0-12 get-quat)) - ) - 2 - (s5-1 s4-0 (t9-1 a0-12)) - ) - (let* ((s5-2 quaternion->matrix) - (s4-1 (-> self tgt-face-mat)) - (a0-14 (the-as process-focusable gp-0)) - (t9-3 (method-of-object a0-14 get-quat)) - ) - 1 - (s5-2 s4-1 (t9-3 a0-14)) - ) + (quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2)) + (quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1)) (vector-reset! (-> self pitch-off)) (set! (-> self upspeed) 0.0) (set! (-> self on-ground) @@ -97,14 +83,9 @@ 0 ) ) - (let ((gp-1 (the-as process-focusable (new 'stack-no-clear 'vector)))) - (vector--float*! - (the-as vector gp-1) - (-> self tpos-curr-adj) - (-> self local-down) - (-> self settings target-height) - ) - (tracking-spline-method-10 (-> self target-spline) (the-as vector gp-1)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self settings target-height)) + (tracking-spline-method-10 (-> self target-spline) gp-1) ) ) ) @@ -163,22 +144,8 @@ ) (set! (-> self tpos-old quad) (-> self tpos-curr quad)) (set! (-> self tpos-old-adj quad) (-> self tpos-curr-adj quad)) - (let* ((s5-1 quaternion->matrix) - (s4-0 (-> self tgt-rot-mat)) - (a0-12 (the-as target gp-0)) - (t9-4 (method-of-object a0-12 get-quat)) - ) - 2 - (s5-1 s4-0 (t9-4 a0-12)) - ) - (let* ((s5-2 quaternion->matrix) - (s4-1 (-> self tgt-face-mat)) - (a0-14 (the-as target gp-0)) - (t9-6 (method-of-object a0-14 get-quat)) - ) - 1 - (s5-2 s4-1 (t9-6 a0-14)) - ) + (quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as target gp-0) 2)) + (quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as target gp-0) 1)) (cond ((< (-> self ease-t) 1.0) (new 'stack-no-clear 'vector) @@ -385,10 +352,8 @@ ;; INFO: Used lq/sq (defbehavior master-choose-entity camera-master ((arg0 cam-setting-data)) (local-vars - (r0-0 uint128) (v1-22 symbol) - (v1-52 uint128) - (sv-96 int) + (sv-96 res-tag) (sv-112 process) (sv-128 (pointer process)) (sv-144 int) @@ -412,8 +377,8 @@ (format 0 "ERROR : camera entity '~S' didn't produce a state~%" (res-lump-struct s5-0 'name structure)) ) ) - (set! sv-96 0) - (let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (the-as (pointer res-tag) (& sv-96))))) + (set! sv-96 (new 'static 'res-tag)) + (let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (& sv-96)))) (when s4-1 (let* ((s1-1 (get-process *camera-dead-pool* camera-slave #x4000)) (s3-1 (when s1-1 @@ -434,86 +399,78 @@ (setup-slave-for-hopefull (the-as camera-slave (ppointer->process s3-1))) (format 0 "ERROR : primary region activate failed~%") ) - (let ((s2-1 0)) - (while (begin - (let ((v1-51 (the-as uint128 sv-96))) - (.pcpyud v1-52 v1-51 r0-0) - ) - (< s2-1 (shr (* (the-as int v1-52) 2) 49)) - ) - (let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))))) - (cond - (s0-0 - (let ((s1-2 (cam-state-from-entity s0-0))) - (cond - (s1-2 - (set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000)) - (set! v1-22 (when sv-112 - (set! sv-128 (the-as (pointer process) v1-22)) - (let ((t9-14 (method-of-type camera-slave activate))) - (t9-14 - (the-as camera-slave sv-112) - *camera* - (symbol->string (-> camera-slave symbol)) - (the-as pointer #x70004000) - ) + (dotimes (s2-1 (the-as int (-> sv-96 elt-count))) + (let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))))) + (cond + (s0-0 + (let ((s1-2 (cam-state-from-entity s0-0))) + (cond + (s1-2 + (set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000)) + (set! v1-22 (when sv-112 + (set! sv-128 (the-as (pointer process) v1-22)) + (let ((t9-14 (method-of-type camera-slave activate))) + (t9-14 + (the-as camera-slave sv-112) + *camera* + (symbol->string (-> camera-slave symbol)) + (the-as pointer #x70004000) ) - (run-now-in-process sv-112 cam-slave-init s1-2 s0-0) - (set! sv-128 (-> sv-112 ppointer)) - v1-22 ) - ) - (cond - (sv-128 - (setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128))) - (cond - ((master-is-hopeful-better? - (the-as camera-slave (ppointer->process s3-1)) - (the-as camera-slave (ppointer->process sv-128)) - ) - (if s3-1 - (deactivate (-> s3-1 0)) - ) - (set! s3-1 (the-as (pointer camera-slave) sv-128)) - (set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))) - (set! (-> arg0 cam-mode) (the-as symbol s1-2)) - ) - (else - (deactivate (-> sv-128 0)) - ) - ) + (run-now-in-process sv-112 cam-slave-init s1-2 s0-0) + (set! sv-128 (-> sv-112 ppointer)) + v1-22 + ) ) - (else - (format 0 "ERROR : alternate region activate failed~%") + (cond + (sv-128 + (setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128))) + (cond + ((master-is-hopeful-better? + (the-as camera-slave (ppointer->process s3-1)) + (the-as camera-slave (ppointer->process sv-128)) + ) + (if s3-1 + (deactivate (-> s3-1 0)) + ) + (set! s3-1 (the-as (pointer camera-slave) sv-128)) + (set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))) + (set! (-> arg0 cam-mode) (the-as symbol s1-2)) + ) + (else + (deactivate (-> sv-128 0)) + ) ) ) - ) - (else - (let ((s1-5 format)) - (set! sv-144 0) - (set! sv-160 "ERROR : alternate camera region '~S' didn't produce a state~%") - (let ((a2-14 (res-lump-struct s0-0 'name structure))) - (s1-5 sv-144 sv-160 a2-14) - ) + (else + (format 0 "ERROR : alternate region activate failed~%") ) ) ) - ) - ) - (else - (let ((s1-7 format) - (s0-1 0) + (else + (let ((s1-5 format)) + (set! sv-144 0) + (set! sv-160 "ERROR : alternate camera region '~S' didn't produce a state~%") + (let ((a2-14 (res-lump-struct s0-0 'name structure))) + (s1-5 sv-144 sv-160 a2-14) + ) ) - (set! sv-176 "ERROR : alternate '~S' not found for '~S'~%") - (set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))) - (let ((a3-8 (res-lump-struct s5-0 'name structure))) - (s1-7 s0-1 sv-176 sv-192 a3-8) ) ) ) ) + (else + (let ((s1-7 format) + (s0-1 0) + ) + (set! sv-176 "ERROR : alternate '~S' not found for '~S'~%") + (set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))) + (let ((a3-8 (res-lump-struct s5-0 'name structure))) + (s1-7 s0-1 sv-176 sv-192 a3-8) + ) + ) + ) ) - (+! s2-1 1) ) ) (if s3-1 diff --git a/test/decompiler/reference/jak2/engine/debug/debug_REF.gc b/test/decompiler/reference/jak2/engine/debug/debug_REF.gc index 12d5ac2844..bd38a5f7b2 100644 --- a/test/decompiler/reference/jak2/engine/debug/debug_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/debug_REF.gc @@ -708,7 +708,7 @@ ;; definition (debug) for function add-debug-line2d ;; INFO: Used lq/sq -(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector)) +(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w)) (if (not enable) (return #f) ) diff --git a/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc b/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc index 1bad69c618..a6f458cad8 100644 --- a/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc @@ -243,7 +243,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/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc index aeab375b01..38d85f98ed 100644 --- a/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc @@ -580,9 +580,9 @@ (goto cfg-4) ) (format #t "[~8x] ~A~%" obj 'vector4w-4) - (format #t "~1Tdata[16] @ #x~X~%" (-> obj data)) - (format #t "~1Tquad[4] @ #x~X~%" (-> obj data)) - (format #t "~1Tvector[4] @ #x~X~%" (-> obj data)) + (format #t "~1Tdata[16] @ #x~X~%" (-> obj vector)) + (format #t "~1Tquad[4] @ #x~X~%" (-> obj vector)) + (format #t "~1Tvector[4] @ #x~X~%" (-> obj vector)) (label cfg-4) obj ) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-focusable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-focusable_REF.gc index 7cbd7a163c..c6bb3fe786 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-focusable_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/process-focusable_REF.gc @@ -11,7 +11,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) @@ -63,7 +63,7 @@ ) ;; definition for method 21 of type process-focusable -(defmethod get-quat process-focusable ((obj process-focusable)) +(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int)) (-> obj root quat) ) diff --git a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc index b2651ede1a..269f69d708 100644 --- a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc @@ -2817,13 +2817,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)) diff --git a/test/decompiler/reference/jak2/engine/ui/hud-h_REF.gc b/test/decompiler/reference/jak2/engine/ui/hud-h_REF.gc index fb4bd0e486..b141f64979 100644 --- a/test/decompiler/reference/jak2/engine/ui/hud-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/hud-h_REF.gc @@ -44,7 +44,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) ) ) @@ -77,7 +77,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) 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 db05a72fc9..6e96222d23 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 @@ -347,7 +347,7 @@ ;; definition for function begin-scissor-secret ;; WARN: Return type mismatch int vs none. -(defun begin-scissor-secret ((arg0 hud-box)) +(defun begin-scissor-secret ((arg0 hud-box) (arg1 progress)) (cond ((= (get-aspect-ratio) 'aspect16x9) (set! (-> arg0 min x) 79.0) @@ -453,7 +453,7 @@ ;; definition for function end-scissor-missions ;; WARN: Return type mismatch int vs none. -(defun end-scissor-missions ((arg0 hud-box)) +(defun end-scissor-missions ((arg0 hud-box) (arg1 float)) (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) @@ -585,7 +585,7 @@ ;; definition for function end-scissor-level ;; WARN: Return type mismatch int vs none. -(defun end-scissor-level ((arg0 hud-box)) +(defun end-scissor-level ((arg0 hud-box) (arg1 float)) (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) @@ -631,21 +631,21 @@ ) ;; definition for function unlocked-secret-menu? -(defun unlocked-secret-menu? ((arg0 int)) - (or (logtest? arg0 32) - (logtest? arg0 64) - (logtest? arg0 128) - (logtest? arg0 256) - (logtest? arg0 512) - (logtest? arg0 1024) - (logtest? arg0 2048) - (logtest? arg0 #x8000) +(defun unlocked-secret-menu? ((arg0 game-secrets)) + (or (logtest? arg0 (game-secrets scene-player-1)) + (logtest? arg0 (game-secrets scene-player-2)) + (logtest? arg0 (game-secrets scene-player-3)) + (logtest? arg0 (game-secrets level-select)) + (logtest? arg0 (game-secrets scrap-book-1)) + (logtest? arg0 (game-secrets scrap-book-2)) + (logtest? arg0 (game-secrets scrap-book-3)) + (logtest? arg0 (game-secrets hero-mode)) ) ) ;; definition for function memcard-unlocked-secrets? +;; WARN: Return type mismatch int vs game-secrets. (defun memcard-unlocked-secrets? ((arg0 symbol)) - "TODO - returns a bitfield" (let ((v1-0 *progress-save-info*) (s5-0 0) ) @@ -656,7 +656,7 @@ ) ) ) - (if (unlocked-secret-menu? s5-0) + (if (unlocked-secret-menu? (the-as game-secrets s5-0)) (set! (-> *progress-state* secrets-unlocked) #t) (set! (-> *progress-state* secrets-unlocked) #f) ) @@ -664,45 +664,45 @@ (set! (-> *progress-state* secrets-unlocked) #t) (set! s5-0 (logior s5-0 #x8fe0)) ) - (cond - (arg0 - (empty) - s5-0 - ) - (else - (the-as int (unlocked-secret-menu? s5-0)) - ) - ) + (the-as game-secrets (cond + (arg0 + (empty) + s5-0 + ) + (else + (the-as int (unlocked-secret-menu? (the-as game-secrets s5-0))) + ) + ) + ) ) ) ;; definition for function num-unlocked-secret? -(defun num-unlocked-secret? ((arg0 int)) - "TODO - bitfield - @returns The number of secrets currently unlocked" +(defun num-unlocked-secret? ((arg0 game-secrets)) + "@returns The number of secrets currently unlocked" (let ((v0-0 0)) - (if (logtest? arg0 32) + (if (logtest? arg0 (game-secrets scene-player-1)) (+! v0-0 1) ) - (if (logtest? arg0 64) + (if (logtest? arg0 (game-secrets scene-player-2)) (+! v0-0 1) ) - (if (logtest? arg0 128) + (if (logtest? arg0 (game-secrets scene-player-3)) (+! v0-0 1) ) - (if (logtest? arg0 256) + (if (logtest? arg0 (game-secrets level-select)) (+! v0-0 1) ) - (if (logtest? arg0 512) + (if (logtest? arg0 (game-secrets scrap-book-1)) (+! v0-0 1) ) - (if (logtest? arg0 1024) + (if (logtest? arg0 (game-secrets scrap-book-2)) (+! v0-0 1) ) - (if (logtest? arg0 2048) + (if (logtest? arg0 (game-secrets scrap-book-3)) (+! v0-0 1) ) - (if (logtest? arg0 #x8000) + (if (logtest? arg0 (game-secrets hero-mode)) (+! v0-0 1) ) v0-0 @@ -1039,7 +1039,7 @@ (cond ((= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) (cond - ((logtest? s5-0 512) + ((logtest? s5-0 (game-secrets scrap-book-1)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook) #f) arg1 @@ -1058,7 +1058,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) (cond - ((logtest? s5-0 1024) + ((logtest? s5-0 (game-secrets scrap-book-2)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-mega-scrapbook) #f) arg1 @@ -1077,7 +1077,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) (cond - ((logtest? s5-0 2048) + ((logtest? s5-0 (game-secrets scrap-book-3)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook-3) #f) arg1 @@ -1096,7 +1096,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) (cond - ((logtest? s5-0 32) + ((logtest? s5-0 (game-secrets scene-player-1)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-1) #f) arg1 @@ -1115,7 +1115,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) (cond - ((logtest? s5-0 64) + ((logtest? s5-0 (game-secrets scene-player-2)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-2) #f) arg1 @@ -1134,7 +1134,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) (cond - ((logtest? s5-0 128) + ((logtest? s5-0 (game-secrets scene-player-3)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-3) #f) arg1 @@ -1153,7 +1153,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) (cond - ((logtest? s5-0 #x8000) + ((logtest? s5-0 (game-secrets hero-mode)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-hero-mode) #f) arg1 @@ -1172,7 +1172,7 @@ ) ((= (-> obj name) (game-text-id progress-main-secrets-levelselect)) (cond - ((logtest? s5-0 256) + ((logtest? s5-0 (game-secrets level-select)) (print-game-text (lookup-text! *common-text* (game-text-id progress-main-secrets-levelselect) #f) arg1 @@ -1369,8 +1369,7 @@ (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) ) - (-> arg0 box) - ((method-of-type hud-box hud-box-method-9)) + ((method-of-type hud-box hud-box-method-9) (the-as hud-box (-> arg0 box)) s5-0) (let ((a3-1 (-> s5-0 base))) (let ((v1-7 (the-as object (-> s5-0 base)))) (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2543,51 +2542,35 @@ (set! (-> obj sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 (the-as int s2-8)))) (set! (-> obj sprites 1 scale-x) 1.0) (set! (-> obj sprites 1 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (&-> obj something-hud-related)) sv-40 sv-48) + (set-hud-piece-position! (-> obj sprites 1) sv-40 sv-48) (set-vector! (-> obj sprites 2 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 2 pos z) #xffffff) (set! (-> obj sprites 2 pos w) 1) (set! (-> obj sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 (the-as int s2-8)))) (set! (-> obj sprites 2 scale-x) 1.0) (set! (-> obj sprites 2 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (+ sv-40 sv-56) sv-48) + (set-hud-piece-position! (-> obj sprites 2) (+ sv-40 sv-56) sv-48) (set-vector! (-> obj sprites 3 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 1) (set! (-> obj sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 (the-as int s2-8)))) (set! (-> obj sprites 3 scale-x) 1.0) (set! (-> obj sprites 3 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) sv-40 (+ sv-48 64)) + (set-hud-piece-position! (-> obj sprites 3) sv-40 (+ sv-48 64)) (set-vector! (-> obj sprites 4 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 4 pos z) #xffffff) (set! (-> obj sprites 4 pos w) 1) (set! (-> obj sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 (the-as int s2-8)))) (set! (-> obj sprites 4 scale-x) 1.0) (set! (-> obj sprites 4 scale-y) 1.0) - (set-hud-piece-position! (the-as basic (-> obj sprites 4)) (+ sv-40 sv-56) (+ sv-48 64)) + (set-hud-piece-position! (-> obj sprites 4) (+ sv-40 sv-56) (+ sv-48 64)) (let* ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-9 (-> s1-7 base)) ) - (&-> obj something-hud-related) - (let ((t9-38 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-38) - ) - (-> obj sprites 2) - (let ((t9-39 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-39) - ) - (-> obj sprites 3) - (let ((t9-40 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-40) - ) - (-> obj sprites 4) - (let ((t9-41 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-41) - ) + (hud-sprite-method-9 (-> obj sprites 1) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) s1-7 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 4) s1-7 (-> *level* default-level)) (let ((a3-35 (-> s1-7 base))) (let ((v1-237 (the-as object (-> s1-7 base)))) (set! (-> (the-as dma-packet v1-237) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2613,15 +2596,15 @@ (set! (-> obj sprites 0 scale-x) 0.7) (set! (-> obj sprites 0 scale-y) 0.7) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 265 263) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 265 263) (let* ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-10 (-> s1-8 base)) ) - (-> obj sprites) - (let ((t9-45 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-45) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-8 + (-> *level* default-level) + ) (let ((a3-36 (-> s1-8 base))) (let ((v1-260 (the-as object (-> s1-8 base)))) (set! (-> (the-as dma-packet v1-260) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2650,15 +2633,15 @@ ) ) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 263) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 263) (let* ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-12 (-> s1-10 base)) ) - (-> obj sprites) - (let ((t9-52 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-52) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-10 + (-> *level* default-level) + ) (let ((a3-39 (-> s1-10 base))) (let ((v1-285 (the-as object (-> s1-10 base)))) (set! (-> (the-as dma-packet v1-285) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2680,15 +2663,15 @@ (s2-13 *temp-string* arg1 #f 44 320) ) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 289) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 289) (let* ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-14 (-> s1-12 base)) ) - (-> obj sprites) - (let ((t9-59 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-59) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-12 + (-> *level* default-level) + ) (let ((a3-41 (-> s1-12 base))) (let ((v1-304 (the-as object (-> s1-12 base)))) (set! (-> (the-as dma-packet v1-304) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -2712,15 +2695,15 @@ (set! (-> obj sprites 0 scale-x) 0.6) (set! (-> obj sprites 0 scale-y) 0.6) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93))) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 253 290) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 253 290) (let* ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) (s2-16 (-> s1-14 base)) ) - (-> obj sprites) - (let ((t9-66 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-66) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s1-14 + (-> *level* default-level) + ) (let ((a3-43 (-> s1-14 base))) (let ((v1-325 (the-as object (-> s1-14 base)))) (set! (-> (the-as dma-packet v1-325) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -3304,15 +3287,15 @@ (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 (- 1.0 (-> arg0 menu-transition))))) (set! (-> obj sprites 0 pos z) #xffffff) (set! (-> obj sprites 0 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 240 160) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 240 160) (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (s4-1 (-> s3-0 base)) ) - (-> obj sprites) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s3-0 + (-> *level* default-level) + ) (let ((a3-1 (-> s3-0 base))) (let ((v1-16 (the-as object (-> s3-0 base)))) (set! (-> (the-as dma-packet v1-16) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -3888,9 +3871,10 @@ (+! s2-0 1) ) ) - (let ((t9-10 end-scissor-level)) - #x3f800000 - (t9-10 sv-128) + (let ((t9-10 end-scissor-level) + (a1-13 1.0) + ) + (t9-10 sv-128 a1-13) ) (draw-scene-up-down arg1) 0 @@ -3970,7 +3954,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) @@ -3981,55 +3965,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) @@ -4056,7 +4039,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) @@ -4534,12 +4517,7 @@ (print-game-text (lookup-text! *common-text* (game-text-id progress-missions-none) #f) arg1 #f 44 320) ) ) - (let ((t9-39 end-scissor-missions) - (a0-93 sv-276) - ) - #x3f800000 - (t9-39 a0-93) - ) + (end-scissor-missions sv-276 1.0) (draw-missions-up-down arg1) 0 (none) @@ -5054,15 +5032,15 @@ (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) (set! (-> obj sprites 0 pos z) #xffffff) (set! (-> obj sprites 0 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) 100 128) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 100 128) (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (s4-0 (-> s3-0 base)) ) - (-> obj sprites) - (let ((t9-3 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-3) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + s3-0 + (-> *level* default-level) + ) (let ((a3-1 (-> s3-0 base))) (let ((v1-42 (the-as object (-> s3-0 base)))) (set! (-> (the-as dma-packet v1-42) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -5142,12 +5120,7 @@ (s4-1 *temp-string* arg1 #f 44 320) ) (set! (-> arg1 origin x) 100.0) - (let ((t9-11 begin-scissor-secret) - (a0-39 sv-120) - ) - sv-48 - (t9-11 a0-39) - ) + (begin-scissor-secret sv-120 sv-48) (case (get-aspect-ratio) (('aspect16x9) (set! sv-128 195) @@ -5268,15 +5241,15 @@ (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1))) (set! (-> arg0 sprites 0 scale-x) arg4) (set! (-> arg0 sprites 0 scale-y) arg4) - (set-hud-piece-position! (the-as basic (-> arg0 sprites)) arg2 arg3) + (set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3) (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-1 (-> s4-1 base)) ) - (-> arg0 sprites) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> arg0 sprites)) + s4-1 + (-> *level* default-level) + ) (let ((a3-1 (-> s4-1 base))) (let ((v1-8 (the-as object (-> s4-1 base)))) (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -5322,15 +5295,15 @@ (set! (-> arg0 data 0) (lookup-texture-by-id (the-as texture-id a0-1))) (set! (-> arg0 pad 12) (the-as uint arg4)) (set! (-> arg0 pad 13) (the-as uint arg4)) - (set-hud-piece-position! (the-as basic (&-> arg0 pad 3)) arg2 arg3) + (set-hud-piece-position! (the-as hud-sprite (&-> arg0 pad 3)) arg2 arg3) (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (s5-1 (-> s4-1 base)) ) - (&-> arg0 pad 3) - (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) - (-> *level* default-level) - (t9-2) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (&-> arg0 pad 3)) + s4-1 + (-> *level* default-level) + ) (let ((a3-1 (-> s4-1 base))) (let ((v1-20 (the-as object (-> s4-1 base)))) (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -6050,7 +6023,7 @@ ) ;; definition for function get-highscore-icon-xoffset -(defun get-highscore-icon-xoffset () +(defun get-highscore-icon-xoffset ((arg0 int)) (if (= (get-aspect-ratio) 'aspect4x3) 435 410 @@ -6332,19 +6305,12 @@ ) (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120))) (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) - (let ((gp-3 draw-highscore-icon) - (s5-3 sv-144) - (s4-3 (get-highscore-icon (-> sv-144 page-index))) - (t9-17 get-highscore-icon-xoffset) - ) - (-> sv-144 page-index) - (gp-3 - s5-3 - s4-3 - (the int (+ (the float (t9-17)) sv-120)) - (get-highscore-icon-yoffset (-> sv-144 page-index)) - (get-highscore-icon-scale (-> sv-144 page-index)) - ) + (draw-highscore-icon + sv-144 + (get-highscore-icon (-> sv-144 page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-120)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) ) (set! sv-108 (-> sv-140 origin x)) (let ((a0-54 sv-140)) @@ -6453,19 +6419,12 @@ ) (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124))) (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) - (let ((gp-8 draw-highscore-icon) - (s5-8 sv-144) - (s4-6 (get-highscore-icon (-> sv-144 prev-page-index))) - (t9-36 get-highscore-icon-xoffset) - ) - (-> sv-144 page-index) - (gp-8 - s5-8 - s4-6 - (the int (+ (the float (t9-36)) sv-124)) - (get-highscore-icon-yoffset (-> sv-144 page-index)) - (get-highscore-icon-scale (-> sv-144 page-index)) - ) + (draw-highscore-icon + sv-144 + (get-highscore-icon (-> sv-144 prev-page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-124)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) ) (set! sv-108 (-> sv-140 origin x)) (let ((a0-105 sv-140)) @@ -7593,22 +7552,21 @@ (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0) (set-hud-piece-position! - (the-as basic (-> obj sprites 1)) + (-> obj sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) (+ s2-0 -4) ) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-192 (-> sv-176 base)) - (-> obj sprites) - (let ((t9-13 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-13) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + sv-176 + (-> *level* default-level) + ) (draw-sprite2d-xy sv-176 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) @@ -7617,24 +7575,9 @@ 9 (the-as rgba sv-160) ) - (-> obj sprites 1) - (let ((t9-15 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-15) - ) - (-> obj sprites 2) - (let ((t9-16 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-16) - ) - (-> obj sprites 3) - (let ((t9-17 (method-of-type hud-sprite hud-sprite-method-9))) - sv-176 - (-> *level* default-level) - (t9-17) - ) + (hud-sprite-method-9 (-> obj sprites 1) sv-176 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) sv-176 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) sv-176 (-> *level* default-level)) (let ((a3-6 (-> sv-176 base))) (let ((v1-100 (the-as object (-> sv-176 base)))) (set! (-> (the-as dma-packet v1-100) dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -7724,22 +7667,21 @@ (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) (set! (-> obj sprites 3 pos z) #xffffff) (set! (-> obj sprites 3 pos w) 0) - (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0) (set-hud-piece-position! - (the-as basic (-> obj sprites 1)) + (-> obj sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) (+ s2-0 -4) ) - (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) - (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-272 (-> sv-256 base)) - (-> obj sprites) - (let ((t9-33 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-33) - ) + ((method-of-type hud-sprite hud-sprite-method-9) + (the-as hud-sprite (-> obj sprites)) + sv-256 + (-> *level* default-level) + ) (draw-sprite2d-xy sv-256 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) @@ -7748,24 +7690,9 @@ 9 (the-as rgba sv-240) ) - (-> obj sprites 1) - (let ((t9-35 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-35) - ) - (-> obj sprites 2) - (let ((t9-36 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-36) - ) - (-> obj sprites 3) - (let ((t9-37 (method-of-type hud-sprite hud-sprite-method-9))) - sv-256 - (-> *level* default-level) - (t9-37) - ) + (hud-sprite-method-9 (-> obj sprites 1) sv-256 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 2) sv-256 (-> *level* default-level)) + (hud-sprite-method-9 (-> obj sprites 3) sv-256 (-> *level* default-level)) (let ((a3-13 (-> sv-256 base))) (let ((v1-183 (the-as object (-> sv-256 base)))) (set! (-> (the-as dma-packet v1-183) dma) (new 'static 'dma-tag :id (dma-tag-id next))) diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc index e0faeb5ac0..7598d3ef48 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc @@ -392,9 +392,8 @@ ;; definition of type menu-memcard-slot-option (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/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc index 23637e575f..a05f802e54 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc @@ -229,773 +229,767 @@ obj ) -;; definition for symbol *hud-select-scene-act1*, type menu-option-list +;; definition for symbol *hud-select-scene-act1*, type (array hud-scene-info) (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 ) ) ) -;; definition for symbol *hud-select-scene-act2*, type menu-option-list +;; definition for symbol *hud-select-scene-act2*, type (array hud-scene-info) (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 ) ) ) -;; definition for symbol *hud-select-scene-act3*, type menu-option-list +;; definition for symbol *hud-select-scene-act3*, type (array hud-scene-info) (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/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc index dd1fc238d0..2d86ce9de9 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc @@ -949,7 +949,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*) ) @@ -1694,7 +1694,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 ) @@ -2256,7 +2256,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) @@ -2275,7 +2275,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) @@ -2287,7 +2287,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) @@ -2301,7 +2303,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) @@ -2315,7 +2319,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) @@ -2329,30 +2335,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) @@ -2516,7 +2532,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") @@ -2584,11 +2600,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) ) @@ -2611,7 +2629,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") @@ -2992,7 +3010,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") @@ -3173,10 +3191,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/test/decompiler/reference/jak2/engine/ui/text_REF.gc b/test/decompiler/reference/jak2/engine/ui/text_REF.gc index 66b5e726f9..c80c5d6a38 100644 --- a/test/decompiler/reference/jak2/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/text_REF.gc @@ -93,15 +93,15 @@ ) ;; definition for function convert-korean-text -(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*) @@ -114,33 +114,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)) @@ -150,7 +143,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)) @@ -230,7 +223,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) @@ -532,53 +525,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