diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 7611e46d71e..af19b732b9e 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -1697,7 +1697,7 @@ (pid int32 :offset-assert 40) (main-thread cpu-thread :offset-assert 44) (top-thread thread :offset-assert 48) - (entity entity :offset-assert 52) ;; likely a res-lump + (entity entity-actor :offset-assert 52) (state state :offset-assert 56) (trans-hook function :offset-assert 60) (post-hook function :offset-assert 64) @@ -1724,7 +1724,7 @@ ;; - Functions -(define-extern entity-deactivate-handler (function process entity none)) +(define-extern entity-deactivate-handler (function process entity-actor none)) (define-extern process-disconnect (function process int)) (define-extern throw (function symbol object int)) (define-extern set-to-run-bootstrap (function none)) @@ -10834,8 +10834,7 @@ ) (deftype camera-tracker (process) - ((entity-override entity-actor :score 100 :offset 52) - (grab-target handle :offset 120) + ((grab-target handle :offset 120) (grab-event symbol :offset-assert 128) (release-event symbol :offset-assert 132) (old-global-mask process-mask :offset-assert 136) @@ -16112,7 +16111,7 @@ ;; - Functions -(define-extern nav-mesh-connect (function process trsqv nav-control nav-mesh)) +(define-extern nav-mesh-connect (function process trsqv nav-control nav-mesh :behavior process)) (define-extern has-nav-mesh? (function entity-actor symbol)) ;; - Symbols @@ -20467,7 +20466,7 @@ (define-extern camera-look-at (function pair uint process :behavior camera-tracker)) (define-extern camera-pov-from (function pair uint process :behavior camera-tracker)) (define-extern command-get-trans (function object vector vector)) ;; object types - null | symbol (null | target) | pair -(define-extern manipy-init (function vector entity skeleton-group vector none :behavior manipy)) ;; TODO - not confirmed yet +(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy)) ;; TODO - not confirmed yet (define-extern part-tracker-notify (function object :behavior part-tracker)) (define-extern clone-anim-once (function handle int symbol string none :behavior process-drawable)) (define-extern convert-to-hud-object (function process-drawable hud none :behavior process-drawable)) @@ -20853,7 +20852,7 @@ ;; - Functions (define-extern target-swim-tilt (function float float float float float :behavior target)) -(define-extern projectile-init-by-other (function entity vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` +(define-extern projectile-init-by-other (function entity-actor vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` (define-extern first-person-hud-init-by-other (function none :behavior first-person-hud)) (define-extern disable-hud (function int none)) (define-extern enable-hud (function none)) @@ -21258,8 +21257,8 @@ ;; - Functions (define-extern task-control-reset (function symbol none)) -(define-extern init-entity (function process entity none)) -(define-extern birth-viewer (function process entity object)) +(define-extern init-entity (function process entity-actor none)) +(define-extern birth-viewer (function process entity-actor object)) (define-extern update-actor-vis-box (function process-drawable vector vector none)) (define-extern process-status-bits (function process symbol none)) (define-extern entity-by-meters (function float float float entity-actor)) @@ -21472,7 +21471,7 @@ (define-extern check-water-level-drop (function sparticle-system sparticle-cpuinfo vector none)) (define-extern check-water-level-drop-and-die (function sparticle-system sparticle-cpuinfo vector none)) (define-extern check-water-level-above-and-die (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern water-vol-init-by-other (function entity none :behavior water-vol)) +(define-extern water-vol-init-by-other (function entity-actor none :behavior water-vol)) ;; ---------------------- @@ -21730,11 +21729,11 @@ (define-extern check-blue-suck (function process-drawable none :behavior eco-collectable)) (define-extern initialize-eco-by-other (function vector vector fact-info none :behavior eco)) (define-extern add-blue-shake (function vector vector vector vector)) -(define-extern money-init-by-other (function vector vector fact-info entity none :behavior money)) -(define-extern money-init-by-other-no-bob (function vector vector fact-info float entity none :behavior money)) -(define-extern fuel-cell-init-by-other (function vector vector fact-info entity none :behavior fuel-cell)) +(define-extern money-init-by-other (function vector vector fact-info entity-actor none :behavior money)) +(define-extern money-init-by-other-no-bob (function vector vector fact-info float entity-actor none :behavior money)) +(define-extern fuel-cell-init-by-other (function vector vector fact-info entity-actor none :behavior fuel-cell)) (define-extern fuel-cell-init-as-clone (function handle int none :behavior fuel-cell)) -(define-extern buzzer-init-by-other (function vector vector fact-info entity none :behavior buzzer)) +(define-extern buzzer-init-by-other (function vector vector fact-info entity-actor none :behavior buzzer)) ;; - Symbols @@ -23560,7 +23559,7 @@ ;; - Functions -(define-extern basebutton-init-by-other (function basebutton vector quaternion entity-actor symbol float none :behavior basebutton)) +(define-extern basebutton-init-by-other (function entity-actor vector quaternion entity-actor symbol float none :behavior basebutton)) ;; - Unknowns @@ -24199,7 +24198,7 @@ (define-extern solve-missile-velocity (function trajectory-params float none)) (define-extern spawn-mistycannon-missile (function process-tree vector vector float float float float entity none)) (define-extern angle-tracker-apply-move! (function angle-tracker float float)) -(define-extern mistycannon-missile-init-by-other (function mistycannon-init-data entity none :behavior mistycannon-missile)) +(define-extern mistycannon-missile-init-by-other (function mistycannon-init-data entity-actor none :behavior mistycannon-missile)) (define-extern mistycannon-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) (define-extern angle-tracker-get-value (function angle-tracker float)) (define-extern angle-tracker-set-value (function angle-tracker float float)) @@ -24487,7 +24486,7 @@ (define-extern flutflutegg-hit-sounds (function none :behavior flutflutegg)) (define-extern bladeassm-prebind-function (function process-drawable int bladeassm event-message-block object)) ;; TODO - first arg is very likely wrong -(define-extern flying-rock-init-by-other (function vector vector float entity none :behavior flying-rock)) +(define-extern flying-rock-init-by-other (function vector vector float entity-actor none :behavior flying-rock)) (define-extern spawn-flying-rock (function vector vector float entity none)) (define-extern move-grottopole-to-position (function grottopole none)) (define-extern move-grottopole (function grottopole float none)) @@ -26129,12 +26128,12 @@ ;; - Functions -(define-extern light-eco-child-init-by-other (function entity vector vector int none :behavior light-eco-child)) +(define-extern light-eco-child-init-by-other (function entity-actor vector vector int none :behavior light-eco-child)) (define-extern check-drop-level-lighteco-big-pops (function sparticle-system sparticle-cpuinfo vector none)) (define-extern check-drop-level-lighteco-pops (function sparticle-system sparticle-cpuinfo vector none)) (define-extern light-eco-child-default-event-handler (function process int symbol event-message-block object :behavior light-eco-child)) (define-extern light-eco-mother-default-event-handler (function process int symbol event-message-block int :behavior light-eco-mother)) -(define-extern light-eco-mother-init-by-other (function entity vector none :behavior light-eco-mother)) +(define-extern light-eco-mother-init-by-other (function entity-actor vector none :behavior light-eco-mother)) ;; - Unknowns @@ -26327,7 +26326,7 @@ (define-extern robotboss-manipy-trans-hook (function none :behavior robotboss)) (define-extern ecoclaw-beam-particle-callback (function part-tracker none)) (define-extern ecoclaw-handler (function process int symbol event-message-block object :behavior ecoclaw)) -(define-extern finalbosscam-init-by-other (function entity none :behavior finalbosscam)) +(define-extern finalbosscam-init-by-other (function entity-actor none :behavior finalbosscam)) ;; - Unknowns @@ -26380,8 +26379,8 @@ ;; - Functions -(define-extern green-eco-lurker-init-by-other (function entity green-eco-lurker-gen vector none :behavior green-eco-lurker)) -(define-extern green-eco-lurker-gen-init-by-other (function entity vector int none :behavior green-eco-lurker-gen)) +(define-extern green-eco-lurker-init-by-other (function entity-actor green-eco-lurker-gen vector none :behavior green-eco-lurker)) +(define-extern green-eco-lurker-gen-init-by-other (function entity-actor vector int none :behavior green-eco-lurker-gen)) ;; - Unknowns @@ -26510,7 +26509,7 @@ ;; - Functions -(define-extern powercellalt-init-by-other (function entity vector vector int none :behavior powercellalt)) +(define-extern powercellalt-init-by-other (function entity-actor vector vector int none :behavior powercellalt)) ;; - Unknowns @@ -26601,7 +26600,7 @@ ;; - Types (deftype evilbro (process-taskable) - ((evilsis entity :offset-assert 380) + ((evilsis entity-actor :offset-assert 380) ) :method-count-assert 53 :heap-base #x110 @@ -27844,7 +27843,7 @@ ;; - Types (deftype flut-info (basic) - ((entity basic :offset-assert 4) + ((entity entity-actor :offset-assert 4) (flut-trans vector :inline :offset-assert 16) (flut-quat vector :inline :offset-assert 32) (flut-scale vector :inline :offset-assert 48) @@ -28488,7 +28487,7 @@ ;; - Functions -(define-extern sequenceA-village1-init-by-other (function entity none :behavior sequenceA-village1)) +(define-extern sequenceA-village1-init-by-other (function entity-actor none :behavior sequenceA-village1)) (define-extern sequenceA-village1-trans-hook (function none :behavior sequenceA-village1)) ;; - Unknowns @@ -29039,10 +29038,10 @@ (define-extern orient-to-face-target (function quaternion :behavior quicksandlurker)) (define-extern quicksandlurker-spit (function (pointer part-tracker) :behavior quicksandlurker)) -(define-extern spawn-quicksandlurker-missile (function process vector vector entity none)) +(define-extern spawn-quicksandlurker-missile (function process vector vector entity-actor none)) (define-extern quicksandlurker-check-hide-transition (function none :behavior quicksandlurker)) (define-extern inc-angle (function (pointer float) float float)) -(define-extern quicksandlurker-missile-init-by-other (function quicksandlurker-missile-init-data entity none :behavior quicksandlurker-missile)) +(define-extern quicksandlurker-missile-init-by-other (function quicksandlurker-missile-init-data entity-actor none :behavior quicksandlurker-missile)) (define-extern get-height-over-navmesh! function) ;; unused (define-extern intersects-nav-mesh? (function nav-control vector symbol)) ;; unused (define-extern quicksandlurker-default-event-handler (function process int symbol event-message-block object :behavior quicksandlurker)) @@ -29115,10 +29114,10 @@ (explosion-force vector :inline :offset-assert 752) (explosion symbol :offset-assert 768) (explosion-joint-index uint16 2 :offset-assert 772) - (explosion-joint-index-bytes int8 4 :offset 772) ;; added overlay + (explosion-joint-index-bytes int8 4 :score 50 :offset 772) ;; added overlay (vulnerable symbol :offset-assert 776) (water-y float :offset-assert 780) - (propeller joint-mod-set-local :offset-assert 784) + (propeller joint-mod-spinner :offset-assert 784) (rudder joint-mod-set-local :offset-assert 788) (mine joint-mod-set-world 2 :offset-assert 792) (buoyancy-factor float :offset-assert 800) @@ -30321,7 +30320,7 @@ (define-extern kermit-get-new-patrol-point (function vector :behavior kermit)) (define-extern kermit-long-hop (function symbol :behavior kermit)) (define-extern kermit-short-hop (function symbol :behavior kermit)) -(define-extern kermit-pulse-init-by-other (function vector entity none :behavior kermit-pulse)) +(define-extern kermit-pulse-init-by-other (function vector entity-actor none :behavior kermit-pulse)) (define-extern joint-mod-tracker-callback (function cspace transformq none)) (define-extern build-matrix-from-up-and-forward-axes! (function matrix vector int vector int matrix)) (define-extern kermit-get-head-dir (function kermit vector vector)) @@ -30959,7 +30958,7 @@ ;; - Functions -(define-extern mother-spider-egg-init-by-other (function entity vector vector vector none :behavior mother-spider-egg)) +(define-extern mother-spider-egg-init-by-other (function entity-actor vector vector vector none :behavior mother-spider-egg)) ;; - Unknowns @@ -31535,7 +31534,7 @@ ;; - Functions -(define-extern orbit-plat-bottom-init-by-other (function entity orbit-plat none :behavior orbit-plat-bottom)) +(define-extern orbit-plat-bottom-init-by-other (function entity-actor orbit-plat none :behavior orbit-plat-bottom)) (define-extern get-rotate-point! (function vector vector vector vector float float vector)) (define-extern get-nav-point! (function vector orbit-plat vector float vector)) @@ -31695,7 +31694,7 @@ ;; - Functions -(define-extern qbert-plat-on-init-by-other (function entity qbert-plat none :behavior qbert-plat)) +(define-extern qbert-plat-on-init-by-other (function entity-actor qbert-plat none :behavior qbert-plat)) (define-extern qbert-plat-event-handler (function process int symbol event-message-block object :behavior qbert-plat)) ;; - Unknowns @@ -31859,7 +31858,7 @@ ;; - Functions (define-extern exit-chamber-button-init-by-other (function vector quaternion entity-actor symbol none :behavior exit-chamber-button)) -(define-extern blue-eco-charger-orb-init-by-other (function entity blue-eco-charger-orb none :behavior blue-eco-charger-orb)) +(define-extern blue-eco-charger-orb-init-by-other (function entity-actor blue-eco-charger-orb none :behavior blue-eco-charger-orb)) ;; - Unknowns @@ -32079,7 +32078,7 @@ ;; - Functions -(define-extern bully-broken-cage-init-by-other (function entity none :behavior bully-broken-cage)) +(define-extern bully-broken-cage-init-by-other (function entity-actor none :behavior bully-broken-cage)) (define-extern bully-default-event-handler (function process int symbol event-message-block object :behavior bully)) (define-extern bully-post (function none :behavior bully)) @@ -32364,7 +32363,7 @@ ;; - Functions -(define-extern sunkenfisha-init-by-other (function entity none :behavior sunkenfisha)) +(define-extern sunkenfisha-init-by-other (function entity-actor none :behavior sunkenfisha)) ;; - Unknowns @@ -32994,20 +32993,20 @@ (define-extern ogreboss-spawn-super-boulder (function none :behavior ogreboss)) (define-extern ogreboss-update-shuffling (function none :behavior ogreboss)) (define-extern ogreboss-player-inside-range? (function float symbol :behavior ogreboss)) -(define-extern ogreboss-super-boulder-init-by-other (function vector float entity none :behavior ogreboss-super-boulder)) +(define-extern ogreboss-super-boulder-init-by-other (function vector float entity-actor none :behavior ogreboss-super-boulder)) (define-extern ogreboss-set-stage2-camera (function none)) (define-extern ogreboss-move-far (function time-frame float none :behavior ogreboss)) (define-extern ogreboss-roll-boulder (function none :behavior ogreboss)) (define-extern ogreboss-update-super-boulder (function none :behavior ogreboss)) (define-extern ogreboss-blend-hit-anim (function none :behavior ogreboss)) -(define-extern ogreboss-bounce-boulder-init-by-other (function int entity none :behavior ogreboss-bounce-boulder)) +(define-extern ogreboss-bounce-boulder-init-by-other (function int entity-actor none :behavior ogreboss-bounce-boulder)) (define-extern ogreboss-set-stage1-camera (function none)) (define-extern ogreboss-move-near (function time-frame float none :behavior ogreboss)) (define-extern ogreboss-shoot-boulder (function int none :behavior ogreboss)) (define-extern ogreboss-inc-try-count (function none :behavior ogreboss)) (define-extern ogreboss-emerge (function float none :behavior ogreboss)) (define-extern ogreboss-pick-target (function int :behavior ogreboss)) -(define-extern ogreboss-missile-init-by-other (function ogreboss-missile-init-data entity none :behavior ogreboss-missile)) +(define-extern ogreboss-missile-init-by-other (function ogreboss-missile-init-data entity-actor none :behavior ogreboss-missile)) (define-extern ogreboss-idle-loop (function none :behavior ogreboss)) (define-extern ogreboss-super-boulder-impact-effect (function none :behavior ogreboss-super-boulder)) (define-extern ogreboss-super-boulder-play-hit-anim (function object :behavior ogreboss-super-boulder)) @@ -34669,8 +34668,8 @@ ;; - Functions -(define-extern logo-slave-init-by-other (function entity skeleton-group none :behavior logo-slave)) -(define-extern logo-init-by-other (function entity vector symbol none :behavior logo)) +(define-extern logo-slave-init-by-other (function entity-actor skeleton-group none :behavior logo-slave)) +(define-extern logo-init-by-other (function entity-actor vector symbol none :behavior logo)) ;; - Unknowns diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 9c154b95906..9381ad62338 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -665,16 +665,6 @@ ], "(method 12 art-group)": [[13, "a0", "art-joint-anim"]], "(method 0 path-control)": [["_stack_", 16, "res-tag"]], - "(method 0 curve-control)": [[[13, 55], "s3", "entity"]], - "nav-mesh-connect": [ - [[4, 15], "s2", "entity-actor"], - [19, "v1", "entity"], - [20, "v1", "entity-links"], - [72, "v1", "entity"], - [73, "v1", "entity-links"], - [76, "a0", "entity"], - [77, "a0", "entity-links"] - ], "add-debug-point": [ [125, "a3", "pointer"], [[27, 144], "a0", "(pointer uint64)"], diff --git a/goal_src/engine/data/art-h.gc b/goal_src/engine/data/art-h.gc index 7672d05b878..33e43320b9f 100644 --- a/goal_src/engine/data/art-h.gc +++ b/goal_src/engine/data/art-h.gc @@ -143,6 +143,7 @@ ;; "art" is an overly general parent class of all art data. ;; it can be either a container of arts (art-group) or a single art (art-element) +(declare-type res-lump basic) (deftype art (basic) ((name string :offset 8) (length int32 :offset-assert 12) diff --git a/goal_src/engine/debug/viewer.gc b/goal_src/engine/debug/viewer.gc index 8ab1df17423..183479a0286 100644 --- a/goal_src/engine/debug/viewer.gc +++ b/goal_src/engine/debug/viewer.gc @@ -222,7 +222,7 @@ #f ) -(defun birth-viewer ((arg0 process) (arg1 entity)) +(defun birth-viewer ((arg0 process) (arg1 entity-actor)) (set! (-> arg0 type) viewer) (let ((t9-0 init-entity)) viewer diff --git a/goal_src/engine/entity/actor-link-h.gc b/goal_src/engine/entity/actor-link-h.gc index f7a66c56544..d9cf247bb8c 100644 --- a/goal_src/engine/entity/actor-link-h.gc +++ b/goal_src/engine/entity/actor-link-h.gc @@ -6,13 +6,13 @@ ;; dgos: GAME, ENGINE ;; The exact details of actor-link-h are not yet understood, but this system caches lookups for entities/process. -;; Each entity has a res-lump. Some entities may reference other entities. This is done with an element in a res-lump -;; than contains named lists (possibly of size 1) of other entities. These lists may store entities by a name, or by an +;; Some entities may reference other entities. This is done with an element in a res-lump/entity that contains +;; named lists (possibly of size 1) of other entities. These lists may store entities by a name, or by an ;; actor id (AID). -;; This process is slow: it involves going from a process, to its entity, to doing a res-lump, deciding if you have an AID/string, +;; This process is slow: it involves going from a process, to its entity, to doing a lookup, deciding if you have an AID/string, ;; then looking up the other actor by name, or AID. Lookup by name is extremely slow, as it involves checking each actor's name -;; a res lookup per every actor in every level. Lookup by aid isn't bad, but is still a binary search through all actors. +;; per every actor in every level. Lookup by aid isn't bad, but is still a binary search through all actors. ;; The next-actor and prev-actor res build a linked list of actors. @@ -95,12 +95,14 @@ (defmethod next-actor entity-actor ((obj entity-actor)) "Utility function to look up the next actor in the list, assuming we don't have actor-link-info yet." + (declare (inline)) ;; look up reference to next-actor - this is slow. (entity-actor-lookup obj 'next-actor 0) ) (defmethod prev-actor entity-actor ((obj entity-actor)) "Look up previous actor in the list" + (declare (inline)) (entity-actor-lookup obj 'prev-actor 0) ) @@ -110,15 +112,9 @@ (let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> obj process) proc) - ;; set next (likely next-actor inlined) - (let ((ent (-> proc entity))) - (set! (-> obj next) (entity-actor-lookup (the-as res-lump ent) 'next-actor 0)) - ) - - ;; set prev (likely prev-actor inlined) - (let ((a0-2 (-> proc entity))) - (set! (-> obj prev) (entity-actor-lookup (the-as res-lump a0-2) 'prev-actor 0)) - ) + ;; set next and prev + (set! (-> obj next) (next-actor (-> proc entity))) + (set! (-> obj prev) (prev-actor (-> proc entity))) obj ) ) @@ -139,30 +135,18 @@ (defmethod get-next-process actor-link-info ((obj actor-link-info)) "Get the process for the next, if it exists." ;; we can't easily get to the actor-link-info of the next, so we have to grab it from entity-links. - (the-as process - (and (-> obj next) (-> (the-as entity-links (-> obj next extra)) process)) - ) + (the-as process (and (-> obj next) (-> obj next extra process))) ) (defmethod get-prev-process actor-link-info ((obj actor-link-info)) "Get the process for the prev, if it exists" - (the-as process - (and (-> obj prev) (-> (the-as entity-links (-> obj prev extra)) process)) - ) + (the-as process (and (-> obj prev) (-> obj prev extra process))) ) (defmethod link-to-next-and-prev-actor actor-link-info ((obj actor-link-info)) "Redo the linking in the constructor by looking up the next/prev actor." - (let ((a0-1 (-> obj process entity))) - (set! (-> obj next) - (entity-actor-lookup (the-as res-lump a0-1) 'next-actor 0) - ) - ) - (let ((a0-2 (-> obj process entity))) - (set! (-> obj prev) - (entity-actor-lookup (the-as res-lump a0-2) 'prev-actor 0) - ) - ) + (set! (-> obj next) (next-actor (-> obj process entity))) + (set! (-> obj prev) (prev-actor (-> obj process entity))) (-> obj next) ) @@ -176,7 +160,7 @@ (if (arg0 s3-0 arg1) (return (the-as int #f)) ) - (set! s3-0 (entity-actor-lookup s3-0 'next-actor 0)) + (set! s3-0 (next-actor s3-0)) ) ) 0 @@ -191,33 +175,28 @@ (if (arg0 s3-0 arg1) (return (the-as int #f)) ) - (set! s3-0 (entity-actor-lookup s3-0 'prev-actor 0)) + (set! s3-0 (prev-actor s3-0)) ) ) 0 ) -(defmethod apply-all actor-link-info - ((obj actor-link-info) (arg0 (function entity-actor object object)) (arg1 object)) +(defmethod apply-all actor-link-info ((obj actor-link-info) (arg0 (function entity-actor object object)) (arg1 object)) "Apply to all entities. Starts at the back and hits everyone, including this object." ;; start at us (next may give us #f here, so can't do that.) (let ((s4-0 (-> obj process entity))) ;; while there is a prev... - (while (let ((a0-2 s4-0)) - (entity-actor-lookup (the-as res-lump a0-2) 'prev-actor 0) - ) + (while (prev-actor s4-0) ;; set prev (this is stupid, they do the slow lookup twice!) - (set! s4-0 (entity-actor-lookup (the-as res-lump s4-0) 'prev-actor 0)) + (set! s4-0 (prev-actor s4-0)) ) ;; now iterate forward. (while s4-0 - (if (arg0 (the-as entity-actor s4-0) arg1) + (if (arg0 s4-0 arg1) (return (the-as int #f)) ) - (let ((a0-4 s4-0)) - (set! s4-0 (entity-actor-lookup (the-as res-lump a0-4) 'next-actor 0)) - ) + (set! s4-0 (next-actor s4-0)) ) ) 0 @@ -229,11 +208,11 @@ (let ((iter (-> obj next)) (result (the object #f))) (while iter - (let ((proc (-> (the entity-links (-> iter extra)) process))) + (let ((proc (-> iter extra process))) (when proc (set! result (or (send-event proc message) result)) ) - (set! iter (entity-actor-lookup iter 'next-actor 0)) + (set! iter (next-actor iter)) ) ) result @@ -246,11 +225,11 @@ (let ((iter (-> obj prev)) (result (the object #f))) (while iter - (let ((proc (-> (the entity-links (-> iter extra)) process))) + (let ((proc (-> iter extra process))) (when proc (set! result (or (send-event proc message) result)) ) - (set! iter (entity-actor-lookup iter 'prev-actor 0)) + (set! iter (prev-actor iter)) ) ) result @@ -264,7 +243,7 @@ ;; do we have a next? (when a0-1 ;; get the actual process - (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) + (let ((a0-2 (-> a0-1 extra process))) ;; do we have a process? (when a0-2 (send-event a0-2 message) @@ -280,7 +259,7 @@ (let ((a0-1 (-> obj prev))) (when a0-1 - (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) + (let ((a0-2 (-> a0-1 extra process))) (when a0-2 (send-event a0-2 message) ) @@ -310,17 +289,13 @@ (count 0) ) ;; get back to the beginning. - (while (let ((a0-2 actor)) - (entity-actor-lookup (the-as res-lump a0-2) 'prev-actor 0) - ) - (set! actor (entity-actor-lookup (the-as res-lump actor) 'prev-actor 0)) + (while (prev-actor actor) + (set! actor (prev-actor actor)) ) ;; iterate and set the count (while actor (+! count 1) - (let ((a0-3 actor)) - (set! actor (entity-actor-lookup (the-as res-lump a0-3) 'next-actor 0)) - ) + (set! actor (next-actor actor)) ) count ) @@ -335,8 +310,8 @@ (let ((current-bit 1)) ;; seek to beginning - (while (let ((a0-2 actor)) (entity-actor-lookup a0-2 'prev-actor 0)) - (set! actor (entity-actor-lookup actor 'prev-actor 0)) + (while (prev-actor actor) + (set! actor (prev-actor actor)) ) ;; loop over actors @@ -346,11 +321,9 @@ (set! mask (logior mask current-bit)) ) ;; next - (let ((a0-3 actor)) - (set! actor (entity-actor-lookup a0-3 'next-actor 0)) - ) + (set! actor (next-actor actor)) ;; next bit - (set! current-bit (* current-bit 2)) + (set! current-bit (ash current-bit 1)) ) ) mask @@ -364,17 +337,13 @@ (count 0) ) ;; go to beginning (why not count here???) - (while (let ((a0-2 actor)) - (entity-actor-lookup (the-as res-lump a0-2) 'prev-actor 0) - ) - (set! actor (entity-actor-lookup (the-as res-lump actor) 'prev-actor 0)) + (while (prev-actor actor) + (set! actor (prev-actor actor)) ) ;; go forward, until we hit this actor (while (!= actor this-actor) (+! count 1) - (let ((a0-3 actor)) - (set! actor (entity-actor-lookup (the-as res-lump a0-3) 'next-actor 0)) - ) + (set! actor (next-actor actor)) ) count ) @@ -383,7 +352,7 @@ (defun actor-link-subtask-complete-hook ((arg0 entity-actor) (arg1 (pointer symbol))) "Sets arg1 if the thing is complete. Does not continue the apply if the complete perm is set." (cond - ((logtest? (-> (the-as entity-links (-> arg0 extra)) perm status) (entity-perm-status complete)) + ((logtest? (-> arg0 extra perm status) (entity-perm-status complete)) (set! (-> arg1 0) #t) #f ) @@ -397,7 +366,7 @@ (defun actor-link-dead-hook ((arg0 entity-actor) (arg1 (pointer symbol))) "Sets arg1 is the thing is dead. Does not continue the apply if the dead perm is set." (cond - ((logtest? (-> (the-as entity-links (-> arg0 extra)) perm status) (entity-perm-status dead)) + ((logtest? (-> arg0 extra perm status) (entity-perm-status dead)) (set! (-> arg1 0) #t) #f ) @@ -419,7 +388,7 @@ ;; look up the alt actor (let ((a0-3 (entity-actor-lookup (the-as res-lump (-> arg0 entity)) 'alt-actor alt-actor-idx))) (if (or (not a0-3) - (zero? (logand (-> (the-as entity-links (-> a0-3 extra)) perm status) (entity-perm-status complete))) + (zero? (logand (-> a0-3 extra perm status) (entity-perm-status complete))) ) (+! incomplete-count 1) ) diff --git a/goal_src/engine/entity/entity.gc b/goal_src/engine/entity/entity.gc index 7a765d0a1e1..361362f261e 100644 --- a/goal_src/engine/entity/entity.gc +++ b/goal_src/engine/entity/entity.gc @@ -1218,7 +1218,7 @@ ;;`(empty) ) -(defun init-entity ((proc process) (ent entity)) +(defun init-entity ((proc process) (ent entity-actor)) "This function starts up an entity! The process should not be activated yet." @@ -1241,7 +1241,7 @@ ;; TODO -(define-extern birth-viewer (function process entity object)) +(define-extern birth-viewer (function process entity-actor object)) (defmacro obj-etype? (&rest types) `(or ,@(apply (lambda (x) `(begin (define-extern ,x type) (type-type? (-> obj etype) ,x))) types)) @@ -1297,7 +1297,7 @@ obj ) -(defun entity-deactivate-handler ((arg0 process) (arg1 entity)) +(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor)) "Handle a deactivation in the entity. The entity directly stores a process so it should remove that after deactivating." (when (= arg0 (-> arg1 extra process)) @@ -1650,8 +1650,12 @@ ) ) (when (not (paused?)) - (let ((s5-1 (-> *display* frames (-> *display* last-screen) frame run-time))) - (let ((f0-5 (fmax 327680.0 (fmin (+ 327680.0 (* 204.8 (the float (- 7000 s5-1)))) (-> *ACTOR-bank* birth-dist))))) + ;; NOTE : get rid of lag compensation in PC port, it's not helpful + (let ((s5-1 (#if PC_PORT + 0 + (-> *display* frames (-> *display* last-screen) frame run-time) + ))) + (let ((f0-5 (fmax (meters 80) (fmin (+ (meters 80) (* (meters 0.05) (the float (- 7000 s5-1)))) (-> *ACTOR-bank* birth-dist))))) (seek! (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (-> *display* seconds-per-frame))) ) (seekl! (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 1.0 (the float s5-1) 2000.0 7000.0)) 10) diff --git a/goal_src/engine/game/collectables.gc b/goal_src/engine/game/collectables.gc index 19c68b93ed3..84baaf4b26d 100644 --- a/goal_src/engine/game/collectables.gc +++ b/goal_src/engine/game/collectables.gc @@ -1249,14 +1249,14 @@ (defmethod init-from-entity! money ((obj money) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (update-transforms! (-> obj root-override)) (go (method-of-object obj wait)) (none) ) -(defbehavior money-init-by-other money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior money-init-by-other money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) @@ -1280,7 +1280,7 @@ (none) ) -(defbehavior money-init-by-other-no-bob money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 float) (arg4 entity)) +(defbehavior money-init-by-other-no-bob money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 float) (arg4 entity-actor)) (set! (-> self entity) arg4) (set! (-> self pickup-type) (the-as pickup-type arg2)) (set! (-> self pickup-amount) arg3) @@ -2000,7 +2000,7 @@ (defmethod init-from-entity! fuel-cell ((obj fuel-cell) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (logclear! (-> obj fact options) (fact-options can-collect)) (update-transforms! (-> obj root-override)) @@ -2008,7 +2008,7 @@ (none) ) -(defbehavior fuel-cell-init-by-other fuel-cell ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior fuel-cell-init-by-other fuel-cell ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) @@ -2322,7 +2322,7 @@ (defmethod init-from-entity! buzzer ((obj buzzer) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (set! (-> obj collect-timeout) (seconds 2)) (update-transforms! (-> obj root-override)) @@ -2334,7 +2334,7 @@ (none) ) -(defbehavior buzzer-init-by-other buzzer ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior buzzer-init-by-other buzzer ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) diff --git a/goal_src/engine/game/generic-obs-h.gc b/goal_src/engine/game/generic-obs-h.gc index c7e6989f816..987ff2ee9a7 100644 --- a/goal_src/engine/game/generic-obs-h.gc +++ b/goal_src/engine/game/generic-obs-h.gc @@ -108,8 +108,7 @@ ;; a camera-tracker can control the camera. (deftype camera-tracker (process) - ((entity-override entity-actor :offset 52) - (grab-target handle :offset 120) + ((grab-target handle :offset 120) (grab-event symbol :offset-assert 128) (release-event symbol :offset-assert 132) (old-global-mask process-mask :offset-assert 136) diff --git a/goal_src/engine/game/generic-obs.gc b/goal_src/engine/game/generic-obs.gc index 62d15c7ebd3..ea570ab84ba 100644 --- a/goal_src/engine/game/generic-obs.gc +++ b/goal_src/engine/game/generic-obs.gc @@ -483,7 +483,7 @@ ) ) -(defbehavior manipy-init manipy ((arg0 vector) (arg1 entity) (arg2 skeleton-group) (arg3 vector)) +(defbehavior manipy-init manipy ((arg0 vector) (arg1 entity-actor) (arg2 skeleton-group) (arg3 vector)) (stack-size-set! (-> self main-thread) 256) ;; from 128 (logior! (-> self mask) (process-mask heap-shrunk)) (set! (-> self entity) arg1) @@ -1102,8 +1102,8 @@ ) ) :enter (behavior () - (if (-> self entity-override) - (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #t) + (if (-> self entity) + (dummy-30 (-> self entity) (entity-perm-status bit-3) #t) ) (if (not (-> self border-value)) (add-setting! 'border-mode (-> self border-value) 0.0 0) @@ -1114,8 +1114,8 @@ (none) ) :exit (behavior () - (if (-> self entity-override) - (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #f) + (if (-> self entity) + (dummy-30 (-> self entity) (entity-perm-status bit-3) #f) ) (send-event *camera* 'clear-entity) (none) @@ -1178,7 +1178,7 @@ ) ) (if v1-17 - (set! (-> self entity-override) (the-as entity-actor (-> (the-as process v1-17) entity))) + (set! (-> self entity) (-> (the-as process v1-17) entity)) ) ) (set! (-> self event-hook) (-> camera-tracker-process event)) diff --git a/goal_src/engine/game/projectiles-h.gc b/goal_src/engine/game/projectiles-h.gc index 5c6644faaee..63f8bac978f 100644 --- a/goal_src/engine/game/projectiles-h.gc +++ b/goal_src/engine/game/projectiles-h.gc @@ -6,7 +6,7 @@ ;; dgos: GAME, ENGINE (declare-type projectile process-drawable) -(define-extern projectile-init-by-other (function entity vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` +(define-extern projectile-init-by-other (function entity-actor vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` ;; DECOMP BEGINS diff --git a/goal_src/engine/game/projectiles.gc b/goal_src/engine/game/projectiles.gc index c8f9154b7a2..46b633b1f89 100644 --- a/goal_src/engine/game/projectiles.gc +++ b/goal_src/engine/game/projectiles.gc @@ -847,7 +847,7 @@ (none) ) -(defbehavior projectile-init-by-other projectile ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 uint) (arg4 handle)) +(defbehavior projectile-init-by-other projectile ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 uint) (arg4 handle)) (stack-size-set! (-> self main-thread) 512) (set! (-> self entity) arg0) (set! (-> self attack-mode) #f) @@ -1153,7 +1153,7 @@ ) (defun spawn-projectile-blue ((arg0 target)) - (local-vars (sv-48 entity)) + (local-vars (sv-48 entity-actor)) (with-pp (when arg0 (let ((s3-0 (rand-vu-int-range 3 (+ (-> arg0 node-list length) -1))) diff --git a/goal_src/engine/game/voicebox.gc b/goal_src/engine/game/voicebox.gc index a6e76fb3ed3..4d700bed41b 100644 --- a/goal_src/engine/game/voicebox.gc +++ b/goal_src/engine/game/voicebox.gc @@ -5,9 +5,6 @@ ;; name in dgo: voicebox ;; dgos: GAME, ENGINE -(define-extern *voicebox-sg* skeleton-group) - - ;; DECOMP BEGINS (import "goal_src/import/speaker-ag.gc") diff --git a/goal_src/engine/geometry/vol-h.gc b/goal_src/engine/geometry/vol-h.gc index 33581fe4f68..74d6a4513f3 100644 --- a/goal_src/engine/geometry/vol-h.gc +++ b/goal_src/engine/geometry/vol-h.gc @@ -59,7 +59,7 @@ ) (set! (-> (the-as vol-control gp-0) process) arg0) (let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-1) 'vol 'exact 0.0) lo)) + (s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity-actor s5-1) 'vol 'exact 0.0) lo)) ) (when (>= (the-as int s4-0) 0) (let ((s3-0 (the-as int s4-0)) @@ -81,7 +81,7 @@ ) ) (let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-1 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo)) + (s4-1 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity-actor s5-2) 'cutoutvol 'exact 0.0) lo)) ) (when (>= (the-as int s4-1) 0) (let ((s3-1 (the-as int s4-1)) diff --git a/goal_src/engine/gfx/water/water.gc b/goal_src/engine/gfx/water/water.gc index 5dcb022ee9e..614aa8b8b5e 100644 --- a/goal_src/engine/gfx/water/water.gc +++ b/goal_src/engine/gfx/water/water.gc @@ -1343,7 +1343,7 @@ ) ) ) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (logclear! (-> obj mask) (process-mask actor-pause)) (set! (-> obj vol) (new 'process 'vol-control obj)) (logior! (-> obj vol flags) 3) @@ -1395,7 +1395,7 @@ (none) ) -(defbehavior water-vol-init-by-other water-vol ((arg0 entity)) +(defbehavior water-vol-init-by-other water-vol ((arg0 entity-actor)) (set! (-> self entity) arg0) (set-stack-size! self) (reset-root! self) diff --git a/goal_src/engine/nav/navigate-h.gc b/goal_src/engine/nav/navigate-h.gc index bd22c7f6e10..2d4b55035bc 100644 --- a/goal_src/engine/nav/navigate-h.gc +++ b/goal_src/engine/nav/navigate-h.gc @@ -291,74 +291,65 @@ ) ) -(defun nav-mesh-connect ((proc process) (trans trsqv) (nav-cont nav-control)) - (with-pp - ;; try to find an entity with a nav-mesh, first from the given process - (let ((ent (-> proc entity))) - (when (zero? (-> (the-as entity-actor ent) nav-mesh)) - ;; and if that doesn't have one already, lookup from the res-lump - (let ((lookup-entity (entity-actor-lookup (the-as res-lump ent) 'nav-mesh-actor 0))) - (if lookup-entity - (set! ent lookup-entity) - ) - ) +(defbehavior nav-mesh-connect process ((proc process) (trans trsqv) (nav-cont nav-control)) + ;; try to find an entity with a nav-mesh, first from the given process + (let ((ent (-> proc entity))) + (when (zero? (-> ent nav-mesh)) + ;; and if that doesn't have one already, lookup from the res-lump + (let ((lookup-entity (entity-actor-lookup ent 'nav-mesh-actor 0))) + (if lookup-entity + (set! ent lookup-entity) + ) ) + ) - ;; now, look at the nav-mesh from the entity - (let ((entity-nav-mesh (-> (the-as entity-actor ent) nav-mesh))) - (cond - ((nonzero? entity-nav-mesh) - ;; we have a nav mesh mesh already - (when (zero? (-> entity-nav-mesh user-list)) - ;; but, no engine, maybe because this is the first time we're doing this for the level. - - ;; this seems like a bit of a hack. We'd like to allocate the engine on a level heap. - ;; but I guess we can't assume that process-level-heap is set correctly here. - ;; so we grab the entity-links from the current pp's entity, and look at that level. - ;; I'm not sure why we do this on the current pp instead of the proc we were given... - (set! process-level-heap - (-> (the-as entity-links (-> (the-as entity (-> pp entity)) extra)) level heap) - ) + ;; now, look at the nav-mesh from the entity + (let ((entity-nav-mesh (-> ent nav-mesh))) + (cond + ((nonzero? entity-nav-mesh) + ;; we have a nav mesh mesh already + (when (zero? (-> entity-nav-mesh user-list)) + ;; but, no engine, maybe because this is the first time we're doing this for the level. - ;; now construct the engine, looking up the size from the res-lump. - (set! (-> entity-nav-mesh user-list) - (new 'process-level-heap 'engine 'nav-engine - (res-lump-value ent 'nav-max-users int :default (the-as uint128 32)) - ) - ) + ;; this seems like a bit of a hack. We'd like to allocate the engine on a level heap. + ;; but I guess we can't assume that process-level-heap is set correctly here. + ;; so we grab the entity-links from the current pp's entity, and look at that level. + ;; I'm not sure why we do this on the current pp instead of the proc we were given... + (set! process-level-heap (-> self entity extra level heap)) - ;; do some setup - (initialize-mesh! entity-nav-mesh) - (update-route-table entity-nav-mesh) - ) + ;; now construct the engine, looking up the size from the res-lump. + (set! (-> entity-nav-mesh user-list) + (new 'process-level-heap 'engine 'nav-engine + (res-lump-value ent 'nav-max-users int :default (the-as uint128 32)) + ) + ) - ;; in all cases, do the connection - ;; connect the nav-mesh engine: - (add-connection (-> entity-nav-mesh user-list) - proc ;; to the given process - nothing ;; no function - ;; and some weird parameters. - proc - nav-cont - trans - ) + ;; do some setup + (initialize-mesh! entity-nav-mesh) + (update-route-table entity-nav-mesh) ) - (else - ;; we couldn't find a nav-mesh. Set a bit. - (if (and nav-cont (-> proc entity)) - (logior! (-> (the-as entity-links (-> (the-as entity (-> proc entity)) extra)) - perm - status - ) - (entity-perm-status bit-1) - ) - ) - ;; no nav-mesh, so give us a default-nav-mesh. - (set! entity-nav-mesh *default-nav-mesh*) - ) - ) - entity-nav-mesh + + ;; in all cases, do the connection + ;; connect the nav-mesh engine: + (add-connection (-> entity-nav-mesh user-list) + proc ;; to the given process + nothing ;; no function + ;; and some weird parameters. + proc + nav-cont + trans + ) + ) + (else + ;; we couldn't find a nav-mesh. Set a bit. + (if (and nav-cont (-> proc entity)) + (logior! (-> proc entity extra perm status) (entity-perm-status bit-1)) + ) + ;; no nav-mesh, so give us a default-nav-mesh. + (set! entity-nav-mesh *default-nav-mesh*) + ) ) + entity-nav-mesh ) ) ) diff --git a/goal_src/engine/sound/gsound-h.gc b/goal_src/engine/sound/gsound-h.gc index 637186e5be1..b8510b91a74 100644 --- a/goal_src/engine/sound/gsound-h.gc +++ b/goal_src/engine/sound/gsound-h.gc @@ -502,6 +502,7 @@ (define *current-sound-id* (the sound-id #x10000)) ;; a in-game background sound. +(declare-type entity basic) (deftype ambient-sound (basic) ((spec sound-spec :offset-assert 4) (playing-id sound-id :offset-assert 8) diff --git a/goal_src/kernel/gkernel-h.gc b/goal_src/kernel/gkernel-h.gc index 70ff07d0c93..f4372ebfb97 100644 --- a/goal_src/kernel/gkernel-h.gc +++ b/goal_src/kernel/gkernel-h.gc @@ -256,15 +256,13 @@ ;; A GOAL process. A GOAL process contains memory and a suspendable main-thread. -(declare-type res-lump basic) -(declare-type entity res-lump) (deftype process (process-tree) ((pool dead-pool :offset-assert #x20) ;; the memory pool we came from, and should return to when we die (status basic :offset-assert #x24) (pid int32 :offset-assert #x28) ;; unqiue process ID (main-thread cpu-thread :offset-assert #x2c) ;; our suspendable main thread (top-thread thread :offset-assert #x30) ;; currently running thread - (entity entity :offset-assert #x34) ;; if we are a process spawned by an entity, our entity + (entity entity-actor :offset-assert #x34) ;; if we are a process spawned by an entity-actor, our entity (state state :offset-assert #x38) ;; if we use the state system, our current state (trans-hook function :offset-assert #x3c) ;; function to call for trans (post-hook function :offset-assert #x40) ;; function to call for post diff --git a/goal_src/kernel/gkernel.gc b/goal_src/kernel/gkernel.gc index 916fe8f4f6a..720d7cd9641 100644 --- a/goal_src/kernel/gkernel.gc +++ b/goal_src/kernel/gkernel.gc @@ -2430,8 +2430,7 @@ ;; this is not yet defined. -(define-extern entity-deactivate-handler (function process entity none)) -(define entity-deactivate-handler (the (function process entity none) nothing)) +(define entity-deactivate-handler (the (function process entity-actor none) nothing)) (define-extern process-disconnect (function process int)) diff --git a/goal_src/levels/beach/beach-obs.gc b/goal_src/levels/beach/beach-obs.gc index c9ecb7a2c5d..cb06ca2d645 100644 --- a/goal_src/levels/beach/beach-obs.gc +++ b/goal_src/levels/beach/beach-obs.gc @@ -832,7 +832,7 @@ :post (the-as (function none :behavior flying-rock) ja-post) ) -(defbehavior flying-rock-init-by-other flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity)) +(defbehavior flying-rock-init-by-other flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity-actor)) (set! (-> self entity) arg3) (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/goal_src/levels/beach/seagull.gc b/goal_src/levels/beach/seagull.gc index 527ec7c8927..e493877f4c9 100644 --- a/goal_src/levels/beach/seagull.gc +++ b/goal_src/levels/beach/seagull.gc @@ -5,8 +5,6 @@ ;; name in dgo: seagull ;; dgos: BEA, L1 -(define-extern *seagull-sg* skeleton-group) - (declare-type seagullflock process) ;; DECOMP BEGINS diff --git a/goal_src/levels/citadel/citadel-obs.gc b/goal_src/levels/citadel/citadel-obs.gc index 875dae4295d..4bc6d36f59f 100644 --- a/goal_src/levels/citadel/citadel-obs.gc +++ b/goal_src/levels/citadel/citadel-obs.gc @@ -979,8 +979,8 @@ (initialize-skeleton obj *citb-coil-sg* '()) (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 596) obj)) (set! (-> obj part-off) (create-launch-control (-> *part-group-id-table* 602) obj)) - (let ((v1-9 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-9)) + (let ((v1-9 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-9) (set! v1-9 (-> obj entity)) ) (if (logtest? (-> v1-9 extra perm status) (entity-perm-status complete)) @@ -1071,8 +1071,8 @@ (set! (-> obj root) (new 'process 'trsqv)) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *citb-hose-sg* '()) - (let ((v1-3 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-3)) + (let ((v1-3 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-3) (set! v1-3 (-> obj entity)) ) (if (logtest? (-> v1-3 extra perm status) (entity-perm-status complete)) @@ -1427,8 +1427,8 @@ (init! obj) (process-drawable-from-entity! obj arg0) (dummy-21 obj) - (let ((v1-4 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-4)) + (let ((v1-4 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-4) (set! v1-4 (-> obj entity)) ) (if (logtest? (-> v1-4 extra perm status) (entity-perm-status complete)) diff --git a/goal_src/levels/citadel/citadel-sages.gc b/goal_src/levels/citadel/citadel-sages.gc index 75a7cfae256..0c04a53f6e4 100644 --- a/goal_src/levels/citadel/citadel-sages.gc +++ b/goal_src/levels/citadel/citadel-sages.gc @@ -5,6 +5,7 @@ ;; name in dgo: citadel-sages ;; dgos: CIT, L1 +;; TODO (define-extern *robotboss-sg* skeleton-group) (declare-type citb-sage process-taskable) diff --git a/goal_src/levels/citadel/citb-bunny.gc b/goal_src/levels/citadel/citb-bunny.gc index 912a2177993..fc9cde5c532 100644 --- a/goal_src/levels/citadel/citb-bunny.gc +++ b/goal_src/levels/citadel/citb-bunny.gc @@ -5,8 +5,6 @@ ;; name in dgo: citb-bunny ;; dgos: CIT, L1 -(define-extern *citb-bunny-sg* skeleton-group) - ;; DECOMP BEGINS (import "goal_src/import/citb-bunny-ag.gc") diff --git a/goal_src/levels/citadel/citb-plat.gc b/goal_src/levels/citadel/citb-plat.gc index 8581bc711c8..897526e5e61 100644 --- a/goal_src/levels/citadel/citb-plat.gc +++ b/goal_src/levels/citadel/citb-plat.gc @@ -5,22 +5,6 @@ ;; name in dgo: citb-plat ;; dgos: CIT, L1 -(define-extern *citb-exit-plat-sg* skeleton-group) -(define-extern *citb-firehose-sg* skeleton-group) -(define-extern *citb-stopbox-sg* skeleton-group) -(define-extern *citb-donut-sg* skeleton-group) -(define-extern *citb-rotatebox-sg* skeleton-group) -(define-extern *citb-chain-plat-sg* skeleton-group) -(define-extern *plat-citb-sg* skeleton-group) -(define-extern *plat-eco-citb-lit-sg* skeleton-group) -(define-extern *plat-eco-citb-unlit-sg* skeleton-group) - -(declare-type citb-exit-plat plat-button) -(declare-type citb-firehose process-drawable) -(declare-type citb-chain-plat rigid-body-platform) - - - ;; DECOMP BEGINS (import "goal_src/import/citb-exit-plat-ag.gc") diff --git a/goal_src/levels/common/basebutton.gc b/goal_src/levels/common/basebutton.gc index b840cb7a9c2..1be11bb3b4a 100644 --- a/goal_src/levels/common/basebutton.gc +++ b/goal_src/levels/common/basebutton.gc @@ -425,7 +425,7 @@ (none) ) -(defbehavior basebutton-init-by-other basebutton ((arg0 basebutton) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) +(defbehavior basebutton-init-by-other basebutton ((arg0 entity-actor) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) (reset! self) (set! (-> self spawned-by-other?) #t) (set! (-> self button-id) -1) @@ -433,7 +433,7 @@ (set! (-> self notify-actor) arg3) (set! (-> self timeout) arg5) (if arg0 - (set! (-> self entity) (the-as entity arg0)) + (set! (-> self entity) arg0) ) (TODO-RENAME-27 self) (set! (-> self root-override trans quad) (-> arg1 quad)) diff --git a/goal_src/levels/common/launcherdoor.gc b/goal_src/levels/common/launcherdoor.gc index 9a7f0865b17..61b55a52ad9 100644 --- a/goal_src/levels/common/launcherdoor.gc +++ b/goal_src/levels/common/launcherdoor.gc @@ -5,11 +5,6 @@ ;; name in dgo: launcherdoor ;; dgos: JUN, JUNGLE, L1, MAI, MAINCAVE, SUN, SUNKEN -(define-extern *launcherdoor-maincave-sg* skeleton-group) -(define-extern *launcherdoor-sg* skeleton-group) - -(declare-type launcherdoor process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/darkcave/darkcave-obs.gc b/goal_src/levels/darkcave/darkcave-obs.gc index 58ee7fa8508..c91cc200cfd 100644 --- a/goal_src/levels/darkcave/darkcave-obs.gc +++ b/goal_src/levels/darkcave/darkcave-obs.gc @@ -5,8 +5,6 @@ ;; name in dgo: darkcave-obs ;; dgos: DAR, L1 -; (define-extern *cavecrystal-sg* skeleton-group) - ;; DECOMP BEGINS (import "goal_src/import/cavecrystal-ag.gc") diff --git a/goal_src/levels/finalboss/final-door.gc b/goal_src/levels/finalboss/final-door.gc index d8c2bd3e709..571fd91d7b0 100644 --- a/goal_src/levels/finalboss/final-door.gc +++ b/goal_src/levels/finalboss/final-door.gc @@ -273,7 +273,7 @@ ) ) -(defbehavior powercellalt-init-by-other powercellalt ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int)) +(defbehavior powercellalt-init-by-other powercellalt ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 int)) (set! (-> self entity) arg0) (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/goal_src/levels/finalboss/green-eco-lurker.gc b/goal_src/levels/finalboss/green-eco-lurker.gc index 1ac98d11c0a..c244180bc87 100644 --- a/goal_src/levels/finalboss/green-eco-lurker.gc +++ b/goal_src/levels/finalboss/green-eco-lurker.gc @@ -762,7 +762,7 @@ (none) ) -(defbehavior green-eco-lurker-init-by-other green-eco-lurker ((arg0 entity) (arg1 green-eco-lurker-gen) (arg2 vector)) +(defbehavior green-eco-lurker-init-by-other green-eco-lurker ((arg0 entity-actor) (arg1 green-eco-lurker-gen) (arg2 vector)) (initialize-collision self) (set! (-> self collide-info trans quad) (-> arg2 quad)) (vector-identity! (-> self collide-info scale)) @@ -818,7 +818,7 @@ ) ) -(defbehavior green-eco-lurker-gen-init-by-other green-eco-lurker-gen ((arg0 entity) (arg1 vector) (arg2 int)) +(defbehavior green-eco-lurker-gen-init-by-other green-eco-lurker-gen ((arg0 entity-actor) (arg1 vector) (arg2 int)) (set! (-> self num-to-spawn) arg2) (set! (-> self num-spawned) 0) (set! (-> self num-alive) 0) diff --git a/goal_src/levels/finalboss/light-eco.gc b/goal_src/levels/finalboss/light-eco.gc index 4d99749eaba..ee5e3013a19 100644 --- a/goal_src/levels/finalboss/light-eco.gc +++ b/goal_src/levels/finalboss/light-eco.gc @@ -530,7 +530,7 @@ ) ) -(defbehavior light-eco-child-init-by-other light-eco-child ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int)) +(defbehavior light-eco-child-init-by-other light-eco-child ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 int)) (set! (-> self entity) arg0) (set! (-> self angle-bit) arg3) (set! (-> self ground-y) (-> arg2 y)) @@ -753,7 +753,7 @@ (the-as light-eco-mother ((method-of-type projectile relocate) (the-as projectile obj) arg0)) ) -(defbehavior light-eco-mother-init-by-other light-eco-mother ((arg0 entity) (arg1 vector)) +(defbehavior light-eco-mother-init-by-other light-eco-mother ((arg0 entity-actor) (arg1 vector)) (set! (-> self entity) arg0) (set! (-> self last-update-time) 0) (set! (-> self last-spawned-time) (-> *display* base-frame-counter)) diff --git a/goal_src/levels/finalboss/robotboss-misc.gc b/goal_src/levels/finalboss/robotboss-misc.gc index bb1b174db57..5c248d3f48e 100644 --- a/goal_src/levels/finalboss/robotboss-misc.gc +++ b/goal_src/levels/finalboss/robotboss-misc.gc @@ -521,7 +521,7 @@ ) ) -(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity)) +(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity-actor)) (set! (-> self entity) arg0) (dummy-40 self arg0 *finalbosscam-sg* 4 4 (new 'static 'vector :w 4096.0) 4) (set! (-> self tasks) (get-task-control (game-task finalboss-movies))) diff --git a/goal_src/levels/firecanyon/firecanyon-obs.gc b/goal_src/levels/firecanyon/firecanyon-obs.gc index 9522773c220..c17469ddad1 100644 --- a/goal_src/levels/firecanyon/firecanyon-obs.gc +++ b/goal_src/levels/firecanyon/firecanyon-obs.gc @@ -5,13 +5,6 @@ ;; name in dgo: firecanyon-obs ;; dgos: L1, FIC, OGR -(define-extern *balloon-sg* skeleton-group) -(define-extern *crate-darkeco-cluster-sg* skeleton-group) -(define-extern *spike-sg* skeleton-group) - -(declare-type spike process-drawable) -(declare-type balloon process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/flut_common/target-flut.gc b/goal_src/levels/flut_common/target-flut.gc index 06c1df9e36e..1eee58adfcd 100644 --- a/goal_src/levels/flut_common/target-flut.gc +++ b/goal_src/levels/flut_common/target-flut.gc @@ -8,12 +8,12 @@ ;; DECOMP BEGINS (deftype flut-info (basic) - ((entity basic :offset-assert 4) - (flut-trans vector :inline :offset-assert 16) - (flut-quat vector :inline :offset-assert 32) - (flut-scale vector :inline :offset-assert 48) - (stick-lock basic :offset-assert 64) - (flap-sound-id sound-id :offset-assert 68) + ((entity entity-actor :offset-assert 4) + (flut-trans vector :inline :offset-assert 16) + (flut-quat vector :inline :offset-assert 32) + (flut-scale vector :inline :offset-assert 48) + (stick-lock basic :offset-assert 64) + (flap-sound-id sound-id :offset-assert 68) ) :method-count-assert 9 :size-assert #x48 @@ -444,7 +444,7 @@ (set! (-> self control unknown-float01) 0.0) (logior! (-> self control root-prim prim-core action) (collide-action ca-14)) (let ((s5-0 (-> self entity))) - (set! (-> self entity) (the-as entity (-> self flut entity))) + (set! (-> self entity) (-> self flut entity)) (set! (-> self manipy) (manipy-spawn (-> self control trans) (-> self entity) *flutflut-sg* 'collide-shape-moving :to self) ) diff --git a/goal_src/levels/intro/evilbro.gc b/goal_src/levels/intro/evilbro.gc index c6b09901aea..038f0bd5bf1 100644 --- a/goal_src/levels/intro/evilbro.gc +++ b/goal_src/levels/intro/evilbro.gc @@ -11,7 +11,7 @@ (import "goal_src/import/evilsis-ag.gc") (deftype evilbro (process-taskable) - ((evilsis entity :offset-assert 380) + ((evilsis entity-actor :offset-assert 380) ) :heap-base #x110 :method-count-assert 53 diff --git a/goal_src/levels/jungle/fisher.gc b/goal_src/levels/jungle/fisher.gc index 1152b520769..543f8b1de3f 100644 --- a/goal_src/levels/jungle/fisher.gc +++ b/goal_src/levels/jungle/fisher.gc @@ -2067,7 +2067,7 @@ a2-2 (if v1-16 (-> v1-16 entity) - (the-as entity #f) + (the-as entity-actor #f) ) *fish-net-sg* #f diff --git a/goal_src/levels/jungleb/jungleb-obs.gc b/goal_src/levels/jungleb/jungleb-obs.gc index b881f67ba8d..8c0b6aef1cb 100644 --- a/goal_src/levels/jungleb/jungleb-obs.gc +++ b/goal_src/levels/jungleb/jungleb-obs.gc @@ -5,11 +5,6 @@ ;; name in dgo: jungleb-obs ;; dgos: JUB, L1 -(define-extern *jng-iris-door-sg* skeleton-group) -(define-extern *eggtop-sg* skeleton-group) - -(declare-type eggtop process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/maincave/dark-crystal.gc b/goal_src/levels/maincave/dark-crystal.gc index d808097621f..1e67b4f2ebe 100644 --- a/goal_src/levels/maincave/dark-crystal.gc +++ b/goal_src/levels/maincave/dark-crystal.gc @@ -5,11 +5,6 @@ ;; name in dgo: dark-crystal ;; dgos: L1, MAI, MAINCAVE -(define-extern *dark-crystal-sg* skeleton-group) -(define-extern *dark-crystal-explode-sg* skeleton-group) - -(declare-type dark-crystal process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/maincave/driller-lurker.gc b/goal_src/levels/maincave/driller-lurker.gc index 15861763968..3f8a875b0df 100644 --- a/goal_src/levels/maincave/driller-lurker.gc +++ b/goal_src/levels/maincave/driller-lurker.gc @@ -5,10 +5,6 @@ ;; name in dgo: driller-lurker ;; dgos: L1, MAI, MAINCAVE -(define-extern *driller-lurker-sg* skeleton-group) - -(declare-type driller-lurker process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/maincave/gnawer.gc b/goal_src/levels/maincave/gnawer.gc index b67100ae889..ccc5078c5cf 100644 --- a/goal_src/levels/maincave/gnawer.gc +++ b/goal_src/levels/maincave/gnawer.gc @@ -5,9 +5,6 @@ ;; name in dgo: gnawer ;; dgos: L1, MAI, MAINCAVE -(define-extern *gnawer-sg* skeleton-group) -(define-extern *gnawer-segment-sg* skeleton-group) - (declare-type gnawer process-drawable) diff --git a/goal_src/levels/maincave/mother-spider-egg.gc b/goal_src/levels/maincave/mother-spider-egg.gc index ce08d7cd567..62b3425cb9b 100644 --- a/goal_src/levels/maincave/mother-spider-egg.gc +++ b/goal_src/levels/maincave/mother-spider-egg.gc @@ -5,11 +5,6 @@ ;; name in dgo: mother-spider-egg ;; dgos: L1, MAI, MAINCAVE -(define-extern *mother-spider-egg-unbroken-sg* skeleton-group) -(define-extern *mother-spider-egg-broken-sg* skeleton-group) - -(declare-type mother-spider-egg process-drawable) - ;; DECOMP BEGINS @@ -483,7 +478,7 @@ ) ) -(defbehavior mother-spider-egg-init-by-other mother-spider-egg ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 vector)) +(defbehavior mother-spider-egg-init-by-other mother-spider-egg ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 vector)) (set! (-> self entity) arg0) (set! (-> self anim-speed) (rand-vu-float-range 0.8 1.2)) (set! (-> self falling-start-time) (-> *display* base-frame-counter)) diff --git a/goal_src/levels/misty/balloonlurker.gc b/goal_src/levels/misty/balloonlurker.gc index b999d27a8a1..8306726fb3d 100644 --- a/goal_src/levels/misty/balloonlurker.gc +++ b/goal_src/levels/misty/balloonlurker.gc @@ -281,7 +281,7 @@ (explosion-joint-index-bytes int8 4 :offset 772) (vulnerable symbol :offset-assert 776) (water-y float :offset-assert 780) - (propeller joint-mod-set-local :offset-assert 784) + (propeller joint-mod-spinner :offset-assert 784) (rudder joint-mod-set-local :offset-assert 788) (mine joint-mod-set-world 2 :offset-assert 792) (buoyancy-factor float :offset-assert 800) @@ -658,7 +658,7 @@ (f2-6 6735.6445) (f3-6 (-> *BALLOONLURKER-bank* max-engine-thrust)) ) - (set! (-> self propeller transform quat y) (* f0-31 (+ f1-14 (* f2-6 (/ 1.0 f3-6) (-> self engine-thrust))))) + (set! (-> self propeller spin-rate) (* f0-31 (+ f1-14 (* f2-6 (/ 1.0 f3-6) (-> self engine-thrust))))) ) (let ((f0-34 (* (-> *BALLOONLURKER-bank* max-rudder-deflection-angle) (-> self rudder-control))) (gp-1 (new 'stack-no-clear 'quaternion)) @@ -1049,17 +1049,12 @@ (set! (-> obj vulnerable) #t) (set! (-> obj dead) #f) (set! (-> obj explosion) #f) - (set! (-> obj propeller) - (the-as - joint-mod-set-local - (new 'process 'joint-mod-spinner obj 4 (new 'static 'vector :z -1.0 :w 1.0) 8192.0) - ) - ) + (set! (-> obj propeller) (new 'process 'joint-mod-spinner obj 4 (new 'static 'vector :z -1.0 :w 1.0) 8192.0)) (set! (-> obj rudder) (new 'process 'joint-mod-set-local obj 12 #f #t #f)) (set! (-> obj mine 0) (new 'process 'joint-mod-set-world obj 8 #f)) (set! (-> obj mine 1) (new 'process 'joint-mod-set-world obj 5 #f)) - (set! (-> obj stack 660) (the-as uint 10)) - (set! (-> obj stack 661) (the-as uint 7)) + (set! (-> obj explosion-joint-index-bytes 0) 10) + (set! (-> obj explosion-joint-index-bytes 1) 7) (set! (-> obj engine-sound-id) (new 'static 'sound-id)) (set! (-> obj pedal-sound-id) (new 'static 'sound-id)) (set! (-> obj player-force quad) (-> *null-vector* quad)) diff --git a/goal_src/levels/misty/mistycannon.gc b/goal_src/levels/misty/mistycannon.gc index 6bd6a949004..1152fb38218 100644 --- a/goal_src/levels/misty/mistycannon.gc +++ b/goal_src/levels/misty/mistycannon.gc @@ -960,7 +960,7 @@ ) -(defbehavior mistycannon-missile-init-by-other mistycannon-missile ((arg0 mistycannon-init-data) (arg1 entity)) +(defbehavior mistycannon-missile-init-by-other mistycannon-missile ((arg0 mistycannon-init-data) (arg1 entity-actor)) (set! (-> self mask) (logior (process-mask projectile) (-> self mask))) (logclear! (-> self mask) (process-mask actor-pause)) (set! (-> self entity) arg1) diff --git a/goal_src/levels/misty/quicksandlurker.gc b/goal_src/levels/misty/quicksandlurker.gc index 2687946f268..5a31d6be16e 100644 --- a/goal_src/levels/misty/quicksandlurker.gc +++ b/goal_src/levels/misty/quicksandlurker.gc @@ -404,7 +404,7 @@ ) -(defbehavior quicksandlurker-missile-init-by-other quicksandlurker-missile ((arg0 quicksandlurker-missile-init-data) (arg1 entity)) +(defbehavior quicksandlurker-missile-init-by-other quicksandlurker-missile ((arg0 quicksandlurker-missile-init-data) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -439,7 +439,7 @@ (none) ) -(defun spawn-quicksandlurker-missile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 entity)) +(defun spawn-quicksandlurker-missile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 entity-actor)) (let ((s5-0 (new 'stack-no-clear 'quicksandlurker-missile-init-data))) (set! (-> s5-0 position) arg1) (set! (-> s5-0 velocity) arg2) diff --git a/goal_src/levels/ogre/flying-lurker.gc b/goal_src/levels/ogre/flying-lurker.gc index acdd949881c..eab63b5af5f 100644 --- a/goal_src/levels/ogre/flying-lurker.gc +++ b/goal_src/levels/ogre/flying-lurker.gc @@ -5,8 +5,6 @@ ;; name in dgo: flying-lurker ;; dgos: L1, OGR -(declare-type flying-lurker process-drawable) - ;; DECOMP BEGINS (import "goal_src/import/ogrecam-ag.gc") diff --git a/goal_src/levels/ogre/ogre-obs.gc b/goal_src/levels/ogre/ogre-obs.gc index 32a69cb6511..191258d6306 100644 --- a/goal_src/levels/ogre/ogre-obs.gc +++ b/goal_src/levels/ogre/ogre-obs.gc @@ -5,24 +5,6 @@ ;; name in dgo: ogre-obs ;; dgos: L1, OGR -(define-extern *shortcut-boulder-whole-sg* skeleton-group) -(define-extern *shortcut-boulder-broken-sg* skeleton-group) -(define-extern *ogre-bridgeend-sg* skeleton-group) -(define-extern *ogre-bridge-sg* skeleton-group) -(define-extern *ogre-isle-d-sg* skeleton-group) -(define-extern *ogre-isle-b-sg* skeleton-group) -(define-extern *ogre-step-b-sg* skeleton-group) -(define-extern *ogre-step-c-sg* skeleton-group) -(define-extern *ogre-step-a-sg* skeleton-group) -(define-extern *tntbarrel-sg* skeleton-group) -(define-extern *med-res-snow-sg* skeleton-group) -(define-extern *ogre-isle-a-sg* skeleton-group) -(define-extern *ogre-isle-c-sg* skeleton-group) - -(declare-type ogre-bridgeend process-drawable) -(declare-type ogre-bridge process-drawable) -(declare-type shortcut-boulder process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/ogre/ogreboss.gc b/goal_src/levels/ogre/ogreboss.gc index b6bec2a3c23..aa867daa6cf 100644 --- a/goal_src/levels/ogre/ogreboss.gc +++ b/goal_src/levels/ogre/ogreboss.gc @@ -374,7 +374,7 @@ ) -(defbehavior ogreboss-missile-init-by-other ogreboss-missile ((arg0 ogreboss-missile-init-data) (arg1 entity)) +(defbehavior ogreboss-missile-init-by-other ogreboss-missile ((arg0 ogreboss-missile-init-data) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -791,7 +791,7 @@ ) ) -(defbehavior ogreboss-super-boulder-init-by-other ogreboss-super-boulder ((arg0 vector) (arg1 float) (arg2 entity)) +(defbehavior ogreboss-super-boulder-init-by-other ogreboss-super-boulder ((arg0 vector) (arg1 float) (arg2 entity-actor)) (set! (-> self entity) arg2) (let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-others)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) @@ -922,7 +922,7 @@ ) ) -(defbehavior ogreboss-bounce-boulder-init-by-other ogreboss-bounce-boulder ((arg0 int) (arg1 entity)) +(defbehavior ogreboss-bounce-boulder-init-by-other ogreboss-bounce-boulder ((arg0 int) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -1980,8 +1980,8 @@ (ja-post) (when (not (task-complete? *game-info* (-> self entity extra perm task))) (let ((gp-1 (new 'stack-no-clear 'vector))) - (let ((a0-9 (the-as entity (entity-actor-lookup (-> self entity) 'trigger-actor 2)))) - (if (not (the-as entity-actor a0-9)) + (let ((a0-9 (entity-actor-lookup (-> self entity) 'trigger-actor 2))) + (if (not a0-9) (set! a0-9 (-> self entity)) ) (set! (-> gp-1 quad) (-> a0-9 extra trans quad)) diff --git a/goal_src/levels/racer_common/racer-states.gc b/goal_src/levels/racer_common/racer-states.gc index 81c02a9dc41..89e8fdd1804 100644 --- a/goal_src/levels/racer_common/racer-states.gc +++ b/goal_src/levels/racer_common/racer-states.gc @@ -180,7 +180,7 @@ (set! (-> self racer entity) #f) (let ((v1-28 (handle->process arg0))) (if v1-28 - (set! (-> self racer entity) (the-as entity-actor (-> v1-28 entity))) + (set! (-> self racer entity) (-> v1-28 entity)) ) ) (set! (-> self control surf) *race-track-surface*) diff --git a/goal_src/levels/robocave/spider-egg.gc b/goal_src/levels/robocave/spider-egg.gc index 0757431b253..a93f1b86f64 100644 --- a/goal_src/levels/robocave/spider-egg.gc +++ b/goal_src/levels/robocave/spider-egg.gc @@ -5,11 +5,6 @@ ;; name in dgo: spider-egg ;; dgos: L1, ROB -(define-extern *spider-egg-unbroken-sg* skeleton-group) -(define-extern *spider-egg-broken-sg* skeleton-group) - -(declare-type spider-egg process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/snow/ice-cube.gc b/goal_src/levels/snow/ice-cube.gc index 20bb7f1444d..f4717ff7826 100644 --- a/goal_src/levels/snow/ice-cube.gc +++ b/goal_src/levels/snow/ice-cube.gc @@ -563,7 +563,7 @@ ) (defmethod TODO-RENAME-48 ice-cube ((obj ice-cube)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *ice-cube-sg* '()) (TODO-RENAME-45 obj *ice-cube-nav-enemy-info*) (set! (-> obj neck up) (the-as uint 0)) diff --git a/goal_src/levels/snow/snow-bumper.gc b/goal_src/levels/snow/snow-bumper.gc index 853cfe91100..388e08eb7af 100644 --- a/goal_src/levels/snow/snow-bumper.gc +++ b/goal_src/levels/snow/snow-bumper.gc @@ -5,10 +5,6 @@ ;; name in dgo: snow-bumper ;; dgos: L1, SNO -(define-extern *snow-bumper-sg* skeleton-group) - -(declare-type snow-bumper process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/snow/snow-flutflut-obs.gc b/goal_src/levels/snow/snow-flutflut-obs.gc index 8d2f5c0d4eb..fa512cc4d13 100644 --- a/goal_src/levels/snow/snow-flutflut-obs.gc +++ b/goal_src/levels/snow/snow-flutflut-obs.gc @@ -5,14 +5,6 @@ ;; name in dgo: snow-flutflut-obs ;; dgos: L1, SNO -(define-extern *flutflut-plat-large-sg* skeleton-group) -(define-extern *flutflut-plat-med-sg* skeleton-group) -(define-extern *flutflut-plat-small-sg* skeleton-group) -(define-extern *snow-button-sg* skeleton-group) - -(declare-type flutflut-plat plat) -(declare-type snow-button process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/sunken/bully.gc b/goal_src/levels/sunken/bully.gc index 255629d0bb9..e4f17be3ea9 100644 --- a/goal_src/levels/sunken/bully.gc +++ b/goal_src/levels/sunken/bully.gc @@ -7,9 +7,6 @@ (declare-type bully process-drawable) -(define-extern *bully-sg* skeleton-group) -(define-extern *bully-broken-cage-sg* skeleton-group) - ;; DECOMP BEGINS (import "goal_src/import/bully-ag.gc") @@ -237,7 +234,7 @@ :post (the-as (function none :behavior bully-broken-cage) ja-post) ) -(defbehavior bully-broken-cage-init-by-other bully-broken-cage ((arg0 entity)) +(defbehavior bully-broken-cage-init-by-other bully-broken-cage ((arg0 entity-actor)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> self parent-override 0 root-override trans quad)) diff --git a/goal_src/levels/sunken/double-lurker.gc b/goal_src/levels/sunken/double-lurker.gc index f77186d49eb..f0364f9bf87 100644 --- a/goal_src/levels/sunken/double-lurker.gc +++ b/goal_src/levels/sunken/double-lurker.gc @@ -1268,7 +1268,7 @@ (defmethod TODO-RENAME-48 double-lurker ((obj double-lurker)) (set! (-> obj buddy-handle) (the-as handle #f)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (set! (-> obj align) (new 'process 'align-control obj)) (initialize-skeleton obj *double-lurker-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) diff --git a/goal_src/levels/sunken/orbit-plat.gc b/goal_src/levels/sunken/orbit-plat.gc index 9f69835d5cc..bdb3c610de1 100644 --- a/goal_src/levels/sunken/orbit-plat.gc +++ b/goal_src/levels/sunken/orbit-plat.gc @@ -254,7 +254,7 @@ (none) ) -(defbehavior orbit-plat-bottom-init-by-other orbit-plat-bottom ((arg0 entity) (arg1 orbit-plat)) +(defbehavior orbit-plat-bottom-init-by-other orbit-plat-bottom ((arg0 entity-actor) (arg1 orbit-plat)) (set! (-> self entity) arg0) (set! (-> self mask) (logior (process-mask platform) (-> self mask))) (set! (-> self root) (new 'process 'trsqv)) diff --git a/goal_src/levels/sunken/puffer.gc b/goal_src/levels/sunken/puffer.gc index 200e9312f4d..7b40bb9eb5c 100644 --- a/goal_src/levels/sunken/puffer.gc +++ b/goal_src/levels/sunken/puffer.gc @@ -5,11 +5,6 @@ ;; name in dgo: puffer ;; dgos: L1, SUN, SUNKEN -(define-extern *puffer-sg* skeleton-group) -(define-extern *puffer-mean-sg* skeleton-group) - -(declare-type puffer process-drawable) - ;; DECOMP BEGINS @@ -1165,7 +1160,7 @@ (set! (-> obj look-mean?) #f) (set! (-> obj travel-turn-speed) 16384.0) (dummy-21 obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *puffer-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) (logclear! (-> obj mask) (process-mask actor-pause)) diff --git a/goal_src/levels/sunken/qbert-plat.gc b/goal_src/levels/sunken/qbert-plat.gc index bb538d61c94..d462519a7c1 100644 --- a/goal_src/levels/sunken/qbert-plat.gc +++ b/goal_src/levels/sunken/qbert-plat.gc @@ -142,7 +142,7 @@ ) ) -(defbehavior qbert-plat-on-init-by-other qbert-plat ((arg0 entity) (arg1 qbert-plat)) +(defbehavior qbert-plat-on-init-by-other qbert-plat ((arg0 entity-actor) (arg1 qbert-plat)) (set! (-> self entity) arg0) (set! (-> self mask) (logior (process-mask platform) (-> self mask))) (set! (-> self root-overlay) (the-as collide-shape-moving (new 'process 'trsqv))) diff --git a/goal_src/levels/sunken/sun-exit-chamber.gc b/goal_src/levels/sunken/sun-exit-chamber.gc index 226db6e5943..e3ec0517945 100644 --- a/goal_src/levels/sunken/sun-exit-chamber.gc +++ b/goal_src/levels/sunken/sun-exit-chamber.gc @@ -294,7 +294,7 @@ :post (the-as (function none :behavior blue-eco-charger-orb) ja-post) ) -(defbehavior blue-eco-charger-orb-init-by-other blue-eco-charger-orb ((arg0 entity) (arg1 blue-eco-charger-orb)) +(defbehavior blue-eco-charger-orb-init-by-other blue-eco-charger-orb ((arg0 entity-actor) (arg1 blue-eco-charger-orb)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> arg1 root trans quad)) @@ -527,7 +527,7 @@ (defbehavior exit-chamber-button-init-by-other exit-chamber-button ((arg0 vector) (arg1 quaternion) (arg2 entity-actor) (arg3 symbol)) - (basebutton-init-by-other (the-as basebutton #f) arg0 arg1 arg2 arg3 0.0) + (basebutton-init-by-other (the-as entity-actor #f) arg0 arg1 arg2 arg3 0.0) (none) ) diff --git a/goal_src/levels/sunken/sunken-fish.gc b/goal_src/levels/sunken/sunken-fish.gc index 09cafd11cfe..3a88a47f3c6 100644 --- a/goal_src/levels/sunken/sunken-fish.gc +++ b/goal_src/levels/sunken/sunken-fish.gc @@ -229,7 +229,7 @@ (defmethod TODO-RENAME-26 sunkenfisha ((obj sunkenfisha)) (set! (-> obj root) (new 'process 'trsqv)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (set-vector! (-> obj root scale) 6.0 6.0 6.0 1.0) (let ((v1-3 (rand-vu-int-count 3))) (cond @@ -336,7 +336,7 @@ ) ) -(defbehavior sunkenfisha-init-by-other sunkenfisha ((arg0 entity)) +(defbehavior sunkenfisha-init-by-other sunkenfisha ((arg0 entity-actor)) (set! (-> self entity) arg0) (TODO-RENAME-26 self) (TODO-RENAME-27 self) diff --git a/goal_src/levels/sunken/sunken-obs.gc b/goal_src/levels/sunken/sunken-obs.gc index 0ea32ca3ac9..bb5c3b3dede 100644 --- a/goal_src/levels/sunken/sunken-obs.gc +++ b/goal_src/levels/sunken/sunken-obs.gc @@ -4,10 +4,6 @@ ;; name: sunken-obs.gc ;; name in dgo: sunken-obs ;; dgos: L1, SUN, SUNKEN - -(define-extern *seaweed-sg* skeleton-group) -(define-extern *side-to-side-plat-sg* skeleton-group) -(define-extern *sunkencam-sg* skeleton-group) (declare-type seaweed basic) (define-extern *seaweed* seaweed) diff --git a/goal_src/levels/sunken/sunken-pipegame.gc b/goal_src/levels/sunken/sunken-pipegame.gc index 4d79b924332..3ac8c56d4a9 100644 --- a/goal_src/levels/sunken/sunken-pipegame.gc +++ b/goal_src/levels/sunken/sunken-pipegame.gc @@ -485,7 +485,7 @@ ) (defbehavior sunken-pipegame-button-init-by-other sunken-pipegame-button ((arg0 vector) (arg1 quaternion) (arg2 entity-actor) (arg3 symbol)) - (basebutton-init-by-other (the-as basebutton #f) arg0 arg1 arg2 arg3 0.0) + (basebutton-init-by-other (the-as entity-actor #f) arg0 arg1 arg2 arg3 0.0) (none) ) diff --git a/goal_src/levels/swamp/kermit.gc b/goal_src/levels/swamp/kermit.gc index 4c200443c35..f4f7be0df79 100644 --- a/goal_src/levels/swamp/kermit.gc +++ b/goal_src/levels/swamp/kermit.gc @@ -584,7 +584,7 @@ ) ) -(defbehavior kermit-pulse-init-by-other kermit-pulse ((arg0 vector) (arg1 entity)) +(defbehavior kermit-pulse-init-by-other kermit-pulse ((arg0 vector) (arg1 entity-actor)) (logclear! (-> self mask) (process-mask enemy attackable)) (set! (-> self mask) (logior (process-mask projectile) (-> self mask))) (set! (-> self entity) arg1) diff --git a/goal_src/levels/swamp/swamp-obs.gc b/goal_src/levels/swamp/swamp-obs.gc index c37ae1a0615..1a734372fd2 100644 --- a/goal_src/levels/swamp/swamp-obs.gc +++ b/goal_src/levels/swamp/swamp-obs.gc @@ -5,15 +5,6 @@ ;; name in dgo: swamp-obs ;; dgos: L1, SWA -(define-extern *swampcam-sg* skeleton-group) -(define-extern *tar-plat-sg* skeleton-group) -(define-extern *swamp-rock-sg* skeleton-group) -(define-extern *balance-plat-sg* skeleton-group) -(define-extern *swamp-spike-sg* skeleton-group) - -(declare-type swamp-rock process-drawable) -(declare-type balance-plat process-drawable) -(declare-type swamp-spike process-drawable) (declare-type swampgate swamp-spike) (define-extern swamp-spike-gate-down (state swampgate)) @@ -363,7 +354,7 @@ (backup-collide-with-as s5-0) (set! (-> obj root-override) s5-0) ) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *swamp-spike-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) (load-params! (-> obj sync) obj (the-as uint 1500) 0.0 0.15 0.15) diff --git a/goal_src/levels/swamp/swamp-rat-nest.gc b/goal_src/levels/swamp/swamp-rat-nest.gc index 805135dd56b..5cb9a196610 100644 --- a/goal_src/levels/swamp/swamp-rat-nest.gc +++ b/goal_src/levels/swamp/swamp-rat-nest.gc @@ -797,7 +797,7 @@ (let ((gp-0 (-> arg0 entity))) (set! (-> self mask) (logior (process-mask enemy) (-> self mask))) (dummy-20 self) - (process-drawable-from-entity! self (the-as entity-actor gp-0)) + (process-drawable-from-entity! self gp-0) (set! (-> self top-sphere quad) (-> self root-override trans quad)) (set! (-> self top-sphere y) (+ 24576.0 (-> self top-sphere y))) (set! (-> self top-sphere w) 18432.0) diff --git a/goal_src/levels/title/title-obs.gc b/goal_src/levels/title/title-obs.gc index 9d716191894..91f3c3a51ff 100644 --- a/goal_src/levels/title/title-obs.gc +++ b/goal_src/levels/title/title-obs.gc @@ -164,7 +164,7 @@ ) ) -(defbehavior logo-slave-init-by-other logo-slave ((arg0 entity) (arg1 skeleton-group)) +(defbehavior logo-slave-init-by-other logo-slave ((arg0 entity-actor) (arg1 skeleton-group)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (initialize-skeleton self arg1 '()) @@ -560,7 +560,7 @@ ) ) -(defbehavior logo-init-by-other logo ((arg0 entity) (arg1 vector) (arg2 symbol)) +(defbehavior logo-init-by-other logo ((arg0 entity-actor) (arg1 vector) (arg2 symbol)) (stack-size-set! (-> self main-thread) 512) (logclear! (-> self mask) (process-mask progress)) (set! (-> self entity) arg0) diff --git a/goal_src/levels/village1/sequence-a-village1.gc b/goal_src/levels/village1/sequence-a-village1.gc index 64f1aa3ca05..755db1ef767 100644 --- a/goal_src/levels/village1/sequence-a-village1.gc +++ b/goal_src/levels/village1/sequence-a-village1.gc @@ -347,7 +347,7 @@ (none) ) -(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity)) +(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity-actor)) (set! (-> self entity) arg0) (dummy-40 self arg0 *sage-sg* 3 40 (new 'static 'vector :w 4096.0) 5) (set! (-> self tasks) (get-task-control (game-task intro))) diff --git a/goal_src/levels/village1/village-obs.gc b/goal_src/levels/village1/village-obs.gc index c425b710f9a..5eb209921bf 100644 --- a/goal_src/levels/village1/village-obs.gc +++ b/goal_src/levels/village1/village-obs.gc @@ -5,40 +5,6 @@ ;; name in dgo: village-obs ;; dgos: VI1 -(define-extern *revcycle-sg* skeleton-group) -(define-extern *revcycleprop-sg* skeleton-group) -(define-extern *hutlamp-sg* skeleton-group) -(define-extern *starfish-sg* skeleton-group) -(define-extern *starfish-nav-enemy-info* nav-enemy-info) -(define-extern *reflector-middle-sg* skeleton-group) -(define-extern *mayorgears-sg* skeleton-group) -(define-extern *windspinner-sg* skeleton-group) -(define-extern *sagesail-sg* skeleton-group) -(define-extern *windmill-sail-sg* skeleton-group) -(define-extern *med-res-jungle-sg* skeleton-group) -(define-extern *med-res-jungle1-sg* skeleton-group) -(define-extern *med-res-jungle2-sg* skeleton-group) -(define-extern *med-res-beach-sg* skeleton-group) -(define-extern *med-res-beach1-sg* skeleton-group) -(define-extern *med-res-beach2-sg* skeleton-group) -(define-extern *med-res-beach3-sg* skeleton-group) -(define-extern *med-res-misty-sg* skeleton-group) -(define-extern *med-res-village11-sg* skeleton-group) -(define-extern *med-res-village12-sg* skeleton-group) -(define-extern *med-res-village13-sg* skeleton-group) -(define-extern *med-res-training-sg* skeleton-group) - -(declare-type windmill-sail process-drawable) -(declare-type sagesail process-drawable) -(declare-type windspinner process-drawable) -(declare-type mayorgears process-drawable) -(declare-type reflector-middle process-drawable) -(declare-type starfish nav-enemy) -(declare-type reflector-end process-drawable) -(declare-type hutlamp process-drawable) -(declare-type village-fish process-drawable) -(declare-type villa-starfish process-drawable) - ;; DECOMP BEGINS diff --git a/goal_src/levels/village2/swamp-blimp.gc b/goal_src/levels/village2/swamp-blimp.gc index 11f122b3062..bfc94caec3b 100644 --- a/goal_src/levels/village2/swamp-blimp.gc +++ b/goal_src/levels/village2/swamp-blimp.gc @@ -5,16 +5,7 @@ ;; name in dgo: swamp-blimp ;; dgos: L1, VI2 -(define-extern *swamp-blimp-sg* skeleton-group) -(define-extern *swamp-rope-sg* skeleton-group) -(define-extern *swamp-tetherrock-explode-sg* skeleton-group) -(define-extern *precursor-arm-sg* skeleton-group) -(define-extern *swamp-tetherrock-sg* skeleton-group) - (declare-type swamp-blimp process-drawable) -(declare-type swamp-rope process-drawable) -(declare-type swamp-tetherrock process-drawable) -(declare-type precursor-arm process-drawable) ;; DECOMP BEGINS diff --git a/goal_src/pc/hud-classes-pc.gc b/goal_src/pc/hud-classes-pc.gc index 7cd4cc898ee..8ec52bae221 100644 --- a/goal_src/pc/hud-classes-pc.gc +++ b/goal_src/pc/hud-classes-pc.gc @@ -30,19 +30,30 @@ ;; hud element for battles (deftype hud-battle-enemy (hud) ((want-skel symbol) - + (want-skel2 symbol) + (last-battle handle) - (battle-entity entity) + (battle-entity entity-actor) (battle-max int32) (battle-alive int32) (battle-mode symbol) - - (has-icons symbol) + (last-task entity-actor) + (task-entity entity-actor) + (task-track int32) + (task2-entity entity-actor) + (task2-time time-frame) + (task2-track int32) + + (last-level symbol) + (ready? symbol) (kicked symbol) + (display-mode? symbol) ) (:methods - (make-enemy-icon (_type_ int symbol) int) - (kill-enemy-icons (_type_) int) + (make-enemy-icon (_type_ int symbol entity) int) + (kill-icon (_type_ int) int) + (kill-all-icons (_type_) int) + (update-display-status (_type_ symbol entity int symbol) int) ) ) @@ -50,7 +61,7 @@ ;; all pc hud elements (deftype hud-parts-pc (structure) ((battle-enemy (pointer hud-battle-enemy)) - + (parts (pointer hud-pc) HUD_PART_PC_AMOUNT :offset 0) ) ) @@ -85,12 +96,9 @@ `(when (< (-> ,obj nb-of-icons) ,max) (let ((icon-idx (-> ,obj nb-of-icons))) (set! (-> ,obj icons icon-idx) (new 'static 'hud-icon)) - (let ((new-manipy (manipy-spawn (new 'static 'vector :w 1.0) ,entity ,skel #f - :to ,obj - :stack *scratch-memory-top* - ))) + (let ((new-manipy (manipy-spawn (new 'static 'vector :w 1.0) ,entity ,skel #f :to ,obj))) (when new-manipy - (set! (-> (-> new-manipy) draw dma-add-func) dma-add-process-drawable-hud) + (set! (-> (-> new-manipy) draw dma-add-func) dma-add-process-drawable-hud-with-hud-lights) (set-vector! (-> (-> new-manipy) root trans) 0.0 0.0 0.0 1.0) (set-vector! (-> (-> new-manipy) root scale) ,scale-x ,scale-y ,scale-x 1.0) (when #f @@ -118,12 +126,9 @@ &key z &key (entity #f) ) - `(let ((new-manipy (manipy-spawn (new 'static 'vector :w 1.0) ,entity ,skel #f - :to ,obj - :stack *scratch-memory-top* - ))) + `(let ((new-manipy (manipy-spawn (new 'static 'vector :w 1.0) ,entity ,skel #f :to ,obj))) (when new-manipy - (set! (-> (-> new-manipy) draw dma-add-func) dma-add-process-drawable-hud) + (set! (-> (-> new-manipy) draw dma-add-func) dma-add-process-drawable-hud-with-hud-lights) (set-vector! (-> (-> new-manipy) root trans) 0.0 0.0 0.0 1.0) (set-vector! (-> (-> new-manipy) root scale) (-> ,obj icons ,idx scale-x) (-> ,obj icons ,idx scale-y) (-> ,obj icons ,idx scale-x) 1.0) (when #f @@ -140,6 +145,61 @@ ) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; hud rendering with level lights +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(define *hud-pc-lights* (new 'global 'vu-lights)) +(set-vector! (-> *hud-pc-lights* direction 0) 1.0 0.0 0.0 1.0) +(set-vector! (-> *hud-pc-lights* direction 1) 0.0 1.0 0.0 1.0) +(set-vector! (-> *hud-pc-lights* direction 2) 0.0 0.0 1.0 1.0) +(set-vector! (-> *hud-pc-lights* color 0) 0.75 0.75 1.0 1.0) +(set-vector! (-> *hud-pc-lights* color 1) 0.75 0.75 1.0 1.0) +(set-vector! (-> *hud-pc-lights* color 2) 0.75 0.75 1.0 1.0) +(set-vector! (-> *hud-pc-lights* ambient) 0.2 0.2 0.2 1.0) + +(defun dma-add-process-drawable-hud-with-lights ((proc process-drawable) (draw draw-control) (arg2 symbol) (buf dma-buffer)) + (logclear! (-> draw status) (draw-status was-drawn)) + (when (zero? (logand (-> draw status) (draw-status hidden no-anim no-skeleton-update))) + (let ((vu-lgt (the-as vu-lights (+ 64 (scratchpad-object int)))) + (lgt (if (= (-> draw level-index) 2) + (-> *time-of-day-context* light-group (-> draw light-index)) + (-> *time-of-day-context* moods (-> draw level-index) light-group (-> draw light-index)) + )) + ) + (vu-lights<-light-group! vu-lgt lgt) + ) + (lod-set! draw 0) + (logior! (-> draw status) (draw-status was-drawn)) + (draw-bones-hud draw buf) + ) + 0 + (none) + ) + +(defun dma-add-process-drawable-hud-with-hud-lights ((proc process-drawable) (draw draw-control) (arg2 symbol) (buf dma-buffer)) + (logclear! (-> draw status) (draw-status was-drawn)) + (when (zero? (logand (-> draw status) (draw-status hidden no-anim no-skeleton-update))) + (let ((vu-lgt (the-as vu-lights (+ 64 (scratchpad-object int)))) + (lgt *hud-pc-lights*) + ) + (set! (-> vu-lgt direction 0 quad) (-> lgt direction 0 quad)) + (set! (-> vu-lgt direction 1 quad) (-> lgt direction 1 quad)) + (set! (-> vu-lgt direction 2 quad) (-> lgt direction 2 quad)) + (set! (-> vu-lgt color 0 quad) (-> lgt color 0 quad)) + (set! (-> vu-lgt color 1 quad) (-> lgt color 1 quad)) + (set! (-> vu-lgt color 2 quad) (-> lgt color 2 quad)) + (set! (-> vu-lgt ambient quad) (-> lgt ambient quad)) + ) + (lod-set! draw 0) + (logior! (-> draw status) (draw-status was-drawn)) + (draw-bones-hud draw buf) + ) + 0 + (none) + ) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; hud methods ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -157,140 +217,317 @@ ) -(defmethod kill-enemy-icons hud-battle-enemy ((obj hud-battle-enemy)) - "kill all hud icons" - - (when (-> obj has-icons) - (dotimes (i (-> obj nb-of-icons)) - (when (and (nonzero? (-> obj icons i)) (nonzero? (-> obj icons i icon)) (-> obj icons i icon)) - (deactivate (ppointer->process (-> obj icons i icon))) - (set! (-> obj icons i icon) #f) - (hud-pc-replace-icon obj i :skel *fuelcell-naked-sg* :z (meters 0.5)) - ) +(defmethod kill-icon hud-battle-enemy ((obj hud-battle-enemy) (idx int)) + "kill a hud icon" + + (when (and (nonzero? (-> obj icons idx)) (nonzero? (-> obj icons idx icon)) (-> obj icons idx icon)) + (deactivate (ppointer->process (-> obj icons idx icon))) + (set! (-> obj icons idx icon) #f) ) - - (false! (-> obj has-icons)) + 0) + +(defmethod kill-all-icons hud-battle-enemy ((obj hud-battle-enemy)) + "kill all hud icons" + + (dotimes (i (-> obj nb-of-icons)) + (kill-icon obj i) ) 0) -(defmethod make-enemy-icon hud-battle-enemy ((obj hud-battle-enemy) (idx int) (skel-sym symbol)) +(defmethod make-enemy-icon hud-battle-enemy ((obj hud-battle-enemy) (idx int) (skel-sym symbol) (enemy-ent entity)) "make a new icon for the hud" - + ;; make new manipy - (hud-pc-replace-icon obj 0 :skel (-> skel-sym value) :entity (-> obj battle-entity) :z (meters 0.5)) - - (true! (-> obj has-icons)) + (kill-icon obj 0) + (hud-pc-replace-icon obj 0 :skel (-> skel-sym value) :entity enemy-ent :z (meters 0.5)) 0) +(defmethod update-display-status hud-battle-enemy ((obj hud-battle-enemy) (skel symbol) (ent entity) (icon-idx int) (trigger-force symbol)) + "logic for displaying or hiding the hud, and drawing the icons." + + + ;; do stuff depending on our current state + (cond + ((hidden? obj) + ;; we're hidden, so let's make our new icons and see if we are allowed to show + + ;; if we have icons made then show! + (when (-> obj ready?) + (set! (-> obj kicked) #f) + (send-event obj 'show) + ) + + ;; no icons, make new ones but keep them hidden for now + (when (and (not (-> obj ready?)) skel (not *progress-process*)) + (case skel + (('*swamp-rat-sg* '*citb-bunny-sg*) + (set! (-> obj icons icon-idx icon-x) (the int (* 0.84 512))) + (set! (-> obj icons icon-idx icon-y) (the int (* 0.51 448))) + (set! (-> obj icons icon-idx scale-x) 0.006) + ) + (('*gnawer-sg*) + (set! (-> obj icons icon-idx icon-x) (the int (* 0.78 512))) + (set! (-> obj icons icon-idx icon-y) (the int (* 0.54 448))) + (set! (-> obj icons icon-idx scale-x) 0.003) + ) + (('*flying-lurker-sg*) + (set! (-> obj icons icon-idx icon-x) (the int (* 0.80 512))) + (set! (-> obj icons icon-idx icon-y) (the int (* 0.40 448))) + (set! (-> obj icons icon-idx scale-x) 0.003) + ) + (else + (set! (-> obj icons icon-idx icon-x) (the int (* 0.84 512))) + (set! (-> obj icons icon-idx icon-y) (the int (* 0.51 448))) + (set! (-> obj icons icon-idx scale-x) 0.004) + ) + ) + (set! (-> obj icons icon-idx scale-y) (* (-> obj icons icon-idx scale-x) (/ -512.0 448.0))) + (make-enemy-icon obj icon-idx skel ent) + (let ((icon0 (the manipy (ppointer->process (-> obj icons icon-idx icon))))) + (case skel + (('*babak-sg*) + (send-event icon0 'art-joint-anim "babak-idle" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + (('*citb-bunny-sg*) + (send-event icon0 'art-joint-anim "citb-bunny-idle" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + (('*bonelurker-sg*) + (send-event icon0 'art-joint-anim "bonelurker-idle" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + (('*swamp-rat-sg*) + (send-event icon0 'art-joint-anim "swamp-rat-celebrate" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + (('*gnawer-sg*) + (send-event icon0 'art-joint-anim "gnawer-idle" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + (('*flying-lurker-sg*) + (send-event icon0 'art-joint-anim "flying-lurker-fly" 0) + (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + ) + ) + (send-event icon0 'draw #f) + ) + (true! (-> obj ready?)) + ) + ) + (else + ;; we want to be shown! + + ;; progress is open, let's leave. + (when (and (not (-> obj kicked)) (= *master-mode* 'progress)) + (true! (-> obj kicked)) + (false! (-> obj ready?)) + (send-event obj 'hide-quick) + ) + + ;; set the trigger time so we don't automatically go away + (if (and trigger-force (!= (-> obj next-state name) 'hud-leaving)) + (set! (-> obj trigger-time) (current-time))) + ) + ) + 0) + + +(defmacro actor-by-name (name) + "get an entity by name and cast it to an actor. not super safe!" + `(the entity-actor (entity-by-name ,name))) + +(defmacro actor-by-name-safe (name) + "safe, slower version of actor-by-name" + `(aif (entity-by-name ,name) + (if (type-type? it entity-actor) + (the entity-actor it)) + ) + ) (defmethod hud-update hud-battle-enemy ((obj hud-battle-enemy)) + "hud logic." (when (not (-> *pc-settings* extra-hud?)) - (kill-enemy-icons obj) + (kill-all-icons obj) (return #f)) - (let ((battle (the battlecontroller #f))) + (when (and (not (-> obj ready?)) (hidden? obj)) + (kill-all-icons obj) + ) + + (let ((battle (the process #f)) + (cur-lev (aif (level-get-target-inside *level*) (-> it name))) + (actor-list-task? #f) + ) ;; default params + (set! (-> obj task-entity) #f) (set! (-> obj battle-entity) #f) - (set! (-> obj battle-mode) 'dead) - + (set! (-> obj battle-mode) 'remain) + ;; find an entity for a battlecontroller, check current level - (awhen (level-get-target-inside *level*) - (case (-> it name) - (('swamp) - (set! (-> obj battle-entity) (entity-by-name "swamp-battlecontroller-1")) - (set! (-> obj want-skel) '*babak-sg*) - ) - (('misty) - (set! (-> obj battle-entity) (entity-by-name "misty-battlecontroller-1")) - (set! (-> obj want-skel) '*babak-sg*) - ) - (('citadel) - (set! (-> obj battle-entity) (entity-by-name "citb-battlecontroller-1")) - (set! (-> obj want-skel) '*citb-bunny-sg*) + (case cur-lev + (('swamp) + (set! (-> obj battle-entity) (actor-by-name "swamp-battlecontroller-1")) + (set! (-> obj want-skel) '*swamp-rat-sg*) + ) + (('misty) + (set! (-> obj battle-entity) (actor-by-name "misty-battlecontroller-1")) + (set! (-> obj want-skel) '*bonelurker-sg*) + ) + (('citadel) + (set! (-> obj battle-entity) (actor-by-name "citb-battlecontroller-1")) + (set! (-> obj want-skel) '*citb-bunny-sg*) + (set! (-> obj battle-mode) 'alive) + ) + (('maincave) + (set! (-> obj task-entity) (the entity-actor (or (actor-by-name "gnawer-11") + (actor-by-name "gnawer-12") + (actor-by-name "gnawer-13") + (actor-by-name "gnawer-14") + (actor-by-name "gnawer-15") + (actor-by-name "gnawer-16") + (actor-by-name "gnawer-17") + (actor-by-name "gnawer-18") + (actor-by-name "gnawer-19") + ))) + (true! actor-list-task?) + (set! (-> obj want-skel) '*gnawer-sg*) + ) + (('ogre) + (when (= 'debug *cheat-mode*) + (set! (-> obj battle-entity) (actor-by-name "flying-lurker-1")) + (set! (-> obj want-skel) '*flying-lurker-sg*) (set! (-> obj battle-mode) 'alive) ) ) ) - + ;; have an entity, grab its process (if (-> obj battle-entity) - (set! battle (the battlecontroller (-> obj battle-entity extra process)))) - + (set! battle (-> obj battle-entity extra process))) + (cond - ;; check if we have a battle process + ;; check level statuses FIRST + ((not (aif (level-get *level* (-> obj last-level)) (-> it display?))) + ;; the old level died. kill everything. + (unless (hidden? obj) + (set! (-> obj last-battle) INVALID_HANDLE) + (set! (-> obj last-task) #f) + (false! (-> obj ready?)) + (kill-all-icons obj) + (go hud-hidden) + ) + ) + ;; check if we have anything + ((-> obj task-entity) + ;; we have a task to track. + + ;; see if we've changed tracking now + (when (or (!= (-> obj display-mode?) 'task) + (!= (-> obj task-entity) (-> obj last-task))) + (set! (-> obj last-task) (-> obj task-entity)) + (set! (-> obj display-mode?) 'task) + (false! (-> obj ready?)) + (send-event obj 'hide) + ) + + ;; logic for each kind of task + (cond + (actor-list-task? + ;; simple: check a list of actors and count how many have completed their task. + (set! (-> obj battle-max) 0) + (set! (-> obj value) 0) + (let ((actor (-> obj task-entity))) + + ;; get the first actor + (while (prev-actor actor) + (set! actor (prev-actor actor))) + + ;; now count forwards. + (while actor + + ;; stuff. + (1+! (-> obj battle-max)) + (when (logtest? (-> actor extra perm status) (entity-perm-status complete)) + (1+! (-> obj value)) + ) + + (set! actor (next-actor actor)) + ) + ) + + (when (and (!= (-> obj value) (-> obj battle-max)) + (or (> (-> obj value) 0) (task-closed? (-> obj task-entity task) (task-status need-hint))) + ) + (update-display-status obj (-> obj want-skel) (-> obj task-entity) 0 #t) + ) + ) + ) + ) (battle ;; if its a different process, panic and restart the whole sequence. it's OK - (when (!= (handle->process (-> obj last-battle)) battle) + (when (or (!= (-> obj display-mode?) 'battle) + (!= (handle->process (-> obj last-battle)) battle)) (set! (-> obj last-battle) (process->handle battle)) - (kill-enemy-icons obj) - (send-event obj 'hide-quick) - ) - - ;; wait until battle is active - (when (= 'battlecontroller-active (-> battle next-state name)) - ;; get battle stats - (let ((alive-count 0)) - (with-children (child battle) - (1+! alive-count)) - (set! (-> obj value) (- (-> battle spawn-count) alive-count)) - (set! (-> obj battle-max) (-> battle max-spawn-count)) - (set! (-> obj battle-alive) alive-count) + (set! (-> obj display-mode?) 'battle) + (false! (-> obj ready?)) + (send-event obj 'hide) ) - - ;; do stuff depending on our current state - (case (-> obj next-state name) - (('hud-hidden) - ;; we're hidden, so let's make our new icons and see if we are allowed to show - ;; if we have icons, show! - (when (-> obj has-icons) - (set! (-> obj kicked) #f) - (send-event obj 'show) - ) - ;; no icons, make new ones but keep them hidden for now - (when (and (not (-> obj has-icons)) (-> obj want-skel) (not *progress-process*)) - (make-enemy-icon obj 0 (-> obj want-skel)) - (let ((icon0 (ppointer->process (-> obj icons 0 icon)))) - (case (-> obj want-skel) - (('*babak-sg*) - (send-event icon0 'art-joint-anim "babak-idle" (seconds 0.05)) - (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) - ) - (('*citb-bunny-sg*) - (send-event icon0 'art-joint-anim "citb-bunny-idle" (seconds 0.05)) - (send-event icon0 'rot-quat (quaternion-axis-angle! (new-stack-quaternion0) 0.0 1.0 0.15 (degrees 210))) + + ;; logic for each kind of process. + (cond + ((type-type? (-> battle type) battlecontroller) + (let ((battle (the battlecontroller battle)) ) - ) - (send-event icon0 'draw #f) - ) - ) - ) - (else - ;; we want to be shown! - - ;; progress is open, let's leave. - (when (and (not (-> obj kicked)) (= *master-mode* 'progress)) - (true! (-> obj kicked)) - (kill-enemy-icons obj) - (send-event obj 'hide-quick) - ) - - ;; set the trigger time so we don't automatically go away - (set! (-> obj trigger-time) (current-time)) - ) - ) + ;; wait until battle is active + (when (= 'battlecontroller-active (-> battle next-state name)) + ;; get battle stats + (let ((alive-count 0)) + (with-children (child battle) + (1+! alive-count)) + (set! (-> obj value) (- (-> battle spawn-count) alive-count)) + (set! (-> obj battle-max) (-> battle max-spawn-count)) + (set! (-> obj battle-alive) alive-count) + ) + + (update-display-status obj (-> obj want-skel) (-> obj battle-entity) 0 #t) + ) + )) + ((and (= 'debug *cheat-mode*) (= (-> obj battle-entity) (actor-by-name "flying-lurker-1"))) + (let ((battle (the process-drawable battle))) + + (if *target* + (set! (-> obj battle-alive) (the int (/ (vector-vector-distance (-> battle root trans) (target-pos 0)) METER_LENGTH)))) + + (update-display-status obj (-> obj want-skel) (-> obj battle-entity) 0 #t) + )) ) ) (else - ;; no battle. kill everything we have. - (when (-> obj has-icons) - (kill-enemy-icons obj) + ;; we have nothing. kill everything. + (unless (hidden? obj) (set! (-> obj last-battle) INVALID_HANDLE) - (send-event obj 'hide-quick) + (set! (-> obj last-task) #f) + (false! (-> obj ready?)) + (cond + ((and (!= (-> obj next-state name) 'hud-leaving) + (aif (level-get *level* (-> obj last-level)) (-> it display?)) + ) + (send-event obj 'hide) + ) + (else + (kill-all-icons obj) + (go hud-hidden) + ) + ) ) ) ) + + ;; save the current level + (set! (-> obj last-level) cur-lev) ) 0 (none) @@ -308,15 +545,19 @@ (the int (-> *video-parms* relative-y-scale))) 2)) ) - + (case (-> obj battle-mode) (('dead) (draw-string-xy (string-format "~D/~D" (-> obj value) (-> obj battle-max)) - buf str-x str-y (font-color white) (font-flags shadow kerning large)) + buf str-x str-y (font-color white) (font-flags shadow kerning large middle)) ) (('alive) (draw-string-xy (string-format "~D" (-> obj battle-alive)) - buf str-x str-y (font-color white) (font-flags shadow kerning large)) + buf str-x str-y (font-color white) (font-flags shadow kerning large middle)) + ) + (('remain) + (draw-string-xy (string-format "~D" (- (-> obj battle-max) (-> obj value))) + buf str-x str-y (font-color white) (font-flags shadow kerning large middle)) ) ) ) @@ -328,21 +569,23 @@ (defmethod init-particles! hud-battle-enemy ((obj hud-battle-enemy) (arg0 int)) (hud-pc-make-icon obj HUD_ICON_COUNT :skel *fuelcell-naked-sg* - :x (the int (* 0.84 512)) :y (the int (* 0.52 448)) :z (meters 0.5) + :x (the int (* 0.84 512)) :y (the int (* 0.51 448)) :z (meters 0.5) :scale-x 0.004 :scale-y (* -0.004 (/ 512.0 448.0))) - (set! (-> obj text-x) (the int (* 0.78 512))) + (set! (-> obj text-x) (the int (* 0.84 512))) (set! (-> obj text-y) (the int (* 0.5 448))) (set! (-> obj x-sgn) 1) (set! (-> obj y-sgn) 0) (set! (-> obj increment-on-event) #t) (set-pos-and-scale obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - + (set! (-> obj last-battle) INVALID_HANDLE) + (set! (-> obj last-task) #f) (set! (-> obj want-skel) #f) (set! (-> obj battle-max) 0) - + + (set! (-> obj last-level) #f) (set! (-> obj kicked) #f) - (set! (-> obj has-icons) #f) + (set! (-> obj ready?) #f) 0 (none) ) @@ -366,12 +609,11 @@ (defun activate-hud-pc ((tree process-tree)) "make the pc hud" - + (deactivate-hud-pc) - + (set! (-> *hud-parts-pc* battle-enemy) (process-spawn hud-battle-enemy :init hud-init-by-other 0 - :from *pc-dead-pool* :to tree - :stack-size PC_PROC_DEFAULT_STACK_SIZE)) + :from *pc-dead-pool* :to tree)) 0) diff --git a/test/decompiler/reference/engine/debug/viewer_REF.gc b/test/decompiler/reference/engine/debug/viewer_REF.gc index 6cfdde8b020..c5807c2d58f 100644 --- a/test/decompiler/reference/engine/debug/viewer_REF.gc +++ b/test/decompiler/reference/engine/debug/viewer_REF.gc @@ -241,7 +241,7 @@ ;; definition for function birth-viewer ;; INFO: Return type mismatch symbol vs object. -(defun birth-viewer ((arg0 process) (arg1 entity)) +(defun birth-viewer ((arg0 process) (arg1 entity-actor)) (set! (-> arg0 type) viewer) (let ((t9-0 init-entity)) viewer diff --git a/test/decompiler/reference/engine/entity/actor-link-h_REF.gc b/test/decompiler/reference/engine/entity/actor-link-h_REF.gc index ab3d73d1ac1..943217d9750 100644 --- a/test/decompiler/reference/engine/entity/actor-link-h_REF.gc +++ b/test/decompiler/reference/engine/entity/actor-link-h_REF.gc @@ -164,7 +164,7 @@ (set! s4-0 (entity-actor-lookup s4-0 'prev-actor 0)) ) (while s4-0 - (if (arg0 (the-as entity-actor s4-0) arg1) + (if (arg0 s4-0 arg1) (return (the-as int #f)) ) (let ((a0-4 s4-0)) @@ -292,7 +292,7 @@ ;; definition for method 9 of type actor-link-info (defmethod get-matching-actor-type-mask actor-link-info ((obj actor-link-info) (matching-type type)) - (let ((actor (the-as entity-actor (-> obj process entity))) + (let ((actor (-> obj process entity)) (mask 0) ) (let ((current-bit 1)) diff --git a/test/decompiler/reference/engine/entity/entity_REF.gc b/test/decompiler/reference/engine/entity/entity_REF.gc index 989503c4ade..13280c4f048 100644 --- a/test/decompiler/reference/engine/entity/entity_REF.gc +++ b/test/decompiler/reference/engine/entity/entity_REF.gc @@ -1223,7 +1223,7 @@ ;; definition for function init-entity ;; INFO: Return type mismatch process vs none. -(defun init-entity ((proc process) (ent entity)) +(defun init-entity ((proc process) (ent entity-actor)) (activate proc *entity-pool* (res-lump-struct ent 'name basic) (the-as pointer #x70004000)) (set! (-> proc entity) ent) (set! (-> ent extra process) proc) @@ -1272,7 +1272,7 @@ ;; definition for function entity-deactivate-handler ;; INFO: Return type mismatch symbol vs none. -(defun entity-deactivate-handler ((arg0 process) (arg1 entity)) +(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor)) (when (= arg0 (-> arg1 extra process)) (logclear! (-> arg1 extra perm status) (entity-perm-status bit-1 bit-3)) (set! (-> arg1 extra process) #f) diff --git a/test/decompiler/reference/engine/game/collectables_REF.gc b/test/decompiler/reference/engine/game/collectables_REF.gc index f37e8a23d1d..9d98dff75d8 100644 --- a/test/decompiler/reference/engine/game/collectables_REF.gc +++ b/test/decompiler/reference/engine/game/collectables_REF.gc @@ -1366,7 +1366,7 @@ ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! money ((obj money) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (update-transforms! (-> obj root-override)) (go (method-of-object obj wait)) @@ -1376,7 +1376,7 @@ ;; definition for function money-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior money-init-by-other money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior money-init-by-other money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) @@ -1403,7 +1403,7 @@ ;; definition for function money-init-by-other-no-bob ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior money-init-by-other-no-bob money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 float) (arg4 entity)) +(defbehavior money-init-by-other-no-bob money ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 float) (arg4 entity-actor)) (set! (-> self entity) arg4) (set! (-> self pickup-type) (the-as pickup-type arg2)) (set! (-> self pickup-amount) arg3) @@ -2144,7 +2144,7 @@ ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! fuel-cell ((obj fuel-cell) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (logclear! (-> obj fact options) (fact-options can-collect)) (update-transforms! (-> obj root-override)) @@ -2155,7 +2155,7 @@ ;; definition for function fuel-cell-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior fuel-cell-init-by-other fuel-cell ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior fuel-cell-init-by-other fuel-cell ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) @@ -2489,7 +2489,7 @@ ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! buzzer ((obj buzzer) (arg0 entity-actor)) (initialize obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-params obj 0 (the-as float 1024.0)) (set! (-> obj collect-timeout) (seconds 2)) (update-transforms! (-> obj root-override)) @@ -2504,7 +2504,7 @@ ;; definition for function buzzer-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior buzzer-init-by-other buzzer ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity)) +(defbehavior buzzer-init-by-other buzzer ((arg0 vector) (arg1 vector) (arg2 fact-info) (arg3 entity-actor)) (let ((s3-0 (-> arg2 pickup-type)) (f30-0 (-> arg2 pickup-spawn-amount)) ) diff --git a/test/decompiler/reference/engine/game/generic-obs-h_REF.gc b/test/decompiler/reference/engine/game/generic-obs-h_REF.gc index 22f38cddb23..96662b5ffad 100644 --- a/test/decompiler/reference/engine/game/generic-obs-h_REF.gc +++ b/test/decompiler/reference/engine/game/generic-obs-h_REF.gc @@ -130,8 +130,7 @@ ;; definition of type camera-tracker (deftype camera-tracker (process) - ((entity-override entity-actor :offset 52) - (grab-target handle :offset 120) + ((grab-target handle :offset 120) (grab-event symbol :offset-assert 128) (release-event symbol :offset-assert 132) (old-global-mask process-mask :offset-assert 136) diff --git a/test/decompiler/reference/engine/game/generic-obs_REF.gc b/test/decompiler/reference/engine/game/generic-obs_REF.gc index 5e7c93b05e7..49862f25aec 100644 --- a/test/decompiler/reference/engine/game/generic-obs_REF.gc +++ b/test/decompiler/reference/engine/game/generic-obs_REF.gc @@ -544,7 +544,7 @@ ;; definition for function manipy-init ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior manipy-init manipy ((arg0 vector) (arg1 entity) (arg2 skeleton-group) (arg3 vector)) +(defbehavior manipy-init manipy ((arg0 vector) (arg1 entity-actor) (arg2 skeleton-group) (arg3 vector)) (stack-size-set! (-> self main-thread) 128) (logior! (-> self mask) (process-mask heap-shrunk)) (set! (-> self entity) arg1) @@ -1177,8 +1177,8 @@ ) ) :enter (behavior () - (if (-> self entity-override) - (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #t) + (if (-> self entity) + (dummy-30 (-> self entity) (entity-perm-status bit-3) #t) ) (if (not (-> self border-value)) (add-setting! 'border-mode (-> self border-value) 0.0 0) @@ -1189,8 +1189,8 @@ (none) ) :exit (behavior () - (if (-> self entity-override) - (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #f) + (if (-> self entity) + (dummy-30 (-> self entity) (entity-perm-status bit-3) #f) ) (send-event *camera* 'clear-entity) (none) @@ -1254,7 +1254,7 @@ ) ) (if v1-17 - (set! (-> self entity-override) (the-as entity-actor (-> (the-as process v1-17) entity))) + (set! (-> self entity) (-> (the-as process v1-17) entity)) ) ) (set! (-> self event-hook) (-> camera-tracker-process event)) diff --git a/test/decompiler/reference/engine/game/projectiles_REF.gc b/test/decompiler/reference/engine/game/projectiles_REF.gc index 85fc14a000a..bd62e03e134 100644 --- a/test/decompiler/reference/engine/game/projectiles_REF.gc +++ b/test/decompiler/reference/engine/game/projectiles_REF.gc @@ -906,7 +906,7 @@ ;; definition for function projectile-init-by-other ;; Used lq/sq -(defbehavior projectile-init-by-other projectile ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 uint) (arg4 handle)) +(defbehavior projectile-init-by-other projectile ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 uint) (arg4 handle)) (stack-size-set! (-> self main-thread) 512) (set! (-> self entity) arg0) (set! (-> self attack-mode) #f) @@ -1230,7 +1230,7 @@ ;; INFO: Return type mismatch int vs none. ;; Used lq/sq (defun spawn-projectile-blue ((arg0 target)) - (local-vars (sv-48 entity)) + (local-vars (sv-48 entity-actor)) (with-pp (when arg0 (let ((s3-0 (rand-vu-int-range 3 (+ (-> arg0 node-list length) -1))) diff --git a/test/decompiler/reference/engine/geometry/vol-h_REF.gc b/test/decompiler/reference/engine/geometry/vol-h_REF.gc index 92fad74c608..7b3b22079a2 100644 --- a/test/decompiler/reference/engine/geometry/vol-h_REF.gc +++ b/test/decompiler/reference/engine/geometry/vol-h_REF.gc @@ -83,7 +83,7 @@ ) (set! (-> (the-as vol-control gp-0) process) arg0) (let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-1) 'vol 'exact 0.0) lo)) + (s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity-actor s5-1) 'vol 'exact 0.0) lo)) ) (when (>= (the-as int s4-0) 0) (let ((s3-0 (the-as int s4-0)) @@ -105,7 +105,7 @@ ) ) (let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) - (s4-1 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo)) + (s4-1 (-> ((method-of-type res-lump lookup-tag-idx) (the-as entity-actor s5-2) 'cutoutvol 'exact 0.0) lo)) ) (when (>= (the-as int s4-1) 0) (let ((s3-1 (the-as int s4-1)) diff --git a/test/decompiler/reference/engine/gfx/water/water_REF.gc b/test/decompiler/reference/engine/gfx/water/water_REF.gc index 2ab80cdf120..65420bf0a5e 100644 --- a/test/decompiler/reference/engine/gfx/water/water_REF.gc +++ b/test/decompiler/reference/engine/gfx/water/water_REF.gc @@ -1416,7 +1416,7 @@ ) ) ) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (logclear! (-> obj mask) (process-mask actor-pause)) (set! (-> obj vol) (new 'process 'vol-control obj)) (logior! (-> obj vol flags) 3) @@ -1472,7 +1472,7 @@ ;; definition for function water-vol-init-by-other ;; INFO: Return type mismatch object vs none. -(defbehavior water-vol-init-by-other water-vol ((arg0 entity)) +(defbehavior water-vol-init-by-other water-vol ((arg0 entity-actor)) (set! (-> self entity) arg0) (set-stack-size! self) (reset-root! self) diff --git a/test/decompiler/reference/engine/nav/navigate-h_REF.gc b/test/decompiler/reference/engine/nav/navigate-h_REF.gc index 1038161a940..c24b040ec60 100644 --- a/test/decompiler/reference/engine/nav/navigate-h_REF.gc +++ b/test/decompiler/reference/engine/nav/navigate-h_REF.gc @@ -438,48 +438,43 @@ ;; definition for function nav-mesh-connect ;; Used lq/sq -(defun nav-mesh-connect ((proc process) (trans trsqv) (nav-cont nav-control)) +(defbehavior nav-mesh-connect process ((proc process) (trans trsqv) (nav-cont nav-control)) (local-vars (sv-16 type) (sv-32 symbol)) - (with-pp - (let ((ent (-> proc entity))) - (when (zero? (-> (the-as entity-actor ent) nav-mesh)) - (let ((lookup-entity (entity-actor-lookup (the-as entity-actor ent) 'nav-mesh-actor 0))) - (if lookup-entity - (set! ent lookup-entity) - ) - ) + (let ((ent (-> proc entity))) + (when (zero? (-> ent nav-mesh)) + (let ((lookup-entity (entity-actor-lookup ent 'nav-mesh-actor 0))) + (if lookup-entity + (set! ent lookup-entity) + ) ) - (let ((entity-nav-mesh (-> (the-as entity-actor ent) nav-mesh))) - (cond - ((nonzero? entity-nav-mesh) - (when (zero? (-> entity-nav-mesh user-list)) - (set! process-level-heap (-> (the-as entity-links (-> (the-as entity (-> pp entity)) extra)) level heap)) - (let ((s1-0 (method-of-type engine new)) - (s0-0 'process-level-heap) - ) - (set! sv-16 engine) - (set! sv-32 'nav-engine) - (let ((a3-1 (res-lump-value ent 'nav-max-users uint128 :default (the-as uint128 32)))) - (set! (-> entity-nav-mesh user-list) (s1-0 s0-0 sv-16 sv-32 (the-as int a3-1))) + ) + (let ((entity-nav-mesh (-> ent nav-mesh))) + (cond + ((nonzero? entity-nav-mesh) + (when (zero? (-> entity-nav-mesh user-list)) + (set! process-level-heap (-> self entity extra level heap)) + (let ((s1-0 (method-of-type engine new)) + (s0-0 'process-level-heap) ) + (set! sv-16 engine) + (set! sv-32 'nav-engine) + (let ((a3-1 (res-lump-value ent 'nav-max-users uint128 :default (the-as uint128 32)))) + (set! (-> entity-nav-mesh user-list) (s1-0 s0-0 sv-16 sv-32 (the-as int a3-1))) ) - (initialize-mesh! entity-nav-mesh) - (update-route-table entity-nav-mesh) ) - (add-connection (-> entity-nav-mesh user-list) proc nothing proc nav-cont trans) + (initialize-mesh! entity-nav-mesh) + (update-route-table entity-nav-mesh) ) - (else - (if (and nav-cont (-> proc entity)) - (logior! - (-> (the-as entity-links (-> (the-as entity (-> proc entity)) extra)) perm status) - (entity-perm-status bit-1) - ) - ) - (set! entity-nav-mesh *default-nav-mesh*) - ) + (add-connection (-> entity-nav-mesh user-list) proc nothing proc nav-cont trans) + ) + (else + (if (and nav-cont (-> proc entity)) + (logior! (-> proc entity extra perm status) (entity-perm-status bit-1)) + ) + (set! entity-nav-mesh *default-nav-mesh*) ) - entity-nav-mesh ) + entity-nav-mesh ) ) ) diff --git a/test/decompiler/reference/kernel/gkernel_REF.gc b/test/decompiler/reference/kernel/gkernel_REF.gc index 32b4e8ba51c..e4cbfbf999f 100644 --- a/test/decompiler/reference/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/kernel/gkernel_REF.gc @@ -1364,8 +1364,8 @@ :code (the-as (function none :behavior process) nothing) ) -;; definition for symbol entity-deactivate-handler, type (function process entity none) -(define entity-deactivate-handler (the-as (function process entity none) nothing)) +;; definition for symbol entity-deactivate-handler, type (function process entity-actor none) +(define entity-deactivate-handler (the-as (function process entity-actor none) nothing)) ;; definition for method 10 of type process ;; INFO: Return type mismatch int vs none. diff --git a/test/decompiler/reference/levels/beach/beach-obs_REF.gc b/test/decompiler/reference/levels/beach/beach-obs_REF.gc index 91b6f6235a6..aa85a83081e 100644 --- a/test/decompiler/reference/levels/beach/beach-obs_REF.gc +++ b/test/decompiler/reference/levels/beach/beach-obs_REF.gc @@ -903,7 +903,7 @@ ;; definition for function flying-rock-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior flying-rock-init-by-other flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity)) +(defbehavior flying-rock-init-by-other flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity-actor)) (set! (-> self entity) arg3) (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/test/decompiler/reference/levels/citadel/citadel-obs_REF.gc b/test/decompiler/reference/levels/citadel/citadel-obs_REF.gc index 06025dd6c03..26941b813ce 100644 --- a/test/decompiler/reference/levels/citadel/citadel-obs_REF.gc +++ b/test/decompiler/reference/levels/citadel/citadel-obs_REF.gc @@ -1222,8 +1222,8 @@ (initialize-skeleton obj *citb-coil-sg* '()) (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 596) obj)) (set! (-> obj part-off) (create-launch-control (-> *part-group-id-table* 602) obj)) - (let ((v1-9 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-9)) + (let ((v1-9 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-9) (set! v1-9 (-> obj entity)) ) (if (logtest? (-> v1-9 extra perm status) (entity-perm-status complete)) @@ -1329,8 +1329,8 @@ (set! (-> obj root) (new 'process 'trsqv)) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *citb-hose-sg* '()) - (let ((v1-3 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-3)) + (let ((v1-3 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-3) (set! v1-3 (-> obj entity)) ) (if (logtest? (-> v1-3 extra perm status) (entity-perm-status complete)) @@ -1750,8 +1750,8 @@ (init! obj) (process-drawable-from-entity! obj arg0) (dummy-21 obj) - (let ((v1-4 (the-as entity (entity-actor-lookup (-> obj entity) 'state-actor 0)))) - (if (not (the-as entity-actor v1-4)) + (let ((v1-4 (entity-actor-lookup (-> obj entity) 'state-actor 0))) + (if (not v1-4) (set! v1-4 (-> obj entity)) ) (if (logtest? (-> v1-4 extra perm status) (entity-perm-status complete)) diff --git a/test/decompiler/reference/levels/common/basebutton_REF.gc b/test/decompiler/reference/levels/common/basebutton_REF.gc index 37880d644ad..1942505f2d5 100644 --- a/test/decompiler/reference/levels/common/basebutton_REF.gc +++ b/test/decompiler/reference/levels/common/basebutton_REF.gc @@ -458,7 +458,7 @@ ;; definition for function basebutton-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior basebutton-init-by-other basebutton ((arg0 basebutton) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) +(defbehavior basebutton-init-by-other basebutton ((arg0 entity-actor) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) (reset! self) (set! (-> self spawned-by-other?) #t) (set! (-> self button-id) -1) @@ -466,7 +466,7 @@ (set! (-> self notify-actor) arg3) (set! (-> self timeout) arg5) (if arg0 - (set! (-> self entity) (the-as entity arg0)) + (set! (-> self entity) arg0) ) (TODO-RENAME-27 self) (set! (-> self root-override trans quad) (-> arg1 quad)) diff --git a/test/decompiler/reference/levels/finalboss/final-door_REF.gc b/test/decompiler/reference/levels/finalboss/final-door_REF.gc index 1cac7c2fc35..3ec6d518f65 100644 --- a/test/decompiler/reference/levels/finalboss/final-door_REF.gc +++ b/test/decompiler/reference/levels/finalboss/final-door_REF.gc @@ -349,7 +349,7 @@ ;; definition for function powercellalt-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior powercellalt-init-by-other powercellalt ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int)) +(defbehavior powercellalt-init-by-other powercellalt ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 int)) (set! (-> self entity) arg0) (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc b/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc index f7c483011c8..db8c0277afc 100644 --- a/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc +++ b/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc @@ -814,7 +814,7 @@ ;; definition for function green-eco-lurker-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior green-eco-lurker-init-by-other green-eco-lurker ((arg0 entity) (arg1 green-eco-lurker-gen) (arg2 vector)) +(defbehavior green-eco-lurker-init-by-other green-eco-lurker ((arg0 entity-actor) (arg1 green-eco-lurker-gen) (arg2 vector)) (initialize-collision self) (set! (-> self collide-info trans quad) (-> arg2 quad)) (vector-identity! (-> self collide-info scale)) @@ -874,7 +874,7 @@ ;; definition for function green-eco-lurker-gen-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior green-eco-lurker-gen-init-by-other green-eco-lurker-gen ((arg0 entity) (arg1 vector) (arg2 int)) +(defbehavior green-eco-lurker-gen-init-by-other green-eco-lurker-gen ((arg0 entity-actor) (arg1 vector) (arg2 int)) (set! (-> self num-to-spawn) arg2) (set! (-> self num-spawned) 0) (set! (-> self num-alive) 0) diff --git a/test/decompiler/reference/levels/finalboss/light-eco_REF.gc b/test/decompiler/reference/levels/finalboss/light-eco_REF.gc index 0e0c6a724c4..4107c6d9d3e 100644 --- a/test/decompiler/reference/levels/finalboss/light-eco_REF.gc +++ b/test/decompiler/reference/levels/finalboss/light-eco_REF.gc @@ -586,7 +586,7 @@ ;; definition for function light-eco-child-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior light-eco-child-init-by-other light-eco-child ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int)) +(defbehavior light-eco-child-init-by-other light-eco-child ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 int)) (set! (-> self entity) arg0) (set! (-> self angle-bit) arg3) (set! (-> self ground-y) (-> arg2 y)) @@ -823,7 +823,7 @@ ;; definition for function light-eco-mother-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior light-eco-mother-init-by-other light-eco-mother ((arg0 entity) (arg1 vector)) +(defbehavior light-eco-mother-init-by-other light-eco-mother ((arg0 entity-actor) (arg1 vector)) (set! (-> self entity) arg0) (set! (-> self last-update-time) 0) (set! (-> self last-spawned-time) (-> *display* base-frame-counter)) diff --git a/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc b/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc index 6f4e255757f..ef1a30f04b0 100644 --- a/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc +++ b/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc @@ -574,7 +574,7 @@ ;; definition for function finalbosscam-init-by-other ;; INFO: Return type mismatch object vs none. -(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity)) +(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity-actor)) (set! (-> self entity) arg0) (dummy-40 self arg0 *finalbosscam-sg* 4 4 (new 'static 'vector :w 4096.0) 4) (set! (-> self tasks) (get-task-control (game-task finalboss-movies))) diff --git a/test/decompiler/reference/levels/flut_common/target-flut_REF.gc b/test/decompiler/reference/levels/flut_common/target-flut_REF.gc index b8f303d8872..7f45d516227 100644 --- a/test/decompiler/reference/levels/flut_common/target-flut_REF.gc +++ b/test/decompiler/reference/levels/flut_common/target-flut_REF.gc @@ -3,12 +3,12 @@ ;; definition of type flut-info (deftype flut-info (basic) - ((entity basic :offset-assert 4) - (flut-trans vector :inline :offset-assert 16) - (flut-quat vector :inline :offset-assert 32) - (flut-scale vector :inline :offset-assert 48) - (stick-lock basic :offset-assert 64) - (flap-sound-id sound-id :offset-assert 68) + ((entity entity-actor :offset-assert 4) + (flut-trans vector :inline :offset-assert 16) + (flut-quat vector :inline :offset-assert 32) + (flut-scale vector :inline :offset-assert 48) + (stick-lock basic :offset-assert 64) + (flap-sound-id sound-id :offset-assert 68) ) :method-count-assert 9 :size-assert #x48 @@ -480,7 +480,7 @@ (set! (-> self control unknown-float01) 0.0) (logior! (-> self control root-prim prim-core action) (collide-action ca-14)) (let ((s5-0 (-> self entity))) - (set! (-> self entity) (the-as entity (-> self flut entity))) + (set! (-> self entity) (-> self flut entity)) (set! (-> self manipy) (manipy-spawn (-> self control trans) (-> self entity) *flutflut-sg* 'collide-shape-moving :to self) ) diff --git a/test/decompiler/reference/levels/intro/evilbro_REF.gc b/test/decompiler/reference/levels/intro/evilbro_REF.gc index 83e51a7de49..ee12c1a4be5 100644 --- a/test/decompiler/reference/levels/intro/evilbro_REF.gc +++ b/test/decompiler/reference/levels/intro/evilbro_REF.gc @@ -6,7 +6,7 @@ ;; definition of type evilbro (deftype evilbro (process-taskable) - ((evilsis entity :offset-assert 380) + ((evilsis entity-actor :offset-assert 380) ) :heap-base #x110 :method-count-assert 53 diff --git a/test/decompiler/reference/levels/jungle/fisher_REF.gc b/test/decompiler/reference/levels/jungle/fisher_REF.gc index 8d4c02105cb..c1719ed3f0f 100644 --- a/test/decompiler/reference/levels/jungle/fisher_REF.gc +++ b/test/decompiler/reference/levels/jungle/fisher_REF.gc @@ -2184,7 +2184,7 @@ a2-2 (if v1-16 (-> v1-16 entity) - (the-as entity #f) + (the-as entity-actor #f) ) *fish-net-sg* #f diff --git a/test/decompiler/reference/levels/maincave/mother-spider-egg_REF.gc b/test/decompiler/reference/levels/maincave/mother-spider-egg_REF.gc index f3b5b4d671e..694e91eb189 100644 --- a/test/decompiler/reference/levels/maincave/mother-spider-egg_REF.gc +++ b/test/decompiler/reference/levels/maincave/mother-spider-egg_REF.gc @@ -507,7 +507,7 @@ ;; definition for function mother-spider-egg-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior mother-spider-egg-init-by-other mother-spider-egg ((arg0 entity) (arg1 vector) (arg2 vector) (arg3 vector)) +(defbehavior mother-spider-egg-init-by-other mother-spider-egg ((arg0 entity-actor) (arg1 vector) (arg2 vector) (arg3 vector)) (set! (-> self entity) arg0) (set! (-> self anim-speed) (rand-vu-float-range 0.8 1.2)) (set! (-> self falling-start-time) (-> *display* base-frame-counter)) diff --git a/test/decompiler/reference/levels/misty/balloonlurker_REF.gc b/test/decompiler/reference/levels/misty/balloonlurker_REF.gc index 23db6b9973f..fd2b0cdbf7e 100644 --- a/test/decompiler/reference/levels/misty/balloonlurker_REF.gc +++ b/test/decompiler/reference/levels/misty/balloonlurker_REF.gc @@ -306,7 +306,7 @@ (explosion-joint-index-bytes int8 4 :offset 772) (vulnerable symbol :offset-assert 776) (water-y float :offset-assert 780) - (propeller joint-mod-set-local :offset-assert 784) + (propeller joint-mod-spinner :offset-assert 784) (rudder joint-mod-set-local :offset-assert 788) (mine joint-mod-set-world 2 :offset-assert 792) (buoyancy-factor float :offset-assert 800) @@ -342,7 +342,7 @@ (format #t "~T~Texplosion-force-position: #~%" (-> obj explosion-force-position)) (format #t "~T~Texplosion-force: #~%" (-> obj explosion-force)) (format #t "~T~Texplosion: ~A~%" (-> obj explosion)) - (format #t "~T~Texplosion-joint-index[2] @ #x~X~%" (-> obj explosion-joint-index)) + (format #t "~T~Texplosion-joint-index[2] @ #x~X~%" (-> obj explosion-joint-index-bytes)) (format #t "~T~Tvulnerable: ~A~%" (-> obj vulnerable)) (format #t "~T~Twater-y: ~f~%" (-> obj water-y)) (format #t "~T~Tpropeller: ~A~%" (-> obj propeller)) @@ -744,7 +744,7 @@ (f2-6 6735.6445) (f3-6 (-> *BALLOONLURKER-bank* max-engine-thrust)) ) - (set! (-> self propeller transform quat y) (* f0-31 (+ f1-14 (* f2-6 (/ 1.0 f3-6) (-> self engine-thrust))))) + (set! (-> self propeller spin-rate) (* f0-31 (+ f1-14 (* f2-6 (/ 1.0 f3-6) (-> self engine-thrust))))) ) (let ((f0-34 (* (-> *BALLOONLURKER-bank* max-rudder-deflection-angle) (-> self rudder-control))) (gp-1 (new 'stack-no-clear 'quaternion)) @@ -1154,17 +1154,12 @@ (set! (-> obj vulnerable) #t) (set! (-> obj dead) #f) (set! (-> obj explosion) #f) - (set! (-> obj propeller) - (the-as - joint-mod-set-local - (new 'process 'joint-mod-spinner obj 4 (new 'static 'vector :z -1.0 :w 1.0) 8192.0) - ) - ) + (set! (-> obj propeller) (new 'process 'joint-mod-spinner obj 4 (new 'static 'vector :z -1.0 :w 1.0) 8192.0)) (set! (-> obj rudder) (new 'process 'joint-mod-set-local obj 12 #f #t #f)) (set! (-> obj mine 0) (new 'process 'joint-mod-set-world obj 8 #f)) (set! (-> obj mine 1) (new 'process 'joint-mod-set-world obj 5 #f)) - (set! (-> obj stack 660) (the-as uint 10)) - (set! (-> obj stack 661) (the-as uint 7)) + (set! (-> obj explosion-joint-index-bytes 0) 10) + (set! (-> obj explosion-joint-index-bytes 1) 7) (set! (-> obj engine-sound-id) (new 'static 'sound-id)) (set! (-> obj pedal-sound-id) (new 'static 'sound-id)) (set! (-> obj player-force quad) (-> *null-vector* quad)) diff --git a/test/decompiler/reference/levels/misty/mistycannon_REF.gc b/test/decompiler/reference/levels/misty/mistycannon_REF.gc index ef46f00621c..64441cdb5d9 100644 --- a/test/decompiler/reference/levels/misty/mistycannon_REF.gc +++ b/test/decompiler/reference/levels/misty/mistycannon_REF.gc @@ -1036,7 +1036,7 @@ ;; definition for function mistycannon-missile-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior mistycannon-missile-init-by-other mistycannon-missile ((arg0 mistycannon-init-data) (arg1 entity)) +(defbehavior mistycannon-missile-init-by-other mistycannon-missile ((arg0 mistycannon-init-data) (arg1 entity-actor)) (set! (-> self mask) (logior (process-mask projectile) (-> self mask))) (logclear! (-> self mask) (process-mask actor-pause)) (set! (-> self entity) arg1) diff --git a/test/decompiler/reference/levels/misty/quicksandlurker_REF.gc b/test/decompiler/reference/levels/misty/quicksandlurker_REF.gc index f9338cffc6d..c88b5388cad 100644 --- a/test/decompiler/reference/levels/misty/quicksandlurker_REF.gc +++ b/test/decompiler/reference/levels/misty/quicksandlurker_REF.gc @@ -432,7 +432,7 @@ ;; definition for function quicksandlurker-missile-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior quicksandlurker-missile-init-by-other quicksandlurker-missile ((arg0 quicksandlurker-missile-init-data) (arg1 entity)) +(defbehavior quicksandlurker-missile-init-by-other quicksandlurker-missile ((arg0 quicksandlurker-missile-init-data) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -469,7 +469,7 @@ ;; definition for function spawn-quicksandlurker-missile ;; INFO: Return type mismatch int vs none. -(defun spawn-quicksandlurker-missile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 entity)) +(defun spawn-quicksandlurker-missile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 entity-actor)) (let ((s5-0 (new 'stack-no-clear 'quicksandlurker-missile-init-data))) (set! (-> s5-0 position) arg1) (set! (-> s5-0 velocity) arg2) diff --git a/test/decompiler/reference/levels/ogre/ogreboss_REF.gc b/test/decompiler/reference/levels/ogre/ogreboss_REF.gc index 3a1c02b09e6..c0d75303459 100644 --- a/test/decompiler/reference/levels/ogre/ogreboss_REF.gc +++ b/test/decompiler/reference/levels/ogre/ogreboss_REF.gc @@ -367,7 +367,7 @@ ;; definition for function ogreboss-missile-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior ogreboss-missile-init-by-other ogreboss-missile ((arg0 ogreboss-missile-init-data) (arg1 entity)) +(defbehavior ogreboss-missile-init-by-other ogreboss-missile ((arg0 ogreboss-missile-init-data) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -821,7 +821,7 @@ ;; definition for function ogreboss-super-boulder-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior ogreboss-super-boulder-init-by-other ogreboss-super-boulder ((arg0 vector) (arg1 float) (arg2 entity)) +(defbehavior ogreboss-super-boulder-init-by-other ogreboss-super-boulder ((arg0 vector) (arg1 float) (arg2 entity-actor)) (set! (-> self entity) arg2) (let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-others)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) @@ -970,7 +970,7 @@ ;; definition for function ogreboss-bounce-boulder-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior ogreboss-bounce-boulder-init-by-other ogreboss-bounce-boulder ((arg0 int) (arg1 entity)) +(defbehavior ogreboss-bounce-boulder-init-by-other ogreboss-bounce-boulder ((arg0 int) (arg1 entity-actor)) (set! (-> self entity) arg1) (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) @@ -2114,8 +2114,8 @@ (ja-post) (when (not (task-complete? *game-info* (-> self entity extra perm task))) (let ((gp-1 (new 'stack-no-clear 'vector))) - (let ((a0-9 (the-as entity (entity-actor-lookup (-> self entity) 'trigger-actor 2)))) - (if (not (the-as entity-actor a0-9)) + (let ((a0-9 (entity-actor-lookup (-> self entity) 'trigger-actor 2))) + (if (not a0-9) (set! a0-9 (-> self entity)) ) (set! (-> gp-1 quad) (-> a0-9 extra trans quad)) diff --git a/test/decompiler/reference/levels/racer_common/racer-states_REF.gc b/test/decompiler/reference/levels/racer_common/racer-states_REF.gc index 2f50be8b360..2741aa2a5a1 100644 --- a/test/decompiler/reference/levels/racer_common/racer-states_REF.gc +++ b/test/decompiler/reference/levels/racer_common/racer-states_REF.gc @@ -173,7 +173,7 @@ (set! (-> self racer entity) #f) (let ((v1-28 (handle->process arg0))) (if v1-28 - (set! (-> self racer entity) (the-as entity-actor (-> v1-28 entity))) + (set! (-> self racer entity) (-> v1-28 entity)) ) ) (set! (-> self control surf) *race-track-surface*) diff --git a/test/decompiler/reference/levels/snow/ice-cube_REF.gc b/test/decompiler/reference/levels/snow/ice-cube_REF.gc index 4b852f1e35e..c7681adafc8 100644 --- a/test/decompiler/reference/levels/snow/ice-cube_REF.gc +++ b/test/decompiler/reference/levels/snow/ice-cube_REF.gc @@ -609,7 +609,7 @@ ;; definition for method 48 of type ice-cube ;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-48 ice-cube ((obj ice-cube)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *ice-cube-sg* '()) (TODO-RENAME-45 obj *ice-cube-nav-enemy-info*) (set! (-> obj neck up) (the-as uint 0)) diff --git a/test/decompiler/reference/levels/sunken/bully_REF.gc b/test/decompiler/reference/levels/sunken/bully_REF.gc index 1ecee6551ba..05f782ab2ca 100644 --- a/test/decompiler/reference/levels/sunken/bully_REF.gc +++ b/test/decompiler/reference/levels/sunken/bully_REF.gc @@ -271,7 +271,7 @@ ;; definition for function bully-broken-cage-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior bully-broken-cage-init-by-other bully-broken-cage ((arg0 entity)) +(defbehavior bully-broken-cage-init-by-other bully-broken-cage ((arg0 entity-actor)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> self parent-override 0 root-override trans quad)) diff --git a/test/decompiler/reference/levels/sunken/double-lurker_REF.gc b/test/decompiler/reference/levels/sunken/double-lurker_REF.gc index 486c0df9185..907e3b64694 100644 --- a/test/decompiler/reference/levels/sunken/double-lurker_REF.gc +++ b/test/decompiler/reference/levels/sunken/double-lurker_REF.gc @@ -1326,7 +1326,7 @@ ;; Used lq/sq (defmethod TODO-RENAME-48 double-lurker ((obj double-lurker)) (set! (-> obj buddy-handle) (the-as handle #f)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (set! (-> obj align) (new 'process 'align-control obj)) (initialize-skeleton obj *double-lurker-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) diff --git a/test/decompiler/reference/levels/sunken/orbit-plat_REF.gc b/test/decompiler/reference/levels/sunken/orbit-plat_REF.gc index 64ef1752714..c330d427034 100644 --- a/test/decompiler/reference/levels/sunken/orbit-plat_REF.gc +++ b/test/decompiler/reference/levels/sunken/orbit-plat_REF.gc @@ -285,7 +285,7 @@ ;; definition for function orbit-plat-bottom-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior orbit-plat-bottom-init-by-other orbit-plat-bottom ((arg0 entity) (arg1 orbit-plat)) +(defbehavior orbit-plat-bottom-init-by-other orbit-plat-bottom ((arg0 entity-actor) (arg1 orbit-plat)) (set! (-> self entity) arg0) (set! (-> self mask) (logior (process-mask platform) (-> self mask))) (set! (-> self root) (new 'process 'trsqv)) diff --git a/test/decompiler/reference/levels/sunken/puffer_REF.gc b/test/decompiler/reference/levels/sunken/puffer_REF.gc index 9f899add5e8..9956cd48a2c 100644 --- a/test/decompiler/reference/levels/sunken/puffer_REF.gc +++ b/test/decompiler/reference/levels/sunken/puffer_REF.gc @@ -1234,7 +1234,7 @@ (set! (-> obj look-mean?) #f) (set! (-> obj travel-turn-speed) 16384.0) (dummy-21 obj) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *puffer-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) (logclear! (-> obj mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc b/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc index 169905c6765..14a74eaee5b 100644 --- a/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc +++ b/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc @@ -181,7 +181,7 @@ ;; definition for function qbert-plat-on-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior qbert-plat-on-init-by-other qbert-plat ((arg0 entity) (arg1 qbert-plat)) +(defbehavior qbert-plat-on-init-by-other qbert-plat ((arg0 entity-actor) (arg1 qbert-plat)) (set! (-> self entity) arg0) (set! (-> self mask) (logior (process-mask platform) (-> self mask))) (set! (-> self root-overlay) (the-as collide-shape-moving (new 'process 'trsqv))) diff --git a/test/decompiler/reference/levels/sunken/sun-exit-chamber_REF.gc b/test/decompiler/reference/levels/sunken/sun-exit-chamber_REF.gc index 4ddb0550592..f32bc5c2ad5 100644 --- a/test/decompiler/reference/levels/sunken/sun-exit-chamber_REF.gc +++ b/test/decompiler/reference/levels/sunken/sun-exit-chamber_REF.gc @@ -350,7 +350,7 @@ ;; definition for function blue-eco-charger-orb-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior blue-eco-charger-orb-init-by-other blue-eco-charger-orb ((arg0 entity) (arg1 blue-eco-charger-orb)) +(defbehavior blue-eco-charger-orb-init-by-other blue-eco-charger-orb ((arg0 entity-actor) (arg1 blue-eco-charger-orb)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> arg1 root trans quad)) @@ -600,7 +600,7 @@ ;; definition for function exit-chamber-button-init-by-other (defbehavior exit-chamber-button-init-by-other exit-chamber-button ((arg0 vector) (arg1 quaternion) (arg2 entity-actor) (arg3 symbol)) - (basebutton-init-by-other (the-as basebutton #f) arg0 arg1 arg2 arg3 0.0) + (basebutton-init-by-other (the-as entity-actor #f) arg0 arg1 arg2 arg3 0.0) (none) ) diff --git a/test/decompiler/reference/levels/sunken/sunken-fish_REF.gc b/test/decompiler/reference/levels/sunken/sunken-fish_REF.gc index 6c1304e6ca6..3dbfe9b3f01 100644 --- a/test/decompiler/reference/levels/sunken/sunken-fish_REF.gc +++ b/test/decompiler/reference/levels/sunken/sunken-fish_REF.gc @@ -258,7 +258,7 @@ ;; definition for method 26 of type sunkenfisha (defmethod TODO-RENAME-26 sunkenfisha ((obj sunkenfisha)) (set! (-> obj root) (new 'process 'trsqv)) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (set-vector! (-> obj root scale) 6.0 6.0 6.0 1.0) (let ((v1-3 (rand-vu-int-count 3))) (cond @@ -369,7 +369,7 @@ ;; definition for function sunkenfisha-init-by-other ;; INFO: Return type mismatch object vs none. -(defbehavior sunkenfisha-init-by-other sunkenfisha ((arg0 entity)) +(defbehavior sunkenfisha-init-by-other sunkenfisha ((arg0 entity-actor)) (set! (-> self entity) arg0) (TODO-RENAME-26 self) (TODO-RENAME-27 self) diff --git a/test/decompiler/reference/levels/sunken/sunken-pipegame_REF.gc b/test/decompiler/reference/levels/sunken/sunken-pipegame_REF.gc index 93c02a1ab53..95f19122459 100644 --- a/test/decompiler/reference/levels/sunken/sunken-pipegame_REF.gc +++ b/test/decompiler/reference/levels/sunken/sunken-pipegame_REF.gc @@ -548,7 +548,7 @@ ;; definition for function sunken-pipegame-button-init-by-other (defbehavior sunken-pipegame-button-init-by-other sunken-pipegame-button ((arg0 vector) (arg1 quaternion) (arg2 entity-actor) (arg3 symbol)) - (basebutton-init-by-other (the-as basebutton #f) arg0 arg1 arg2 arg3 0.0) + (basebutton-init-by-other (the-as entity-actor #f) arg0 arg1 arg2 arg3 0.0) (none) ) diff --git a/test/decompiler/reference/levels/swamp/kermit_REF.gc b/test/decompiler/reference/levels/swamp/kermit_REF.gc index 6b4abc6584f..a763b9a2144 100644 --- a/test/decompiler/reference/levels/swamp/kermit_REF.gc +++ b/test/decompiler/reference/levels/swamp/kermit_REF.gc @@ -634,7 +634,7 @@ ;; definition for function kermit-pulse-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior kermit-pulse-init-by-other kermit-pulse ((arg0 vector) (arg1 entity)) +(defbehavior kermit-pulse-init-by-other kermit-pulse ((arg0 vector) (arg1 entity-actor)) (logclear! (-> self mask) (process-mask enemy attackable)) (set! (-> self mask) (logior (process-mask projectile) (-> self mask))) (set! (-> self entity) arg1) diff --git a/test/decompiler/reference/levels/swamp/swamp-obs_REF.gc b/test/decompiler/reference/levels/swamp/swamp-obs_REF.gc index 4650754b932..39bd500c62a 100644 --- a/test/decompiler/reference/levels/swamp/swamp-obs_REF.gc +++ b/test/decompiler/reference/levels/swamp/swamp-obs_REF.gc @@ -371,7 +371,7 @@ (backup-collide-with-as s5-0) (set! (-> obj root-override) s5-0) ) - (process-drawable-from-entity! obj (the-as entity-actor (-> obj entity))) + (process-drawable-from-entity! obj (-> obj entity)) (initialize-skeleton obj *swamp-spike-sg* '()) (set! (-> obj draw origin-joint-index) (the-as uint 3)) (load-params! (-> obj sync) obj (the-as uint 1500) 0.0 0.15 0.15) diff --git a/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc b/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc index a528d9cb0c6..f783602882e 100644 --- a/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc +++ b/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc @@ -881,7 +881,7 @@ (let ((gp-0 (-> arg0 entity))) (set! (-> self mask) (logior (process-mask enemy) (-> self mask))) (dummy-20 self) - (process-drawable-from-entity! self (the-as entity-actor gp-0)) + (process-drawable-from-entity! self gp-0) (set! (-> self top-sphere quad) (-> self root-override trans quad)) (set! (-> self top-sphere y) (+ 24576.0 (-> self top-sphere y))) (set! (-> self top-sphere w) 18432.0) diff --git a/test/decompiler/reference/levels/title/title-obs_REF.gc b/test/decompiler/reference/levels/title/title-obs_REF.gc index 4281f17a740..33a3af4de0a 100644 --- a/test/decompiler/reference/levels/title/title-obs_REF.gc +++ b/test/decompiler/reference/levels/title/title-obs_REF.gc @@ -201,7 +201,7 @@ ;; definition for function logo-slave-init-by-other ;; INFO: Return type mismatch object vs none. -(defbehavior logo-slave-init-by-other logo-slave ((arg0 entity) (arg1 skeleton-group)) +(defbehavior logo-slave-init-by-other logo-slave ((arg0 entity-actor) (arg1 skeleton-group)) (set! (-> self entity) arg0) (set! (-> self root) (new 'process 'trsqv)) (initialize-skeleton self arg1 '()) @@ -604,7 +604,7 @@ ;; definition for function logo-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq -(defbehavior logo-init-by-other logo ((arg0 entity) (arg1 vector) (arg2 symbol)) +(defbehavior logo-init-by-other logo ((arg0 entity-actor) (arg1 vector) (arg2 symbol)) (stack-size-set! (-> self main-thread) 512) (logclear! (-> self mask) (process-mask progress)) (set! (-> self entity) arg0) diff --git a/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc b/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc index 929c6589fa5..350b22b1d54 100644 --- a/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc +++ b/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc @@ -370,7 +370,7 @@ ;; definition for function sequenceA-village1-init-by-other ;; INFO: Return type mismatch object vs none. -(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity)) +(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity-actor)) (set! (-> self entity) arg0) (dummy-40 self arg0 *sage-sg* 3 40 (new 'static 'vector :w 4096.0) 5) (set! (-> self tasks) (get-task-control (game-task intro)))