From ccaebb522b48a4a111f20b7575def3217dd5dde2 Mon Sep 17 00:00:00 2001 From: water Date: Sat, 23 Mar 2024 12:11:23 -0400 Subject: [PATCH] before adding files --- decompiler/config/jak3/all-types.gc | 4 +- decompiler/config/jak3/ntsc_v1/hacks.jsonc | 4 +- goal_src/jak3/engine/game/game-info-h.gc | 21 +++-- goal_src/jak3/engine/game/game-info.gc | 4 +- goal_src/jak3/engine/game/settings.gc | 4 +- goal_src/jak3/engine/level/bsp-h.gc | 27 +++++-- goal_src/jak3/engine/level/level-h.gc | 65 ++++++++------- goal_src/jak3/engine/level/level-info.gc | 80 +++++++++---------- goal_src/jak3/engine/sound/gsound-h.gc | 42 ++++++---- goal_src/jak3/engine/sound/gsound.gc | 2 +- goal_src/jak3/engine/sound/speech.gc | 2 +- goal_src/jak3/engine/target/target-death.gc | 8 +- goal_src/jak3/engine/ui/progress/progress.gc | 4 +- goalc/compiler/compilation/Static.cpp | 4 +- .../jak3/engine/game/game-info-h_REF.gc | 21 +++-- .../jak3/engine/game/game-info_REF.gc | 4 +- .../jak3/engine/game/settings_REF.gc | 4 +- .../reference/jak3/engine/level/bsp-h_REF.gc | 25 ++++-- .../jak3/engine/level/level-h_REF.gc | 61 +++++++------- .../jak3/engine/level/level-info_REF.gc | 80 +++++++++---------- .../jak3/engine/sound/gsound-h_REF.gc | 2 +- .../reference/jak3/engine/sound/gsound_REF.gc | 2 +- .../reference/jak3/engine/sound/speech_REF.gc | 6 +- .../jak3/engine/target/target-death_REF.gc | 8 +- .../jak3/engine/ui/progress/progress_REF.gc | 4 +- 25 files changed, 265 insertions(+), 223 deletions(-) diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index ebd30f261b..7d3a115c28 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -7389,9 +7389,9 @@ ) (deftype level-borrow-info (basic) - ((alias pair :offset-assert 4) + ((alias object :offset-assert 4) (borrow-size uint16 5 :offset-assert 8) - (borrow-info pair 5 :offset-assert 20) + (borrow-info object 5 :offset-assert 20) ) :method-count-assert 9 :size-assert #x28 diff --git a/decompiler/config/jak3/ntsc_v1/hacks.jsonc b/decompiler/config/jak3/ntsc_v1/hacks.jsonc index 29ec97ddce..3a14f4f60a 100644 --- a/decompiler/config/jak3/ntsc_v1/hacks.jsonc +++ b/decompiler/config/jak3/ntsc_v1/hacks.jsonc @@ -220,7 +220,9 @@ "update-sound-banks", "level-base-level-name", "borrow-city-expansion", - "add-want-level" + "add-want-level", + "level-find-borrow-slot", + "(method 18 level)" ], // If format is used with the wrong number of arguments, diff --git a/goal_src/jak3/engine/game/game-info-h.gc b/goal_src/jak3/engine/game/game-info-h.gc index 5a3e6044c0..d0d1b14d3d 100644 --- a/goal_src/jak3/engine/game/game-info-h.gc +++ b/goal_src/jak3/engine/game/game-info-h.gc @@ -239,32 +239,31 @@ (command-list pair) (object-name string 256) (object-status basic 256) - (update-callback basic) + (update-callback (function load-state object)) ) (:methods (new (symbol type) _type_) - (load-state-method-9 () none) - (load-state-method-10 () none) - (load-state-method-11 () none) + (reset! (_type_) _type_) + (update! (_type_) int) + (want-levels (_type_ (pointer symbol)) int) (want-sound-banks (_type_ (pointer symbol)) none) - (load-state-method-13 () none) - (load-state-method-14 () none) - (load-state-method-15 () none) - (load-state-method-16 () none) + (want-display-level (_type_ symbol symbol) int) + (want-vis-level (_type_ symbol) none) + (want-force-vis (_type_ symbol symbol) int) + (want-force-inside (_type_ symbol symbol) none) (execute-commands-up-to (_type_ float) none) (backup-load-state-and-set-cmds (_type_ pair) int) (restore-load-state-and-cleanup (_type_) int) (restore-load-state (_type_) int) - (load-state-method-21 (_type_) none) + (add-borrow-levels (_type_) none) ) ) -;; WARN: Return type mismatch none vs load-state. (defmethod new load-state ((allocation symbol) (type-to-make type)) (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> a0-1 update-callback) #f) - (the-as load-state ((method-of-object a0-1 load-state-method-9))) + (reset! a0-1) ) ) diff --git a/goal_src/jak3/engine/game/game-info.gc b/goal_src/jak3/engine/game/game-info.gc index 8d23c2fc65..1d5e1fc88e 100644 --- a/goal_src/jak3/engine/game/game-info.gc +++ b/goal_src/jak3/engine/game/game-info.gc @@ -202,7 +202,7 @@ (set! (-> continue-rot 8) (the int (* 32767.0 (-> rot fvec z)))) ) ) - (load-state-method-21 arg0) + (add-borrow-levels arg0) this ) @@ -382,7 +382,7 @@ (when (or (and (-> subtask manager) (handle->process (-> subtask manager manager))) (and (-> subtask manager) (-> subtask manager level) - (= (level-group-method-26 *level* (-> subtask manager level) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> subtask manager level) #f) 'active) ) (and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level))) ) diff --git a/goal_src/jak3/engine/game/settings.gc b/goal_src/jak3/engine/game/settings.gc index 5897c160bf..b02c2a31d1 100644 --- a/goal_src/jak3/engine/game/settings.gc +++ b/goal_src/jak3/engine/game/settings.gc @@ -1429,7 +1429,7 @@ (set! (-> s5-0 allow-error) (-> s4-0 allow-error)) (set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod)) (set! (-> s5-0 slow-time) (-> s4-0 slow-time)) - (if (and (-> s4-0 mirror) (= (level-group-method-26 *level* 'ctywide (the-as int #f)) 'active)) + (if (and (-> s4-0 mirror) (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)) (set! (-> s5-0 mirror) #f) (set! (-> s5-0 mirror) (-> s4-0 mirror)) ) @@ -1653,7 +1653,7 @@ (when (and (!= (-> s4-0 music) (-> s5-0 music)) (and (zero? (rpc-busy? 1)) (or (not (-> s4-0 music)) - (and (< 0.0 (-> s5-0 music-volume)) (not (level-group-method-28 *level*)) (not (-> s5-0 movie))) + (and (< 0.0 (-> s5-0 music-volume)) (not (load-in-progress? *level*)) (not (-> s5-0 movie))) ) (not *master-exit*) ) diff --git a/goal_src/jak3/engine/level/bsp-h.gc b/goal_src/jak3/engine/level/bsp-h.gc index fb63e7ef2f..10632e40ea 100644 --- a/goal_src/jak3/engine/level/bsp-h.gc +++ b/goal_src/jak3/engine/level/bsp-h.gc @@ -8,6 +8,8 @@ (declare-type bsp-header drawable) (declare-type bsp-node structure) (declare-type entity-camera entity) +(declare-type entity-nav-mesh structure) +(declare-type city-level-info structure) (define-extern inspect-bsp-tree (function bsp-header bsp-node none)) (define-extern map-bsp-tree (function (function bsp-node none) bsp-header bsp-node none)) @@ -40,33 +42,42 @@ This is used for precomputed visibility, based on the camera position. This is n "The bsp-header is really an entire level. This probably started as a very simple structure, but now it is extremely complicated." ((info file-info :overlay-at id) - (all-visible-list (pointer uint8) :offset 32) - (visible-list-length int16 :offset 36) + (all-visible-list (pointer uint8)) + (visible-list-length int16) (extra-vis-list-length int16) - (drawable-trees drawable-tree-array :offset 40) - (pat pointer :offset 44) - (pat-length int32 :offset 48) + (drawable-trees drawable-tree-array) + (pat pointer) + (pat-length int32) (texture-remap-table (pointer uint64)) (texture-remap-table-len int32) (texture-ids (pointer texture-id)) (texture-page-count int32) (unknown-basic basic) - (actors drawable-inline-array-actor :offset 112) + (name symbol) + (nickname symbol) + (vis-info level-vis-info 8) + (actors drawable-inline-array-actor) (cameras (array entity-camera)) - (nodes (inline-array bsp-node) :offset 120) + (nodes (inline-array bsp-node)) (level level) (current-leaf-idx uint16) - (texture-flags texture-page-flag 10 :offset 130) + (texture-flags texture-page-flag 10) (cam-outside-bsp uint8 :offset 152) (cam-using-back uint8) (cam-box-idx uint16) + (subdivide-close float :offset 160) + (subdivide-far float) (actor-birth-order (pointer uint32) :offset 172) + (light-hash light-hash) + (nav-meshes (array entity-nav-mesh)) (region-trees (array drawable-tree-region-prim) :offset 188) (collide-hash collide-hash :offset 196) (wind-array uint32 :offset 200) (wind-array-length int32 :offset 204) + (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) (vis-spheres-length uint32 :offset 248) + (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset 256) (tfrag-closest (pointer float)) (tfrag-mask-count uint32 :overlay-at tfrag-closest) diff --git a/goal_src/jak3/engine/level/level-h.gc b/goal_src/jak3/engine/level/level-h.gc index 0b1777b988..8e80bfd79f 100644 --- a/goal_src/jak3/engine/level/level-h.gc +++ b/goal_src/jak3/engine/level/level-h.gc @@ -13,12 +13,15 @@ (declare-type game-text-info structure) (declare-type entity-links structure) (declare-type level-group basic) +(declare-type level-load-info structure) (define-extern *level* level-group) (define-extern *draw-index* int) (define-extern *level-index* int) (define-extern *print-login* symbol) (define-extern level-remap-texture (function texture-id texture-id)) +(define-extern lookup-level-info (function symbol level-load-info)) + ;; +++vis-info-flag (defenum vis-info-flag @@ -255,9 +258,9 @@ ) (deftype level-borrow-info (basic) - ((alias symbol) + ((alias object) (borrow-size uint16 5) - (borrow-info symbol 5) + (borrow-info object 5) ) ) @@ -303,12 +306,11 @@ (mood-range mood-range :inline) ) (:methods - (level-load-info-method-9 (_type_ int) object) - (level-load-info-method-10 (_type_) none) + (get-callback-symbol-value-by-slot! (_type_ int) object) + (get-callback-by-slot! (_type_ int) object) ) ) -(define-extern lookup-level-info (function symbol level-load-info)) (deftype login-state (basic) ((state int32) @@ -338,6 +340,11 @@ (entity entity-links-array) (closest-object meters 10) (tie-min-dist float :offset 352) + (fg-tfrag-min-dist float) + (fg-prim-min-dist float) + (fg-shrub-min-dist float) + (fg-warp-min-dist float :offset 372) + (fg-prim2-min-dist float :offset 380) (upload-size int32 20 :offset 388) (inside-boxes? basic) (display? symbol) @@ -397,27 +404,27 @@ (unknown-pad uint8 14) ) (:methods - (level-method-9 () none) - (level-method-10 () none) - (level-method-11 () none) + (deactivate (_type_) _type_) + (unload! (_type_) _type_) + (is-object-visible? (_type_ int) symbol) (level-method-12 () none) - (level-method-13 () none) + (bsp-name (_type_) symbol) (compute-memory-usage! (_type_ symbol) memory-usage-block) - (level-method-15 () none) + (inside-bsp? (_type_) symbol) (update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) - (level-method-17 () none) - (level-method-18 () none) - (level-method-19 () none) - (level-method-20 () none) + (load-continue (_type_) _type_) + (load-begin (_type_) _type_) + (login-begin (_type_) _type_) + (debug-print-region-splitbox (_type_ vector object) none) (get-art-group-by-name (_type_ string) art-group) (level-method-22 () none) (level-method-23 () none) (level-method-24 () none) - (level-method-25 () none) - (level-method-26 () none) - (level-method-27 () none) - (level-method-28 () none) - (level-method-29 () none) + (birth (_type_) _type_) + (level-status-update! (_type_ symbol) _type_) + (load-common-package (_type_) none) + (init-vis-from-bsp (_type_) none) + (vis-clear (_type_) none) ) ) @@ -463,27 +470,27 @@ ) (:methods (level-get (_type_ symbol) level) - (level-group-method-10 () none) + (level-get-with-status (_type_ symbol) level) (get-level-by-heap-ptr-and-status (_type_ pointer symbol) level) - (level-group-method-12 () none) - (level-group-method-13 () none) + (level-get-for-use (_type_ symbol symbol) level) + (activate-levels! (_type_) int) (level-group-method-14 () none) (level-group-method-15 () none) - (level-group-method-16 () none) + (assign-draw-indices (_type_) none) (level-group-method-17 () none) (level-group-method-18 () none) (level-update (_type_) none) (level-get-target-inside (_type_) level) - (level-group-method-21 () none) + (init-level-system (_type_ symbol) none) (art-group-get-by-name (_type_ string (pointer level)) art-group) (level-group-method-23 () none) (level-group-method-24 () none) (level-group-method-25 () none) - (level-group-method-26 (_type_ symbol int) symbol) - (level-group-method-27 () none) - (level-group-method-28 (_type_) symbol) - (level-group-method-29 () none) - (level-group-method-30 () none) + (status-of-level-and-borrows (_type_ symbol symbol) symbol) + (do-nothing (_type_) none) + (load-in-progress? (_type_) symbol) + (is-load-allowed? (_type_ (pointer symbol)) symbol) + (level-get-most-disposable (_type_) level) ) ) diff --git a/goal_src/jak3/engine/level/level-info.gc b/goal_src/jak3/engine/level/level-info.gc index 640936f303..a68f209b8c 100644 --- a/goal_src/jak3/engine/level/level-info.gc +++ b/goal_src/jak3/engine/level/level-info.gc @@ -445,7 +445,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbb8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -570,7 +570,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1a4 #x1a4 #x1a4 #x30c #x32a) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -602,7 +602,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -633,7 +633,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -664,7 +664,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -695,7 +695,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -726,7 +726,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -757,7 +757,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -3151,7 +3151,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x71c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -100) :fog-height (meters 80) @@ -3334,7 +3334,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x13a1 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -3478,7 +3478,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbea #x898 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -4234,7 +4234,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4ba #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4355,7 +4355,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x82a #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4497,7 +4497,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1b #x2ee #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4718,7 +4718,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #xe6 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5102,7 +5102,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5277,7 +5277,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -6125,7 +6125,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa28 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8081,7 +8081,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x79e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8350,7 +8350,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x785 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8383,7 +8383,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x21c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -8515,7 +8515,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x195 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8548,7 +8548,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x320 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8839,7 +8839,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9320,7 +9320,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9754,7 +9754,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4dd #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9787,7 +9787,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x8ca #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -10238,7 +10238,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x898 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 10) :fog-height (meters 80) @@ -11700,7 +11700,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x52d #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -13765,7 +13765,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -14201,7 +14201,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -14623,7 +14623,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4c9 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -15756,7 +15756,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -16235,7 +16235,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17556,7 +17556,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x285 #x8fc #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17821,7 +17821,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18193,7 +18193,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18277,7 +18277,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x9c4 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 516) :fog-height (meters 80) @@ -18462,7 +18462,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -18578,7 +18578,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x384 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) diff --git a/goal_src/jak3/engine/sound/gsound-h.gc b/goal_src/jak3/engine/sound/gsound-h.gc index cff51ed3f7..c1cb1c55df 100644 --- a/goal_src/jak3/engine/sound/gsound-h.gc +++ b/goal_src/jak3/engine/sound/gsound-h.gc @@ -60,6 +60,20 @@ (set-stereo-mode) ) +(defenum sound-bank-mode + :type uint32 + (none 0) + (unknown 1) + (common 2) + (mode 3) + (full 4) + (half 5) + (halfa 6) + (halfb 7) + (halfc 8) + (virtual 9) + ) + ;; +++sound-group (defenum sound-group :bitfield #t @@ -193,8 +207,8 @@ ) (deftype sound-name (uint128) - ((lo uint64 :offset 0) ;; added to help with cases where they access it by u64. - (hi uint64 :offset 64) + ((lo uint64 :offset 0 :size 64) + (hi uint64 :offset 64 :size 64) ) ) @@ -208,17 +222,17 @@ (deftype sound-play-params (structure) - ((mask uint16) - (pitch-mod int16) - (bend int16) - (fo-min int16) - (fo-max int16) - (fo-curve int8) - (priority int8) - (volume int32) - (trans int32 3) - (group uint8) - (reg uint8 3) + ((mask uint16) + (pitch-mod int16) + (bend int16) + (fo-min int16) + (fo-max int16) + (fo-curve int8) + (priority int8) + (volume int32) + (trans int32 3) + (group uint8) + (reg uint8 3) (group-and-reg uint32 :overlay-at group) ) :pack-me @@ -452,7 +466,7 @@ (deftype sound-bank-state (structure) ((name symbol) - (mode uint32) + (mode sound-bank-mode) ) :pack-me ) diff --git a/goal_src/jak3/engine/sound/gsound.gc b/goal_src/jak3/engine/sound/gsound.gc index 6f8fd4a5f9..3ad7bcfae2 100644 --- a/goal_src/jak3/engine/sound/gsound.gc +++ b/goal_src/jak3/engine/sound/gsound.gc @@ -1245,7 +1245,7 @@ (sound-bank-load (string->sound-name (symbol->string s5-0)) 4 10) (set! (-> *level* sound-bank (* gp-0 2) name) s5-0) ) - (set! (-> *level* sound-bank (* gp-0 2) mode) (the-as uint 4)) + (set! (-> *level* sound-bank (* gp-0 2) mode) (sound-bank-mode full)) ) (defun loader-test-command ((cmd sound-command) (param uint)) diff --git a/goal_src/jak3/engine/sound/speech.gc b/goal_src/jak3/engine/sound/speech.gc index 27cc278ab3..da425644af 100644 --- a/goal_src/jak3/engine/sound/speech.gc +++ b/goal_src/jak3/engine/sound/speech.gc @@ -244,7 +244,7 @@ (with-pp (logclear! (-> this flags) (speech-channel-flag disable)) (if (or (not (-> *setting-control* user-current speech-control)) - (level-group-method-28 *level*) + (load-in-progress? *level*) (nonzero? (-> this id)) ) (logior! (-> this flags) (speech-channel-flag disable)) diff --git a/goal_src/jak3/engine/target/target-death.gc b/goal_src/jak3/engine/target/target-death.gc index 4eb8e47346..d534fb4065 100644 --- a/goal_src/jak3/engine/target/target-death.gc +++ b/goal_src/jak3/engine/target/target-death.gc @@ -650,15 +650,15 @@ ) (dotimes (v1-107 3) (set! (-> *load-state* want-sound v1-107 name) (-> arg0 want-sound v1-107)) - (set! (-> *load-state* want-sound v1-107 mode) (the-as uint 1)) + (set! (-> *load-state* want-sound v1-107 mode) (sound-bank-mode unknown)) ) - (load-state-method-21 *load-state*) + (add-borrow-levels *load-state*) (when (not (string= (-> arg0 name) "default")) (while (begin (dotimes (s5-0 (-> arg0 want-count)) (when (not (or (not (-> arg0 want s5-0 name)) (not (-> arg0 want s5-0 display?)) - (= (level-group-method-26 *level* (-> arg0 want s5-0 name) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> arg0 want s5-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -669,7 +669,7 @@ (dotimes (s4-0 10) (when (not (or (not (-> s5-1 want s4-0 name)) (not (-> s5-1 want s4-0 display?)) - (= (level-group-method-26 *level* (-> s5-1 want s4-0 name) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> s5-1 want s4-0 name) #f) 'active) ) ) (set! v1-126 #t) diff --git a/goal_src/jak3/engine/ui/progress/progress.gc b/goal_src/jak3/engine/ui/progress/progress.gc index 2753089f72..3d1f019c02 100644 --- a/goal_src/jak3/engine/ui/progress/progress.gc +++ b/goal_src/jak3/engine/ui/progress/progress.gc @@ -2861,7 +2861,7 @@ (cond ((and (or (demo?) (kiosk?)) (or (= (-> arg0 current) 'select-kiosk-start) (= (-> arg0 current) 'select-kiosk-start-special)) - (= (level-group-method-26 *level* 'title (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* 'title #f) 'active) ) (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) (set-master-mode 'game) @@ -4094,7 +4094,7 @@ ) ) (while (or (not (handle-command-list *gui-control* (gui-channel alert) (the-as gui-connection #f))) - (= (level-group-method-26 *level* 'title (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* 'title #f) 'active) ) (suspend) ) diff --git a/goalc/compiler/compilation/Static.cpp b/goalc/compiler/compilation/Static.cpp index 57f1e42341..ba2a784fab 100644 --- a/goalc/compiler/compilation/Static.cpp +++ b/goalc/compiler/compilation/Static.cpp @@ -891,8 +891,8 @@ void Compiler::fill_static_array_inline(const goos::Object& form, typecheck(form, TypeSpec("integer"), sr.typespec()); } else { if (sr.is_symbol() && sr.symbol_name() == "#f") { - // allow #f for any structure, or symbol (no longer a structure in jak 2) - if (content_type.base_type() != "symbol") { + // allow #f for any structure, symbol (no longer a structure in jak 2), or object. + if (content_type.base_type() != "symbol" && content_type.base_type() != "object") { typecheck(form, TypeSpec("structure"), content_type); } } else { diff --git a/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc index d79220c18d..2a97a23959 100644 --- a/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc @@ -131,23 +131,23 @@ (command-list pair) (object-name string 256) (object-status basic 256) - (update-callback basic) + (update-callback (function load-state object)) ) (:methods (new (symbol type) _type_) - (load-state-method-9 () none) - (load-state-method-10 () none) - (load-state-method-11 () none) + (reset! (_type_) _type_) + (update! (_type_) int) + (want-levels (_type_ (pointer symbol)) int) (want-sound-banks (_type_ (pointer symbol)) none) - (load-state-method-13 () none) - (load-state-method-14 () none) - (load-state-method-15 () none) - (load-state-method-16 () none) + (want-display-level (_type_ symbol symbol) int) + (want-vis-level (_type_ symbol) none) + (want-force-vis (_type_ symbol symbol) int) + (want-force-inside (_type_ symbol symbol) none) (execute-commands-up-to (_type_ float) none) (backup-load-state-and-set-cmds (_type_ pair) int) (restore-load-state-and-cleanup (_type_) int) (restore-load-state (_type_) int) - (load-state-method-21 (_type_) none) + (add-borrow-levels (_type_) none) ) ) @@ -192,11 +192,10 @@ ) ;; definition for method 0 of type load-state -;; WARN: Return type mismatch none vs load-state. (defmethod new load-state ((allocation symbol) (type-to-make type)) (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> a0-1 update-callback) #f) - (the-as load-state ((method-of-object a0-1 load-state-method-9))) + (reset! a0-1) ) ) diff --git a/test/decompiler/reference/jak3/engine/game/game-info_REF.gc b/test/decompiler/reference/jak3/engine/game/game-info_REF.gc index 6ab506e9c5..9f36de3ca2 100644 --- a/test/decompiler/reference/jak3/engine/game/game-info_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-info_REF.gc @@ -193,7 +193,7 @@ (set! (-> continue-rot 8) (the int (* 32767.0 (-> rot fvec z)))) ) ) - (load-state-method-21 arg0) + (add-borrow-levels arg0) this ) @@ -385,7 +385,7 @@ (when (or (and (-> subtask manager) (handle->process (-> subtask manager manager))) (and (-> subtask manager) (-> subtask manager level) - (= (level-group-method-26 *level* (-> subtask manager level) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> subtask manager level) #f) 'active) ) (and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level))) ) diff --git a/test/decompiler/reference/jak3/engine/game/settings_REF.gc b/test/decompiler/reference/jak3/engine/game/settings_REF.gc index 696b8aadfc..ddf1d15fc3 100644 --- a/test/decompiler/reference/jak3/engine/game/settings_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/settings_REF.gc @@ -1429,7 +1429,7 @@ (set! (-> s5-0 allow-error) (-> s4-0 allow-error)) (set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod)) (set! (-> s5-0 slow-time) (-> s4-0 slow-time)) - (if (and (-> s4-0 mirror) (= (level-group-method-26 *level* 'ctywide (the-as int #f)) 'active)) + (if (and (-> s4-0 mirror) (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)) (set! (-> s5-0 mirror) #f) (set! (-> s5-0 mirror) (-> s4-0 mirror)) ) @@ -1655,7 +1655,7 @@ (when (and (!= (-> s4-0 music) (-> s5-0 music)) (and (zero? (rpc-busy? 1)) (or (not (-> s4-0 music)) - (and (< 0.0 (-> s5-0 music-volume)) (not (level-group-method-28 *level*)) (not (-> s5-0 movie))) + (and (< 0.0 (-> s5-0 music-volume)) (not (load-in-progress? *level*)) (not (-> s5-0 movie))) ) (not *master-exit*) ) diff --git a/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc b/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc index 5efc74f301..c6da4a4c66 100644 --- a/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc @@ -37,33 +37,42 @@ This is used for precomputed visibility, based on the camera position. This is n "The bsp-header is really an entire level. This probably started as a very simple structure, but now it is extremely complicated." ((info file-info :overlay-at id) - (all-visible-list (pointer uint8) :offset 32) - (visible-list-length int16 :offset 36) + (all-visible-list (pointer uint8)) + (visible-list-length int16) (extra-vis-list-length int16) - (drawable-trees drawable-tree-array :offset 40) - (pat pointer :offset 44) - (pat-length int32 :offset 48) + (drawable-trees drawable-tree-array) + (pat pointer) + (pat-length int32) (texture-remap-table (pointer uint64)) (texture-remap-table-len int32) (texture-ids (pointer texture-id)) (texture-page-count int32) (unknown-basic basic) - (actors drawable-inline-array-actor :offset 112) + (name symbol) + (nickname symbol) + (vis-info level-vis-info 8) + (actors drawable-inline-array-actor) (cameras (array entity-camera)) - (nodes (inline-array bsp-node) :offset 120) + (nodes (inline-array bsp-node)) (level level) (current-leaf-idx uint16) - (texture-flags texture-page-flag 10 :offset 130) + (texture-flags texture-page-flag 10) (cam-outside-bsp uint8 :offset 152) (cam-using-back uint8) (cam-box-idx uint16) + (subdivide-close float :offset 160) + (subdivide-far float) (actor-birth-order (pointer uint32) :offset 172) + (light-hash light-hash) + (nav-meshes (array entity-nav-mesh)) (region-trees (array drawable-tree-region-prim) :offset 188) (collide-hash collide-hash :offset 196) (wind-array uint32 :offset 200) (wind-array-length int32 :offset 204) + (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) (vis-spheres-length uint32 :offset 248) + (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset 256) (tfrag-closest (pointer float)) (tfrag-mask-count uint32 :overlay-at tfrag-closest) diff --git a/test/decompiler/reference/jak3/engine/level/level-h_REF.gc b/test/decompiler/reference/jak3/engine/level/level-h_REF.gc index 7e6f28b758..e07416a5bf 100644 --- a/test/decompiler/reference/jak3/engine/level/level-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/level-h_REF.gc @@ -150,9 +150,9 @@ ;; definition of type level-borrow-info (deftype level-borrow-info (basic) - ((alias symbol) + ((alias object) (borrow-size uint16 5) - (borrow-info symbol 5) + (borrow-info object 5) ) ) @@ -218,8 +218,8 @@ (mood-range mood-range :inline) ) (:methods - (level-load-info-method-9 (_type_ int) object) - (level-load-info-method-10 (_type_) none) + (get-callback-symbol-value-by-slot! (_type_ int) object) + (get-callback-by-slot! (_type_ int) object) ) ) @@ -376,6 +376,11 @@ (entity entity-links-array) (closest-object meters 10) (tie-min-dist float :offset 352) + (fg-tfrag-min-dist float) + (fg-prim-min-dist float) + (fg-shrub-min-dist float) + (fg-warp-min-dist float :offset 372) + (fg-prim2-min-dist float :offset 380) (upload-size int32 20 :offset 388) (inside-boxes? basic) (display? symbol) @@ -435,27 +440,27 @@ (unknown-pad uint8 14) ) (:methods - (level-method-9 () none) - (level-method-10 () none) - (level-method-11 () none) + (deactivate (_type_) _type_) + (unload! (_type_) _type_) + (is-object-visible? (_type_ int) symbol) (level-method-12 () none) - (level-method-13 () none) + (bsp-name (_type_) symbol) (compute-memory-usage! (_type_ symbol) memory-usage-block) - (level-method-15 () none) + (inside-bsp? (_type_) symbol) (update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) - (level-method-17 () none) - (level-method-18 () none) - (level-method-19 () none) - (level-method-20 () none) + (load-continue (_type_) _type_) + (load-begin (_type_) _type_) + (login-begin (_type_) _type_) + (debug-print-region-splitbox (_type_ vector object) none) (get-art-group-by-name (_type_ string) art-group) (level-method-22 () none) (level-method-23 () none) (level-method-24 () none) - (level-method-25 () none) - (level-method-26 () none) - (level-method-27 () none) - (level-method-28 () none) - (level-method-29 () none) + (birth (_type_) _type_) + (level-status-update! (_type_ symbol) _type_) + (load-common-package (_type_) none) + (init-vis-from-bsp (_type_) none) + (vis-clear (_type_) none) ) ) @@ -657,27 +662,27 @@ ) (:methods (level-get (_type_ symbol) level) - (level-group-method-10 () none) + (level-get-with-status (_type_ symbol) level) (get-level-by-heap-ptr-and-status (_type_ pointer symbol) level) - (level-group-method-12 () none) - (level-group-method-13 () none) + (level-get-for-use (_type_ symbol symbol) level) + (activate-levels! (_type_) int) (level-group-method-14 () none) (level-group-method-15 () none) - (level-group-method-16 () none) + (assign-draw-indices (_type_) none) (level-group-method-17 () none) (level-group-method-18 () none) (level-update (_type_) none) (level-get-target-inside (_type_) level) - (level-group-method-21 () none) + (init-level-system (_type_ symbol) none) (art-group-get-by-name (_type_ string (pointer level)) art-group) (level-group-method-23 () none) (level-group-method-24 () none) (level-group-method-25 () none) - (level-group-method-26 (_type_ symbol int) symbol) - (level-group-method-27 () none) - (level-group-method-28 (_type_) symbol) - (level-group-method-29 () none) - (level-group-method-30 () none) + (status-of-level-and-borrows (_type_ symbol symbol) symbol) + (do-nothing (_type_) none) + (load-in-progress? (_type_) symbol) + (is-load-allowed? (_type_ (pointer symbol)) symbol) + (level-get-most-disposable (_type_) level) ) ) diff --git a/test/decompiler/reference/jak3/engine/level/level-info_REF.gc b/test/decompiler/reference/jak3/engine/level/level-info_REF.gc index 42ae4cd18f..25d475c76b 100644 --- a/test/decompiler/reference/jak3/engine/level/level-info_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/level-info_REF.gc @@ -445,7 +445,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbb8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -574,7 +574,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1a4 #x1a4 #x1a4 #x30c #x32a) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -607,7 +607,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -639,7 +639,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -671,7 +671,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -703,7 +703,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -735,7 +735,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -767,7 +767,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -3190,7 +3190,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x71c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -100) :fog-height (meters 80) @@ -3377,7 +3377,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x13a1 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -3523,7 +3523,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbea #x898 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -4299,7 +4299,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4ba #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4422,7 +4422,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x82a #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4566,7 +4566,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1b #x2ee #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4791,7 +4791,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #xe6 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5179,7 +5179,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5355,7 +5355,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -6221,7 +6221,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa28 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8202,7 +8202,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x79e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8476,7 +8476,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x785 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8510,7 +8510,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x21c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -8645,7 +8645,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x195 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8679,7 +8679,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x320 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8971,7 +8971,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9456,7 +9456,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9895,7 +9895,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4dd #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9929,7 +9929,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x8ca #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -10385,7 +10385,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x898 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 10) :fog-height (meters 80) @@ -11893,7 +11893,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x52d #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -13969,7 +13969,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -14411,7 +14411,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -14843,7 +14843,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4c9 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -16005,7 +16005,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -16489,7 +16489,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17819,7 +17819,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x285 #x8fc #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18091,7 +18091,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18464,7 +18464,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18549,7 +18549,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x9c4 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 516) :fog-height (meters 80) @@ -18737,7 +18737,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -18855,7 +18855,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x384 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) diff --git a/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc b/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc index 9183f1e966..8392702d66 100644 --- a/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc @@ -807,7 +807,7 @@ ;; definition of type sound-bank-state (deftype sound-bank-state (structure) ((name symbol) - (mode uint32) + (mode sound-bank-mode) ) :pack-me ) diff --git a/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc b/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc index 8dd3114d95..6e37a7ad34 100644 --- a/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc @@ -1409,7 +1409,7 @@ (sound-bank-load (string->sound-name (symbol->string s5-0)) 4 10) (set! (-> *level* sound-bank (* gp-0 2) name) s5-0) ) - (set! (-> *level* sound-bank (* gp-0 2) mode) (the-as uint 4)) + (set! (-> *level* sound-bank (* gp-0 2) mode) (sound-bank-mode full)) ) ;; definition for function loader-test-command diff --git a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc index cd26e9cf98..06ab4b3df8 100644 --- a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc @@ -247,7 +247,7 @@ (with-pp (logclear! (-> this flags) (speech-channel-flag disable)) (if (or (not (-> *setting-control* user-current speech-control)) - (level-group-method-28 *level*) + (load-in-progress? *level*) (nonzero? (-> this id)) ) (logior! (-> this flags) (speech-channel-flag disable)) @@ -626,7 +626,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc index 6f271a362d..d26d4d053f 100644 --- a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc @@ -654,15 +654,15 @@ ) (dotimes (v1-107 3) (set! (-> *load-state* want-sound v1-107 name) (-> arg0 want-sound v1-107)) - (set! (-> *load-state* want-sound v1-107 mode) (the-as uint 1)) + (set! (-> *load-state* want-sound v1-107 mode) (sound-bank-mode unknown)) ) - (load-state-method-21 *load-state*) + (add-borrow-levels *load-state*) (when (not (string= (-> arg0 name) "default")) (while (begin (dotimes (s5-0 (-> arg0 want-count)) (when (not (or (not (-> arg0 want s5-0 name)) (not (-> arg0 want s5-0 display?)) - (= (level-group-method-26 *level* (-> arg0 want s5-0 name) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> arg0 want s5-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -673,7 +673,7 @@ (dotimes (s4-0 10) (when (not (or (not (-> s5-1 want s4-0 name)) (not (-> s5-1 want s4-0 display?)) - (= (level-group-method-26 *level* (-> s5-1 want s4-0 name) (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* (-> s5-1 want s4-0 name) #f) 'active) ) ) (set! v1-126 #t) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc index 78d698f25f..86eca38658 100644 --- a/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc @@ -2950,7 +2950,7 @@ (cond ((and (or (demo?) (kiosk?)) (or (= (-> arg0 current) 'select-kiosk-start) (= (-> arg0 current) 'select-kiosk-start-special)) - (= (level-group-method-26 *level* 'title (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* 'title #f) 'active) ) (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) (set-master-mode 'game) @@ -4204,7 +4204,7 @@ ) ) (while (or (not (handle-command-list *gui-control* (gui-channel alert) (the-as gui-connection #f))) - (= (level-group-method-26 *level* 'title (the-as int #f)) 'active) + (= (status-of-level-and-borrows *level* 'title #f) 'active) ) (suspend) )