diff --git a/decompiler/IR2/Env.cpp b/decompiler/IR2/Env.cpp index 27777a3de4..943cb0425b 100644 --- a/decompiler/IR2/Env.cpp +++ b/decompiler/IR2/Env.cpp @@ -64,6 +64,44 @@ void Env::set_remap_for_new_method(const TypeSpec& ts) { } } +void Env::set_remap_for_relocate_method(const TypeSpec& ts) { + int nargs = ts.arg_count() - 1; + m_var_remap["a0-0"] = "this"; + if (ts.get_arg(1).base_type() == "kheap") { + m_var_remap["a1-0"] = "heap"; + } else { + m_var_remap["a1-0"] = "offset"; + } + if (nargs > 1 && ts.get_arg(2).base_type() == "pointer") { + m_var_remap["a2-0"] = "name"; + } + for (int i = 3; i < nargs; i++) { + m_var_remap[get_reg_name(i)] = ("arg" + std::to_string(i - 3)); + } + if (ts.try_get_tag("behavior")) { + m_var_remap["s6-0"] = "self"; + m_pp_mapped_by_behavior = true; + } else { + m_var_remap["s6-0"] = "pp"; + } +} + +void Env::set_remap_for_memusage_method(const TypeSpec& ts) { + int nargs = ts.arg_count() - 1; + m_var_remap["a0-0"] = "this"; + m_var_remap["a1-0"] = "usage"; + m_var_remap["a2-0"] = "flags"; + for (int i = 3; i < nargs; i++) { + m_var_remap[get_reg_name(i)] = ("arg" + std::to_string(i - 3)); + } + if (ts.try_get_tag("behavior")) { + m_var_remap["s6-0"] = "self"; + m_pp_mapped_by_behavior = true; + } else { + m_var_remap["s6-0"] = "pp"; + } +} + void Env::set_remap_for_method(const TypeSpec& ts) { int nargs = ts.arg_count() - 1; m_var_remap["a0-0"] = "this"; diff --git a/decompiler/IR2/Env.h b/decompiler/IR2/Env.h index 1ab527f8bf..22a9cf1efa 100644 --- a/decompiler/IR2/Env.h +++ b/decompiler/IR2/Env.h @@ -170,6 +170,8 @@ class Env { void set_remap_for_function(const Function& func); void set_remap_for_method(const TypeSpec& ts); void set_remap_for_new_method(const TypeSpec& ts); + void set_remap_for_relocate_method(const TypeSpec& ts); + void set_remap_for_memusage_method(const TypeSpec& ts); void map_args_from_config(const std::vector& args_names, const std::unordered_map& var_names); void map_args_from_config(const std::vector& args_names, diff --git a/decompiler/analysis/expression_build.cpp b/decompiler/analysis/expression_build.cpp index 41d633f133..d9610d9b48 100644 --- a/decompiler/analysis/expression_build.cpp +++ b/decompiler/analysis/expression_build.cpp @@ -30,10 +30,19 @@ bool convert_to_expressions( } else if (f.guessed_name.kind == FunctionName::FunctionKind::METHOD) { auto method_type = dts.ts.lookup_method(f.guessed_name.type_name, f.guessed_name.method_id).type; - if (f.guessed_name.method_id == GOAL_NEW_METHOD) { - f.ir2.env.set_remap_for_new_method(method_type); - } else { - f.ir2.env.set_remap_for_method(method_type); + switch (f.guessed_name.method_id) { + case GOAL_NEW_METHOD: + f.ir2.env.set_remap_for_new_method(method_type); + break; + case GOAL_RELOC_METHOD: + f.ir2.env.set_remap_for_relocate_method(method_type); + break; + case GOAL_MEMUSAGE_METHOD: + f.ir2.env.set_remap_for_memusage_method(method_type); + break; + default: + f.ir2.env.set_remap_for_method(method_type); + break; } } diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index 8785788409..57d8493cf5 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -3751,7 +3751,7 @@ (bucket347 347) (bucket348 348) (bucket349 349) - (bucket350 350) + (shadow 350) (bucket351 351) (bucket352 352) (bucket353 353) @@ -3973,8 +3973,8 @@ (bucket569 569) (bucket570 570) (bucket571 571) - (bucket572 572) - (bucket573 573) + (shadow2 572) + (shadow3 573) (bucket574 574) (bucket575 575) (bucket576 576) @@ -11308,18 +11308,38 @@ (defenum collide-spec :bitfield #t :type uint32 - (cs0 0) - (cs1 1) - (cs2 2) - (cs3 3) - (cs4 4) - (cs5 5) - (cs6 6) - (cs7 7) - (cs8 8) - (cs9 9) - (cs10 10) - (cs11 11) + (backgnd 0) + (jak 1) + (bot 2) + (crate 3) + (civilian 4) + (enemy 5) + (obstacle 6) + (vehicle-sphere 7) + (hit-by-player-list 8) + (hit-by-others-list 9) + (player-list 10) + (water 11) + (collectable 12) + (blocking-plane 13) + (projectile 14) + (jak-vulnerable 15) + (camera-blocker 16) + (los-blocker 17) + (notice-blue-eco-powerup 18) + (tobot 19) + (pusher 20) + (vehicle-mesh 21) + (bot-targetable 22) + (jak-vehicle 23) + (special-obstacle 24) + (mech-punch 25) + (obstacle-for-jak 26) + (vehicle-mesh-probeable 27) + (impenetrable-obj 28) + (shield 29) + (vehicle-mesh-no-block-use 30) + (vehicle-sphere-no-probe 31) ) ;; ---main-h:collide-spec @@ -14199,22 +14219,21 @@ ;; merc-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ripple-merc-query (inline-array-class) + "Information about which merc vertices to apply the 'ripple' effect to." ((start-vertex int32 :offset-assert 16) (vertex-skip int32 :offset-assert 20) (vertex-count int32 :offset-assert 24) (current-loc int32 :offset-assert 28) - (data vector :dynamic :offset-assert 32) ;; guessed by decompiler + (data vector :inline :dynamic :offset-assert 32) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x20 :flag-assert #xe00000020 ) -|# -#| (deftype merc-byte-header (structure) + "Header for a single [[merc-fragment]] uploaded to the VU." ((srcdest-off uint8 :offset-assert 0) (rgba-off uint8 :offset-assert 1) (lump-off uint8 :offset-assert 2) @@ -14234,10 +14253,9 @@ :size-assert #x17 :flag-assert #x900000017 ) -|# -#| (deftype merc-fragment (structure) + "A single merc fragment that fits into VU memory." ((header merc-byte-header :inline :offset-assert 0) (rest uint8 1 :offset-assert 23) ;; guessed by decompiler ) @@ -14245,13 +14263,12 @@ :size-assert #x18 :flag-assert #xa00000018 (:methods - (merc-fragment-method-9 () none) ;; 9 ;; (login-adgifs (_type_) merc-fragment) + (login-adgifs (_type_) merc-fragment) ;; 9 ) ) -|# -#| (deftype merc-vtx (structure) + "A packed merc vertex." ((mat-0 uint8 :offset-assert 0) (mat-1 uint8 :offset-assert 1) (nrm-x uint8 :offset-assert 2) @@ -14269,10 +14286,9 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype merc-fp-header (structure) + "Merc header for a [[merc-fragment]]'s floating point data." ((x-add float :offset-assert 0) (y-add float :offset-assert 4) (z-add float :offset-assert 8) @@ -14285,21 +14301,20 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype merc-mat-dest (structure) + "Metadata for a merc matrix upload." ((matrix-number uint8 :offset-assert 0) (matrix-dest uint8 :offset-assert 1) ) + :pack-me :method-count-assert 9 :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype merc-fragment-control (structure) + "Data about a [[merc-fragment]] needed for merc DMA generation." ((unsigned-four-count uint8 :offset-assert 0) (lump-four-count uint8 :offset-assert 1) (fp-qwc uint8 :offset-assert 2) @@ -14310,10 +14325,9 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype merc-blend-ctrl (structure) + "Information about the vertices of a model modified by BLERC." ((blend-vtx-count uint8 :offset-assert 0) (nonzero-index-count uint8 :offset-assert 1) (bt-index uint8 :dynamic :offset-assert 2) ;; guessed by decompiler @@ -14322,10 +14336,9 @@ :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype mei-envmap-tint (structure) + "Data for the extra 'envmap tint' effect." ((fade0 float :offset-assert 0) (fade1 float :offset-assert 4) (tint rgba :offset-assert 8) ;; guessed by decompiler @@ -14335,10 +14348,9 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype mei-texture-scroll (structure) + "Data for the extra 'texscroll' effect." ((max-dist float :offset-assert 0) (st-int-scale uint8 :offset-assert 4) (time-factor uint8 :offset-assert 5) @@ -14351,10 +14363,9 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype mei-ripple (structure) + "Data for the extra 'ripple' effect." ((x-base float :offset-assert 0) (z-base float :offset-assert 4) (grid-size float :offset-assert 8) @@ -14364,10 +14375,9 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype merc-extra-info (structure) + "Info for merc extra effects." ((envmap-tint-offset uint8 :offset-assert 0) (shader-offset uint8 :offset-assert 1) (texture-scroll-offset uint8 :offset-assert 2) @@ -14378,10 +14388,31 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| +;; +++merc-h:effect-bits +(defenum effect-bits + :type uint8 + :bitfield #t + (texscroll 0) + (no-fade-out 1) ;; translucent. + (ripple 2) + (emerc 3) ;; envmap?? + (ignore-tod-for-envmap-tint 4) ;; color thing + (force-mercneric 5) ;; some mercneric-only effect + (cross-fade 6) ;; WARP? + (ignore-alpha 7) + ) +;; ---merc-h:effect-bits + +;; moved from end of merc-h definitions +(deftype merc-blend-data (structure) ;; was unknown! + "Packed BLERC data." + ((int8-data int8 :dynamic :offset-assert 0) + ) + ) + (deftype merc-effect (structure) + "A collection of [[merc-fragment]]s with data for any extra effects." ((frag-geo merc-fragment :offset-assert 0) (frag-ctrl merc-fragment-control :offset-assert 4) (blend-data merc-blend-data :offset-assert 8) @@ -14400,70 +14431,66 @@ :size-assert #x20 :flag-assert #xa00000020 (:methods - (merc-effect-method-9 () none) ;; 9 ;; (login-adgifs (_type_) none) + (login-adgifs (_type_) none) ;; 9 ) ) -|# -#| (deftype merc-eye-ctrl (structure) - ((eye-slot int8 :offset-assert 0) - (shader-offset int8 :offset-assert 1) - (shader-count int8 :offset-assert 2) - (eye-ctrl-index int8 :offset-assert 3) - (shader adgif-shader 6 :offset-assert 16) ;; guessed by decompiler - (left-iris-shader adgif-shader :inline :offset-assert 16) - (left-pupil-shader adgif-shader :inline :offset-assert 96) - (left-lid-shader adgif-shader :inline :offset-assert 176) - (right-iris-shader adgif-shader :inline :offset-assert 256) - (right-pupil-shader adgif-shader :inline :offset-assert 336) - (right-lid-shader adgif-shader :inline :offset-assert 416) + "Eye info for both eyes of a merc model." + ((eye-slot int8 :offset-assert 0) + (shader-offset int8 :offset-assert 1) + (shader-count int8 :offset-assert 2) + (eye-ctrl-index int8 :offset-assert 3) + (shader adgif-shader 6 :inline :offset-assert 16) ;; guessed by decompiler + (left-iris-shader adgif-shader :inline :offset 16) + (left-pupil-shader adgif-shader :inline :offset 96) + (left-lid-shader adgif-shader :inline :offset 176) + (right-iris-shader adgif-shader :inline :offset 256) + (right-pupil-shader adgif-shader :inline :offset 336) + (right-lid-shader adgif-shader :inline :offset 416) ) :method-count-assert 9 :size-assert #x1f0 :flag-assert #x9000001f0 ) -|# -#| (deftype merc-eye-anim-frame (structure) + "A single frame of a merc eye animation." ((pupil-trans-x int8 :offset-assert 0) (pupil-trans-y int8 :offset-assert 1) (blink int8 :offset-assert 2) - (iris-scale int8 :offset-assert 4) - (pupil-scale int8 :offset-assert 5) - (lid-scale int8 :offset-assert 6) - (dword uint64 :offset-assert 0) + (iris-scale int8 :offset 4) + (pupil-scale int8 :offset 5) + (lid-scale int8 :offset 6) + (dword uint64 :offset 0) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype merc-eye-anim-block (structure) - ((max-frame int16 :offset-assert 0) - (data merc-eye-anim-frame :dynamic :offset-assert 8) ;; guessed by decompiler + "A list of eye animation frames." + ((max-frame int16 :offset-assert 0) + (data merc-eye-anim-frame :inline :dynamic :offset-assert 8) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype texture-usage-group (structure) - ((data texture-masks 7 :offset-assert 0) ;; guessed by decompiler + ((data texture-masks 7 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x150 :flag-assert #x900000150 ) -|# -#| (deftype merc-ctrl-header (structure) + "The header for a [[merc-ctrl]], + containing metadata about the model used for drawing." ((xyz-scale float :offset-assert 0) (st-magic uint32 :offset-assert 4) (st-out-a uint32 :offset-assert 8) @@ -14493,36 +14520,36 @@ (eye-ctrl merc-eye-ctrl :offset-assert 64) (pad uint32 3 :offset-assert 68) ;; guessed by decompiler (masks-padding texture-masks :inline :offset-assert 80) - (texture-usage-group texture-usage-group :offset-assert 80) - (dummy-bytes uint8 :dynamic :offset-assert 32) ;; guessed by decompiler - (envmap-tint uint32 :offset-assert 32) - (query basic :offset-assert 36) - (needs-clip uint8 :offset-assert 40) - (use-isometric uint8 :offset-assert 41) - (use-attached-shader uint8 :offset-assert 42) - (display-triangles uint8 :offset-assert 43) - (death-vertex-skip uint16 :offset-assert 44) - (death-start-vertex uint16 :offset-assert 46) - (death-effect uint32 :offset-assert 48) - (use-translucent uint8 :offset-assert 52) - (display-this-fragment uint8 :offset-assert 53) - (use-warp uint8 :offset-assert 54) - (ignore-alpha uint8 :offset-assert 55) - (force-fade uint8 :offset-assert 56) - (disable-fog uint8 :offset-assert 57) - (disable-envmap uint8 :offset-assert 58) + (texture-usage-group texture-usage-group :offset 80) + (dummy-bytes uint8 :dynamic :offset 32) ;; guessed by decompiler + (envmap-tint uint32 :offset 32) + (query basic :offset 36) + (needs-clip uint8 :offset 40) + (use-isometric uint8 :offset 41) + (use-attached-shader uint8 :offset 42) + (display-triangles uint8 :offset 43) + (death-vertex-skip uint16 :offset 44) + (death-start-vertex uint16 :offset 46) + (death-effect uint32 :offset 48) + (use-translucent uint8 :offset 52) + (display-this-fragment uint8 :offset 53) + (use-warp uint8 :offset 54) + (ignore-alpha uint8 :offset 55) + (force-fade uint8 :offset 56) + (disable-fog uint8 :offset 57) + (disable-envmap uint8 :offset 58) ) :method-count-assert 9 :size-assert #x80 :flag-assert #x900000080 ;; field xyz-scale is a float printed as hex? ) -|# -#| (deftype merc-ctrl (art-element) - ((num-joints int32 :offset-assert 12) - (seg-table (array uint64) :offset-assert 28) ;; guessed by decompiler + "The merc data for a single model as it's stored in an art group. + Consists of a header and a list of [[merc-effect]]s." + ((num-joints int32 :offset 12) + (seg-table (array uint64) :offset 28) ;; guessed by decompiler (header merc-ctrl-header :inline :offset-assert 48) (effect merc-effect :dynamic :offset-assert 176) ;; guessed by decompiler ) @@ -14530,12 +14557,10 @@ :size-assert #xb0 :flag-assert #xe000000b0 ) -|# -#| (deftype merc-vu1-low-mem (structure) - ((tri-strip-gif qword :inline :offset-assert 0) ;; gs-gif-tag :inline - (ad-gif qword :inline :offset-assert 16) ;; gs-gif-tag :inline + ((tri-strip-gif gs-gif-tag :inline :offset-assert 0) ;; gs-gif-tag :inline + (ad-gif gs-gif-tag :inline :offset-assert 16) ;; gs-gif-tag :inline (hvdf-offset vector :inline :offset-assert 32) (perspective uint128 4 :offset-assert 48) ;; guessed by decompiler (fog vector :inline :offset-assert 112) @@ -14544,24 +14569,20 @@ :size-assert #x80 :flag-assert #x900000080 ) -|# -#| (deftype emerc-vu1-low-mem (structure) - ((tri-strip-gif qword :inline :offset-assert 0) ;; gs-gif-tag :inline - (ad-gif qword :inline :offset-assert 16) ;; gs-gif-tag :inline - (hvdf-offset vector :inline :offset-assert 32) - (perspective vector 4 :offset-assert 48) ;; guessed by decompiler - (fog vector :inline :offset-assert 112) - (unperspect vector :inline :offset-assert 128) + ((tri-strip-gif gs-gif-tag :inline :offset-assert 0) ;; gs-gif-tag :inline + (ad-gif gs-gif-tag :inline :offset-assert 16) ;; gs-gif-tag :inline + (hvdf-offset vector :inline :offset-assert 32) + (perspective vector 4 :inline :offset-assert 48) ;; guessed by decompiler + (fog vector :inline :offset-assert 112) + (unperspect vector :inline :offset-assert 128) ) :method-count-assert 9 :size-assert #x90 :flag-assert #x900000090 ) -|# -#| (deftype texture-login-data (structure) ((default-texture-index int32 :offset-assert 0) (current-texture-index int32 :offset-assert 4) @@ -14573,9 +14594,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype ripple-wave (structure) ((scale float :offset-assert 0) (offs float :offset-assert 4) @@ -14586,27 +14605,24 @@ (zmul float :offset-assert 20) (delta float :offset-assert 24) ) + :pack-me :method-count-assert 9 :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype ripple-wave-set (basic) ((count int32 :offset-assert 4) (converted basic :offset-assert 8) (normal-scale float :offset-assert 12) - (wave ripple-wave 4 :offset-assert 16) ;; guessed by decompiler + (wave ripple-wave 4 :inline :offset-assert 16) ;; guessed by decompiler (frame-save uint64 :offset-assert 128) ) :method-count-assert 9 :size-assert #x88 :flag-assert #x900000088 ) -|# -#| (deftype ripple-control (basic) ((global-scale float :offset-assert 4) (last-frame-scale float :offset-assert 8) @@ -14621,10 +14637,11 @@ :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 + (:methods + (new (symbol type) _type_) ;; 0 + ) ) -|# -#| (deftype death-info (basic) ((vertex-skip uint16 :offset-assert 4) (timer uint8 :offset-assert 6) @@ -14636,48 +14653,34 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| -(deftype merc-blend-data (UNKNOWN) - ((int8-data int8 :dynamic :offset-assert 0) ;; guessed by decompiler - ) - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 - ) -|# - -;; (define-extern merc-fragment-fp-data function) ;; (function merc-fragment merc-fp-header) +(define-extern merc-fragment-fp-data + "Get the floating point data of a [[merc-fragment]]." + (function merc-fragment merc-fp-header)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-merc-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype merc-matrix (structure) ((quad uint128 8 :offset-assert 0) ;; guessed by decompiler - (vector vector 8 :offset-assert 0) ;; guessed by decompiler - (tag uint64 :offset-assert 0) + (vector vector 8 :inline :offset 0 :score 1) ;; guessed by decompiler + (tag uint64 :offset 0) ) :method-count-assert 9 :size-assert #x80 :flag-assert #x900000080 ) -|# -#| (deftype generic-merc-tag (dma-packet) - ((next-ptr uint32 :offset-assert 12) - (size uint32 :offset-assert 8) + ((next-ptr uint32 :offset 12) + (size uint32 :offset 8) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype generic-merc-ctrl (structure) ((tag generic-merc-tag :inline :offset-assert 0) (lights vu-lights :inline :offset-assert 16) @@ -14688,9 +14691,7 @@ :size-assert #x120 :flag-assert #x900000120 ) -|# -#| (deftype generic-merc-ctrl-with-sfx (generic-merc-ctrl) ((sfx-data uint128 11 :offset-assert 288) ;; guessed by decompiler ) @@ -14698,14 +14699,12 @@ :size-assert #x1d0 :flag-assert #x9000001d0 ) -|# -#| (deftype generic-merc-input (structure) ((geo-tag generic-merc-tag :inline :offset-assert 0) (geo-block uint8 1296 :offset-assert 16) ;; guessed by decompiler - (byte-header merc-byte-header :inline :offset-assert 16) - (matrix merc-matrix 9 :offset-assert 1312) ;; guessed by decompiler + (byte-header merc-byte-header :inline :offset 16) + (matrix merc-matrix 9 :inline :offset-assert 1312) ;; guessed by decompiler (control generic-merc-ctrl-with-sfx :inline :offset-assert 2464) (end-tag generic-merc-tag :inline :offset-assert 2928) (shader adgif-shader :inline :offset-assert 2944) @@ -14714,24 +14713,20 @@ :size-assert #xbd0 :flag-assert #x900000bd0 ) -|# -#| (deftype generic-merc-output (structure) ((info gsf-info :inline :offset-assert 0) (header gsf-header :inline :offset-assert 16) (index-kick-table uint16 80 :offset-assert 32) ;; guessed by decompiler - (index-table uint8 160 :offset-assert 32) ;; guessed by decompiler + (index-table uint8 160 :offset 32) ;; guessed by decompiler (inverse-table uint8 256 :offset-assert 192) ;; guessed by decompiler - (vertex-table gsf-vertex 72 :offset-assert 448) ;; guessed by decompiler + (vertex-table gsf-vertex 72 :inline :offset-assert 448) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #xac0 :flag-assert #x900000ac0 ) -|# -#| (deftype generic-merc-dcache (structure) ((output-a generic-merc-output :inline :offset-assert 0) (output-b generic-merc-output :inline :offset-assert 2752) @@ -14744,9 +14739,7 @@ :size-assert #x2000 :flag-assert #x900002000 ) -|# -#| (deftype gm-shadow (structure) ((perspective matrix :inline :offset-assert 0) (isometric matrix :inline :offset-assert 64) @@ -14780,9 +14773,7 @@ :size-assert #x190 :flag-assert #x900000190 ) -|# -#| (deftype generic-merc-work (structure) ((input-a generic-merc-input :inline :offset-assert 0) (input-b generic-merc-input :inline :offset-assert 3024) @@ -14794,8 +14785,6 @@ :size-assert #x1c00 :flag-assert #x900001c00 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-tie-h ;; @@ -15032,19 +15021,16 @@ ;; generic-work-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype generic-input-buffer (structure) ((data uint128 473 :offset-assert 0) ;; guessed by decompiler - (merc generic-merc-work :inline :offset-assert 0) - (tie generic-tie-work :inline :offset-assert 0) + (merc generic-merc-work :inline :offset 0) + (tie generic-tie-work :inline :offset 0) ) :method-count-assert 9 :size-assert #x1d90 :flag-assert #x900001d90 ) -|# -#| (deftype generic-debug (structure) ((locks uint32 4 :offset-assert 0) ;; guessed by decompiler (timer uint32 32 :offset-assert 16) ;; guessed by decompiler @@ -15058,26 +15044,22 @@ :size-assert #x19c :flag-assert #x90000019c ) -|# -#| (deftype generic-vu1-header (structure) ((matrix matrix :inline :offset-assert 0) (strgif generic-gif-tag :inline :offset-assert 64) - (adcmds gs-adcmd 2 :offset-assert 80) ;; guessed by decompiler - (adnop1 gs-adcmd :inline :offset-assert 80) - (adnop2 gs-adcmd :inline :offset-assert 96) - (dps uint16 :offset-assert 92) - (kickoff uint16 :offset-assert 108) - (strips uint16 :offset-assert 76) + (adcmds gs-adcmd 2 :inline :offset-assert 80) ;; guessed by decompiler + (adnop1 gs-adcmd :inline :offset 80) + (adnop2 gs-adcmd :inline :offset 96) + (dps uint16 :offset 92) + (kickoff uint16 :offset 108) + (strips uint16 :offset 76) ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype generic-vu1-texbuf (structure) ((header generic-vu1-header :inline :offset-assert 0) (shader uint32 :dynamic :offset-assert 112) ;; guessed by decompiler @@ -15086,9 +15068,7 @@ :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype generic-texbuf (structure) ((tag dma-packet :inline :offset-assert 0) (header generic-vu1-header :inline :offset-assert 16) @@ -15098,9 +15078,7 @@ :size-assert #x80 :flag-assert #x900000080 ) -|# -#| (deftype generic-effect-work (structure) ((consts generic-consts :inline :offset-assert 0) (storage generic-storage :inline :offset-assert 432) @@ -15111,9 +15089,7 @@ :size-assert #x420 :flag-assert #x900000420 ) -|# -#| (deftype generic-effect-buffer (structure) ((outbuf-0 uint8 3552 :offset-assert 0) ;; guessed by decompiler (work generic-effect-work :inline :offset-assert 3552) @@ -15123,9 +15099,7 @@ :size-assert #x1fe0 :flag-assert #x900001fe0 ) -|# -#| (deftype generic-work (structure) ((saves generic-saves :inline :offset-assert 0) (storage generic-storage :inline :offset-assert 368) @@ -15136,23 +15110,37 @@ :size-assert #x3fe0 :flag-assert #x900003fe0 ) -|# -;; (define-extern *generic-debug* object) ;; generic-debug +(define-extern *generic-debug* generic-debug) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shadow-cpu-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++shadow-cpu-h:shadow-flags +(defenum shadow-flags + :bitfield #t + :type int32 + (shdf00) ;; unused + (disable-fade) + (shdf02) ;; only set, never used. + (shdf03) + (shdf04) ;; unused + (disable-draw) + (shdf06) + (shdf07) + ) +;; ---shadow-cpu-h:shadow-flags + (deftype shadow-settings (structure) - ((center vector :inline :offset-assert 0) - (flags int32 :offset-assert 12) ;; shadow-flags + "Settings used to draw a shadow." + ((center vector :inline :offset-assert 0 :score -1) + (flags shadow-flags :offset 12) (shadow-dir vector :inline :offset-assert 16) - (dist-to-locus float :offset-assert 28) + (dist-to-locus float :offset 28) (bot-plane plane :inline :offset-assert 32) (top-plane plane :inline :offset-assert 48) - (fade-dist float :offset-assert 64) + (fade-dist float :offset 64) (fade-start float :offset-assert 68) (dummy-2 int32 :offset-assert 72) (shadow-type int32 :offset-assert 76) @@ -15161,9 +15149,7 @@ :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype shadow-control (basic) ((settings shadow-settings :inline :offset-assert 16) ) @@ -15171,21 +15157,20 @@ :size-assert #x60 :flag-assert #xf00000060 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type float float float shadow-flags float) _type_) - (shadow-control-method-9 () none) ;; 9 ;; (enable-draw (shadow-control) int) - (shadow-control-method-10 () none) ;; 10 ;; (disable-draw (shadow-control) int) - (shadow-control-method-11 () none) ;; 11 ;; (set-top-plane-offset (shadow-control float) int) - (shadow-control-method-12 () none) ;; 12 ;; (set-bottom-plane-offset (shadow-control float) int) - (shadow-control-method-13 () none) ;; 13 ;; (probe-line-for-shadow (_type_ vector float float float) none) - (shadow-control-method-14 () none) ;; 14 ;; (shadow-control-method-14 (_type_ vector vector float float float) none) + (new (symbol type float float float vector float float) _type_) ;; 0 + (enable-draw (shadow-control) int) ;; 9 + (disable-draw (shadow-control) int) ;; 10 + (set-top-plane-offset (shadow-control float) int) ;; 11 + (set-bottom-plane-offset (shadow-control float) int) ;; 12 + (probe-line-for-shadow (_type_ vector float float float) none) ;; 13 + (shadow-control-method-14 (_type_ vector vector float float float) none) ;; 14 ) ) -|# -#| (deftype shadow-data (structure) + "DMA data for the shadow renderer." ((dma-unpack-template dma-packet :inline :offset-assert 0) - (dma-cnt uint64 :offset-assert 16) ;; dma-tag + (dma-cnt dma-tag :offset-assert 16) ;; dma-tag (vif-nop vif-tag :offset-assert 24) ;; guessed by decompiler (vif-unpack-v4-8 vif-tag :offset-assert 28) ;; guessed by decompiler (pdc basic :offset-assert 32) @@ -15197,9 +15182,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype shadow-work (structure) ((shadow-data shadow-data :inline :offset-assert 0) (inbuf uint128 600 :offset-assert 48) ;; guessed by decompiler @@ -15208,35 +15191,32 @@ :size-assert #x25b0 :flag-assert #x9000025b0 ) -|# -#| +(declare-type shadow-vu1-constants structure) + (deftype shadow-bucket (structure) ((first pointer :offset-assert 0) ;; guessed by decompiler (next pointer :offset-assert 4) ;; guessed by decompiler - (bucket-id int32 :offset-assert 8) + (bucket-id bucket-id :offset-assert 8) (shadow-color rgba :offset-assert 12) ;; guessed by decompiler (constants shadow-vu1-constants :offset-assert 16) ;; guessed by decompiler ) + :allow-misaligned :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype shadow-globals (structure) - ((num-buckets uint32 :offset-assert 0) - (cur-bucket uint32 :offset-assert 4) - (bucket shadow-bucket 3 :offset-assert 8) ;; guessed by decompiler + ((num-buckets uint32 :offset-assert 0) + (cur-bucket uint32 :offset-assert 4) + (bucket shadow-bucket 3 :inline :offset-assert 8) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x68 :flag-assert #x900000068 ) -|# -#| (deftype shadow-vertex (structure) ((x float :offset-assert 0) (y float :offset-assert 4) @@ -15247,9 +15227,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype shadow-matrix-ref (structure) ((joint-0 uint8 :offset-assert 0) (joint-1 uint8 :offset-assert 1) @@ -15258,9 +15236,7 @@ :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype shadow-edge (structure) ((ind-0 uint8 :offset-assert 0) (ind-1 uint8 :offset-assert 1) @@ -15271,9 +15247,7 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype shadow-tri (structure) ((ind-0 uint8 :offset-assert 0) (ind-1 uint8 :offset-assert 1) @@ -15284,9 +15258,7 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype shadow-frag-header (structure) ((qwc-data uint32 :offset-assert 0) (num-joints uint32 :offset-assert 4) @@ -15307,39 +15279,36 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype shadow-frag-ref (structure) ((header shadow-frag-header :offset-assert 0) (qwc uint32 :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype shadow-geo (art-element) - ((version uint32 :offset-assert 28) - (total-size uint32 :offset-assert 32) + "The low poly model used for drawing the shadow." + ((version uint32 :offset 28) + (total-size uint32 :offset 32) (total-qwc uint32 :offset-assert 48) (num-joints uint32 :offset-assert 52) (num-fragments uint32 :offset-assert 56) - (frags shadow-frag-ref :dynamic :offset-assert 60) ;; guessed by decompiler + (frags shadow-frag-ref :inline :dynamic :offset-assert 60) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x3c :flag-assert #xe0000003c ) -|# -;; (define-extern *shadow-globals* object) ;; shadow-globals -;; (define-extern *shadow* object) ;; symbol -;; (define-extern *shadow-object* object) ;; symbol -;; (define-extern *shadow-debug* object) ;; symbol -;; (define-extern *shadow-dma-buf* object) ;; dma-buffer +(define-extern *shadow-globals* shadow-globals) +(define-extern *shadow* symbol) +(define-extern *shadow-object* symbol) +(define-extern *shadow-debug* symbol) +(define-extern *shadow-dma-buf* dma-buffer) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shadow-vu1-h ;; @@ -15443,64 +15412,94 @@ ;; memcard-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (deftype mc-handle (int32) -;; () -;; :flag-assert #x900000004 -;; ) +(deftype mc-handle (int32) + () + ) -#| (deftype mc-file-info (structure) + "Data stored in a save file." ((present int32 :offset-assert 0) (blind-data float 16 :offset-assert 4) ;; guessed by decompiler - (blind-data-int8 int8 64 :offset-assert 4) ;; guessed by decompiler - (level-index int32 :offset-assert 4) - (gem-count float :offset-assert 8) - (skill-count float :offset-assert 12) - (completion-percentage float :offset-assert 16) - (minute uint8 :offset-assert 24) - (hour uint8 :offset-assert 25) - (week uint8 :offset-assert 26) - (day uint8 :offset-assert 27) - (month uint8 :offset-assert 28) - (year uint8 :offset-assert 29) - (language uint8 :offset-assert 30) - (game-time0 uint32 :offset-assert 36) - (game-time1 uint32 :offset-assert 40) - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + (blind-data-int8 int8 64 :offset 4) ;; guessed by decompiler + (level-index int32 :offset 4) + (gem-count float :offset 8) + (skill-count float :offset 12) + (completion-percentage float :offset 16) + (minute uint8 :offset 24) + (hour uint8 :offset 25) + (week uint8 :offset 26) + (day uint8 :offset 27) + (month uint8 :offset 28) + (year uint8 :offset 29) + (language uint8 :offset 30) + (game-time0 uint32 :offset 36) + (game-time1 uint32 :offset 40) + (purchase-secrets uint32 :offset 44) + (secrets uint32 :offset 52) + (features uint32 :offset 60) ) + :pack-me :method-count-assert 9 :size-assert #x44 :flag-assert #x900000044 ) -|# -#| (deftype mc-slot-info (structure) - ((handle int32 :offset-assert 0) + "Data about a memory card slot." + ((handle mc-handle :offset-assert 0) (known int32 :offset-assert 4) (formatted int32 :offset-assert 8) (inited int32 :offset-assert 12) (last-file int32 :offset-assert 16) (mem-required int32 :offset-assert 20) (mem-actual int32 :offset-assert 24) - (file mc-file-info 4 :offset-assert 28) ;; guessed by decompiler + (file mc-file-info 4 :inline :offset-assert 28) ;; guessed by decompiler ) + :pack-me :method-count-assert 9 :size-assert #x12c :flag-assert #x90000012c ) -|# -;; (define-extern mc-sync function) ;; (function int) -;; (define-extern show-mc-info function) ;; (function dma-buffer none) +;; +++memcard-h:mc-status-code +(defenum mc-status-code + :type uint32 + (busy 0) + (ok 1) + (bad-handle 2) + (format-failed 3) + (internal-error 4) + (write-error 5) + (read-error 6) + (new-game 7) + (no-memory 8) + (no-card 9) + (no-last 10) + (no-format 11) + (no-file 12) + (no-save 13) + (no-space 14) + (bad-version 15) + (no-process 16) + (no-auto-save 17) + ) +;; ---memcard-h:mc-status-code + +(define-extern mc-run (function none)) +(define-extern mc-format (function int mc-status-code)) +(define-extern mc-unformat (function int mc-status-code)) +(define-extern mc-create-file (function int uint mc-status-code)) +(define-extern mc-save (function int int pointer int mc-status-code)) +(define-extern mc-load (function int int pointer mc-status-code)) +(define-extern mc-sync "Synchronize the memory card state." (function int)) +(define-extern mc-get-slot-info (function int mc-slot-info none)) +(define-extern show-mc-info "Display the memory card debug text." (function dma-buffer none)) +(define-extern mc-check-result (function mc-status-code)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; game-info-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype game-bank (basic) ((life-max-default float :offset-assert 4) (life-start-default float :offset-assert 8) @@ -15512,73 +15511,67 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -;; (deftype actor-id (uint32) -;; () -;; :flag-assert #x900000004 -;; ) +(deftype actor-id (uint32) + () + ) + +;; +++game-info-h:highscore-flags +(defenum highscore-flags + :bitfield #t + :type uint8 + (time) + ) +;; ---game-info-h:highscore-flags -#| (deftype highscore-info (structure) - ((flags uint8 :offset-assert 0) ;; highscore-flags - (award-scores float 3 :offset-assert 4) ;; guessed by decompiler - (bronze-score float :offset-assert 4) - (silver-score float :offset-assert 8) - (gold-score float :offset-assert 12) + ((flags highscore-flags :offset-assert 0) + (award-scores float 3 :offset-assert 4) + (bronze-score float :offset 4) + (silver-score float :offset 8) + (gold-score float :offset 12) ) :method-count-assert 10 :size-assert #x10 :flag-assert #xa00000010 (:methods - (highscore-info-method-9 () none) ;; 9 ;; (get-rank (_type_ float) int) + (get-rank (_type_ float) int) ;; 9 ) ) -|# -#| (deftype level-buffer-state (structure) ((name symbol :offset-assert 0) ;; guessed by decompiler (display? symbol :offset-assert 4) ;; guessed by decompiler (force-vis? symbol :offset-assert 8) ;; guessed by decompiler (force-inside? symbol :offset-assert 12) ;; guessed by decompiler ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype level-buffer-state-small (structure) ((name basic :offset-assert 0) - (display? basic :offset-assert 4) + (display? symbol :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype load-state (basic) - ((want level-buffer-state 10 :offset-assert 4) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (want-exp UNKNOWN 10 :offset-assert 164) - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (target UNKNOWN 10 :offset-assert 324) - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (want-sound symbol 3 :offset-assert 484) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (want-exp-sound UNKNOWN 6 :offset-assert 508) - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (target-sound UNKNOWN 6 :offset-assert 556) - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (vis-nick symbol :offset-assert 604) ;; guessed by decompiler - (command-list pair :offset-assert 608) ;; guessed by decompiler - (object-name string 256 :offset-assert 612) ;; guessed by decompiler - (object-status basic 256 :offset-assert 1636) ;; guessed by decompiler - (update-callback basic :offset-assert 2660) + ((want level-buffer-state 10 :inline :offset-assert 4) ;; guessed by decompiler + (want-exp level-buffer-state 10 :inline :offset-assert 164) + (target level-buffer-state 10 :inline :offset-assert 324) + (want-sound sound-bank-state 3 :inline :offset-assert 484) ;; guessed by decompiler + (want-exp-sound sound-bank-state 6 :inline :offset-assert 508) + (target-sound sound-bank-state 6 :inline :offset-assert 556) + (vis-nick symbol :offset-assert 604) ;; guessed by decompiler + (command-list pair :offset-assert 608) ;; guessed by decompiler + (object-name string 256 :offset-assert 612) ;; guessed by decompiler + (object-status basic 256 :offset-assert 1636) ;; guessed by decompiler + (update-callback basic :offset-assert 2660) ) :method-count-assert 22 :size-assert #xa68 @@ -15600,9 +15593,38 @@ (load-state-method-21 () none) ;; 21 ;; (add-borrow-levels (_type_) none) ) ) -|# -#| +;; +++game-info-h:continue-flags +;; TODO copied from jak 2 +(defenum continue-flags + :type uint32 + :bitfield #t + ;(continue-flag-0 0) + (scene-wait 1) + (change-continue 2) + (no-auto 3) + (no-blackout 4) + (game-start 5) + (demo-end 6) + (warp-gate 7) + (demo 8) + (intro 9) + (hero-mode 10) + (demo-movie 11) + (title 12) + (title-movie 13) + (continue-flag-14 14) + (continue-flag-15 15) + (continue-flag-16 16) + (test 17) + (record-path 18) + (pilot 19) + (pilot-dax 20) + (record-sig 21) + (indax 22) + ) +;; ---game-info-h:continue-flags + (deftype continue-point (basic) ((name string :offset-assert 4) ;; guessed by decompiler (level symbol :offset-assert 8) ;; guessed by decompiler @@ -15610,15 +15632,13 @@ (trans vector :inline :offset-assert 16) (camera-trans vector :inline :offset-assert 32) (quat vector4h :inline :offset-assert 48) ;; vector :inline - (camera-rot vector3s 9 :offset-assert 56) ;; guessed by decompiler - (on-goto pair :offset-assert 76) ;; guessed by decompiler - (vis-nick symbol :offset-assert 80) ;; guessed by decompiler - (vehicle-type uint8 :offset-assert 84) - (want-count int8 :offset-assert 85) - (want level-buffer-state :offset-assert 88) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (want-sound symbol 3 :offset-assert 92) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + (camera-rot vector3s 3 :inline :offset-assert 56) ;; guessed by decompiler + (on-goto pair :offset 76) ;; guessed by decompiler + (vis-nick symbol :offset 80) ;; guessed by decompiler + (vehicle-type uint8 :offset 84) + (want-count int8 :offset 85) + (want level-buffer-state-small :offset 88) ;; guessed by decompiler + (want-sound symbol 3 :offset 92) ;; guessed by decompiler ) :method-count-assert 12 :size-assert #x68 @@ -15630,18 +15650,88 @@ (continue-point-method-11 () none) ;; 11 ;; (move-camera! (_type_) none) ) ) -|# -#| +;; +++game-info-h:pickup-type +(defenum pickup-type + :type int32 + (none 0) + (eco-yellow 1) + (eco-red 2) + (eco-blue 3) + (eco-dark 4) + (eco-green 5) + (eco-pill-green 6) + (eco-pill-dark 7) + (eco-pill-light 8) + (eco-pill-random 9) + (money 10) + (fuel-cell 11) + (buzzer 12) + (darkjak 13) + (lightjak 14) + (ammo-yellow 15) + (ammo-red 16) + (ammo-blue 17) + (ammo-dark 18) + (shield 19) + (health 20) + (trick-point 21) + (trick-judge 22) + (gem 23) + (skill 24) + (karma 25) + (gun-red-1 26) + (gun-red-2 27) + (gun-red-3 28) + (gun-yellow-1 29) + (gun-yellow-2 30) + (gun-yellow-3 31) + (gun-blue-1 32) + (gun-blue-2 33) + (gun-blue-3 34) + (gun-dark-1 35) + (gun-dark-2 36) + (gun-dark-3 37) + (board 38) + (pass-red 39) + (pass-green 40) + (pass-yellow 41) + (pass-blue 42) + (ammo-random 43) + (health-max 44) + (light-eco-crystal 45) + (dark-eco-crystal 46) + (pass-slumb-genb 47) + (ammo-light-random 48) + (ammo-dark-light-random 49) + (light-random 50) + ) +;; ---game-info-h:pickup-type + +;; +++game-info-h:game-items +(defenum game-items + :type uint64 + :bitfield #t + ) +;; ---game-info-h:game-items + +;; +++game-info-h:game-vehicles +(defenum game-vehicles + :type uint64 + :bitfield #t + ) +;; ---game-info-h:game-vehicles + +(declare-type entity-perm-array inline-array-class) (deftype game-info (basic) - ((mode symbol :offset-assert 4) ;; guessed by decompiler - (save-name string :offset-assert 8) ;; guessed by decompiler + ((mode symbol :offset-assert 4) + (save-name string :offset-assert 8) (life float :offset-assert 12) (life-max float :offset-assert 16) (money float :offset-assert 20) (money-total float :offset-assert 24) - (money-per-level uint8 32 :offset-assert 28) ;; guessed by decompiler - (deaths-per-level uint8 32 :offset-assert 60) ;; guessed by decompiler + (money-per-level uint8 32 :offset-assert 28) + (deaths-per-level uint8 32 :offset-assert 60) (buzzer-total float :offset-assert 92) (fuel float :offset-assert 96) (gem float :offset-assert 100) @@ -15656,25 +15746,25 @@ (eco-pill-dark-total float :offset-assert 136) (eco-pill-light float :offset-assert 140) (eco-pill-light-total float :offset-assert 144) - (features uint64 :offset-assert 152) ;; game-feature - (debug-features uint64 :offset-assert 160) ;; game-feature - (old-features uint64 :offset-assert 168) - (items uint64 :offset-assert 176) - (debug-items uint64 :offset-assert 184) - (old-items uint64 :offset-assert 192) - (secrets uint64 :offset-assert 200) ;; game-secrets - (purchase-secrets uint64 :offset-assert 208) ;; game-secrets - (gun-type int32 :offset-assert 216) ;; pickup-type - (gun-ammo float 4 :offset-assert 220) ;; guessed by decompiler + (features game-feature :offset-assert 152) + (debug-features game-feature :offset-assert 160) + (old-features game-feature :offset-assert 168) + (items game-items :offset-assert 176) + (debug-items game-items :offset-assert 184) + (old-items game-items :offset-assert 192) + (secrets game-secrets :offset-assert 200) + (purchase-secrets game-secrets :offset-assert 208) + (gun-type pickup-type :offset-assert 216) + (gun-ammo float 4 :offset-assert 220) (shield float :offset-assert 236) - (vehicles uint64 :offset-assert 240) - (debug-vehicles uint64 :offset-assert 248) - (old-vehicles uint64 :offset-assert 256) + (vehicles game-vehicles :offset-assert 240) + (debug-vehicles game-vehicles :offset-assert 248) + (old-vehicles game-vehicles :offset-assert 256) (score float :offset-assert 264) - (score-owner uint64 :offset-assert 272) ;; handle - (timer uint64 :offset-assert 280) ;; time-frame - (timer-owner uint64 :offset-assert 288) ;; handle - (timer-flash symbol :offset-assert 296) ;; guessed by decompiler + (score-owner handle :offset-assert 272) + (timer time-frame :offset-assert 280) + (timer-owner handle :offset-assert 288) + (timer-flash symbol :offset-assert 296) (counter float :offset-assert 300) (counter-flash basic :offset-assert 304) (health-bar float :offset-assert 308) @@ -15682,62 +15772,67 @@ (enemies-killed float :offset-assert 320) (civilians-killed float :offset-assert 324) (marauders-killed float :offset-assert 328) - (shots-fired UNKNOWN 4 :offset-assert 332) - (shots-hit UNKNOWN 4 :offset-assert 348) + (shots-fired float 4 :offset-assert 332) + (shots-hit float 4 :offset-assert 348) (crates-opened float :offset-assert 364) (health-collected float :offset-assert 368) (board-time uint64 :offset-assert 376) (attack-id uint32 :offset-assert 384) - (perm-list entity-perm-array :offset-assert 388) ;; guessed by decompiler - (task-perm-list entity-perm-array :offset-assert 392) ;; guessed by decompiler - (current-continue continue-point :offset-assert 396) ;; guessed by decompiler - (last-continue continue-point :offset-assert 400) ;; guessed by decompiler - (task-node-commands basic :offset-assert 416) - (task-node-exclusive basic :offset-assert 420) + (perm-list entity-perm-array :offset-assert 388) + (task-perm-list entity-perm-array :offset-assert 392) + (current-continue continue-point :offset-assert 396) + (last-continue continue-point :offset-assert 400) + (task-node-commands pair :offset 416) + (task-node-exclusive pair :offset-assert 420) (task-counter uint32 :offset-assert 424) - (level-opened uint8 32 :offset-assert 432) ;; guessed by decompiler + (unknown-arr4 (array uint16)) + (level-opened uint8 32 :offset-assert 432) (total-deaths int32 :offset-assert 464) (continue-deaths int32 :offset-assert 468) (task-deaths int32 :offset-assert 472) (total-trys int32 :offset-assert 476) - (game-start-time uint64 :offset-assert 480) ;; time-frame - (continue-time uint64 :offset-assert 488) ;; time-frame - (death-time uint64 :offset-assert 496) ;; time-frame - (hit-time uint64 :offset-assert 504) ;; time-frame - (task-pickup-time uint64 :offset-assert 512) ;; time-frame - (death-pos vector-array :offset-assert 532) ;; guessed by decompiler - (stop-watch-start uint64 :offset-assert 536) - (stop-watch-stop uint64 :offset-assert 544) - (blackout-time uint64 :offset-assert 552) ;; time-frame - (letterbox-time uint64 :offset-assert 560) ;; time-frame - (hint-play-time uint64 :offset-assert 568) ;; time-frame - (display-text-time uint64 :offset-assert 576) ;; time-frame - (display-text-handle uint64 :offset-assert 584) ;; handle + (game-start-time uint64 :offset-assert 480) + (continue-time uint64 :offset-assert 488) + (death-time uint64 :offset-assert 496) + (hit-time uint64 :offset-assert 504) + (task-pickup-time uint64 :offset-assert 512) + (unknown-arr0 (array uint64)) + (unknown-arr1 (array uint64)) + (unknown-arr2 (array uint64)) + (death-pos vector-array :offset-assert 532) + (stop-watch-start time-frame :offset-assert 536) + (stop-watch-stop time-frame :offset-assert 544) + (blackout-time time-frame :offset-assert 552) + (letterbox-time time-frame :offset-assert 560) + (hint-play-time time-frame :offset-assert 568) + (display-text-time time-frame :offset-assert 576) + (display-text-handle handle :offset-assert 584) (death-movie-tick int32 :offset-assert 592) - (want-auto-save symbol :offset-assert 596) ;; guessed by decompiler - (auto-save-proc uint64 :offset-assert 600) ;; handle - (auto-save-status mc-status-code :offset-assert 608) ;; guessed by decompiler + (want-auto-save symbol :offset-assert 596) + (auto-save-proc handle :offset-assert 600) + (auto-save-status mc-status-code :offset-assert 608) (auto-save-card int32 :offset-assert 612) (auto-save-which int32 :offset-assert 616) (auto-save-count int32 :offset-assert 620) - (pov-camera-handle uint64 :offset-assert 624) ;; handle - (other-camera-handle uint64 :offset-assert 632) ;; handle - (controller handle 2 :offset-assert 640) ;; guessed by decompiler - (race-timer uint64 :offset-assert 656) + (pov-camera-handle handle :offset-assert 624) + (other-camera-handle handle :offset-assert 632) + (controller handle 2 :offset-assert 640) + (race-timer time-frame :offset-assert 656) (race-current-lap-count int32 :offset-assert 664) (race-total-lap-count int32 :offset-assert 668) (race-position int32 :offset-assert 672) (race-number-turbos int32 :offset-assert 676) - (bot-health float 3 :offset-assert 680) ;; guessed by decompiler + (bot-health float 3 :offset-assert 680) (demo-state uint32 :offset-assert 692) - (wanted-flash symbol :offset-assert 696) ;; guessed by decompiler + (wanted-flash symbol :offset-assert 696) (distance float :offset-assert 700) - (kiosk-timeout uint64 :offset-assert 704) - (pause-start-time uint64 :offset-assert 712) ;; time-frame - (game-score (array float) :offset-assert 720) ;; guessed by decompiler + (kiosk-timeout time-frame :offset-assert 704) + (pause-start-time time-frame :offset-assert 712) + (game-score (array float) :offset-assert 720) (goal float :offset-assert 724) (miss float :offset-assert 728) (miss-max float :offset-assert 732) + (unknown-arr3 (array uint64)) (live-eco-pill-count int32 :offset-assert 740) (live-gem-count int32 :offset-assert 744) (air-supply float :offset-assert 748) @@ -15745,7 +15840,7 @@ (dark-eco-pickup int32 :offset-assert 756) (green-eco-pickup int32 :offset-assert 760) (health-bar-vehicle float :offset-assert 764) - (dust-storm uint64 :offset-assert 768) + (dust-storm handle :offset-assert 768) (flut-count int32 :offset-assert 776) (death-resetter resetter-spec :inline :offset-assert 780) (current-vehicle uint8 :offset-assert 796) @@ -15773,7 +15868,7 @@ (game-info-method-23 () none) ;; 23 ;; (save-game (_type_ game-save string) game-save) (game-info-method-24 () none) ;; 24 ;; (load-game (_type_ game-save) game-save) (game-info-method-25 () none) ;; 25 ;; (you-suck-stage (_type_ symbol) int) - (game-info-method-26 () none) ;; 26 ;; (you-suck-scale (_type_ object) float) + (get-next-attack-id! (_type_) uint) ;; 26 ;; (you-suck-scale (_type_ object) float) (game-info-method-27 () none) ;; 27 ;; (get-next-attack-id (_type_) uint) (game-info-method-28 () none) ;; 28 ;; (game-info-method-28 (_type_ game-score float) int) (game-info-method-29 () none) ;; 29 ;; (get-game-score-ref (_type_ int) (pointer float)) @@ -15784,39 +15879,138 @@ (game-info-method-34 () none) ;; 34 ) ) -|# -;; (define-extern *GAME-bank* game-bank) ;; game-bank -;; (define-extern *game-info* object) ;; game-info +(define-extern *GAME-bank* game-bank) +(define-extern *game-info* game-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gui-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++gui-h:gui-action +(defenum gui-action + :type uint8 + :bitfield #f + (none 0) + (queue 1) + (play 2) + (playing 3) + (stop 4) + (stopping 5) + (abort 6) + (hide 7) + (hidden 8) + (fade 9) + ) +;; ---gui-h:gui-action + +;; +++gui-h:gui-status +(defenum gui-status + :type uint8 ;; not sure + :bitfield #f + (unknown 0) + (pending 1) + (ready 2) + (active 3) + (hide 4) + (stop 5) + ) +;; ---gui-h:gui-status + +;; +++gui-h:gui-channel +(defenum gui-channel + :type uint8 + :bitfield #f + (none 0) + (art-load 16) + (art-load-next 17) + (background 18) + (jak 19) + (daxter 20) + (sig 21) + (ashelin 22) + (beast 23) + (jak-effect-1 24) + (pecker 25) + (jak-effect-2 26) + (gun 27) + (hal 28) + (voicebox 29) + (guard 30) + (jak-mode 31) + (alert 32) + (citizen 33) + (bbush 34) + (rider 35) + (task 36) + (voice 47) + (movie 64) + (blackout 65) + (query 66) + (message 67) + (notice 68) + (subtitle 69) + (supertitle 70) + (notice-low 71) + (resetter 72) + (progress 73) + (freeze 74) + (subtitle-pc 78) ;; custom + (screen 79) + (hud-upper-right 80) + (hud-upper-left 81) + (hud-lower-right 82) + (hud-lower-left 83) + (hud-lower-left-1 84) + (hud-lower-left-2 85) + (hud-center-right 86) + (hud-center-left 87) + (hud-middle-right 88) + (hud-middle-left 89) + (hud-upper-center 90) + (hud-upper-center-2 91) + (hud-lower-center 92) + (hud-auto-save 93) + (hud-auto-save-message 94) + (hud 95) + (max 96) + ) +;; ---gui-h:gui-channel + +;; +++gui-h:gui-connection-flags +(defenum gui-connection-flags + :type uint8 + :bitfield #t + (gcf0 0) + (gcf1 1) + (fo-curve 2) + (fo-min 3) + (fo-max 4) + ) +;; ---gui-h:gui-connection-flags + (deftype gui-connection (connection) - ((priority float :offset-assert 16) - (action uint8 :offset-assert 20) ;; gui-action - (channel uint8 :offset-assert 21) ;; gui-channel - (anim-part uint8 :offset-assert 22) - (flags uint8 :offset-assert 23) ;; gui-connection-flags - (name string :offset-assert 24) ;; guessed by decompiler - (id sound-id :offset-assert 28) ;; guessed by decompiler - (handle uint64 :offset-assert 0) ;; handle - (time-stamp uint64 :offset-assert 8) ;; time-frame - (hold-time uint64 :offset-assert 32) ;; time-frame - (fo-min int16 :offset-assert 40) - (fo-max int16 :offset-assert 42) - (fo-curve int8 :offset-assert 44) - (fade uint8 :offset-assert 45) - (volume int16 :offset-assert 46) + ((priority float :offset 16 :score 1) + (action gui-action :offset 20) + (channel gui-channel :offset 21) + (anim-part uint8 :offset 22) + (flags gui-connection-flags :offset 23) + (name string :offset 24) + (id sound-id :offset 28) + (handle handle :offset 0) + (time-stamp time-frame :offset 8) + (hold-time time-frame :offset-assert 32) + (fo-min int16 :offset-assert 40) + (fo-max int16 :offset-assert 42) + (fo-curve int8 :offset-assert 44) + (fade uint8 :offset-assert 45) + (volume int16 :offset-assert 46) ) :method-count-assert 14 :size-assert #x30 :flag-assert #xe00000030 ;; field param1 uses ~A with a signed load. field param2 uses ~A with a signed load. field param3 uses ~A with a signed load. ) -|# ;; (deftype gui-control (basic) ;; () @@ -15828,78 +16022,104 @@ ;; ambient-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++ambient-h:talker-flags +(defenum talker-flags + :type uint16 + :bitfield #t + (tf0 0) + (tf1 1) + (tf2 2) + (tf3 3) + (tf4 4) + (tf5 5) + (tf6 6) + (tf7 7) + (tf8 8) + ) +;; ---ambient-h:talker-flags + (deftype talker-speech-class (structure) - ((name string :offset-assert 0) ;; guessed by decompiler - (channel uint8 :offset-assert 4) ;; gui-channel - (flags uint16 :offset-assert 6) ;; uint8 - (speech uint16 :offset-assert 8) - (text-duration uint16 :offset-assert 10) - (delay uint16 :offset-assert 12) - (pos uint16 :offset-assert 14) - (neg uint16 :offset-assert 16) - (text-message text-id :offset-assert 20) ;; guessed by decompiler - (on-close pair :offset-assert 24) ;; guessed by decompiler - (camera basic :offset-assert 28) + "Contains metadata about a voice line or hint text being played/displayed." + ((name string :offset-assert 0) + (channel gui-channel :offset-assert 4) + (flags talker-flags :offset-assert 6) + (speech uint16 :offset-assert 8) + (text-duration uint16 :offset-assert 10 :decomp-as time-frame) + (delay uint16 :offset-assert 12 :decomp-as time-frame) + (pos uint16 :offset-assert 14) + (neg uint16 :offset-assert 16) + (text-message text-id :offset-assert 20) + (on-close pair :offset-assert 24) + (camera string :offset-assert 28) ) + :pack-me :method-count-assert 14 :size-assert #x20 :flag-assert #xe00000020 ;; field on-close uses ~A with a signed load. (:methods - (talker-speech-class-method-9 () none) ;; 9 ;; (talker-speech-class-method-9 (_type_) symbol) - (talker-speech-class-method-10 () none) ;; 10 ;; (play-communicator-speech! (_type_) none) - (talker-speech-class-method-11 () none) ;; 11 ;; (talker-speech-class-method-11 (_type_) none) - (talker-speech-class-method-12 () none) ;; 12 ;; (talker-speech-class-method-12 (_type_ int) none) - (talker-speech-class-method-13 () none) ;; 13 ;; (talker-speech-class-method-13 (_type_ int) none) + (talker-speech-class-method-9 (_type_) symbol) ;; 9 + (play-communicator-speech! (_type_) none) ;; 10 + (talker-speech-class-method-11 (_type_) none) ;; 11 + (talker-speech-class-method-12 (_type_ int) none) ;; 12 + (talker-speech-class-method-13 (_type_ int) none) ;; 13 ) ) -|# -#| (deftype talker (process) ((trans vector :inline :offset-assert 128) (message talker-speech-class :offset-assert 144) - (total-time uint64 :offset-assert 152) ;; time-frame - (total-off-time uint64 :offset-assert 160) ;; time-frame - (start-time uint64 :offset-assert 168) ;; time-frame - (state-time uint64 :offset-assert 176) ;; time-frame - (voicebox uint64 :offset-assert 184) ;; handle + (total-time time-frame :offset-assert 152) ;; time-frame + (total-off-time time-frame :offset-assert 160) ;; time-frame + (start-time time-frame :offset-assert 168) ;; time-frame + (state-time time-frame :offset-assert 176) ;; time-frame + (voicebox handle :offset-assert 184) ;; handle (voice-id sound-id :offset-assert 192) ;; guessed by decompiler (message-id sound-id :offset-assert 196) ;; guessed by decompiler (region region :offset-assert 200) (interp float :offset-assert 204) (save? symbol :offset-assert 208) ;; guessed by decompiler - (grab? basic :offset-assert 212) + (grab? symbol :offset-assert 212) ) :method-count-assert 18 :size-assert #xd8 :flag-assert #x12006000d8 + (:state-methods + idle ;; 14 + active ;; 15 + exit ;; 16 + ) (:methods - (talker-method-14 () none) ;; 14 ;; (idle () _type_ :state) - (talker-method-15 () none) ;; 15 ;; (active () _type_ :state) - (talker-method-16 () none) ;; 16 ;; (exit () _type_ :state) - (talker-method-17 () none) ;; 17 ;; (talker-method-17 (_type_) none) + (talker-method-17 (_type_) none) ;; 17 ) ) -|# -;; (define-extern *talker-speech* object) ;; (inline-array talker-speech-class) +(define-extern *talker-speech* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; speech-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++speech-h:speech-type-flag +(defenum speech-type-flag + :type uint8 + :bitfield #t + (random-order 0) + (linked-next 1) + (skip-first-time 2) + (first-time 3) + ) +;; ---speech-h:speech-type-flag + (deftype speech-type-info (structure) ((channel uint8 :offset-assert 0) (flags speech-type-flag :offset-assert 1) (priority int8 :offset-assert 2) - (delay-pre-time uint16 :offset-assert 4) - (request-timeout uint16 :offset-assert 6) - (min-delay uint16 :offset-assert 8) - (max-delay uint16 :offset-assert 10) - (delay uint16 :offset-assert 12) + (delay-pre-time uint16 :offset-assert 4 :decomp-as time-frame) + (request-timeout uint16 :offset-assert 6 :decomp-as time-frame) + (min-delay uint16 :offset-assert 8 :decomp-as time-frame) + (max-delay uint16 :offset-assert 10 :decomp-as time-frame) + (delay uint16 :offset-assert 12 :decomp-as time-frame) (play-index int16 :offset-assert 14) (list (array string) :offset-assert 16) ;; guessed by decompiler (time uint64 :offset-assert 24) @@ -15909,30 +16129,98 @@ :flag-assert #x900000020 ;; field speech-type-flag is likely a value type. ) -|# -#| +;; +++speech-h:speech-type +(defenum speech-type + :type int8 + (speech-type-0) + (speech-type-1) + (speech-type-2) + (speech-type-3) + (speech-type-4) + (speech-type-5) + (speech-type-6) + (speech-type-7) + (speech-type-8) + (speech-type-9) + (speech-type-10) + (speech-type-11) + (speech-type-12) + (speech-type-13) + (speech-type-14) + (speech-type-15) + (speech-type-16) + (speech-type-17) + (speech-type-18) + (speech-type-19) + (speech-type-20) + (speech-type-21) + (speech-type-22) + (speech-type-23) + (speech-type-24) + (speech-type-25) + (speech-type-26) + (speech-type-27) + (speech-type-28) + (speech-type-29) + (speech-type-30) + (speech-type-31) + (speech-type-32) + (speech-type-33) + (speech-type-34) + (speech-type-35) + (speech-type-36) + (speech-type-37) + (speech-type-38) + (speech-type-39) + (speech-type-40) + (speech-type-41) + (speech-type-42) + (speech-type-43) + (speech-type-44) + (speech-type-45) + (speech-type-46) + (speech-type-47) + (speech-type-48) + (speech-type-49) + (speech-type-50) + (speech-type-51) + (speech-type-52) + (speech-type-53) + (speech-type-54) + (speech-type-55) + (speech-type-56) + ) +;; ---speech-h:speech-type + (deftype speech-request (structure) - ((handle uint64 :offset-assert 0) ;; handle - (time uint64 :offset-assert 8) ;; time-frame - (priority float :offset-assert 16) - (speech-type int8 :offset-assert 20) ;; speech-type + ((handle handle :offset-assert 0) ;; handle + (time time-frame :offset-assert 8) ;; time-frame + (priority float :offset-assert 16) + (speech-type speech-type :offset-assert 20) ;; speech-type ) + :pack-me :method-count-assert 9 :size-assert #x15 :flag-assert #x900000015 ) -|# -#| +;; +++speech-h:speech-channel-flag +(defenum speech-channel-flag + :type uint8 + :bitfield #t + (disable 0) + ) +;; ---speech-h:speech-channel-flag + (deftype speech-channel (structure) ((flags speech-channel-flag :offset-assert 0) - (gui-channel uint8 :offset-assert 1) ;; gui-channel - (delay uint16 :offset-assert 2) + (gui-channel gui-channel :offset-assert 1) ;; gui-channel + (delay uint16 :offset-assert 2 :decomp-as time-frame) (id sound-id :offset-assert 4) ;; guessed by decompiler - (update-time uint64 :offset-assert 8) ;; time-frame - (start-time uint64 :offset-assert 16) ;; time-frame - (end-time uint64 :offset-assert 24) ;; time-frame + (update-time time-frame :offset-assert 8) ;; time-frame + (start-time time-frame :offset-assert 16) ;; time-frame + (end-time time-frame :offset-assert 24) ;; time-frame (request speech-request :inline :offset-assert 32) (last-request speech-request :inline :offset-assert 56) (target-pos vector :inline :offset-assert 80) @@ -15951,11 +16239,9 @@ (speech-channel-method-14 () none) ;; 14 ) ) -|# -#| (deftype speech-control (structure) - ((channel-array speech-channel 2 :offset-assert 0) ;; guessed by decompiler + ((channel-array speech-channel 2 :inline :offset-assert 0) ;; guessed by decompiler (speech-table speech-type-info 61 :offset-assert 224) ;; guessed by decompiler ) :method-count-assert 18 @@ -15973,28 +16259,24 @@ (speech-control-method-17 () none) ;; 17 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wind-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wind-vector (structure) ((wind-pos vector4w :inline :offset-assert 0) (wind-vel vector4w :inline :offset-assert 16) - (stiffness float :offset-assert 28) + (stiffness float :offset 28) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype wind-work (basic) - ((wind-array vector 64 :offset-assert 16) ;; guessed by decompiler + ((wind-array vector 64 :inline :offset-assert 16) ;; guessed by decompiler (wind-normal vector :inline :offset-assert 1040) (wind-temp vector :inline :offset-assert 1056) (wind-force float 64 :offset-assert 1072) ;; guessed by decompiler @@ -16019,79 +16301,83 @@ :size-assert #x584 :flag-assert #x900000584 ) -|# -#| (deftype wind-dma (structure) - ((buffer0 wind-vector 128 :offset-assert 0) ;; guessed by decompiler - (buffer1 wind-vector 128 :offset-assert 4096) ;; guessed by decompiler - (buffer2 wind-vector 128 :offset-assert 8192) ;; guessed by decompiler + ((buffer0 wind-vector 128 :inline :offset-assert 0) ;; guessed by decompiler + (buffer1 wind-vector 128 :inline :offset-assert 4096) ;; guessed by decompiler + (buffer2 wind-vector 128 :inline :offset-assert 8192) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x3000 :flag-assert #x900003000 ) -|# -;; (define-extern *wind-scales* array) ;; (array uint8) +(define-extern *wind-scales* (array uint8)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prototype-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++prototype-h:prototype-flags +(defenum prototype-flags + :bitfield #t + :type uint16 + (disable 0) ;; set from debug menu, for debugging + (tpage-alpha 2) + (vanish 3) + (visible 5) ;; set by prototypes-game-visible-set! to hide things on purpose + (no-collide 6) + (tpage-water 7) + ) +;; ---prototype-h:prototype-flags + (deftype prototype-bucket (basic) ((name string :offset-assert 4) ;; guessed by decompiler - (flags uint16 :offset-assert 8) ;; prototype-flags + (flags prototype-flags :offset-assert 8) ;; prototype-flags (texture-masks-index uint16 :offset-assert 10) (in-level uint16 :offset-assert 12) (utextures uint16 :offset-assert 14) (geometry drawable 4 :offset-assert 16) ;; guessed by decompiler (dists vector :inline :offset-assert 32) (rdists vector :inline :offset-assert 48) - (near-plane meters :offset-assert 32) - (near-stiff meters :offset-assert 36) - (mid-plane meters :offset-assert 40) - (far-plane meters :offset-assert 44) - (rlength-near float :offset-assert 48) - (rlength-stiff float :offset-assert 52) - (rlength-mid float :offset-assert 56) - (stiffness float :offset-assert 60) + (near-plane meters :offset 32) + (near-stiff meters :offset 36) + (mid-plane meters :offset 40) + (far-plane meters :offset 44) + (rlength-near float :offset 48) + (rlength-stiff float :offset 52) + (rlength-mid float :offset 56) + (stiffness float :offset 60) ) :method-count-assert 9 :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype prototype-bucket-shrub (prototype-bucket) ((next uint32 4 :offset-assert 64) ;; guessed by decompiler (count uint16 4 :offset-assert 80) ;; guessed by decompiler (mod-count uint16 4 :offset-assert 88) ;; guessed by decompiler (last dma-packet 4 :offset-assert 96) ;; guessed by decompiler - (next-clear uint128 :offset-assert 64) - (count-clear uint64 :offset-assert 80) - (last-clear uint128 :offset-assert 96) + (next-clear uint128 :offset 64) + (count-clear uint64 :offset 80) + (last-clear uint128 :offset 96) ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype prototype-inline-array-shrub (drawable) - ((length int16 :offset-assert 6) - (data prototype-bucket-shrub 1 :offset-assert 36) ;; guessed by decompiler + ((length int16 :offset 6) + (data prototype-bucket-shrub 1 :inline :offset 32) ;; guessed by decompiler + (pad uint32) ) :method-count-assert 17 :size-assert #x94 :flag-assert #x1100000094 ) -|# -#| (deftype prototype-array-shrub-info (basic) ((prototype-inline-array-shrub prototype-inline-array-shrub :offset-assert 4) ;; guessed by decompiler (wind-vectors uint32 :offset-assert 8) @@ -16101,9 +16387,10 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| +(declare-type prototype-tie drawable) +(declare-type collide-hash-fragment-array basic) + (deftype prototype-bucket-tie (prototype-bucket) ((next uint32 12 :offset-assert 64) ;; guessed by decompiler (count uint16 12 :offset-assert 112) ;; guessed by decompiler @@ -16120,83 +16407,80 @@ (tie-colors time-of-day-palette :offset-assert 180) ;; guessed by decompiler (data uint32 :dynamic :offset-assert 184) ;; guessed by decompiler (color-index-qwc uint32 :dynamic :offset-assert 184) ;; guessed by decompiler - (scissor-frag-count uint8 :offset-assert 136) - (near-frag-count uint8 :offset-assert 137) - (mid-frag-count uint8 :offset-assert 138) - (far-frag-count uint8 :offset-assert 139) - (scissor-index-start uint8 :offset-assert 140) - (near-index-start uint8 :offset-assert 141) - (mid-index-start uint8 :offset-assert 142) - (far-index-start uint8 :offset-assert 143) - (scissor-base-qw uint16 :offset-assert 144) - (near-base-qw uint16 :offset-assert 146) - (mid-base-qw uint16 :offset-assert 148) - (far-base-qw uint16 :offset-assert 150) - (tie-next uint32 4 :offset-assert 64) ;; guessed by decompiler - (tie-scissor-next uint32 :offset-assert 64) - (tie-near-next uint32 :offset-assert 68) - (tie-mid-next uint32 :offset-assert 72) - (tie-far-next uint32 :offset-assert 76) - (trans-next uint32 4 :offset-assert 64) ;; guessed by decompiler - (trans-scissor-next uint32 4 :offset-assert 64) ;; guessed by decompiler - (trans-near-next uint32 :offset-assert 68) - (trans-mid-next uint32 :offset-assert 72) - (trans-far-next uint32 :offset-assert 76) - (water-next uint32 4 :offset-assert 64) ;; guessed by decompiler - (water-scissor-next uint32 4 :offset-assert 64) ;; guessed by decompiler - (water-near-next uint32 :offset-assert 68) - (water-mid-next uint32 :offset-assert 72) - (water-far-next uint32 :offset-assert 76) - (envmap-next uint32 4 :offset-assert 80) ;; guessed by decompiler - (envmap-scissor-next uint32 4 :offset-assert 80) ;; guessed by decompiler - (envmap-near-next uint32 :offset-assert 84) - (envmap-mid-next uint32 :offset-assert 88) - (envmap-far-next uint32 :offset-assert 92) - (generic-next uint32 3 :offset-assert 96) ;; guessed by decompiler - (generic-near-next uint32 :offset-assert 96) - (generic-mid-next uint32 :offset-assert 100) - (generic-far-next uint32 :offset-assert 104) - (vanish-next uint32 :offset-assert 108) - (tie-count uint16 4 :offset-assert 112) ;; guessed by decompiler - (tie-scissor-count uint16 :offset-assert 112) - (tie-near-count uint16 :offset-assert 114) - (tie-mid-count uint16 :offset-assert 116) - (tie-far-count uint16 :offset-assert 118) - (trans-count uint16 4 :offset-assert 112) ;; guessed by decompiler - (trans-scissor-count uint16 :offset-assert 112) - (trans-near-count uint16 :offset-assert 114) - (trans-mid-count uint16 :offset-assert 116) - (trans-far-count uint16 :offset-assert 118) - (water-count uint16 4 :offset-assert 112) ;; guessed by decompiler - (water-scissor-count uint16 :offset-assert 112) - (water-near-count uint16 :offset-assert 114) - (water-mid-count uint16 :offset-assert 116) - (water-far-count uint16 :offset-assert 118) - (envmap-count uint16 4 :offset-assert 120) ;; guessed by decompiler - (envmap-scissor-count uint16 :offset-assert 120) - (envmap-near-count uint16 :offset-assert 122) - (envmap-mid-count uint16 :offset-assert 124) - (envmap-far-count uint16 :offset-assert 126) - (generic-count uint16 3 :offset-assert 128) ;; guessed by decompiler - (generic-near-count uint16 :offset-assert 128) - (generic-mid-count uint16 :offset-assert 130) - (generic-far-count uint16 :offset-assert 132) - (vanish-count uint16 :offset-assert 134) - (next-clear uint128 3 :offset-assert 64) ;; guessed by decompiler - (count-clear uint64 3 :offset-assert 112) ;; guessed by decompiler + (scissor-frag-count uint8 :offset 136) + (near-frag-count uint8 :offset 137) + (mid-frag-count uint8 :offset 138) + (far-frag-count uint8 :offset 139) + (scissor-index-start uint8 :offset 140) + (near-index-start uint8 :offset 141) + (mid-index-start uint8 :offset 142) + (far-index-start uint8 :offset 143) + (scissor-base-qw uint16 :offset 144) + (near-base-qw uint16 :offset 146) + (mid-base-qw uint16 :offset 148) + (far-base-qw uint16 :offset 150) + (tie-next uint32 4 :offset 64) ;; guessed by decompiler + (tie-scissor-next uint32 :offset 64) + (tie-near-next uint32 :offset 68) + (tie-mid-next uint32 :offset 72) + (tie-far-next uint32 :offset 76) + (trans-next uint32 4 :offset 64) ;; guessed by decompiler + (trans-scissor-next uint32 4 :offset 64) ;; guessed by decompiler + (trans-near-next uint32 :offset 68) + (trans-mid-next uint32 :offset 72) + (trans-far-next uint32 :offset 76) + (water-next uint32 4 :offset 64) ;; guessed by decompiler + (water-scissor-next uint32 4 :offset 64) ;; guessed by decompiler + (water-near-next uint32 :offset 68) + (water-mid-next uint32 :offset 72) + (water-far-next uint32 :offset 76) + (envmap-next uint32 4 :offset 80) ;; guessed by decompiler + (envmap-scissor-next uint32 4 :offset 80) ;; guessed by decompiler + (envmap-near-next uint32 :offset 84) + (envmap-mid-next uint32 :offset 88) + (envmap-far-next uint32 :offset 92) + (generic-next uint32 3 :offset 96) ;; guessed by decompiler + (generic-near-next uint32 :offset 96) + (generic-mid-next uint32 :offset 100) + (generic-far-next uint32 :offset 104) + (vanish-next uint32 :offset 108) + (tie-count uint16 4 :offset 112) ;; guessed by decompiler + (tie-scissor-count uint16 :offset 112) + (tie-near-count uint16 :offset 114) + (tie-mid-count uint16 :offset 116) + (tie-far-count uint16 :offset 118) + (trans-count uint16 4 :offset 112) ;; guessed by decompiler + (trans-scissor-count uint16 :offset 112) + (trans-near-count uint16 :offset 114) + (trans-mid-count uint16 :offset 116) + (trans-far-count uint16 :offset 118) + (water-count uint16 4 :offset 112) ;; guessed by decompiler + (water-scissor-count uint16 :offset 112) + (water-near-count uint16 :offset 114) + (water-mid-count uint16 :offset 116) + (water-far-count uint16 :offset 118) + (envmap-count uint16 4 :offset 120) ;; guessed by decompiler + (envmap-scissor-count uint16 :offset 120) + (envmap-near-count uint16 :offset 122) + (envmap-mid-count uint16 :offset 124) + (envmap-far-count uint16 :offset 126) + (generic-count uint16 3 :offset 128) ;; guessed by decompiler + (generic-near-count uint16 :offset 128) + (generic-mid-count uint16 :offset 130) + (generic-far-count uint16 :offset 132) + (vanish-count uint16 :offset 134) + (next-clear uint128 3 :offset 64) ;; guessed by decompiler + (count-clear uint64 3 :offset 112) ;; guessed by decompiler + ;; added + (tie-geom prototype-tie 4 :offset 16 :score 1) ) :method-count-assert 9 :size-assert #xb8 :flag-assert #x9000000b8 ) -|# -#| (deftype prototype-array-tie (array) - ((type type :offset-assert 0) ;; guessed by decompiler - (length int32 :offset-assert 4) - (allocated-length int32 :offset-assert 8) - (content-type type :offset-assert 12) ;; guessed by decompiler + ((array-data prototype-bucket-tie :dynamic :offset 16) ;; NOTE - field added, not 100% positive on the type ) :method-count-assert 10 :size-assert #x10 @@ -16205,9 +16489,7 @@ (prototype-array-tie-method-9 () none) ;; 9 ;; (login (_type_) none) ) ) -|# -#| (deftype proxy-prototype-array-tie (basic) ((prototype-array-tie prototype-array-tie :offset-assert 4) ;; guessed by decompiler (wind-vectors uint32 :offset-assert 8) @@ -16218,21 +16500,25 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| +;; +++prototype-h:instance-flags +(defenum instance-flags + :type uint16 + :bitfield #t + (no-collide 0) + ) +;; ---prototype-h:instance-flags + (deftype instance (drawable) - ((bucket-index uint16 :offset-assert 6) + ((bucket-index uint16 :offset 6) (origin matrix4h :inline :offset-assert 32) - (flags uint16 :offset-assert 46) ;; instance-flags - (wind-index uint16 :offset-assert 62) + (flags instance-flags :offset 46) ;; instance-flags + (wind-index uint16 :offset 62) ) :method-count-assert 17 :size-assert #x40 :flag-assert #x1100000040 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; joint-h ;; @@ -16667,44 +16953,71 @@ ;; engines ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++engines:part-local-space-flags +(defenum part-local-space-flags + :type uint32 + :bitfield #t + ) +;; ---engines:part-local-space-flags + (deftype particle-local-space-info (connection) - ((params UNKNOWN 3 :offset-assert 20) + ((params basic 3 :offset 20 :score 1) (mat-prev matrix :inline :offset-assert 32) (mat-new matrix :inline :offset-assert 96) - (hand uint64 :offset-assert 160) - (flags uint32 :offset-assert 168) - (pad UNKNOWN 1 :offset-assert 172) + (hand handle :offset-assert 160) + (flags part-local-space-flags :offset-assert 168) + (pad uint32 1 :offset-assert 172) ) :method-count-assert 14 :size-assert #xb0 :flag-assert #xe000000b0 ;; field param1 uses ~A with a signed load. field param2 uses ~A with a signed load. field param3 uses ~A with a signed load. ) -|# -;; (define-extern *background-draw-engine* object) ;; engine -;; (define-extern *matrix-engine* object) ;; (array handle) -;; (define-extern *cloth-engine* object) -;; (define-extern *part-engine* object) ;; engine -;; (define-extern *cam-post-hook-engine* object) -;; (define-extern *part-local-space-engine* object) -;; (define-extern *camera-engine* object) ;; engine -;; (define-extern *debug-engine* object) ;; engine -;; (define-extern *pad-engine* object) ;; engine -;; (define-extern *lightning-engine* object) ;; engine -;; (define-extern *hud-engine* object) ;; engine -;; (define-extern *prim-engine* object) -;; (define-extern *task-manager-engine* object) ;; engine +(define-extern *background-draw-engine* engine) +(define-extern *matrix-engine* (array handle)) +(define-extern *cloth-engine* (array handle)) +(define-extern *part-engine* engine) +(define-extern *cam-post-hook-engine* engine) +(define-extern *part-local-space-engine* engine) +(define-extern *camera-engine* engine) +(define-extern *debug-engine* engine) +(define-extern *pad-engine* engine) +(define-extern *lightning-engine* engine) +(define-extern *hud-engine* engine) +(define-extern *prim-engine* engine) +(define-extern *task-manager-engine* engine) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; lightning-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++lightning-h:lightning-spec-flags +(defenum lightning-spec-flags + :type uint16 + :bitfield #t + (lsf0 0) + (lsf1 1) + (lsf2 2) + (lsf3 3) + (lsf4 4) + (lsf5 5) + (lsf6 6) + (lsf7 7) + (lsf8 8) + (lsf9 9) + (lsf10 10) + (lsf11 11) + (lsf12 12) + (lsf13 13) + (lsf14 14) + (lsf15 15) + ) +;; ---lightning-h:lightning-spec-flags + (deftype lightning-spec (basic) ((name string :offset-assert 4) ;; guessed by decompiler - (flags uint16 :offset-assert 8) ;; lightning-spec-flags + (flags lightning-spec-flags :offset-assert 8) (rand-func uint8 :offset-assert 10) (adjust-distance uint8 :offset-assert 11) (start-color rgba :offset-assert 12) ;; guessed by decompiler @@ -16721,7 +17034,7 @@ (radius float :offset-assert 56) (duration float :offset-assert 60) (duration-rand float :offset-assert 64) - (sound basic :offset-assert 68) + (sound symbol :offset-assert 68) (delay float :offset-assert 72) (delay-rand float :offset-assert 76) ) @@ -16729,9 +17042,7 @@ :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype lightning-state (structure) ((mode uint8 :offset-assert 0) ;; lightning-mode (counter float :offset-assert 4) @@ -16748,9 +17059,18 @@ :size-assert #x94 :flag-assert #x900000094 ) -|# -#| +;; +++lightning-h:lightning-mode +(defenum lightning-mode + :type uint8 + (lm-1 -1) + (lm0 0) + (lm1 1) + (lm2 2) + (lm3 3) + ) +;; ---lightning-h:lightning-mode + (deftype lightning-control (basic) ((spec lightning-spec :offset-assert 4) ;; guessed by decompiler (process (pointer process) :offset-assert 8) ;; guessed by decompiler @@ -16760,49 +17080,78 @@ :size-assert #xa4 :flag-assert #xe000000a4 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type lightning-spec process float) _type_) - (lightning-control-method-9 () none) ;; 9 ;; (change-mode (_type_ lightning-mode) lightning-mode) - (lightning-control-method-10 () none) ;; 10 ;; (get-mode (_type_) lightning-mode) - (lightning-control-method-11 () none) ;; 11 ;; (set-point! (_type_ int vector) none) - (lightning-control-method-12 () none) ;; 12 ;; (set-first-meet-point (_type_ vector) none) - (lightning-control-method-13 () none) ;; 13 ;; (set-last-meet-point (_type_ vector) none) + (new (symbol type lightning-spec process float) _type_) ;; 0 + (change-mode (_type_ lightning-mode) lightning-mode) ;; 9 + (get-mode (_type_) lightning-mode) ;; 10 + (set-point! (_type_ int vector) none) ;; 11 + (set-first-meet-point (_type_ vector) none) ;; 12 + (set-last-meet-point (_type_ vector) none) ;; 13 ) ) -|# -#| (deftype lightning-probe-vars (basic) - ((src-joint-index uint32 :offset-assert 4) - (next-spawn-time uint64 :offset-assert 8) ;; time-frame - (last-valid-time uint64 :offset-assert 16) ;; time-frame - (point vector 2 :offset-assert 32) ;; guessed by decompiler - (start-pos vector :inline :offset-assert 32) - (end-pos vector :inline :offset-assert 48) - (probe-dirs (inline-array vector) :offset-assert 64) ;; guessed by decompiler + ((src-joint-index uint32 :offset-assert 4) + (next-spawn-time time-frame :offset-assert 8) ;; time-frame + (last-valid-time time-frame :offset-assert 16) ;; time-frame + (point vector 2 :inline :offset-assert 32) ;; guessed by decompiler + (start-pos vector :inline :offset 32) + (end-pos vector :inline :offset 48) + (probe-dirs (inline-array vector) :offset-assert 64) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x44 :flag-assert #x900000044 ) -|# -;; (define-extern lookup-lightning-spec-by-name function) ;; (function string lightning-spec) -;; (define-extern *lightning-probe-vars* lightning-probe-vars) ;; lightning-probe-vars +(define-extern lookup-lightning-spec-by-name (function string lightning-spec)) +(define-extern *lightning-probe-vars* lightning-probe-vars) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; res-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (deftype res-tag (uint128) -;; () -;; :flag-assert #x900000010 -;; ) +;; TODO confirm, this is just copied from jak1 +(deftype res-tag (uint128) + "Metadata about a property in a [[res-lump]], such as name, element type and element count." + ((name symbol :offset 0) + (key-frame float :offset 32) + (elt-type type :offset 64) + (data-offset uint16 :offset 96) + (elt-count uint32 :offset 112 :size 15) + (inlined? uint8 :offset 127 :size 1) ;; guess. + ) + :flag-assert #x900000010 + ) + +;; made-up type +(deftype res-tag-pair (uint64) + "The indices of two [[res-tag]]s. If the specific key-frame time is in between two + res-tags, this type is used to return the indices of the first res-tag before and after + the specified time." + ((lo int32 :offset 0) + (hi int32 :offset 32) + ) + ) + +(declare-type nav-mesh basic) +(define-extern nav-mesh type) +(declare-type collide-mesh basic) +(define-extern collide-mesh type) + +;; +++res-h:res-lump-flags +(defenum res-lump-flags + :type uint16 + :bitfield #t + (sorted 0) + (rlf1 1) + ) +;; ---res-h:res-lump-flags -#| (deftype res-lump (basic) + "A collection of [[res-tag]]s and their data." ((length int32 :offset-assert 4) (allocated-length int16 :offset-assert 8) ;; int32 - (flags uint16 :offset-assert 10) + (flags res-lump-flags :offset-assert 10) (data-base pointer :offset-assert 12) ;; guessed by decompiler (data-top pointer :offset-assert 16) ;; guessed by decompiler (data-size int32 :offset-assert 20) @@ -16814,33 +17163,80 @@ :flag-assert #x1600000020 ;; field extra uses ~A with a signed load. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type int int) _type_) - (res-lump-method-9 () none) ;; 9 ;; (get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer) - (res-lump-method-10 () none) ;; 10 ;; (get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure) - (res-lump-method-11 () none) ;; 11 ;; (get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128) - (res-lump-method-12 () none) ;; 12 ;; (get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float) - (res-lump-method-13 () none) ;; 13 ;; (get-tag-index-data (_type_ int) pointer) - (res-lump-method-14 () none) ;; 14 ;; (get-tag-data (_type_ res-tag) pointer) - (res-lump-method-15 () none) ;; 15 ;; (allocate-data-memory-for-tag! (_type_ res-tag) res-tag) - (res-lump-method-16 () none) ;; 16 ;; (sort! (_type_) _type_) - (res-lump-method-17 () none) ;; 17 ;; (add-data! (_type_ res-tag pointer) res-lump) - (res-lump-method-18 () none) ;; 18 ;; (add-32bit-data! (_type_ res-tag object) res-lump) - (res-lump-method-19 () none) ;; 19 ;; (lookup-tag-idx (_type_ symbol symbol float) res-tag-pair) - (res-lump-method-20 () none) ;; 20 ;; (make-property-data (_type_ float res-tag-pair pointer) pointer) - (res-lump-method-21 () none) ;; 21 ;; (get-curve-data! (_type_ curve symbol symbol float) symbol) + (new (symbol type int int) _type_) ;; 0 + (get-property-data + "Returns an address to a given property's data at a specific time stamp, or default on error. + @param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f + @param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode." + (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer) ;; 9 + (get-property-struct + "Returns a given struct property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (_type_ symbol symbol float structure (pointer res-tag) pointer) structure) ;; 10 + (get-property-value + "Returns a given value property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128) ;; 11 + (get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float) ;; 12 + (get-tag-index-data "Get the data address of the n'th tag." (_type_ int) pointer) ;; 13 + (get-tag-data "Get the data address of the specified tag." (_type_ res-tag) pointer) ;; 14 + (allocate-data-memory-for-tag! + "Find space for the data described by arg0 in this. + Returns a tag with data-offset set correctly for this res-lump. + If the lump already contains memory for the given tag, and it is big enough, + it will be reused. Alignment will be at least 8 bytes. + If the input tag has elt-count = 0, it will return a tag for elt-count = 1." + (_type_ res-tag) res-tag) ;; 15 + (sort! "Sort all tags based on name, then key-frame." (_type_) _type_) ;; 16 + (add-data! + "Given a tag and a pointer to its data, copy it to this res-lump. + This doesn't seem to do the right thing if the given tag is a non-inline tag + with > 1 element." + (_type_ res-tag pointer) res-lump) ;; 17 + (add-32bit-data! "Add a single 32-bit value using [[add-data!]]." (_type_ res-tag object) res-lump) ;; 18 + (lookup-tag-idx + "Look up the index of the tag containing with the given name and timestamp. + Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits. + Depending on the mode, they may be the same, or they may be two tags that you should interpolate + between, if the exact time was not found. + + @param name-sym should be the name of the thing you want. + @param time is for the timestamp you want. + If mode = 'base, then both the indices are the same and the timestamp is ignored. + If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found). + If mode = 'exact, then it requires an exact timestamp match and both indices are the same. + If things go wrong, returns a negative number." + (_type_ symbol symbol float) res-tag-pair :no-virtual) ;; 19 + (make-property-data + "Returns (a pointer to) the value data of a property with the tag-pair. + If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time + with the result written into buf. buf must have enough space to copy all of the data. + Otherwise, simply returns an address to the resource binary." + (_type_ float res-tag-pair pointer) pointer) ;; 20 + (get-curve-data! + "Read curve data and write it to curve-target. Return #t if both + control points and knots data was succesfully read, #f otherwise." + (_type_ curve symbol symbol float) symbol) ;; 21 ) ) -|# -;; (define-extern *res-key-string* object) ;; string +(define-extern *res-key-string* string) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; res ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; res-lump is already defined! - -;; (define-extern *res-static-buf* object) ;; pointer +(define-extern *res-static-buf* pointer) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; lights ;; @@ -16870,7 +17266,6 @@ ;; dynamics-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dynamics (basic) ((name symbol :offset-assert 4) ;; guessed by decompiler (gravity-max meters :offset-assert 8) @@ -16884,146 +17279,266 @@ :size-assert #x38 :flag-assert #xa00000038 (:methods - (dynamics-method-9 () none) ;; 9 ;; (set-gravity-length (_type_ float) none) + (set-gravity-length (_type_ float) none) ;; 9 ) ) -|# -;; (define-extern time-to-apex function) ;; (function float float int) -;; (define-extern time-to-ground function) ;; (function float float float int) -;; (define-extern *standard-dynamics* dynamics) ;; dynamics +(define-extern time-to-apex (function float float int)) +(define-extern time-to-ground (function float float float int)) +(define-extern *standard-dynamics* dynamics) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; surface-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++surface-h:surface-flag +;; TODO copied from jak 2 +(defenum surface-flag + :bitfield #t + :type uint32 + + (look-around 0) ;; 1 + (xz-local 1) ;; 2 + (smooth-collision 2) ;; 4 + (no-turn-around 3) ;; 8 + (turn-to-pad 4) ;; 16 + (turn-to-vel 5) ;; 32 + (no-jump 6) ;; 64 + (no-attack 7) ;; 128 + (no-hands 8) ;; 256 + (no-feet 9) ;; 512 + (check-edge 10) ;; 1024 + (air 11) ;; 2048 + (attack 12) ;; 4096 + (duck 13) ;; 8192 + (momentum 14) ;; 16384 + (turn-when-centered 15) ;; 32768 + + (turn-to-alt 16) ;; hi 1 + (spin 17) ;; hi 2 + (super 18) ;; hi 4 + (gun-inactive 19) ;; hi 8 + (gun-hide 20) ;; hi 16 + (gun-off 21) ;; hi 32 + (gun-fast-exit 22) ;; hi 64 + (gun-direct 23) ;; hi 128 + (gun-strafe 24) ;; hi 256 + (gun-no-twist 25) ;; hi 512 + (laser-hide 26) ;; hi 1024 + (no-board 27) ;; hi 2048 + (gun-turn-fast 28) ;; hi 4096 + (sf29 29) + ) +;; ---surface-h:surface-flag + +(declare-type collide-shape trsqv) +(declare-type collide-shape-moving collide-shape) +(declare-type control-info collide-shape-moving) +(declare-type target process-focusable) (deftype surface (basic) + "Definition of a bunch of parameters for different types of surfaces. + Parameters include values such as max speed, friction, callback functions that run + on impact, during touch, on exit, etc." ((name symbol :offset-assert 4) ;; guessed by decompiler - (data float 30 :offset-assert 8) ;; guessed by decompiler - (turnv float :offset-assert 8) - (turnvf float :offset-assert 100) - (turnvv float :offset-assert 12) - (turnvvf float :offset-assert 104) - (tiltv float :offset-assert 16) - (tiltvf float :offset-assert 108) - (tiltvv float :offset-assert 20) - (tiltvvf float :offset-assert 112) - (vel-turn float :offset-assert 116) - (transv-max float :offset-assert 24) - (target-speed float :offset-assert 28) - (seek0 float :offset-assert 32) - (seek90 float :offset-assert 36) - (seek180 float :offset-assert 40) - (fric float :offset-assert 44) - (nonlin-fric-dist float :offset-assert 48) - (slip-factor float :offset-assert 52) - (slide-factor float :offset-assert 56) - (slope-up-factor float :offset-assert 60) - (slope-down-factor float :offset-assert 64) - (slope-slip-angle float :offset-assert 68) - (impact-fric float :offset-assert 72) - (bend-factor float :offset-assert 76) - (bend-speed float :offset-assert 80) - (alignv float :offset-assert 84) - (slope-up-traction float :offset-assert 88) - (align-speed float :offset-assert 92) - (slope-change-preserve float :offset-assert 96) - (hook function 5 :offset-assert 128) ;; guessed by decompiler - (active-hook (function none) :offset-assert 128) ;; guessed by decompiler - (touch-hook (function none) :offset-assert 132) ;; guessed by decompiler - (impact-hook (function control-info (pointer float) vector none) :offset-assert 136) ;; guessed by decompiler - (mult-hook (function surface surface surface int none) :offset-assert 140) ;; guessed by decompiler - (exit-hook function :offset-assert 144) ;; guessed by decompiler - (dataw uint32 2 :offset-assert 148) ;; guessed by decompiler - (mode symbol :offset-assert 148) ;; guessed by decompiler - (flags surface-flag :offset-assert 152) + (data float 30 :offset-assert 8 :score -1) ;; guessed by decompiler + (turnv float :offset 8) + (turnvf float :offset 100) + (turnvv float :offset 12) + (turnvvf float :offset 104) + (tiltv float :offset 16) + (tiltvf float :offset 108) + (tiltvv float :offset 20) + (tiltvvf float :offset 112) + (vel-turn float :offset 116) + (transv-max float :offset 24) + (target-speed float :offset 28) + (seek0 float :offset 32) + (seek90 float :offset 36) + (seek180 float :offset 40) + (fric float :offset 44) + (nonlin-fric-dist float :offset 48) + (slip-factor float :offset 52) + (slide-factor float :offset 56) + (slope-up-factor float :offset 60) + (slope-down-factor float :offset 64) + (slope-slip-angle float :offset 68) + (impact-fric float :offset 72) + (bend-factor float :offset 76) + (bend-speed float :offset 80) + (alignv float :offset 84) + (slope-up-traction float :offset 88) + (align-speed float :offset 92) + (slope-change-preserve float :offset 96) + (hook function 5 :offset-assert 128) + (active-hook (function none) :offset 128) + (touch-hook (function none) :offset 132) + (impact-hook (function control-info (pointer float) vector none) :offset 136) + (mult-hook (function surface surface surface int none) :offset 140) + (exit-hook function :offset 144) + (dataw uint32 2 :offset-assert 148 :score -1) + (mode symbol :offset 148) + (flags surface-flag :offset 152) ) :method-count-assert 9 :size-assert #x9c :flag-assert #x90000009c ) -|# -;; (define-extern calc-terminal-vel function) ;; (function float float float float) -;; (define-extern calc-terminal2-vel function) ;; (function float float float float float) -;; (define-extern calc-terminal4-vel function) ;; (function float float float float) -;; (define-extern surface-interp! function) ;; (function surface surface surface float surface) -;; (define-extern surface-mult! function) ;; (function surface surface surface surface) -;; (define-extern surface-clamp-speed function) ;; (function surface surface surface int none) -;; (define-extern *walk-mods* surface) ;; surface -;; (define-extern *walk-no-turn-mods* surface) ;; surface -;; (define-extern *turn-around-mods* surface) ;; surface -;; (define-extern *jump-mods* surface) ;; surface -;; (define-extern *double-jump-mods* surface) ;; surface -;; (define-extern *smack-jump-mods* surface) ;; surface -;; (define-extern *high-jump-mods* surface) ;; surface -;; (define-extern *launch-jump-mods* surface) ;; surface -;; (define-extern *forward-high-jump-mods* surface) ;; surface -;; (define-extern *flip-jump-mods* surface) ;; surface -;; (define-extern *forward-jump-mods* surface) ;; surface -;; (define-extern *forward-pole-jump-mods* surface) ;; surface -;; (define-extern *dark-jump-mods* object) ;; surface -;; (define-extern *roll-mods* surface) ;; surface -;; (define-extern *roll-flip-mods* surface) ;; surface -;; (define-extern *flop-mods* surface) ;; surface -;; (define-extern *flop-land-mods* object) ;; surface -;; (define-extern *wade-mods* surface) ;; surface -;; (define-extern *swim-mods* surface) ;; surface -;; (define-extern *dive-mods* surface) ;; surface -;; (define-extern *dive-bottom-mods* surface) ;; surface -;; (define-extern *pole-mods* object) ;; surface -;; (define-extern *grab-mods* object) ;; surface -;; (define-extern *edge-grab-mods* object) ;; surface -;; (define-extern *empty-mods* surface) ;; surface -;; (define-extern *empty-mods-allow-gun* surface) -;; (define-extern *neutral-mods* surface) ;; surface -;; (define-extern *stone-surface* surface) ;; surface -;; (define-extern *mushroom-surface* surface) -;; (define-extern *gravel-surface* surface) ;; surface -;; (define-extern *edge-surface* surface) ;; surface -;; (define-extern *wade-surface* surface) ;; surface -;; (define-extern *quicksand-surface* surface) ;; surface -;; (define-extern *tar-surface* surface) ;; surface -;; (define-extern *ice-surface* surface) ;; surface -;; (define-extern *rail-surface* surface) ;; surface -;; (define-extern *standard-ground-surface* object) ;; surface -;; (define-extern *swim-surface* object) ;; surface +(define-extern calc-terminal-vel (function float float float float)) +(define-extern calc-terminal2-vel (function float float float float float)) +(define-extern calc-terminal4-vel (function float float float float)) +(define-extern surface-interp! (function surface surface surface float surface)) +(define-extern surface-mult! (function surface surface surface surface)) +(define-extern surface-clamp-speed (function surface surface surface int none)) +(define-extern *walk-mods* surface) +(define-extern *walk-no-turn-mods* surface) +(define-extern *turn-around-mods* surface) +(define-extern *jump-mods* surface) +(define-extern *double-jump-mods* surface) +(define-extern *smack-jump-mods* surface) +(define-extern *high-jump-mods* surface) +(define-extern *launch-jump-mods* surface) +(define-extern *forward-high-jump-mods* surface) +(define-extern *flip-jump-mods* surface) +(define-extern *forward-jump-mods* surface) +(define-extern *forward-pole-jump-mods* surface) +(define-extern *dark-jump-mods* surface) +(define-extern *roll-mods* surface) +(define-extern *roll-flip-mods* surface) +(define-extern *flop-mods* surface) +(define-extern *flop-land-mods* surface) +(define-extern *wade-mods* surface) +(define-extern *swim-mods* surface) +(define-extern *dive-mods* surface) +(define-extern *dive-bottom-mods* surface) +(define-extern *pole-mods* surface) +(define-extern *grab-mods* surface) +(define-extern *edge-grab-mods* surface) +(define-extern *empty-mods* surface) +(define-extern *empty-mods-allow-gun* surface) +(define-extern *neutral-mods* surface) +(define-extern *stone-surface* surface) +(define-extern *mushroom-surface* surface) +(define-extern *gravel-surface* surface) +(define-extern *edge-surface* surface) +(define-extern *wade-surface* surface) +(define-extern *quicksand-surface* surface) +(define-extern *tar-surface* surface) +(define-extern *ice-surface* surface) +(define-extern *rail-surface* surface) +(define-extern *standard-ground-surface* surface) +(define-extern *swim-surface* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pat-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++pat-h:pat-mode +(defenum pat-mode + :type uint8 + (ground 0) + (wall 1) + (obstacle 2) + (halfpipe 3) + ) +;; ---pat-h:pat-mode + +;; +++pat-h:pat-material +(defenum pat-material + :type uint8 + (unknown 0) + (ice 1) + (quicksand 2) + (waterbottom 3) + (tar 4) + (sand 5) + (wood 6) + (grass 7) + (pcmetal 8) + (snow 9) + (deepsnow 10) + (hotcoals 11) + (lava 12) + (crwood 13) + (gravel 14) + (dirt 15) + (metal 16) + (straw 17) + (tube 18) + (swamp 19) + (stopproj 20) + (rotate 21) + (neutral 22) + (stone 23) + (crmetal 24) + (carpet 25) + (grmetal 26) + (shmetal 27) + (hdwood 28) + (squish 29) + (mhshroom 30) + (forest 31) + (mhswamp 32) + (dmaker 33) + ) +;; ---pat-h:pat-material + +;; +++pat-h:pat-event +(defenum pat-event + :type uint8 + (none 0) + (deadly 1) + (endlessfall 2) + (burn 3) + (deadlyup 4) + (burnup 5) + (melt 6) + (slide 7) + (lip 8) + (lipramp 9) + (shock 10) + (shockup 11) + (hide 12) + (rail 13) + (slippery 14) + (drag 15) + (waterfloor 16) + (hang 17) + (fry 18) + (slime 19) + ) +;; ---pat-h:pat-event + (deftype pat-surface (uint32) - ((UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + ((skip uint8 :offset 0 :size 7 :do-not-decompile) + (mode pat-mode :offset 7 :size 3) + (material pat-material :offset 10 :size 6) + (camera uint8 :offset 16 :size 1 :do-not-decompile) ;; sz = 2?? + (event pat-event :offset 18 :size 6) + (skip2 uint8 :offset 24 :size 5 :do-not-decompile) + + (noentity uint8 :offset 0 :size 1) + (nocamera uint8 :offset 1 :size 1) + (noedge uint8 :offset 2 :size 1) + (nogrind uint8 :offset 3 :size 1) + (nojak uint8 :offset 4 :size 1) + (noboard uint8 :offset 5 :size 1) + (nopilot uint8 :offset 6 :size 1) + + (probe uint8 :offset 24 :size 1) + (nomech uint8 :offset 25 :size 1) + (noproj uint8 :offset 26 :size 1) + (noendlessfall uint8 :offset 27 :size 1) + (noprobe uint8 :offset 28 :size 1) + + (nolineofsight uint8 :offset 16 :size 1) + (board uint8 :offset 4 :size 1) ) :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype pat-mode-info (structure) ((name string :offset-assert 0) ;; guessed by decompiler (wall-angle float :offset-assert 4) @@ -17034,18 +17549,16 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern pat-material->string function) ;; (function pat-surface string) -;; (define-extern pat-mode->string function) ;; (function pat-surface string) -;; (define-extern pat-event->string function) ;; (function pat-surface string) -;; (define-extern *pat-mode-info* object) ;; (inline-array pat-mode-info) +(define-extern pat-material->string (function pat-surface string)) +(define-extern pat-mode->string (function pat-surface string)) +(define-extern pat-event->string (function pat-surface string)) +(define-extern *pat-mode-info* (inline-array pat-mode-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fact-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fact-bank (basic) ((eco-level-max float :offset-assert 4) (eco-single-inc float :offset-assert 8) @@ -17106,139 +17619,188 @@ :size-assert #xf4 :flag-assert #x9000000f4 ) -|# -#| +;; +++fact-h:actor-option +(defenum actor-option + :bitfield #t + :type uint64 + (blocked 0) ;; 1 + (spawns-fuel-cell 1) ;; 2 + (draw-blocker 2) ;; 4 + (loop 3) ;; 8 + (reflect 4) ;; 16 + (wait-for-cue 5) ;; 32 + (auto-pickup 6) ;; 64 + (fuel-cell-no-jump 7) ;; 128 + (suck-in 8) ;; 256 + (fade-out 9) ;; 512 + (big-collision 10) ;; 1024 + (racer-only 11) ;; 2048 + (no-reaction 12) ;; 4096 + (no-shadow 13) ;; 8192 + (wait-for-task-complete 14) ;; 16384 + (respawn-delay 15) ;; 32768 + + (no-amb-sound 16) ;; hi 1 + (user17 17) ;; hi 2 + (user18 18) ;; hi 4 + (user19 19) ;; hi 8 + (user20 20) ;; hi 16 + (cond-hide 21) ;; hi 32 + (cond-respawn 22) ;; hi 64 + (fall 23) ;; hi 128 + (mirror 24) ;; hi 256 + (cond-low-ammo 25) ;; hi 512 + (no-distance-check-fadeout 26) ;; 1024 + (no-track 27) ;; hi 2048 + (dont-override-fact 28) + ) +;; ---fact-h:actor-option + +(define-extern process-drawable-art-error (state string process-drawable)) (deftype fact-info (basic) ((process process :offset-assert 4) ;; guessed by decompiler + (pickup-type pickup-type :offset-assert 8) (pickup-amount float :offset-assert 12) (pickup-spawn-amount float :offset-assert 16) (options actor-option :offset-assert 24) - (fade-time uint64 :offset-assert 32) ;; time-frame + (fade-time time-frame :offset-assert 32) ;; time-frame ) :method-count-assert 12 :size-assert #x28 :flag-assert #xc00000028 ;; field actor-option is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process pickup-type float) _type_) + (new (symbol type process pickup-type float) _type_) ;; 0 (fact-info-method-9 () none) ;; 9 ;; (drop-pickup (_type_ symbol process-tree fact-info int) (pointer process)) - (fact-info-method-10 () none) ;; 10 ;; (reset! (_type_ symbol) none) - (fact-info-method-11 () none) ;; 11 ;; (pickup-collectable! (_type_ pickup-type float handle) float) + (reset! (_type_ symbol) none) ;; 10 + (pickup-collectable! (_type_ pickup-type float handle) float) ;; 11 ) ) -|# -#| (deftype fact-info-target (fact-info) - ((process process :offset-assert 0) ;; guessed by decompiler - (pickup-amount float :offset-assert 8) - (pickup-spawn-amount float :offset-assert 12) - (options actor-option :offset-assert 20) - (fade-time uint64 :offset-assert 28) ;; time-frame - (eco-type int32 :offset-assert 36) - (eco-level float :offset-assert 40) - (eco-pickup-time uint64 :offset-assert 44) ;; time-frame - (eco-timeout seconds :offset-assert 52) ;; time-frame - (eco-source uint64 :offset-assert 60) ;; handle - (eco-source-time uint64 :offset-assert 68) ;; time-frame - (health float :offset-assert 76) - (health-max float :offset-assert 80) - (health-pickup-time uint64 :offset-assert 84) ;; time-frame - (buzzer float :offset-assert 92) - (buzzer-max float :offset-assert 96) - (eco-pill-green float :offset-assert 100) - (eco-pill-green-max float :offset-assert 104) - (eco-pill-green-pickup-time uint64 :offset-assert 108) ;; time-frame - (eco-pill-dark-pickup-time uint64 :offset-assert 116) ;; time-frame - (eco-pill-light-pickup-time uint64 :offset-assert 124) - (money-pickup-time uint64 :offset-assert 132) ;; time-frame - (buzzer-pickup-time uint64 :offset-assert 140) ;; time-frame - (task-pickup-time uint64 :offset-assert 148) ;; time-frame - (stop-time-timeout uint64 :offset-assert 156) ;; time-frame - (darkjak-start-time uint64 :offset-assert 164) ;; time-frame - (darkjak-effect-time uint64 :offset-assert 172) ;; time-frame - (lightjak-start-time uint64 :offset-assert 180) - (lightjak-effect-time uint64 :offset-assert 188) - (ammo-pickup-time uint64 :offset-assert 196) ;; time-frame - (shield-pickup-time uint64 :offset-assert 204) ;; time-frame - (shield-start-time uint64 :offset-assert 212) ;; time-frame - (shield-use-time uint64 :offset-assert 220) ;; time-frame - (shield-level float :offset-assert 228) - (shield-attack-id uint32 :offset-assert 232) - (trick-point float :offset-assert 236) - (trick-point-pickup-time uint64 :offset-assert 244) ;; time-frame - (trick-point-start-time uint64 :offset-assert 252) ;; time-frame - (trick-point-duration uint64 :offset-assert 260) ;; time-frame - (gem-pickup-time uint64 :offset-assert 268) ;; time-frame - (skill-pickup-time uint64 :offset-assert 276) ;; time-frame - (karma-pickup-time uint64 :offset-assert 284) ;; time-frame - (eco-green float :offset-assert 292) - (eco-green-max float :offset-assert 296) - (eco-green-pickup-time uint64 :offset-assert 300) + ((eco-type int32 :offset-assert 40) + (eco-level float :offset-assert 44) + (eco-pickup-time time-frame :offset-assert 48) + (eco-timeout seconds :offset-assert 56) + (eco-source handle :offset-assert 64) + (eco-source-time time-frame :offset-assert 72) + (health float :offset-assert 80) + (health-max float :offset-assert 84) + (health-pickup-time time-frame :offset-assert 88) + (buzzer float :offset-assert 96) + (buzzer-max float :offset-assert 100) + (eco-pill-green float :offset-assert 104) + (eco-pill-green-max float :offset-assert 108) + (eco-pill-green-pickup-time time-frame :offset-assert 112) + (eco-pill-dark-pickup-time time-frame :offset-assert 120) + (eco-pill-light-pickup-time time-frame :offset-assert 128) + (money-pickup-time time-frame :offset-assert 136) + (buzzer-pickup-time time-frame :offset-assert 144) + (task-pickup-time time-frame :offset-assert 152) + (stop-time-timeout time-frame :offset-assert 160) + (darkjak-start-time time-frame :offset-assert 168) + (darkjak-effect-time time-frame :offset-assert 176) + (lightjak-start-time time-frame :offset-assert 184) + (lightjak-effect-time time-frame :offset-assert 192) + (ammo-pickup-time time-frame :offset-assert 200) + (shield-pickup-time time-frame :offset-assert 208) + (shield-start-time time-frame :offset-assert 216) + (shield-use-time time-frame :offset-assert 224) + (shield-level float :offset-assert 232) + (shield-attack-id uint32 :offset-assert 236) + (trick-point float :offset-assert 240) + (trick-point-pickup-time time-frame :offset-assert 248) + (trick-point-start-time time-frame :offset-assert 256) + (trick-point-duration time-frame :offset-assert 264) + (gem-pickup-time time-frame :offset-assert 272) + (skill-pickup-time time-frame :offset-assert 280) + (karma-pickup-time time-frame :offset-assert 288) + (eco-green float :offset-assert 296) + (eco-green-max float :offset-assert 300) + (eco-green-pickup-time time-frame :offset-assert 304) ) :method-count-assert 13 :size-assert #x138 :flag-assert #xd00000138 ;; field actor-option is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process-drawable pickup-type float) _type_) - (fact-info-target-method-12 () none) ;; 12 ;; (get-gun-ammo (_type_) float) + (new (symbol type process-drawable pickup-type float) _type_) ;; 0 + (get-gun-ammo (_type_) float) ;; 12 ) ) -|# -#| +;; +++fact-h:enemy-option +(defenum enemy-option + :bitfield #t + :type uint32 + (user0 0) ;; 1 + (user1 1) ;; 2 + (user2 2) ;; 4 + (user3 3) ;; 8 + (user4 4) ;; 16 + (user5 5) ;; 32 + (user6 6) ;; 64 + (user7 7) ;; 128 + (user8 8) ;; 256 + (user9 9) ;; 512 + (user10 10) ;; 1024 + (user11 11) ;; 2048 + (user12 12) ;; 4096 + (user13 13) ;; 8192 + (user14 14) ;; 16k + (user15 15) + + (dormant 16) ;; hi 1 + (dormant-aware 17) ;; hi 2 + (ambush 18) ;; hi 4 + (spawner 19) ;; hi 8 + (prespawned 20) ;; hi 16 + (multi-focus 21) ;; hi 32 + (has-trigger 22) + (idle-til-trigger 23) ;; hi 128 + (knocked-into-water 24) ;; hi 256 + (water 25) ;; hi 512 + ) +;; ---fact-h:enemy-option + +(declare-type actor-group inline-array-class) (deftype fact-info-enemy (fact-info) - ((process process :offset-assert 0) ;; guessed by decompiler - (pickup-amount float :offset-assert 8) - (pickup-spawn-amount float :offset-assert 12) - (options actor-option :offset-assert 20) - (fade-time uint64 :offset-assert 28) ;; time-frame - (speed float :offset-assert 36) - (idle-distance meters :offset-assert 40) - (notice-top meters :offset-assert 44) - (notice-bottom meters :offset-assert 48) - (cam-horz meters :offset-assert 52) - (cam-vert meters :offset-assert 56) - (cam-notice-dist meters :offset-assert 60) - (enemy-options enemy-option :offset-assert 64) - (trig-dist meters :offset-assert 68) - (trig-actor-group (pointer actor-group) :offset-assert 72) ;; guessed by decompiler - (trig-mask-count int8 :offset-assert 76) - (trig-mask uint8 2 :offset-assert 77) ;; guessed by decompiler + ((speed float :offset-assert 40) + (idle-distance meters :offset-assert 44) + (notice-top meters :offset-assert 48) + (notice-bottom meters :offset-assert 52) + (cam-horz meters :offset-assert 56) + (cam-vert meters :offset-assert 60) + (cam-notice-dist meters :offset-assert 64) + (enemy-options enemy-option :offset-assert 68) + (trig-dist meters :offset-assert 72) + (trig-actor-group (pointer actor-group) :offset-assert 76) ;; guessed by decompiler + (trig-mask-count int8 :offset-assert 80) + (trig-mask uint8 2 :offset-assert 81) ;; guessed by decompiler ) :method-count-assert 13 :size-assert #x53 :flag-assert #xd00000053 ;; field actor-option is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process (pointer float) pickup-type float) _type_) - (fact-info-enemy-method-12 () none) ;; 12 ;; (clear-mask-bits (_type_ int) none) + (new (symbol type process (pointer float) pickup-type float) _type_) ;; 0 + (clear-mask-bits (_type_ int) none) ;; 12 ) ) -|# -#| (deftype fact-info-crate (fact-info) - ((process process :offset-assert 0) ;; guessed by decompiler - (pickup-amount float :offset-assert 8) - (pickup-spawn-amount float :offset-assert 12) - (options actor-option :offset-assert 20) - (fade-time uint64 :offset-assert 28) ;; time-frame - (suck-count int32 :offset-assert 36) + ((suck-count int32 :offset-assert 40) ) :method-count-assert 12 :size-assert #x2c :flag-assert #xc0000002c ;; field actor-option is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process pickup-type float) _type_) + (new (symbol type process pickup-type float) _type_) ;; 0 ) ) -|# -#| (deftype fact-info-enemy-defaults (basic) ((idle-distance meters :offset-assert 4) (pickup-type int32 :offset-assert 8) @@ -17248,11 +17810,10 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern *FACT-bank* fact-bank) ;; fact-bank -;; (define-extern pickup-type->string function) ;; (function pickup-type string) -;; (define-extern *fact-info-enemy-defaults* fact-info-enemy-defaults) ;; fact-info-enemy-defaults +(define-extern *FACT-bank* fact-bank) +(define-extern pickup-type->string (function pickup-type string)) +(define-extern *fact-info-enemy-defaults* fact-info-enemy-defaults) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; aligner-h ;; @@ -17289,7 +17850,78 @@ ;; penetrate-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern penetrate->string function) +;; +++penetrate-h:penetrate +(defenum penetrate + :type uint64 + :bitfield #t + (touch 0) + (generic-attack 1) + (lunge 2) + (flop 3) + (punch 4) + (spin 5) + (roll 6) + (uppercut 7) + (bonk 8) + (tube 9) + (vehicle 10) + (flut-attack 11) + (board 12) + (mech 13) + (mech-punch 14) + (mech-bonk 15) + (dark-skin 16) + (dark-punch 17) + (dark-bomb 18) + (dark-smack 19) + (flut 20) + (shield 21) + (explode 22) + (jak-yellow-shot 23) + (jak-red-shot 24) + (jak-blue-shot 25) + (jak-dark-shot 26) + (enemy-yellow-shot 27) + (enemy-dark-shot 28) + (eco-yellow 29) + (eco-red 30) + (eco-blue 31) + (eco-green 32) + (knocked 33) + (jak-red-shockwave 34) + (jak-dark-nuke 35) + (jak-dark-blackhole 36) + (emp-blast 37) + (penetrate-38 38) + (penetrate-39 39) + (penetrate-40 40) + (penetrate-41 41) + (penetrate-42 42) + (penetrate-43 43) + (penetrate-44 44) + (penetrate-45 45) + (penetrate-46 46) + (penetrate-47 47) + (penetrate-48 48) + (penetrate-49 49) + (penetrate-50 50) + (penetrate-51 51) + (penetrate-52 52) + (penetrate-53 53) + (penetrate-54 54) + (penetrate-55 55) + (penetrate-56 56) + (penetrate-57 57) + (penetrate-58 58) + (penetrate-59 59) + (penetrate-60 60) + (penetrate-61 61) + (penetrate-62 62) + (penetrate-63 63) + ) +;; ---penetrate-h:penetrate + +(define-extern penetrate->string (function penetrate none)) ;; (define-extern penetrate-using->damage function) ;; (function penetrate int) ;; (define-extern penetrated-by-all&hit-points->penetrated-by function) ;; (function penetrate int penetrate) ;; (define-extern pu->knocked-type function) ;; (function penetrate knocked-type) @@ -17792,10 +18424,18 @@ ;; sync-info-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++sync-info-h:sync-flags +(defenum sync-flags + :type uint64 + :bitfield #t + (pong 0) + ) +;; ---sync-info-h:sync-flags + (deftype sync-info-params (structure) + "Parameters used to set up a [[sync-info]]." ((sync-type symbol :offset-assert 0) ;; guessed by decompiler - (sync-flags uint64 :offset-assert 8) ;; sync-flags + (sync-flags sync-flags :offset-assert 8) ;; sync-flags (entity basic :offset-assert 16) (period uint32 :offset-assert 20) (percent float :offset-assert 24) @@ -17808,11 +18448,9 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype sync-info (structure) - ((sync-flags uint64 :offset-assert 0) ;; sync-flags + ((sync-flags sync-flags :offset-assert 0) (offset float :offset-assert 8) (period uint32 :offset-assert 12) ) @@ -17829,18 +18467,15 @@ (sync-info-method-15 () none) ;; 15 ;; (sync-now! (_type_ float) none) ) ) -|# -#| (deftype sync-linear (sync-info) () + :pack-me :method-count-assert 16 :size-assert #x10 :flag-assert #x1000000010 ) -|# -#| (deftype sync-eased (sync-info) ((tlo float :offset-assert 16) (thi float :offset-assert 20) @@ -17850,13 +18485,12 @@ (pause-in float :offset-assert 36) (pause-out float :offset-assert 40) ) + :pack-me :method-count-assert 16 :size-assert #x2c :flag-assert #x100000002c ) -|# -#| (deftype sync-paused (sync-info) ((pause-in float :offset-assert 16) (pause-out float :offset-assert 20) @@ -17865,17 +18499,16 @@ :size-assert #x18 :flag-assert #x1000000018 ) -|# -#| (deftype delayed-rand-float (structure) ((min-time int32 :offset-assert 0) (max-time int32 :offset-assert 4) (max-val float :offset-assert 8) (timer int32 :offset-assert 12) - (start-time uint64 :offset-assert 16) ;; time-frame + (start-time time-frame :offset-assert 16) ;; time-frame (value float :offset-assert 24) ) + :pack-me :method-count-assert 13 :size-assert #x1c :flag-assert #xd0000001c @@ -17886,9 +18519,7 @@ (delayed-rand-float-method-12 () none) ;; 12 ;; (update-and-clear! (_type_) none) ) ) -|# -#| (deftype oscillating-float (structure) ((value float :offset-assert 0) (target float :offset-assert 4) @@ -17897,6 +18528,7 @@ (damping float :offset-assert 16) (accel float :offset-assert 20) ) + :allow-misaligned :method-count-assert 11 :size-assert #x18 :flag-assert #xb00000018 @@ -17905,9 +18537,7 @@ (oscillating-float-method-10 () none) ;; 10 ;; (update! (_type_ float) float) ) ) -|# -#| (deftype bouncing-float (structure) ((osc oscillating-float :inline :offset-assert 0) (max-value float :offset-assert 24) @@ -17915,6 +18545,7 @@ (elasticity float :offset-assert 32) (state int32 :offset-assert 36) ) + :allow-misaligned :method-count-assert 13 :size-assert #x28 :flag-assert #xd00000028 @@ -17925,16 +18556,14 @@ (bouncing-float-method-12 () none) ;; 12 ;; (at-max? (_type_) symbol) ) ) -|# -#| (deftype delayed-rand-vector (structure) ((min-time int32 :offset-assert 0) (max-time int32 :offset-assert 4) (xz-max float :offset-assert 8) (y-max float :offset-assert 12) (timer int32 :offset-assert 16) - (start-time uint64 :offset-assert 24) ;; time-frame + (start-time time-frame :offset-assert 24) ;; time-frame (value vector :inline :offset-assert 32) ) :method-count-assert 13 @@ -17947,9 +18576,7 @@ (delayed-rand-vector-method-12 () none) ;; 12 ;; (update-with-delay-or-reset! (_type_) vector) ) ) -|# -#| (deftype oscillating-vector (structure) ((value vector :inline :offset-assert 0) (target vector :inline :offset-assert 16) @@ -17966,18 +18593,26 @@ (oscillating-vector-method-10 () none) ;; 10 ;; (update! (_type_ vector) vector) ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pov-camera-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +++pov-camera-h:pov-camera-flags +(defenum pov-camera-flags + :bitfield #t + :type int32 + (notify-of-abort 0) + (allow-abort 1) + (inherit-orientation 2) + ) +;; ---pov-camera-h:pov-camera-flags + #| (deftype pov-camera (process-drawable) - ((flags int32 :offset-assert 200) ;; pov-camera-flag - (debounce-start-time uint64 :offset-assert 208) ;; time-frame - (notify-handle uint64 :offset-assert 216) ;; handle + ((flags pov-camera-flags :offset-assert 200) ;; pov-camera-flag + (debounce-start-time time-frame :offset-assert 208) ;; time-frame + (notify-handle handle :offset-assert 216) ;; handle (anim-name string :offset-assert 224) ;; guessed by decompiler (command-list pair :offset-assert 228) ;; guessed by decompiler (mask-to-clear process-mask :offset-assert 232) ;; guessed by decompiler @@ -17987,12 +18622,14 @@ :method-count-assert 30 :size-assert #xf4 :flag-assert #x1e008000f4 + (:state-methods + pov-camera-abort ;; 20 + pov-camera-done-playing ;; 21 + pov-camera-playing ;; 22 + pov-camera-start-playing ;; 23 + pov-camera-startup ;; 24 + ) (:methods - (pov-camera-method-20 () none) ;; 20 ;; (pov-camera-abort () _type_ :state) - (pov-camera-method-21 () none) ;; 21 ;; (pov-camera-done-playing () _type_ :state) - (pov-camera-method-22 () none) ;; 22 ;; (pov-camera-playing () _type_ :state) - (pov-camera-method-23 () none) ;; 23 ;; (pov-camera-start-playing () _type_ :state) - (pov-camera-method-24 () none) ;; 24 ;; (pov-camera-startup () _type_ :state) (pov-camera-method-25 () none) ;; 25 ;; (abort? (_type_) symbol) (pov-camera-method-26 () none) ;; 26 ;; (target-grabbed? (_type_) symbol) (pov-camera-method-27 () none) ;; 27 ;; (pov-camera-method-27 () none) @@ -18002,34 +18639,32 @@ ) |# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; smush-control-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype smush-control (structure) - ((start-time uint64 :offset-assert 0) ;; time-frame - (period float :offset-assert 8) - (duration float :offset-assert 12) - (amp float :offset-assert 16) - (damp-amp float :offset-assert 20) - (damp-period float :offset-assert 24) - (ticks float :offset-assert 28) + "This holds information about the current state of an object's smush." + ((start-time time-frame :offset-assert 0) + (period float :offset-assert 8) + (duration float :offset-assert 12) + (amp float :offset-assert 16) + (damp-amp float :offset-assert 20) + (damp-period float :offset-assert 24) + (ticks float :offset-assert 28) ) :method-count-assert 15 :size-assert #x20 :flag-assert #xf00000020 (:methods - (smush-control-method-9 () none) ;; 9 ;; (set-zero! (_type_) _type_) - (smush-control-method-10 () none) ;; 10 ;; (update! (_type_) float) - (smush-control-method-11 () none) ;; 11 ;; (get-no-update (_type_) float) - (smush-control-method-12 () none) ;; 12 ;; (activate! (_type_ float int int float float clock) _type_) - (smush-control-method-13 () none) ;; 13 ;; (nonzero-amplitude? (_type_) symbol) - (smush-control-method-14 () none) ;; 14 ;; (die-on-next-update! (_type_) _type_) + (set-zero! "Reset this [[smush-control]]." (_type_) _type_) ;; 9 + (update! "Calculate the next smush amplitude and update the smush state." (_type_) float) ;; 10 + (get-no-update "Get the next amplitude, but do not update the smush state." (_type_) float) ;; 11 + (activate! "Start the smush with the given parameters." (_type_ float int int float float clock) _type_) ;; 12 + (nonzero-amplitude? "Is the smush currently active?" (_type_) symbol) ;; 13 + (die-on-next-update! "Set the dampening period so the smush stops on the next update." (_type_) _type_) ;; 14 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -18393,9 +19028,9 @@ ;; collide-mesh-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype collide-tri-result (structure) - ((vertex vector 3 :offset-assert 0) ;; guessed by decompiler + "A triangle result of a collision." + ((vertex vector 3 :inline :offset-assert 0) ;; guessed by decompiler (intersect vector :inline :offset-assert 48) (normal vector :inline :offset-assert 64) (pat pat-surface :offset-assert 80) ;; guessed by decompiler @@ -18405,27 +19040,27 @@ :size-assert #x58 :flag-assert #x900000058 ) -|# -#| (deftype collide-mesh-tri (structure) + "A triangle for foreground collision meshes." ((vertex-index uint8 3 :offset-assert 0) ;; guessed by decompiler (unused uint8 :offset-assert 3) (pat pat-surface :offset-assert 4) ;; guessed by decompiler ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype collide-mesh (basic) + "A collision mesh for foreground objects, + bound to the joint specified by `joint-id`." ((joint-id int32 :offset-assert 4) (num-tris uint32 :offset-assert 8) (num-verts uint32 :offset-assert 12) (vertex-data (inline-array vector) :offset-assert 16) ;; guessed by decompiler - (tris collide-mesh-tri 1 :offset-assert 32) ;; guessed by decompiler + (tris collide-mesh-tri 1 :inline :offset 32) ;; guessed by decompiler ) :method-count-assert 16 :size-assert #x28 @@ -18440,23 +19075,21 @@ (collide-mesh-method-15 () none) ;; 15 ;; (collide-mesh-math-2 (_type_ object object object) none) ) ) -|# -#| (deftype collide-mesh-cache-tri (structure) - ((vertex vector 3 :offset-assert 0) ;; guessed by decompiler + "A triangle stored in the foreground mesh collide cache." + ((vertex vector 3 :inline :offset-assert 0) ;; guessed by decompiler (normal vector :inline :offset-assert 48) (bbox4w bounding-box4w :inline :offset-assert 64) - (pat pat-surface :offset-assert 60) ;; guessed by decompiler + (pat pat-surface :offset 60) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x60 :flag-assert #x900000060 ) -|# -#| (deftype collide-mesh-cache-entry (structure) + "A foreground mesh collide cache entry." ((mat matrix :inline :offset-assert 0) (tris collide-mesh-cache-tri :dynamic :offset-assert 64) ;; guessed by decompiler ) @@ -18464,10 +19097,9 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype collide-mesh-cache (basic) + "A collide cache for foreground meshes." ((used-size uint32 :offset-assert 4) (max-size uint32 :offset-assert 8) (id uint32 :offset-assert 12) @@ -18478,22 +19110,26 @@ :flag-assert #xd0000bb90 (:methods (collide-mesh-cache-method-9 () none) ;; 9 ;; (populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry) - (collide-mesh-cache-method-10 () none) ;; 10 ;; (is-id? (_type_ int) symbol) - (collide-mesh-cache-method-11 () none) ;; 11 ;; (next-id! (_type_) uint) + (is-id? "Does this cache have the given ID?" (_type_ int) symbol) ;; 10 + (next-id! + "Reset all used entries in the cache and increment the ID. + If the id is zero, set it to 1." + (_type_) uint) ;; 11 (collide-mesh-cache-method-12 () none) ;; 12 ;; (allocate! (_type_ int) collide-mesh-cache-entry) ) ) -|# -;; (define-extern *collide-mesh-cache* object) ;; collide-mesh-cache +(define-extern *collide-mesh-cache* collide-mesh-cache) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-shape-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(declare-type collide-shape-prim basic) + (deftype collide-rider (structure) - ((rider-handle uint64 :offset-assert 0) ;; handle + "Something that rides a moving object." + ((rider-handle handle :offset-assert 0) ;; handle (sticky-prim collide-shape-prim :offset-assert 8) ;; guessed by decompiler (prim-ry float :offset-assert 12) (rider-local-pos vector :inline :offset-assert 16) @@ -18502,24 +19138,21 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype collide-rider-pool (basic) + "A pool containing all the riders of an object." ((alloc-count int32 :offset-assert 4) - (riders collide-rider 20 :offset-assert 16) ;; guessed by decompiler + (riders collide-rider 20 :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 11 :size-assert #x290 :flag-assert #xb00000290 (:methods (collide-rider-pool-method-9 () none) ;; 9 ;; (add-rider (_type_ handle) collide-rider) - (collide-rider-pool-method-10 () none) ;; 10 ;; (prepare (_type_) none) + (prepare (_type_) none) ;; 10 ) ) -|# -#| (deftype pull-rider-info (structure) ((rider collide-rider :offset-assert 0) (rider-cshape collide-shape-moving :offset-assert 4) ;; guessed by decompiler @@ -18530,9 +19163,45 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +;; +++collide-shape-h:overlaps-others-options +(defenum overlaps-others-options + :type uint32 + :bitfield #t + (oo0) + (oo1) + (oo2) + (oo3) + (oo4) + ) +;; ---collide-shape-h:overlaps-others-options + +;; +++collide-shape-h:collide-action +(defenum collide-action + :bitfield #t + :type uint32 + (solid 0) ;; 1 + (semi-solid 1) ;; 2 + (rideable 2) ;; 4 + (can-ride 3) ;; 8 + (dont-push-away 4) ;; 16 + (pull-rider-can-collide 5) ;; 32 + (deadly 6) ;; 64 + (persistent-attack 7) ;; 128 + (no-smack 8) ;; 256 + (no-standon 9) ;; 512 + (block-turn-around 10) ;; 1024 + (check-edge 11) ;; 2048 + (check-stuck 12) ;; 4096 + (stuck-wall-escape 13) ;; 8192 + (no-normal-reset 14) ;; 163884 + (edge-grabbed 15) ;; 32768 + (nav-sphere 16) ;; hi 1 + ) +;; ---collide-shape-h:collide-action + +(declare-type touching-list structure) + (deftype overlaps-others-params (structure) ((options overlaps-others-options :offset-assert 0) ;; guessed by decompiler (collide-with-filter collide-spec :offset-assert 4) ;; guessed by decompiler @@ -18545,9 +19214,7 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype move-above-ground-params (structure) ((gnd-collide-with collide-spec :offset-assert 0) ;; guessed by decompiler (popup float :offset-assert 4) @@ -18565,45 +19232,43 @@ :size-assert #x6c :flag-assert #x90000006c ) -|# -#| (deftype collide-prim-core (structure) + "Collide primitives use this to store their world sphere and their collision flags." ((world-sphere vector :inline :offset-assert 0) (collide-as collide-spec :offset-assert 16) ;; guessed by decompiler (collide-with collide-spec :offset-assert 20) ;; guessed by decompiler (action collide-action :offset-assert 24) ;; guessed by decompiler (prim-type int8 :offset-assert 28) ;; prim-type (unused1 uint8 3 :offset-assert 29) ;; guessed by decompiler - (quad uint128 2 :offset-assert 0) ;; guessed by decompiler + (quad uint128 2 :offset 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype collide-shape-prim (basic) + "Base class for collide primitives." ((cshape collide-shape :offset-assert 4) ;; guessed by decompiler (prim-id uint32 :offset-assert 8) (transform-index int8 :offset-assert 12) (unused2 int8 3 :offset-assert 13) ;; guessed by decompiler - (prim-core collide-prim-core :inline :offset-assert 16) - (local-sphere vector :inline :offset-assert 48) - (specific uint8 16 :offset-assert 64) ;; guessed by decompiler - (world-sphere vector :inline :offset-assert 16) - (collide-as collide-spec :offset-assert 32) - (collide-with collide-spec :offset-assert 36) - (action collide-action :offset-assert 40) - (prim-type int8 :offset-assert 44) - (radius meters :offset-assert 60) ;; float + (prim-core collide-prim-core :inline :offset 16) + (local-sphere vector :inline :offset 48) + (specific uint8 16 :offset 64 :score -1) ;; guessed by decompiler + (world-sphere vector :inline :offset 16) + (collide-as collide-spec :offset 32) + (collide-with collide-spec :offset 36) + (action collide-action :offset 40) + (prim-type int8 :offset 44) + (radius meters :offset 60) ;; float ) :method-count-assert 20 :size-assert #x50 :flag-assert #x1400000050 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type collide-shape uint int) _type_) + (new (symbol type collide-shape uint int) _type_) ;; 0 (collide-shape-prim-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) (collide-shape-prim-method-10 () none) ;; 10 ;; (add-fg-prim-using-box (_type_ collide-cache) none) (collide-shape-prim-method-11 () none) ;; 11 ;; (add-fg-prim-using-line-sphere (_type_ collide-cache object) none) @@ -18617,107 +19282,74 @@ (collide-shape-prim-method-19 () none) ;; 19 ;; (should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none) ) ) -|# -#| (deftype collide-shape-prim-sphere (collide-shape-prim) - ((cshape collide-shape :offset-assert 0) ;; guessed by decompiler - (prim-id uint32 :offset-assert 4) - (transform-index int8 :offset-assert 8) - (unused2 int8 3 :offset-assert 9) ;; guessed by decompiler - (prim-core collide-prim-core :inline :offset-assert 12) - (local-sphere vector :inline :offset-assert 44) - (specific uint8 16 :offset-assert 60) ;; guessed by decompiler - (world-sphere vector :inline :offset-assert 12) - (collide-as collide-spec :offset-assert 28) - (collide-with collide-spec :offset-assert 32) - (action collide-action :offset-assert 36) - (prim-type int8 :offset-assert 40) - (radius meters :offset-assert 56) ;; float - (pat pat-surface :offset-assert 60) ;; guessed by decompiler - (nav-radius float :offset-assert 64) + "A sphere primitive for collide shapes." + ((pat pat-surface :offset 64) ;; guessed by decompiler + (nav-radius float :offset 68) ) :method-count-assert 20 :size-assert #x50 :flag-assert #x1400000050 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type collide-shape uint) _type_) + (new (symbol type collide-shape uint) _type_) ;; 0 ) ) -|# -#| (deftype collide-shape-prim-mesh (collide-shape-prim) - ((cshape collide-shape :offset-assert 0) ;; guessed by decompiler - (prim-id uint32 :offset-assert 4) - (transform-index int8 :offset-assert 8) - (unused2 int8 3 :offset-assert 9) ;; guessed by decompiler - (prim-core collide-prim-core :inline :offset-assert 12) - (local-sphere vector :inline :offset-assert 44) - (specific uint8 16 :offset-assert 60) ;; guessed by decompiler - (world-sphere vector :inline :offset-assert 12) - (collide-as collide-spec :offset-assert 28) - (collide-with collide-spec :offset-assert 32) - (action collide-action :offset-assert 36) - (prim-type int8 :offset-assert 40) - (radius meters :offset-assert 56) ;; float - (mesh collide-mesh :offset-assert 60) ;; guessed by decompiler - (mesh-id int32 :offset-assert 64) - (mesh-cache-id uint32 :offset-assert 68) - (mesh-cache-entry collide-mesh-cache-entry :offset-assert 72) + "A mesh primitive for collide shapes." + ((mesh collide-mesh :offset 64) ;; guessed by decompiler + (mesh-id int32 :offset 68) + (mesh-cache-id uint32 :offset 72) + (mesh-cache-entry collide-mesh-cache-entry :offset 76) ) :method-count-assert 20 :size-assert #x50 :flag-assert #x1400000050 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type collide-shape uint uint) _type_) + (new (symbol type collide-shape uint uint) _type_) ;; 0 ) ) -|# -#| (deftype collide-shape-prim-group (collide-shape-prim) - ((cshape collide-shape :offset-assert 0) ;; guessed by decompiler - (prim-id uint32 :offset-assert 4) - (transform-index int8 :offset-assert 8) - (unused2 int8 3 :offset-assert 9) ;; guessed by decompiler - (prim-core collide-prim-core :inline :offset-assert 12) - (local-sphere vector :inline :offset-assert 44) - (specific uint8 16 :offset-assert 60) ;; guessed by decompiler - (world-sphere vector :inline :offset-assert 12) - (collide-as collide-spec :offset-assert 28) - (collide-with collide-spec :offset-assert 32) - (action collide-action :offset-assert 36) - (prim-type int8 :offset-assert 40) - (radius meters :offset-assert 56) ;; float - (num-children uint8 :offset-assert 60) - (num-alloc-children uint8 :offset-assert 61) - (child (inline-array collide-shape-prim) :offset-assert 64) ;; guessed by decompiler + "A group of collide primitives." + ((num-children uint8 :offset 64) + (num-alloc-children uint8 :offset 65) + (child (inline-array collide-shape-prim) :offset 68) ;; guessed by decompiler ) :method-count-assert 20 :size-assert #x50 :flag-assert #x1400000050 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type collide-shape uint int) _type_) + (new (symbol type collide-shape uint int) _type_) ;; 0 ) ) -|# -#| +;; +++collide-shape-h:collide-list-enum +(defenum collide-list-enum + (hit-by-player) + (usually-hit-by-player) + (hit-by-others) + (player) + ) +;; ---collide-shape-h:collide-list-enum + (deftype collide-shape (trsqv) - ((actor-hash-index int16 :offset-assert 12) + "The parent of all of an object's collide primitives. + Most [[process-drawable]]s have a [[collide-shape]] that represents their root transform." + ((actor-hash-index int16 :offset 12) (process process-drawable :offset-assert 140) ;; guessed by decompiler (max-iteration-count uint8 :offset-assert 144) (nav-flags uint8 :offset-assert 145) ;; nav-flags (total-prims uint8 :offset-assert 146) (num-riders uint8 :offset-assert 147) - (event-self symbol :offset-assert 152) ;; guessed by decompiler + (event-self symbol :offset 152) ;; guessed by decompiler (event-other symbol :offset-assert 156) ;; guessed by decompiler (root-prim collide-shape-prim :offset-assert 160) ;; guessed by decompiler (riders (inline-array collide-rider) :offset-assert 164) ;; guessed by decompiler (penetrate-using penetrate :offset-assert 168) (penetrated-by penetrate :offset-assert 176) - (event-priority uint8 :offset-assert 192) + (event-priority uint8 :offset 192) (rider-max-momentum float :offset-assert 196) ) :method-count-assert 55 @@ -18725,7 +19357,7 @@ :flag-assert #x37000000c8 ;; field penetrate is likely a value type. field penetrate is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process-drawable collide-list-enum) _type_) + (new (symbol type process-drawable collide-list-enum) _type_) ;; 0 (collide-shape-method-28 () none) ;; 28 ;; (move-by-vector! (_type_ vector) none) (collide-shape-method-29 () none) ;; 29 ;; (move-to-point! (_type_ vector) none) (collide-shape-method-30 () none) ;; 30 ;; (debug-draw (_type_) none) @@ -18755,18 +19387,42 @@ (collide-shape-method-54 () none) ;; 54 ;; (pusher-init (_type_) none) ) ) -|# -#| +;; +++collide-shape-h:collide-status +(defenum collide-status + :bitfield #t + :type uint64 + (on-surface 0) + (on-ground 1) + (touch-surface 2) + (touch-wall 3) + (touch-ceiling 4) + (touch-actor 5) + (on-special-surface 6) + (touch-edge 7) + (no-touch 8) + (blocked 9) + (on-water 10) + (impact-surface 11) + (touch-background 12) + (stuck 13) + (touch-ceiling-sticky 14) + (glance 15) + (probe-hit 16) + ) +;; ---collide-shape-h:collide-status + +(declare-type collide-query structure) (deftype collide-shape-moving (collide-shape) - ((rider-time uint64 :offset-assert 200) ;; time-frame + "A [[collide-shape]] for moving objects." + ((rider-time time-frame :offset-assert 200) ;; time-frame (rider-last-move vector :inline :offset-assert 208) (trans-old vector :inline :offset-assert 224) - (poly-pat pat-surface :offset-assert 272) ;; guessed by decompiler + (poly-pat pat-surface :offset 272) ;; guessed by decompiler (cur-pat pat-surface :offset-assert 276) ;; guessed by decompiler (ground-pat pat-surface :offset-assert 280) ;; guessed by decompiler - (status uint64 :offset-assert 288) ;; collide-status - (reaction (function control-info collide-query vector vector collide-status) :offset-assert 316) ;; guessed by decompiler + (status collide-status :offset-assert 288) ;; collide-status + (reaction (function control-info collide-query vector vector collide-status) :offset 316) ;; guessed by decompiler (no-reaction (function collide-shape-moving collide-query vector vector object) :offset-assert 320) ;; guessed by decompiler (local-normal vector :inline :offset-assert 336) (surface-normal vector :inline :offset-assert 352) @@ -18788,7 +19444,7 @@ :flag-assert #x44000001dc ;; field penetrate is likely a value type. field penetrate is likely a value type. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process-drawable collide-list-enum) _type_) + (new (symbol type process-drawable collide-list-enum) _type_) ;; 0 (collide-shape-moving-method-55 () none) ;; 55 ;; (find-ground (_type_ collide-query collide-spec float float float) symbol) (collide-shape-moving-method-56 () none) ;; 56 ;; (react-to-pat! (_type_ pat-surface) cshape-reaction-flags) (collide-shape-moving-method-57 () none) ;; 57 ;; (integrate-no-collide! (_type_ vector) none) @@ -18804,14 +19460,13 @@ (collide-shape-moving-method-67 () none) ;; 67 ;; (collide-with-all-collide-cache-prims (_type_ matrix collide-query) none) ) ) -|# -;; (define-extern *collide-hit-by-player-list* object) ;; engine -;; (define-extern *collide-hit-by-others-list* object) ;; engine -;; (define-extern *collide-player-list* object) ;; engine -;; (define-extern *collide-shape-prim-backgnd* collide-shape-prim-mesh) ;; collide-shape-prim-mesh -;; (define-extern *collide-shape-prim-water* collide-shape-prim-mesh) ;; collide-shape-prim-mesh -;; (define-extern *collide-rider-pool* object) ;; collide-rider-pool +(define-extern *collide-hit-by-player-list* engine) +(define-extern *collide-hit-by-others-list* engine) +(define-extern *collide-player-list* engine) +(define-extern *collide-shape-prim-backgnd* collide-shape-prim-mesh) +(define-extern *collide-shape-prim-water* collide-shape-prim-mesh) +(define-extern *collide-rider-pool* collide-rider-pool) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-obs-h ;; @@ -19314,8 +19969,9 @@ ;; collide-touch-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype touching-prim (structure) + "A collide primitive that's touching another. + Potentially also stores the triangle that is involved." ((cprim collide-shape-prim :offset-assert 0) ;; guessed by decompiler (has-tri? symbol :offset-assert 4) ;; guessed by decompiler (tri collide-tri-result :inline :offset-assert 16) @@ -19324,10 +19980,9 @@ :size-assert #x68 :flag-assert #x900000068 ) -|# -#| (deftype touching-prims-entry (structure) + "A record of two primitives touching." ((next touching-prims-entry :offset-assert 0) (prev touching-prims-entry :offset-assert 4) (allocated? symbol :offset-assert 8) ;; guessed by decompiler @@ -19345,54 +20000,53 @@ (touching-prims-entry-method-12 () none) ;; 12 ) ) -|# -#| (deftype touching-prims-entry-pool (structure) + "A pool of up to 64 touching prim records." ((head touching-prims-entry :offset-assert 0) - (nodes touching-prims-entry 64 :offset-assert 16) ;; guessed by decompiler + (nodes touching-prims-entry 64 :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 13 :size-assert #x3c10 :flag-assert #xd00003c10 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) + (new (symbol type) _type_) ;; 0 (touching-prims-entry-pool-method-9 () none) ;; 9 ;; (alloc-node (_type_) touching-prims-entry) (touching-prims-entry-pool-method-10 () none) ;; 10 ;; (get-free-node-count (_type_) int) - (touching-prims-entry-pool-method-11 () none) ;; 11 ;; (init-list! (_type_) none) + (init-list! (_type_) none) ;; 11 (touching-prims-entry-pool-method-12 () none) ;; 12 ;; (free-node (_type_ touching-prims-entry) touching-prims-entry) ) ) -|# -#| (deftype touching-shapes-entry (structure) + "A record of two collide shapes touching, + storing a record of the primitives involved." ((cshape1 collide-shape :offset-assert 0) ;; guessed by decompiler (cshape2 collide-shape :offset-assert 4) ;; guessed by decompiler (resolve-u int8 :offset-assert 8) (head touching-prims-entry :offset-assert 12) - (handle1 uint64 :offset-assert 16) ;; handle - (handle2 uint64 :offset-assert 24) ;; handle + (handle1 handle :offset-assert 16) ;; handle + (handle2 handle :offset-assert 24) ;; handle ) + :pack-me :method-count-assert 15 :size-assert #x20 :flag-assert #xf00000020 (:methods - (touching-shapes-entry-method-9 () none) ;; 9 ;; (get-head (_type_) touching-prims-entry) - (touching-shapes-entry-method-10 () none) ;; 10 ;; (get-next (_type_ touching-shapes-entry) touching-prims-entry) + (get-head (_type_) touching-prims-entry) ;; 9 + (get-next (_type_ touching-shapes-entry) touching-prims-entry) ;; 10 (touching-shapes-entry-method-11 () none) ;; 11 ;; (get-touched-shape (_type_ collide-shape) collide-shape) (touching-shapes-entry-method-12 () none) ;; 12 ;; (prims-touching? (_type_ collide-shape uint) touching-prims-entry) (touching-shapes-entry-method-13 () none) ;; 13 ;; (prims-touching-action? (_type_ collide-shape collide-action collide-action) basic) (touching-shapes-entry-method-14 () none) ;; 14 ;; (free-touching-prims-list (_type_) none) ) ) -|# -#| (deftype touching-list (structure) + "Contains a record of touching collide shape pairs." ((num-touching-shapes int32 :offset-assert 0) (resolve-u int8 :offset-assert 4) - (touching-shapes touching-shapes-entry 32 :offset-assert 8) ;; guessed by decompiler + (touching-shapes touching-shapes-entry 32 :inline :offset-assert 8) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x408 @@ -19406,44 +20060,41 @@ (touching-list-method-13 () none) ;; 13 ;; (get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry) ) ) -|# -;; (define-extern *touching-prims-entry-pool* object) ;; touching-prims-entry-pool -;; (define-extern *touching-list* object) ;; touching-list +(define-extern *touching-prims-entry-pool* touching-prims-entry-pool) +(define-extern *touching-list* touching-list) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-edge-grab-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype pilot-edge-grab-info (structure) + "Info for edge grabs on zoomers." ((local-pos vector :inline :offset-assert 0) (local-dir vector :inline :offset-assert 16) - (handle uint64 :offset-assert 32) ;; handle + (handle handle :offset-assert 32) ;; handle ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype edge-grab-info (structure) - ((world-vertex vector 8 :offset-assert 0) ;; guessed by decompiler - (local-vertex vector 8 :offset-assert 128) ;; guessed by decompiler + ((world-vertex vector 8 :inline :offset-assert 0) ;; guessed by decompiler + (local-vertex vector 8 :inline :offset-assert 128) ;; guessed by decompiler (status uint64 :offset-assert 256) (actor-cshape-prim-offset int32 :offset-assert 264) - (actor-handle uint64 :offset-assert 272) ;; handle + (actor-handle handle :offset-assert 272) ;; handle (hanging-matrix matrix :inline :offset-assert 288) - (edge-vertex vector 2 :offset-assert 0) ;; guessed by decompiler - (center-hold vector :inline :offset-assert 32) - (tri-vertex vector 3 :offset-assert 48) ;; guessed by decompiler - (adjacent-edge-left-vertex vector :inline :offset-assert 96) - (adjacent-edge-right-vertex vector :inline :offset-assert 112) + (edge-vertex vector 2 :inline :offset 0) ;; guessed by decompiler + (center-hold vector :inline :offset 32) + (tri-vertex vector 3 :inline :offset 48) ;; guessed by decompiler + (adjacent-edge-left-vertex vector :inline :offset 96) + (adjacent-edge-right-vertex vector :inline :offset 112) (left-hand-hold vector :inline :offset-assert 352) (right-hand-hold vector :inline :offset-assert 368) (center-hold-old vector :inline :offset-assert 384) - (edge-tri-pat uint32 :offset-assert 400) + (edge-tri-pat pat-surface :offset-assert 400) (found-edge? symbol :offset-assert 404) ;; guessed by decompiler (pilot-edge-grab? symbol :offset-assert 408) ;; guessed by decompiler (pilot-edge-grab pilot-edge-grab-info :inline :offset-assert 416) @@ -19458,10 +20109,10 @@ (edge-grab-info-method-10 () none) ;; 10 ;; (debug-draw (_type_) none) ) ) -|# -#| +(declare-type collide-cache-tri structure) (deftype collide-edge-tri (structure) + "A triangle involved in edge grab collision." ((ctri collide-cache-tri :offset-assert 0) ;; guessed by decompiler (normal vector :inline :offset-assert 16) ) @@ -19469,11 +20120,9 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype collide-edge-edge (structure) - ((ignore basic :offset-assert 0) + ((ignore symbol :offset-assert 0) (etri collide-edge-tri :offset-assert 4) (vertex-ptr (inline-array vector) 2 :offset-assert 8) ;; guessed by decompiler (outward vector :inline :offset-assert 16) @@ -19486,9 +20135,7 @@ (collide-edge-edge-method-9 () none) ;; 9 ;; (no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol) ) ) -|# -#| (deftype collide-edge-hold-item (structure) ((next collide-edge-hold-item :offset-assert 0) (rating float :offset-assert 4) @@ -19501,15 +20148,13 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype collide-edge-hold-list (structure) ((num-allocs uint32 :offset-assert 0) (num-attempts uint32 :offset-assert 4) (head collide-edge-hold-item :offset-assert 8) - (items collide-edge-hold-item 32 :offset-assert 16) ;; guessed by decompiler - (attempts qword 32 :offset-assert 1552) ;; guessed by decompiler + (items collide-edge-hold-item 32 :inline :offset-assert 16) ;; guessed by decompiler + (attempts qword 32 :inline :offset-assert 1552) ;; guessed by decompiler ) :method-count-assert 11 :size-assert #x810 @@ -19519,13 +20164,22 @@ (collide-edge-hold-list-method-10 () none) ;; 10 ;; (add-to-list! (_type_ collide-edge-hold-item) none) ) ) -|# -#| +;; +++collide-edge-grab-h:collide-edge-spec-flags +(defenum collide-edge-spec-flags + :bitfield #t + :type uint64 + (find-adjacent-edge 0) + (one 1) + (two 2) + (send-event 3) + ) +;; ---collide-edge-grab-h:collide-edge-spec-flags + (deftype collide-edge-spec (structure) ((split-dists float 2 :offset-assert 0) ;; guessed by decompiler (outward-offset vector :inline :offset-assert 16) - (flags uint64 :offset-assert 32) ;; collide-edge-spec-flags + (flags collide-edge-spec-flags :offset-assert 32) ;; collide-edge-spec-flags (ignore-pat pat-surface :offset-assert 40) ;; guessed by decompiler (max-dist-sqrd-to-outward-pt float :offset-assert 44) (max-dir-cosa-delta float :offset-assert 48) @@ -19533,17 +20187,16 @@ (touching-segment symbol :offset-assert 56) ;; guessed by decompiler (local-cache-fill-box bounding-box :inline :offset-assert 64) (local-within-reach-box bounding-box :inline :offset-assert 96) - (local-player-spheres sphere 12 :offset-assert 128) ;; guessed by decompiler - (local-player-hanging-spheres sphere 6 :offset-assert 128) ;; guessed by decompiler - (local-player-leap-up-spheres sphere 6 :offset-assert 224) ;; guessed by decompiler + (local-player-spheres sphere 12 :inline :offset 128) ;; guessed by decompiler + (local-player-hanging-spheres sphere 6 :inline :offset 128) ;; guessed by decompiler + (local-player-leap-up-spheres sphere 6 :inline :offset 224) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x140 :flag-assert #x900000140 ) -|# -#| +(declare-type collide-cache basic) (deftype collide-edge-work (structure) ((ccache collide-cache :offset-assert 0) ;; guessed by decompiler (cshape collide-shape :offset-assert 4) ;; guessed by decompiler @@ -19555,14 +20208,14 @@ (within-reach-box4w bounding-box4w :inline :offset-assert 96) (search-pt vector :inline :offset-assert 128) (search-dir-vec vector :inline :offset-assert 144) - (world-player-spheres sphere 12 :offset-assert 160) ;; guessed by decompiler - (world-player-hanging-spheres sphere 6 :offset-assert 160) ;; guessed by decompiler - (world-player-leap-up-spheres sphere 6 :offset-assert 256) ;; guessed by decompiler + (world-player-spheres sphere 12 :inline :offset-assert 160) ;; guessed by decompiler + (world-player-hanging-spheres sphere 6 :inline :offset 160) ;; guessed by decompiler + (world-player-leap-up-spheres sphere 6 :inline :offset 256) ;; guessed by decompiler (spec collide-edge-spec :inline :offset-assert 352) (process (pointer process-drawable) :offset-assert 672) ;; guessed by decompiler - (verts vector 64 :offset-assert 688) ;; guessed by decompiler - (edges collide-edge-edge 96 :offset-assert 1712) ;; guessed by decompiler - (tris collide-edge-tri 48 :offset-assert 6320) ;; guessed by decompiler + (verts vector 64 :inline :offset-assert 688) ;; guessed by decompiler + (edges collide-edge-edge 96 :inline :offset-assert 1712) ;; guessed by decompiler + (tris collide-edge-tri 48 :inline :offset-assert 6320) ;; guessed by decompiler (hold-list collide-edge-hold-list :inline :offset-assert 7856) ) :method-count-assert 21 @@ -19583,11 +20236,10 @@ (collide-edge-work-method-20 () none) ;; 20 ;; (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) ) ) -|# -;; (define-extern *collide-edge-spec* object) ;; collide-edge-spec -;; (define-extern *collide-edge-work* object) ;; collide-edge-work -;; (define-extern *edge-grab-info* object) ;; edge-grab-info +(define-extern *collide-edge-spec* collide-edge-spec) +(define-extern *collide-edge-work* collide-edge-work) +(define-extern *edge-grab-info* edge-grab-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-drawable-h ;; @@ -27901,7 +28553,7 @@ ;; (define-extern *sp-temp* object) ;; float ;; (define-extern lookup-part-group-by-name function) ;; (function string sparticle-launch-group) ;; (define-extern lookup-part-group-pointer-by-name function) ;; (function string (pointer object)) -;; (define-extern part-group-pointer? function) ;; (function pointer symbol) +(define-extern part-group-pointer? (function pointer symbol)) ;; (define-extern unlink-part-group-by-heap function) ;; (function kheap int) ;; (define-extern sp-init-fields! function) ;; (function (pointer float) (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol (inline-array sp-field-init-spec)) ;; (define-extern *sp-launcher-lock* object) ;; symbol @@ -30616,13 +31268,13 @@ ;; ambient ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern can-display-query? function) ;; (function process string float symbol) -;; (define-extern talker-surpress! function) ;; (function none) -;; (define-extern talker-displayed? function) ;; (function symbol) -;; (define-extern kill-current-talker function) ;; (function symbol pair symbol none) -;; (define-extern string->talker-speech function) ;; (function string talker-speech-class) -;; (define-extern talker-spawn-func function) ;; (function talker-speech-class process-tree vector region sound-id) -;; (define-extern talker-init function) ;; (function talker-speech-class vector region none :behavior talker) +(define-extern can-display-query? (function process string float symbol)) +(define-extern talker-surpress! (function none)) +(define-extern talker-displayed? (function symbol)) +(define-extern kill-current-talker (function symbol pair symbol none)) +(define-extern string->talker-speech (function string talker-speech-class)) +(define-extern talker-spawn-func (function talker-speech-class process-tree vector region sound-id)) +(define-extern talker-init (function talker-speech-class vector region none :behavior talker)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; speech ;; @@ -30969,7 +31621,7 @@ ) |# -;; (define-extern *lightning-spec-id-table* object) ;; (array lightning-spec) +(define-extern *lightning-spec-id-table* (array lightning-spec)) ;; (define-extern *lightning-gcf* object) ;; gcf-control ;; (define-extern lightning-fractal-gen function) ;; (function (inline-array vector) int int float lightning-spec none) ;; (define-extern lightning-uniform-gen function) ;; (function (inline-array vector) int int float lightning-spec none) @@ -32341,9 +32993,9 @@ ;; (define-extern target-collision-reaction function) ;; (function control-info collide-query vector vector collide-status :behavior target) ;; (define-extern target-collision-no-reaction function) ;; (function control-info collide-query vector vector none) ;; (define-extern *collide-edge-board-spec* object) ;; collide-edge-spec -;; (define-extern rail-surface-touch function) ;; (function none :behavior target) -;; (define-extern gravel-surface-touch function) ;; (function none) -;; (define-extern mushroom-surface-touch function) +(define-extern rail-surface-touch (function none :behavior target)) +(define-extern gravel-surface-touch (function none)) +(define-extern mushroom-surface-touch (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; logic-target ;; @@ -34450,7 +35102,7 @@ ;; (define-extern entity-remap-names function) ;; (function pair none) ;; (define-extern process-status-bits function) ;; (function process symbol none) ;; (define-extern process-entity-set! function) ;; (function process entity entity) -;; (define-extern process-task-mask function) ;; (function process task-mask) +(define-extern process-task-mask (function process task-mask)) ;; (define-extern update-actor-vis-box function) ;; (function process-drawable vector vector none) ;; (define-extern expand-bounding-box function) ;; (function vector vector vector vector none) ;; (define-extern expand-bounding-box-from-nav-meshes function) diff --git a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc index 4282bfae76..7319794923 100644 --- a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc @@ -8,7 +8,10 @@ [34, "(function process symbol)"], [36, "(function process symbol)"] ], - "profile": [ - [3, "(function profile-segment-array profile-collapse none)"] + "profile": [[3, "(function profile-segment-array profile-collapse none)"]], + "surface-h": [ + [0, "(function none)"], + [1, "(function none)"], + [2, "(function none)"] ] } diff --git a/decompiler/config/jak3/ntsc_v1/label_types.jsonc b/decompiler/config/jak3/ntsc_v1/label_types.jsonc index 6a229c1aa4..96b94b5f1e 100644 --- a/decompiler/config/jak3/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/label_types.jsonc @@ -40,5 +40,7 @@ ["L2", "(pointer uint64)", 584] ], "texture-anim-h": [["L1", "(pointer uint8)", 256]], - "capture": [["L4", "gs-store-image-packet"]] + "capture": [["L4", "gs-store-image-packet"]], + "pat-h": [["L1", "(inline-array pat-mode-info)", 4]], + "ambient-h": [["L1", "(inline-array talker-speech-class)", 365]] } diff --git a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc index d1283ad0b7..505ea2396d 100644 --- a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc @@ -10,5 +10,6 @@ [48, "vector"] ], "rotate-vector-to-vector": [[16, "quaternion"]], - "init-for-transform": [[192, "vector"]] + "init-for-transform": [[192, "vector"]], + "show-mc-info": [[16, "mc-slot-info"]] } diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index 6a1eb0cac4..5b38a4f3c8 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -232,18 +232,15 @@ [141, "v1", "int"], [25, "v1", "dma-tag"] ], - "(method 3 connection-minimap)": [ - [97, "f0", "float"] - ], + "(method 3 connection-minimap)": [[97, "f0", "float"]], "dma-buffer-add-ref-texture": [ [[47, 54], "a3", "dma-packet"], [[56, 69], "a3", "gs-gif-tag"], [[71, 87], "a2", "dma-packet"] ], - "texture-page-default-allocate": - [[51, "a3", "(pointer int32)"]], - "texture-page-font-allocate":[[33, "a3", "(pointer int32)"]], - "upload-vram-pages":[[[187, 193], "v1", "dma-packet"]], + "texture-page-default-allocate": [[51, "a3", "(pointer int32)"]], + "texture-page-font-allocate": [[33, "a3", "(pointer int32)"]], + "upload-vram-pages": [[[187, 193], "v1", "dma-packet"]], "upload-vram-pages-pris": [[[181, 187], "v1", "dma-packet"]], "(method 13 texture-page)": [[45, "a0", "(pointer uint64)"]], "(method 11 texture-pool)": [[217, "a0", "(pointer uint64)"]], @@ -258,7 +255,53 @@ [[77, 100], "a1", "adgif-shader"] // [[70, 93], "a1", "adgif-shader"], // [92, "a1", "adgif-shader"] + ], + "(method 8 res-lump)": [ + [258, "s0", "array"], + [[157, 239], "s0", "(array object)"] + ], + "(method 15 res-lump)": [[132, "s5", "res-tag-pair"]], + "(method 17 res-lump)": [[22, "s4", "(pointer pointer)"]], + "(method 19 res-lump)": [ + [38, "t2", "int"], + [38, "a2", "int"] + ], + "(method 20 res-lump)": [[341, "t0", "(pointer uint128)"]], + "(method 16 res-lump)": [ + [22, "t1", "(pointer uint64)"], + [29, "t2", "(pointer uint64)"] + ], + "(method 18 res-lump)": [["_stack_", 16, "object"]], + "(method 21 res-lump)": [ + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"] + ], + "(method 0 fact-info-target)": [[3, "v0", "fact-info-target"]], + "(method 0 fact-info-crate)": [[3, "v0", "fact-info-crate"]], + "(method 0 fact-info-enemy)": [ + [7, "v0", "fact-info-enemy"], + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"] + ], + "(method 0 fact-info)": [ + [87, "v1", "(pointer int32)"], + [11, "v1", "res-lump"] + ], + "(method 0 collide-shape-moving)": [[[5, 12], "v0", "collide-shape-moving"]], + "(method 0 collide-shape-prim-group)": [ + [[6, 12], "v0", "collide-shape-prim-group"] + ], + "(method 0 collide-shape-prim-sphere)": [ + [[5, 8], "v0", "collide-shape-prim-sphere"] + ], + "(method 0 collide-shape-prim-mesh)": [ + [[6, 11], "v0", "collide-shape-prim-mesh"] + ], + "(method 0 touching-list)": [[[6, 8], "v0", "touching-list"]], + "(method 11 touching-prims-entry-pool)": [ + [[0, 8], "v1", "touching-prims-entry"], + [8, "v1", "pointer"], + [[9, 11], "v1", "touching-prims-entry"], + [[1, 20], "a1", "touching-prims-entry"] ] - - } diff --git a/decompiler/config/jak3/ntsc_v1/var_names.jsonc b/decompiler/config/jak3/ntsc_v1/var_names.jsonc index 7e7241b482..c96e72ae77 100644 --- a/decompiler/config/jak3/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak3/ntsc_v1/var_names.jsonc @@ -490,35 +490,16 @@ "args": ["buckets", "bucket", "start-tag", "end-tag-to-patch"] }, "disasm-vif-details": { - "args": [ - "fmt-dest", - "vif-data", - "unpack-cmd", - "unpack-count" - ] + "args": ["fmt-dest", "vif-data", "unpack-cmd", "unpack-count"] }, "disasm-vif-tag": { - "args": [ - "tag", - "count", - "format-dest", - "details?" - ] + "args": ["tag", "count", "format-dest", "details?"] }, "disasm-dma-tag": { - "args": [ - "tag", - "format-dest" - ] + "args": ["tag", "format-dest"] }, "disasm-dma-list": { - "args": [ - "data", - "mode", - "verbose", - "stream", - "expected-size" - ] + "args": ["data", "mode", "verbose", "stream", "expected-size"] }, "gs-set-default-store-image": { "args": [ @@ -533,345 +514,219 @@ ] }, "store-image": { - "args": [ - "work" - ] + "args": ["work"] }, "texture-bpp": { - "args": [ - "tex-format" - ] + "args": ["tex-format"] }, "texture-qwc": { - "args": [ - "w", - "h", - "tex-format" - ] + "args": ["w", "h", "tex-format"] }, "physical-address": { - "args": [ - "addr" - ] + "args": ["addr"] }, "dma-buffer-add-ref-texture": { - "args": [ - "dma-buf", - "tex-data-ptr", - "w", - "h", - "tex-format" - ] + "args": ["dma-buf", "tex-data-ptr", "w", "h", "tex-format"] }, "gs-find-block": { - "args": [ - "bx", - "by", - "tex-format" - ] + "args": ["bx", "by", "tex-format"] }, "gs-page-width": { - "args": [ - "tex-format" - ] + "args": ["tex-format"] }, "gs-page-height": { - "args": [ - "tex-format" - ] + "args": ["tex-format"] }, "gs-block-width": { - "args": [ - "tex-format" - ] + "args": ["tex-format"] }, "gs-block-height": { - "args": [ - "tex-format" - ] + "args": ["tex-format"] }, "gs-largest-block": { - "args": [ - "w", - "h", - "tex-format" - ] + "args": ["w", "h", "tex-format"] }, "gs-blocks-used": { - "args": [ - "w", - "h", - "tex-format" - ] + "args": ["w", "h", "tex-format"] }, "texture-page-default-allocate": { - "args": [ - "pool", - "page", - "heap", - "page-id" - ] + "args": ["pool", "page", "heap", "page-id"] }, "texture-page-common-allocate": { - "args": [ - "pool", - "page", - "heap", - "page-id" - ] + "args": ["pool", "page", "heap", "page-id"] }, "texture-page-font-allocate": { - "args": [ - "pool", - "page", - "heap", - "page-id" - ] + "args": ["pool", "page", "heap", "page-id"] }, "texture-page-common-boot-allocate": { - "args": [ - "pool", - "page", - "heap", - "page-id" - ] + "args": ["pool", "page", "heap", "page-id"] }, "upload-vram-data": { - "args": [ - "dma-buf", - "dest", - "data-ptr", - "h", - "w" - ] + "args": ["dma-buf", "dest", "data-ptr", "h", "w"] }, "upload-vram-pages": { - "args": [ - "pool", - "pool-segment", - "page", - "mode", - "bucket" - ] + "args": ["pool", "pool-segment", "page", "mode", "bucket"] }, "update-vram-pages": { - "args": [ - "pool", - "pool-segment", - "page", - "mode" - ] + "args": ["pool", "pool-segment", "page", "mode"] }, "upload-vram-pages-pris": { - "args": [ - "pool", - "pool-segment", - "page", - "bucket", - "mask" - ] + "args": ["pool", "pool-segment", "page", "bucket", "mask"] }, "texture-page-level-allocate": { - "args": [ - "pool", - "page", - "heap", - "page-id" - ] + "args": ["pool", "page", "heap", "page-id"] }, "texture-page-size-check": { - "args": [ - "pool", - "lev", - "print?" - ] + "args": ["pool", "lev", "print?"] }, "upload-textures": { - "args": [ - "pool" - ] + "args": ["pool"] }, "texture-relocate": { - "args": [ - "dma-buf", - "tex", - "dest", - "tex-format", - "clut-dest" - ] + "args": ["dma-buf", "tex", "dest", "tex-format", "clut-dest"] }, "texture-page-login": { - "args": [ - "id", - "alloc-func", - "heap" - ] + "args": ["id", "alloc-func", "heap"] }, "lookup-texture-by-id": { - "args": [ - "id" - ] + "args": ["id"] }, "lookup-texture-by-id-fast": { - "args": [ - "id" - ] + "args": ["id"] }, "lookup-texture-by-name": { - "args": [ - "tex-name", - "page-name", - "page-out" - ] + "args": ["tex-name", "page-name", "page-out"] }, "lookup-texture-id-by-name": { - "args": [ - "tex-name", - "page-name" - ] + "args": ["tex-name", "page-name"] }, "lookup-level-texture-by-name": { - "args": [ - "tex-name", - "lev", - "page-out" - ] + "args": ["tex-name", "lev", "page-out"] }, "lookup-tex-id-from-texture": { - "args": [ - "tex" - ] + "args": ["tex"] }, "lookup-level-texture-id-by-name": { - "args": [ - "tex-name", - "lev", - "lev-page-idx" - ] + "args": ["tex-name", "lev", "lev-page-idx"] }, "link-texture-by-id": { - "args": [ - "id", - "shader" - ] + "args": ["id", "shader"] }, "adgif-shader-update!": { - "args": [ - "shader", - "tex" - ] + "args": ["shader", "tex"] }, "hack-texture": { - "args": [ - "tex" - ] + "args": ["tex"] }, "adgif-shader-login": { - "args": [ - "shader" - ] + "args": ["shader"] }, "adgif-shader-login-no-remap": { - "args": [ - "shader" - ] + "args": ["shader"] }, "adgif-shader-login-fast": { - "args": [ - "shader" - ] + "args": ["shader"] }, "adgif-shader-login-no-remap-fast": { - "args": [ - "shader" - ] + "args": ["shader"] }, "adgif-shader<-texture-simple!": { - "args": [ - "shader", - "tex" - ] + "args": ["shader", "tex"] }, "set-dirty-mask!": { - "args": [ - "lev", - "mask-idx", - "m0", - "m1" - ] + "args": ["lev", "mask-idx", "m0", "m1"] }, "(method 13 texture-pool)": { - "args": [ - "this", - "lev", - "texture-page-count", - "texture-ids" - ] + "args": ["this", "lev", "texture-page-count", "texture-ids"] }, "(method 14 texture-pool)": { - "args": [ - "pool", - "lev", - "category", - "bucket" - ] + "args": ["pool", "lev", "category", "bucket"] }, "(method 15 texture-pool)": { - "args": [ - "this", - "size" - ] + "args": ["this", "size"] }, "(method 16 texture-pool)": { - "args": [ - "this", - "segment", - "size" - ] + "args": ["this", "segment", "size"] }, "(method 17 texture-pool)": { - "args": [ - "this", - "page" - ] + "args": ["this", "page"] }, "(method 18 texture-pool)": { - "args": [ - "this", - "id" - ] + "args": ["this", "id"] }, "(method 7 texture-page)": { - "args": [ - "this", - "heap", - "filename" - ] + "args": ["this", "heap", "filename"] }, "(method 9 texture-page)": { - "args": [ - "this", - "heap" - ] + "args": ["this", "heap"] }, "(method 11 texture-page)": { - "args": [ - "this", - "new-dest", - "seg-id" - ] + "args": ["this", "new-dest", "seg-id"] }, "(method 12 texture-page)": { - "args": [ - "page", - "buf", - "mode" - ] + "args": ["page", "buf", "mode"] }, "(method 13 texture-page)": { + "args": ["this", "mode"] + }, + "merc-fragment-fp-data": { + "args": ["frag"] + }, + "show-mc-info": { + "args": ["buf"], + "vars": { + "s5-0": "slot", + "s4-0": "slot-idx" + } + }, + "(method 17 res-lump)": { + "args": ["this", "tag", "arg2"] + }, + "(method 20 res-lump)": { + "args": ["this", "arg1", "tag-pair", "arg3"] + }, + "(method 9 res-lump)": { + "args": ["this", "name", "mode", "time"] + }, + "(method 15 res-lump)": { + "vars": { + "s5-0": ["tag-pair", "res-tag-pair"], + "s2-0": "existing-tag", + "s3-0": "data-size", + "v1-25": "resource-mem" + } + }, + "(method 10 smush-control)": { + "vars": { + "f30-0": "elapsed-time", + "f0-2": "period" + } + }, + "(method 12 smush-control)": { "args": [ "this", - "mode" + "amplitude", + "period", + "duration", + "damp-amplitude", + "damp-period", + "clock" ] + }, + "(method 11 smush-control)": { + "vars": { + "f30-0": "elapsed-time", + "f0-2": "period" + } + }, + "(method 10 collide-mesh-cache)": { + "args": ["this", "id"] + }, + "(method 11 touching-prims-entry-pool)": { + "vars": { + "v1-0": "prev", + "a1-0": "current", + "a2-0": "next" + } } } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index e65af006df..dbd9214160 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -973,6 +973,8 @@ const std::unordered_map< {"ocean-near-indices", {{"data", ArrayFieldDecompMeta(TypeSpec("ocean-near-index"), 32)}}}, {"ocean-mid-masks", {{"data", ArrayFieldDecompMeta(TypeSpec("ocean-mid-mask"), 8)}}}, + {"lightning-probe-vars", + {{"probe-dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}}, }}}; goos::Object decompile_structure(const TypeSpec& type, diff --git a/goal_src/jak3/engine/ambient/ambient-h.gc b/goal_src/jak3/engine/ambient/ambient-h.gc index fd1a5c33ef..f982ebb2d0 100644 --- a/goal_src/jak3/engine/ambient/ambient-h.gc +++ b/goal_src/jak3/engine/ambient/ambient-h.gc @@ -5,5 +5,3390 @@ ;; name in dgo: ambient-h ;; dgos: GAME +;; +++talker-flags +(defenum talker-flags + :type uint16 + :bitfield #t + (tf0 0) + (tf1 1) + (tf2 2) + (tf3 3) + (tf4 4) + (tf5 5) + (tf6 6) + (tf7 7) + (tf8 8) + ) +;; ---talker-flags + + ;; DECOMP BEGINS +(deftype talker-speech-class (structure) + "Contains metadata about a voice line or hint text being played/displayed." + ((name string) + (channel gui-channel) + (flags talker-flags) + (speech uint16) + (text-duration uint16) + (delay uint16) + (pos uint16) + (neg uint16) + (text-message text-id) + (on-close pair) + (camera string) + ) + :pack-me + (:methods + (talker-speech-class-method-9 (_type_) symbol) + (play-communicator-speech! (_type_) none) + (talker-speech-class-method-11 (_type_) none) + (talker-speech-class-method-12 (_type_ int) none) + (talker-speech-class-method-13 (_type_ int) none) + ) + ) + + +(deftype talker (process) + ((trans vector :inline) + (message talker-speech-class) + (total-time time-frame) + (total-off-time time-frame) + (start-time time-frame) + (state-time time-frame) + (voicebox handle) + (voice-id sound-id) + (message-id sound-id) + (region region) + (interp float) + (save? symbol) + (grab? symbol) + ) + (:state-methods + idle + active + exit + ) + (:methods + (talker-method-17 (_type_) none) + ) + ) + + +(define *talker-speech* (new 'static 'inline-array talker-speech-class 365 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "DSbop002" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop004" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop008" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x3 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop010" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x4 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop011" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop016" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x6 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop017" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds020" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x8 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds043" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x9 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds043m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #xa + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds046" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #xb + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds046m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #xc + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax101" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax102" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax103" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #xf + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax104" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x10 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax105" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x11 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax106" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x12 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax107" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax108" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x14 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax109" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x15 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0450) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax110" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax111" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x17 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0451) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax112" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x18 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "mess005" + :channel (gui-channel message) + :speech #x19 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0452) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv063" + :channel (gui-channel voicebox) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv068" + :channel (gui-channel voicebox) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv069" + :channel (gui-channel voicebox) + :speech #x1c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0147) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv070" + :channel (gui-channel voicebox) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv077" + :channel (gui-channel voicebox) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo001" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x1f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-013e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo002" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x20 + :text-duration (seconds 5) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo003" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x21 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo004" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x22 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo005" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x23 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds162" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0002" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0005" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0004" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009b" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0006" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009c" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0035" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009d" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009e" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0072" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds164" + :channel (gui-channel daxter) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds129" + :channel (gui-channel daxter) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "racehint" + :channel (gui-channel message) + :speech #x32 + :text-duration (seconds 4) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv179" + :channel (gui-channel alert) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv180" + :channel (gui-channel alert) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv181" + :channel (gui-channel alert) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "str001" + :channel (gui-channel message) + :flags (talker-flags tf0 tf4) + :speech #x36 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-013a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "str002" + :channel (gui-channel message) + :speech #x37 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-013a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "note001" + :channel (gui-channel notice) + :speech #x38 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x39 + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0155) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01e" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3a + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0156) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01j" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3b + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0158) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01k" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3c + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0157) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro03" + :channel (gui-channel notice-low) + :speech #x3d + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-020a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x3e + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x3f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam007" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #x40 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "klev001" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x41 + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax118" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x42 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck135" + :channel (gui-channel pecker) + :flags (talker-flags tf0) + :speech #x43 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck114" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x44 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck115" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x45 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck129" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x46 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck122" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x47 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0450) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck119" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x48 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck124" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x49 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0451) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck141" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4a + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck141m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4b + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck131" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4c + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck131m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4d + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck126" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4e + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck126m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4f + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax126" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x50 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "gun-fire" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x51 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-012c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "klev002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x52 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x53 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "pregame1" + :channel (gui-channel message) + :speech #x54 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0465) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "leaper01" + :channel (gui-channel message) + :speech #x55 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0466) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "leaper02" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x56 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0467) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic01" + :channel (gui-channel message) + :speech #x57 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0468) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic02" + :channel (gui-channel message) + :speech #x58 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0469) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic03" + :channel (gui-channel message) + :speech #x59 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-046a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic04" + :channel (gui-channel message) + :speech #x5a + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-058d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic05" + :channel (gui-channel message) + :speech #x5b + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0571) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic06" + :channel (gui-channel message) + :speech #x5c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0888) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x5d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x5e + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax133" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-046b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "mine001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x60 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-053d) + :on-close #f + :camera "camera-348" + ) + (new 'static 'talker-speech-class + :name "klev004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x61 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "gun001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x62 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-053e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam003" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x63 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax234" + :channel (gui-channel daxter) + :speech #x64 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "fac001" + :channel (gui-channel message) + :speech #x65 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0547) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam003" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x66 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x67 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam002" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x68 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "for001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x69 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-06df) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x6a + :delay (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam006" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x6b + :delay (seconds 5) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup001" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6c + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup002" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6d + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup003" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6e + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup004" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6f + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0579) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup005" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x70 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup006" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x71 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0576) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup007" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x72 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup008" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x73 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0577) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup009" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x74 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup010" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x75 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup011" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x76 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0578) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup012" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x77 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup013" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x78 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057f) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup014" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x79 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0580) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup015" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7a + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0581) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup016" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7b + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0582) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup017" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7c + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f2) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup018" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7d + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f3) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup019" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7e + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0614) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup020" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7f + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f5) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup021" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x80 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0615) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup022" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x81 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0616) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup023" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf3 tf6) + :speech #x82 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0617) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup024" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x83 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0618) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup025" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x84 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0619) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup026" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x85 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-061a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup099" + :channel (gui-channel alert) + :speech #x86 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-061b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup028" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x87 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-07ba) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup029" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x88 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0857) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup030" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x89 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0858) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup031" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf1 tf6) + :speech #x8a + :text-duration (seconds 10) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0892) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "hang001" + :channel (gui-channel message) + :speech #x8b + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-056e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf2) + :speech #x8c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "jak112" + :channel (gui-channel jak) + :flags (talker-flags tf0) + :speech #x8d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn008" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x8e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn136" + :channel (gui-channel voicebox) + :speech #x8f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn137" + :channel (gui-channel voicebox) + :speech #x90 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn138" + :channel (gui-channel voicebox) + :speech #x91 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn139" + :channel (gui-channel voicebox) + :speech #x92 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn140" + :channel (gui-channel voicebox) + :speech #x93 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn141" + :channel (gui-channel voicebox) + :speech #x94 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn142" + :channel (gui-channel voicebox) + :speech #x95 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn143" + :channel (gui-channel voicebox) + :speech #x96 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn144" + :channel (gui-channel voicebox) + :speech #x97 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn145" + :channel (gui-channel voicebox) + :speech #x98 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn146" + :channel (gui-channel voicebox) + :speech #x99 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn147" + :channel (gui-channel voicebox) + :speech #x9a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn148" + :channel (gui-channel voicebox) + :speech #x9b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax779" + :channel (gui-channel voicebox) + :speech #x9c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax780" + :channel (gui-channel voicebox) + :speech #x9d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes01" + :channel (gui-channel message) + :speech #x9e + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes02" + :channel (gui-channel message) + :speech #x9f + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes03" + :channel (gui-channel message) + :speech #xa0 + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tplmes01" + :channel (gui-channel message) + :speech #xa1 + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xa2 + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam005" + :channel (gui-channel voicebox) + :speech #xa3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "forest-turn-on-mach-res" + :channel (gui-channel voicebox) + :speech #xa4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xa5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds704" + :channel (gui-channel daxter) + :speech #xa6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds705" + :channel (gui-channel daxter) + :speech #xa7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds256" + :channel (gui-channel daxter) + :speech #xa8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds257" + :channel (gui-channel daxter) + :speech #xa9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax123" + :channel (gui-channel daxter) + :speech #xaa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax586" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xab + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax585" + :channel (gui-channel daxter) + :speech #xac + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem003" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #xad + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax724" + :channel (gui-channel daxter) + :speech #xae + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax725" + :channel (gui-channel daxter) + :speech #xaf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax726" + :channel (gui-channel daxter) + :speech #xb0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax727" + :channel (gui-channel daxter) + :speech #xb1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax728" + :channel (gui-channel daxter) + :speech #xb2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax729" + :channel (gui-channel daxter) + :speech #xb3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax730" + :channel (gui-channel daxter) + :speech #xb4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax731" + :channel (gui-channel daxter) + :speech #xb5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #xb6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkjak1" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #xb7 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0600) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb10win" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #xb8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb21fail" + :channel (gui-channel voicebox) + :speech #xb9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb01w" + :channel (gui-channel alert) + :speech #xba + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb01f" + :channel (gui-channel alert) + :speech #xbb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb02w" + :channel (gui-channel alert) + :speech #xbc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb02f" + :channel (gui-channel alert) + :speech #xbd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb03w" + :channel (gui-channel alert) + :speech #xbe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb03f" + :channel (gui-channel alert) + :speech #xbf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb04w" + :channel (gui-channel alert) + :speech #xc0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb04f" + :channel (gui-channel alert) + :speech #xc1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb05w" + :channel (gui-channel alert) + :speech #xc2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb05f" + :channel (gui-channel alert) + :speech #xc3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb06w" + :channel (gui-channel alert) + :speech #xc4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb06f" + :channel (gui-channel alert) + :speech #xc5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb07w" + :channel (gui-channel alert) + :speech #xc6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb07f" + :channel (gui-channel alert) + :speech #xc7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb08w" + :channel (gui-channel alert) + :speech #xc8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb08f" + :channel (gui-channel alert) + :speech #xc9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb09w" + :channel (gui-channel alert) + :speech #xca + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb09f" + :channel (gui-channel alert) + :speech #xcb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb10w" + :channel (gui-channel alert) + :speech #xcc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb10f" + :channel (gui-channel alert) + :speech #xcd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb11w" + :channel (gui-channel alert) + :speech #xce + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb11f" + :channel (gui-channel alert) + :speech #xcf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb12w" + :channel (gui-channel alert) + :speech #xd0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb12f" + :channel (gui-channel alert) + :speech #xd1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb13w" + :channel (gui-channel alert) + :speech #xd2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb13f" + :channel (gui-channel alert) + :speech #xd3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb14w" + :channel (gui-channel alert) + :speech #xd4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb14f" + :channel (gui-channel alert) + :speech #xd5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb15w" + :channel (gui-channel alert) + :speech #xd6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb15f" + :channel (gui-channel alert) + :speech #xd7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb16w" + :channel (gui-channel alert) + :speech #xd8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb16f" + :channel (gui-channel alert) + :speech #xd9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb17w" + :channel (gui-channel alert) + :speech #xda + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb17f" + :channel (gui-channel alert) + :speech #xdb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb18w" + :channel (gui-channel alert) + :speech #xdc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb18f" + :channel (gui-channel alert) + :speech #xdd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb19w" + :channel (gui-channel alert) + :speech #xde + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb19f" + :channel (gui-channel alert) + :speech #xdf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb20w" + :channel (gui-channel alert) + :speech #xe0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb20f" + :channel (gui-channel alert) + :speech #xe1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb21w" + :channel (gui-channel alert) + :speech #xe2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb21f" + :channel (gui-channel alert) + :speech #xe3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb22w" + :channel (gui-channel alert) + :speech #xe4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb22f" + :channel (gui-channel alert) + :speech #xe5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb23w" + :channel (gui-channel alert) + :speech #xe6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb23f" + :channel (gui-channel alert) + :speech #xe7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "light001" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf6) + :speech #xe8 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f6) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "light002" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf6) + :speech #xe9 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f7) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir003" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #xea + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xeb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb01w" + :channel (gui-channel alert) + :speech #xec + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb01f" + :channel (gui-channel alert) + :speech #xed + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb02w" + :channel (gui-channel alert) + :speech #xee + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb02f" + :channel (gui-channel alert) + :speech #xef + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb03w" + :channel (gui-channel alert) + :speech #xf0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb03f" + :channel (gui-channel alert) + :speech #xf1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb04w" + :channel (gui-channel alert) + :speech #xf2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb04f" + :channel (gui-channel alert) + :speech #xf3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb05w" + :channel (gui-channel alert) + :speech #xf4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb05f" + :channel (gui-channel alert) + :speech #xf5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb06w" + :channel (gui-channel alert) + :speech #xf6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb06f" + :channel (gui-channel alert) + :speech #xf7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb07w" + :channel (gui-channel alert) + :speech #xf8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb07f" + :channel (gui-channel alert) + :speech #xf9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb08w" + :channel (gui-channel alert) + :speech #xfa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb08f" + :channel (gui-channel alert) + :speech #xfb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb09w" + :channel (gui-channel alert) + :speech #xfc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb09f" + :channel (gui-channel alert) + :speech #xfd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb10w" + :channel (gui-channel alert) + :speech #xfe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb10f" + :channel (gui-channel alert) + :speech #xff + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb11w" + :channel (gui-channel alert) + :speech #x100 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb11f" + :channel (gui-channel alert) + :speech #x101 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb12w" + :channel (gui-channel alert) + :speech #x102 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb12f" + :channel (gui-channel alert) + :speech #x103 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb13w" + :channel (gui-channel alert) + :speech #x104 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb13f" + :channel (gui-channel alert) + :speech #x105 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb14w" + :channel (gui-channel alert) + :speech #x106 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb14f" + :channel (gui-channel alert) + :speech #x107 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb15w" + :channel (gui-channel alert) + :speech #x108 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb15f" + :channel (gui-channel alert) + :speech #x109 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb16w" + :channel (gui-channel alert) + :speech #x10a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb16f" + :channel (gui-channel alert) + :speech #x10b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb17w" + :channel (gui-channel alert) + :speech #x10c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb17f" + :channel (gui-channel alert) + :speech #x10d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb18w" + :channel (gui-channel alert) + :speech #x10e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb18f" + :channel (gui-channel alert) + :speech #x10f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb19w" + :channel (gui-channel alert) + :speech #x110 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb19f" + :channel (gui-channel alert) + :speech #x111 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb20w" + :channel (gui-channel alert) + :speech #x112 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb20f" + :channel (gui-channel alert) + :speech #x113 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb21w" + :channel (gui-channel alert) + :speech #x114 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb21f" + :channel (gui-channel alert) + :speech #x115 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb22w" + :channel (gui-channel alert) + :speech #x116 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb22f" + :channel (gui-channel alert) + :speech #x117 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb23w" + :channel (gui-channel alert) + :speech #x118 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb23f" + :channel (gui-channel alert) + :speech #x119 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb24w" + :channel (gui-channel alert) + :speech #x11a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb24f" + :channel (gui-channel alert) + :speech #x11b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb25w" + :channel (gui-channel alert) + :speech #x11c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb25f" + :channel (gui-channel alert) + :speech #x11d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb26w" + :channel (gui-channel alert) + :speech #x11e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb26f" + :channel (gui-channel alert) + :speech #x11f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb17win" + :channel (gui-channel alert) + :speech #x120 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb18fail" + :channel (gui-channel alert) + :speech #x121 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb13win" + :channel (gui-channel alert) + :speech #x122 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb03fail" + :channel (gui-channel alert) + :speech #x123 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb01w" + :channel (gui-channel alert) + :speech #x124 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb01f" + :channel (gui-channel alert) + :speech #x125 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb02w" + :channel (gui-channel alert) + :speech #x126 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb02f" + :channel (gui-channel alert) + :speech #x127 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb03w" + :channel (gui-channel alert) + :speech #x128 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb03f" + :channel (gui-channel alert) + :speech #x129 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb04w" + :channel (gui-channel alert) + :speech #x12a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb04f" + :channel (gui-channel alert) + :speech #x12b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb05w" + :channel (gui-channel alert) + :speech #x12c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb05f" + :channel (gui-channel alert) + :speech #x12d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb06w" + :channel (gui-channel alert) + :speech #x12e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb06f" + :channel (gui-channel alert) + :speech #x12f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb07w" + :channel (gui-channel alert) + :speech #x130 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb07f" + :channel (gui-channel alert) + :speech #x131 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb08w" + :channel (gui-channel alert) + :speech #x132 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb08f" + :channel (gui-channel alert) + :speech #x133 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb09w" + :channel (gui-channel alert) + :speech #x134 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb09f" + :channel (gui-channel alert) + :speech #x135 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb10w" + :channel (gui-channel alert) + :speech #x136 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb10f" + :channel (gui-channel alert) + :speech #x137 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb11w" + :channel (gui-channel alert) + :speech #x138 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb11f" + :channel (gui-channel alert) + :speech #x139 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb12w" + :channel (gui-channel alert) + :speech #x13a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb12f" + :channel (gui-channel alert) + :speech #x13b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb13w" + :channel (gui-channel alert) + :speech #x13c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb13f" + :channel (gui-channel alert) + :speech #x13d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn123" + :channel (gui-channel rider) + :speech #x13e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn124" + :channel (gui-channel voicebox) + :speech #x13f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn131" + :channel (gui-channel rider) + :speech #x140 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn128" + :channel (gui-channel voicebox) + :speech #x141 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn199" + :channel (gui-channel rider) + :speech #x142 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn200" + :channel (gui-channel rider) + :speech #x143 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "guards125a" + :channel (gui-channel rider) + :speech #x144 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor062" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x145 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax137" + :channel (gui-channel daxter) + :speech #x146 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax141" + :channel (gui-channel daxter) + :speech #x147 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax142" + :channel (gui-channel daxter) + :speech #x148 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax143" + :channel (gui-channel daxter) + :speech #x149 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax675" + :channel (gui-channel daxter) + :speech #x14a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax676" + :channel (gui-channel daxter) + :speech #x14b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax678" + :channel (gui-channel daxter) + :speech #x14c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax680" + :channel (gui-channel daxter) + :speech #x14d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor033" + :channel (gui-channel voicebox) + :speech #x14e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash119" + :channel (gui-channel voicebox) + :speech #x14f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash132" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x150 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash119a" + :channel (gui-channel voicebox) + :speech #x151 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash101" + :channel (gui-channel ashelin) + :speech #x152 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash109" + :channel (gui-channel ashelin) + :speech #x153 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam102" + :channel (gui-channel rider) + :speech #x154 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam116" + :channel (gui-channel rider) + :speech #x155 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam117" + :channel (gui-channel rider) + :speech #x156 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam105" + :channel (gui-channel rider) + :speech #x157 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam109" + :channel (gui-channel rider) + :speech #x158 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam115" + :channel (gui-channel rider) + :speech #x159 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam121" + :channel (gui-channel rider) + :speech #x15a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam129" + :channel (gui-channel rider) + :speech #x15b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-pickup" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-077b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-place" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15d + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0807) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-shield" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15e + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0864) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "formess1" + :channel (gui-channel message) + :speech #x15f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-05ff) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkp001" + :channel (gui-channel message) + :speech #x160 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-05e7) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkp002" + :channel (gui-channel message) + :speech #x161 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07b4) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "redhint1" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x162 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07c3) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "redhint2" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x163 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07c4) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax619" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x164 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax613" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x165 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax615" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x166 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax624" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x167 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax623" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x168 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax622" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x169 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "hellcat-fire" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x16a + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0862) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem005" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #x16b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "yellow3hint" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x16c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0886) + :on-close #f + :camera #f + ) + ) + ) diff --git a/goal_src/jak3/engine/camera/pov-camera-h.gc b/goal_src/jak3/engine/camera/pov-camera-h.gc index 042c8b6435..611ac0c3f7 100644 --- a/goal_src/jak3/engine/camera/pov-camera-h.gc +++ b/goal_src/jak3/engine/camera/pov-camera-h.gc @@ -5,5 +5,16 @@ ;; name in dgo: pov-camera-h ;; dgos: GAME +;; +++pov-camera-flags +(defenum pov-camera-flags + :bitfield #t + :type int32 + (notify-of-abort 0) + (allow-abort 1) + (inherit-orientation 2) + ) +;; ---pov-camera-flags + + ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/collide/collide-edge-grab-h.gc b/goal_src/jak3/engine/collide/collide-edge-grab-h.gc index 93622499d2..e0da626b9b 100644 --- a/goal_src/jak3/engine/collide/collide-edge-grab-h.gc +++ b/goal_src/jak3/engine/collide/collide-edge-grab-h.gc @@ -5,5 +5,201 @@ ;; name in dgo: collide-edge-grab-h ;; dgos: GAME +;; +++collide-edge-spec-flags +(defenum collide-edge-spec-flags + :bitfield #t + :type uint64 + (find-adjacent-edge 0) + (one 1) + (two 2) + (send-event 3) + ) +;; ---collide-edge-spec-flags + + +(declare-type collide-cache-tri structure) ;; DECOMP BEGINS +(deftype pilot-edge-grab-info (structure) + "Info for edge grabs on zoomers." + ((local-pos vector :inline) + (local-dir vector :inline) + (handle handle) + ) + ) + + +(deftype edge-grab-info (structure) + ((world-vertex vector 8 :inline) + (local-vertex vector 8 :inline) + (status uint64) + (actor-cshape-prim-offset int32) + (actor-handle handle) + (hanging-matrix matrix :inline) + (edge-vertex vector 2 :inline :overlay-at (-> world-vertex 0)) + (center-hold vector :inline :overlay-at (-> world-vertex 2)) + (tri-vertex vector 3 :inline :overlay-at (-> world-vertex 3)) + (adjacent-edge-left-vertex vector :inline :overlay-at (-> world-vertex 6)) + (adjacent-edge-right-vertex vector :inline :overlay-at (-> world-vertex 7)) + (left-hand-hold vector :inline) + (right-hand-hold vector :inline) + (center-hold-old vector :inline) + (edge-tri-pat pat-surface) + (found-edge? symbol) + (pilot-edge-grab? symbol) + (pilot-edge-grab pilot-edge-grab-info :inline) + (pilot-start-grab-pos vector :inline) + (pilot-grab-interp float) + ) + (:methods + (edge-grab-info-method-9 () none) + (edge-grab-info-method-10 () none) + ) + ) + + +(deftype collide-edge-tri (structure) + "A triangle involved in edge grab collision." + ((ctri collide-cache-tri) + (normal vector :inline) + ) + ) + + +(deftype collide-edge-edge (structure) + ((ignore symbol) + (etri collide-edge-tri) + (vertex-ptr (inline-array vector) 2) + (outward vector :inline) + (edge-vec-norm vector :inline) + ) + (:methods + (collide-edge-edge-method-9 () none) + ) + ) + + +(deftype collide-edge-hold-item (structure) + ((next collide-edge-hold-item) + (rating float) + (split int8) + (edge collide-edge-edge) + (center-pt vector :inline) + (outward-pt vector :inline) + ) + ) + + +(deftype collide-edge-hold-list (structure) + ((num-allocs uint32) + (num-attempts uint32) + (head collide-edge-hold-item) + (items collide-edge-hold-item 32 :inline) + (attempts qword 32 :inline) + ) + (:methods + (collide-edge-hold-list-method-9 () none) + (collide-edge-hold-list-method-10 () none) + ) + ) + + +(deftype collide-edge-spec (structure) + ((split-dists float 2) + (outward-offset vector :inline) + (flags collide-edge-spec-flags) + (ignore-pat pat-surface) + (max-dist-sqrd-to-outward-pt float) + (max-dir-cosa-delta float) + (max-dir-cosa-player float) + (touching-segment symbol) + (local-cache-fill-box bounding-box :inline) + (local-within-reach-box bounding-box :inline) + (local-player-spheres sphere 12 :inline :offset 128) + (local-player-hanging-spheres sphere 6 :inline :overlay-at (-> local-player-spheres 0)) + (local-player-leap-up-spheres sphere 6 :inline :overlay-at (-> local-player-spheres 6)) + ) + ) + + +(deftype collide-edge-work (structure) + ((ccache collide-cache) + (cshape collide-shape) + (num-verts uint32) + (num-edges uint32) + (num-tris uint32) + (cache-fill-box bounding-box :inline) + (within-reach-box bounding-box :inline) + (within-reach-box4w bounding-box4w :inline) + (search-pt vector :inline) + (search-dir-vec vector :inline) + (world-player-spheres sphere 12 :inline) + (world-player-hanging-spheres sphere 6 :inline :overlay-at (-> world-player-spheres 0)) + (world-player-leap-up-spheres sphere 6 :inline :overlay-at (-> world-player-spheres 6)) + (spec collide-edge-spec :inline) + (process (pointer process-drawable)) + (verts vector 64 :inline) + (edges collide-edge-edge 96 :inline) + (tris collide-edge-tri 48 :inline) + (hold-list collide-edge-hold-list :inline) + ) + (:methods + (collide-edge-work-method-9 () none) + (collide-edge-work-method-10 () none) + (collide-edge-work-method-11 () none) + (collide-edge-work-method-12 () none) + (collide-edge-work-method-13 () none) + (collide-edge-work-method-14 () none) + (collide-edge-work-method-15 () none) + (collide-edge-work-method-16 () none) + (collide-edge-work-method-17 () none) + (collide-edge-work-method-18 () none) + (collide-edge-work-method-19 () none) + (collide-edge-work-method-20 () none) + ) + ) + + +(define *collide-edge-spec* + (new 'static 'collide-edge-spec + :split-dists (new 'static 'array float 2 1024.0 1433.6) + :outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0) + :flags (collide-edge-spec-flags send-event) + :ignore-pat (new 'static 'pat-surface :noentity #x1 :noedge #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + :max-dist-sqrd-to-outward-pt 37748736.0 + :max-dir-cosa-delta 0.6 + :touching-segment #f + :local-cache-fill-box (new 'static 'bounding-box + :min (new 'static 'vector :x -8192.0 :y -11059.2 :z -8192.0 :w 1.0) + :max (new 'static 'vector :x 8192.0 :y 24576.0 :z 8192.0 :w 1.0) + ) + :local-within-reach-box (new 'static 'bounding-box + :min (new 'static 'vector :x -6144.0 :y 5324.8 :z -6144.0 :w 1.0) + :max (new 'static 'vector :x 6144.0 :y 11059.2 :z 6144.0 :w 1.0) + ) + :local-player-spheres (new 'static 'inline-array sphere 12 + (new 'static 'sphere :x 1720.32 :y -819.2 :r 1433.6) + (new 'static 'sphere :x 2293.76 :y -3276.8 :r 1884.16) + (new 'static 'sphere :x 1966.08 :y -6144.0 :r 1556.48) + (new 'static 'sphere :x 1966.08 :y -8601.6 :r 1556.48) + (new 'static 'sphere :x 1761.28 :y -11059.2 :r 1351.68) + (new 'static 'sphere :x 1679.36 :y -13312.0 :r 1269.76) + (new 'static 'sphere :x -737.28 :y 4096.0 :r 3072.0) + (new 'static 'sphere :x -737.28 :y 6553.6 :r 3072.0) + (new 'static 'sphere :x -737.28 :y 9420.8 :r 3072.0) + (new 'static 'sphere :x 1720.32 :y 3686.4 :r 2949.12) + (new 'static 'sphere :x 1720.32 :y 5734.4 :r 2949.12) + (new 'static 'sphere :x 1720.32 :y 8601.6 :r 2949.12) + ) + ) + ) + +(kmemopen global "collide-edge-work") + +(define *collide-edge-work* (new 'global 'collide-edge-work)) + +(mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer *collide-edge-spec*) 320) + +(define-perm *edge-grab-info* edge-grab-info (new 'global 'edge-grab-info)) + +(kmemclose) diff --git a/goal_src/jak3/engine/collide/collide-func-h.gc b/goal_src/jak3/engine/collide/collide-func-h.gc index 99977ca94e..4211161999 100644 --- a/goal_src/jak3/engine/collide/collide-func-h.gc +++ b/goal_src/jak3/engine/collide/collide-func-h.gc @@ -7,3 +7,4 @@ ;; DECOMP BEGINS +;; No code! diff --git a/goal_src/jak3/engine/collide/collide-mesh-h.gc b/goal_src/jak3/engine/collide/collide-mesh-h.gc index 625579d8d8..22b0654808 100644 --- a/goal_src/jak3/engine/collide/collide-mesh-h.gc +++ b/goal_src/jak3/engine/collide/collide-mesh-h.gc @@ -7,3 +7,121 @@ ;; DECOMP BEGINS +(deftype collide-tri-result (structure) + "A triangle result of a collision." + ((vertex vector 3 :inline) + (intersect vector :inline) + (normal vector :inline) + (pat pat-surface) + (collide-ptr basic) + ) + ) + + +(deftype collide-mesh-tri (structure) + "A triangle for foreground collision meshes." + ((vertex-index uint8 3) + (unused uint8) + (pat pat-surface) + ) + :pack-me + ) + + +(deftype collide-mesh (basic) + "A collision mesh for foreground objects, +bound to the joint specified by `joint-id`." + ((joint-id int32) + (num-tris uint32) + (num-verts uint32) + (vertex-data (inline-array vector)) + (tris collide-mesh-tri 1 :inline :offset 32) + ) + (:methods + (collide-mesh-method-9 () none) + (collide-mesh-method-10 () none) + (collide-mesh-method-11 () none) + (collide-mesh-method-12 () none) + (collide-mesh-method-13 () none) + (collide-mesh-method-14 () none) + (collide-mesh-method-15 () none) + ) + ) + + +(deftype collide-mesh-cache-tri (structure) + "A triangle stored in the foreground mesh collide cache." + ((vertex vector 3 :inline) + (normal vector :inline) + (bbox4w bounding-box4w :inline) + (pat pat-surface :overlay-at (-> normal data 3)) + ) + ) + + +(deftype collide-mesh-cache-entry (structure) + "A foreground mesh collide cache entry." + ((mat matrix :inline) + (tris collide-mesh-cache-tri :dynamic) + ) + ) + + +(deftype collide-mesh-cache (basic) + "A collide cache for foreground meshes." + ((used-size uint32) + (max-size uint32) + (id uint32) + (data uint8 48000) + ) + (:methods + (collide-mesh-cache-method-9 () none) + (is-id? (_type_ int) symbol) + (next-id! (_type_) uint) + (collide-mesh-cache-method-12 () none) + ) + ) + + +(defmethod next-id! ((this collide-mesh-cache)) + "Reset all used entries in the cache and increment the ID. + If the id is zero, set it to 1." + ;; og:preserve-this + ;; (local-vars (v0-0 int) (v1-0 uint) (v1-1 int)) + ;; (set! v1-0 (-> this id)) + ;; (set! (-> this used-size) (the-as uint 0)) + ;; (set! v1-1 (the-as int (+ v1-0 1))) + ;; (bl! (zero? (the-as uint v1-1)) L3 (no-delay!)) + ;; (set! v1-1 1) + ;; (label cfg-2) + ;; (set! (-> this id) (the-as uint v1-1)) + ;; (set! v0-0 0) + ;; (ret-value v0-0) + (let ((id (-> this id))) + (set! (-> this used-size) 0) + (let ((ret (1+ id))) + (if (zero? id) + (set! id (the uint 1)) + ) + (set! (-> this id) ret) + ret + ) + ) + ) + +(defmethod is-id? ((this collide-mesh-cache) (id int)) + "Does this cache have the given ID?" + (= (-> this id) id) + ) + +(kmemopen global "collide-mesh-cache") + +(define-perm *collide-mesh-cache* collide-mesh-cache (new 'global 'collide-mesh-cache)) + +(set! (-> *collide-mesh-cache* id) (the-as uint 1)) + +(set! (-> *collide-mesh-cache* used-size) (the-as uint 0)) + +(set! (-> *collide-mesh-cache* max-size) (the-as uint #xbb80)) + +(kmemclose) diff --git a/goal_src/jak3/engine/collide/collide-shape-h.gc b/goal_src/jak3/engine/collide/collide-shape-h.gc index 8f44d7bc82..6b929e0b19 100644 --- a/goal_src/jak3/engine/collide/collide-shape-h.gc +++ b/goal_src/jak3/engine/collide/collide-shape-h.gc @@ -5,5 +5,435 @@ ;; name in dgo: collide-shape-h ;; dgos: GAME +;; +++collide-action +(defenum collide-action + :bitfield #t + :type uint32 + (solid 0) ;; 1 + (semi-solid 1) ;; 2 + (rideable 2) ;; 4 + (can-ride 3) ;; 8 + (dont-push-away 4) ;; 16 + (pull-rider-can-collide 5) ;; 32 + (deadly 6) ;; 64 + (persistent-attack 7) ;; 128 + (no-smack 8) ;; 256 + (no-standon 9) ;; 512 + (block-turn-around 10) ;; 1024 + (check-edge 11) ;; 2048 + (check-stuck 12) ;; 4096 + (stuck-wall-escape 13) ;; 8192 + (no-normal-reset 14) ;; 163884 + (edge-grabbed 15) ;; 32768 + (nav-sphere 16) ;; hi 1 + ) +;; ---collide-action + + +;; +++overlaps-others-options +(defenum overlaps-others-options + :type uint32 + :bitfield #t + (oo0) + (oo1) + (oo2) + (oo3) + (oo4) + ) +;; ---overlaps-others-options + + +;; +++collide-list-enum +(defenum collide-list-enum + (hit-by-player) + (usually-hit-by-player) + (hit-by-others) + (player) + ) +;; ---collide-list-enum + + +;; +++collide-status +(defenum collide-status + :bitfield #t + :type uint64 + (on-surface 0) + (on-ground 1) + (touch-surface 2) + (touch-wall 3) + (touch-ceiling 4) + (touch-actor 5) + (on-special-surface 6) + (touch-edge 7) + (no-touch 8) + (blocked 9) + (on-water 10) + (impact-surface 11) + (touch-background 12) + (stuck 13) + (touch-ceiling-sticky 14) + (glance 15) + (probe-hit 16) + ) +;; ---collide-status + + +(declare-type collide-shape trsqv) +(declare-type collide-shape-moving collide-shape) +(declare-type control-info collide-shape-moving) +(declare-type touching-list structure) +(declare-type collide-query structure) +(declare-type water-info structure) +(declare-type collide-shape-prim-group basic) +(declare-type collide-cache-prim structure) +(declare-type collide-shape-prim basic) +(declare-type collide-cache basic) +(declare-type rigid-body structure) + ;; DECOMP BEGINS +(deftype collide-rider (structure) + "Something that rides a moving object." + ((rider-handle handle) + (sticky-prim collide-shape-prim) + (prim-ry float) + (rider-local-pos vector :inline) + ) + ) + + +(deftype collide-rider-pool (basic) + "A pool containing all the riders of an object." + ((alloc-count int32) + (riders collide-rider 20 :inline) + ) + (:methods + (collide-rider-pool-method-9 () none) + (prepare (_type_) none) + ) + ) + + +(defmethod prepare ((this collide-rider-pool)) + "Gets this pool ready to be used to allow allocations. This should be called once at the start of every frame." + (set! (-> this alloc-count) 0) + 0 + (none) + ) + +(deftype pull-rider-info (structure) + ((rider collide-rider) + (rider-cshape collide-shape-moving) + (rider-delta-ry float) + (rider-dest vector :inline) + ) + ) + + +(kmemopen global "collide-lists") + +(define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 640 connection)) + +(define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 768 connection)) + +(define *collide-player-list* (new 'global 'engine 'collide-player-list 32 connection)) + +(kmemclose) + +(deftype overlaps-others-params (structure) + ((options overlaps-others-options) + (collide-with-filter collide-spec) + (tlist touching-list) + (filtered-root-collide-with collide-spec) + (filtered-child-collide-with collide-spec) + (filtered-other-collide-as collide-spec) + ) + ) + + +(deftype move-above-ground-params (structure) + ((gnd-collide-with collide-spec) + (popup float) + (dont-move-if-overlaps? symbol) + (hover-if-no-ground? symbol) + (overlaps-params overlaps-others-params :inline) + (new-pos vector :inline) + (old-gspot-pos vector :inline) + (old-gspot-normal vector :inline) + (pat pat-surface) + (on-ground? symbol) + (do-move? symbol) + ) + ) + + +(deftype collide-prim-core (structure) + "Collide primitives use this to store their world sphere and their collision flags." + ((world-sphere vector :inline) + (collide-as collide-spec) + (collide-with collide-spec) + (action collide-action) + (prim-type int8) + (unused1 uint8 3) + (quad uint128 2 :overlay-at (-> world-sphere data 0)) + ) + ) + + +(deftype collide-shape-prim (basic) + "Base class for collide primitives." + ((cshape collide-shape) + (prim-id uint32) + (transform-index int8) + (unused2 int8 3) + (prim-core collide-prim-core :inline :offset 16) + (local-sphere vector :inline :offset 48) + (specific uint8 16 :offset 64) + (world-sphere vector :inline :overlay-at (-> prim-core quad 0)) + (collide-as collide-spec :overlay-at (-> prim-core quad 1)) + (collide-with collide-spec :offset 36) + (action collide-action :offset 40) + (prim-type int8 :offset 44) + (radius meters :overlay-at (-> local-sphere w)) + ) + (:methods + (new (symbol type collide-shape uint int) _type_) + (collide-shape-prim-method-9 () none) + (collide-shape-prim-method-10 () none) + (collide-shape-prim-method-11 () none) + (collide-shape-prim-method-12 () none) + (collide-shape-prim-method-13 () none) + (collide-shape-prim-method-14 () none) + (collide-shape-prim-method-15 () none) + (collide-shape-prim-method-16 () none) + (collide-shape-prim-method-17 () none) + (collide-shape-prim-method-18 () none) + (collide-shape-prim-method-19 () none) + ) + ) + + +(deftype collide-shape-prim-sphere (collide-shape-prim) + "A sphere primitive for collide shapes." + ((pat pat-surface :overlay-at (-> specific 0)) + (nav-radius float :overlay-at (-> specific 4)) + ) + (:methods + (new (symbol type collide-shape uint) _type_) + ) + ) + + +(deftype collide-shape-prim-mesh (collide-shape-prim) + "A mesh primitive for collide shapes." + ((mesh collide-mesh :overlay-at (-> specific 0)) + (mesh-id int32 :overlay-at (-> specific 4)) + (mesh-cache-id uint32 :overlay-at (-> specific 8)) + (mesh-cache-entry collide-mesh-cache-entry :overlay-at (-> specific 12)) + ) + (:methods + (new (symbol type collide-shape uint uint) _type_) + ) + ) + + +(deftype collide-shape-prim-group (collide-shape-prim) + "A group of collide primitives." + ((num-children uint8 :overlay-at (-> specific 0)) + (num-alloc-children uint8 :overlay-at (-> specific 1)) + (child (inline-array collide-shape-prim) :overlay-at (-> specific 4)) + ) + (:methods + (new (symbol type collide-shape uint int) _type_) + ) + ) + + +(deftype collide-shape (trsqv) + "The parent of all of an object's collide primitives. +Most [[process-drawable]]s have a [[collide-shape]] that represents their root transform." + ((actor-hash-index int16 :offset 12) + (process process-drawable) + (max-iteration-count uint8) + (nav-flags uint8) + (total-prims uint8) + (num-riders uint8) + (event-self symbol :offset 152) + (event-other symbol) + (root-prim collide-shape-prim) + (riders (inline-array collide-rider)) + (penetrate-using penetrate) + (penetrated-by penetrate) + (event-priority uint8 :offset 192) + (rider-max-momentum float) + ) + (:methods + (new (symbol type process-drawable collide-list-enum) _type_) + (collide-shape-method-28 () none) + (collide-shape-method-29 () none) + (collide-shape-method-30 () none) + (collide-shape-method-31 () none) + (collide-shape-method-32 () none) + (collide-shape-method-33 () none) + (collide-shape-method-34 () none) + (collide-shape-method-35 () none) + (collide-shape-method-36 () none) + (collide-shape-method-37 () none) + (collide-shape-method-38 () none) + (collide-shape-method-39 () none) + (collide-shape-method-40 () none) + (collide-shape-method-41 () none) + (collide-shape-method-42 () none) + (collide-shape-method-43 () none) + (collide-shape-method-44 () none) + (collide-shape-method-45 () none) + (collide-shape-method-46 () none) + (collide-shape-method-47 () none) + (collide-shape-method-48 () none) + (collide-shape-method-49 () none) + (collide-shape-method-50 () none) + (collide-shape-method-51 () none) + (collide-shape-method-52 () none) + (collide-shape-method-53 () none) + (collide-shape-method-54 () none) + ) + ) + + +(deftype collide-shape-moving (collide-shape) + "A [[collide-shape]] for moving objects." + ((rider-time time-frame) + (rider-last-move vector :inline) + (trans-old vector :inline) + (poly-pat pat-surface :offset 272) + (cur-pat pat-surface) + (ground-pat pat-surface) + (status collide-status) + (reaction (function control-info collide-query vector vector collide-status) :offset 316) + (no-reaction (function collide-shape-moving collide-query vector vector object)) + (local-normal vector :inline) + (surface-normal vector :inline) + (poly-normal vector :inline) + (ground-poly-normal vector :inline) + (gspot-pos vector :inline) + (gspot-normal vector :inline) + (ground-touch-point vector :inline) + (ground-impact-vel meters) + (surface-angle float) + (poly-angle float) + (touch-angle float) + (coverage float) + (dynam dynamics) + (surf surface) + ) + (:methods + (new (symbol type process-drawable collide-list-enum) _type_) + (collide-shape-moving-method-55 () none) + (collide-shape-moving-method-56 () none) + (collide-shape-moving-method-57 () none) + (collide-shape-moving-method-58 () none) + (collide-shape-moving-method-59 () none) + (collide-shape-moving-method-60 () none) + (collide-shape-moving-method-61 () none) + (collide-shape-moving-method-62 () none) + (collide-shape-moving-method-63 () none) + (collide-shape-moving-method-64 () none) + (collide-shape-moving-method-65 () none) + (collide-shape-moving-method-66 () none) + (collide-shape-moving-method-67 () none) + ) + ) + + +(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int)) + (let ((v0-0 (object-new allocation type-to-make arg2))) + (set! (-> v0-0 cshape) arg0) + (set! (-> v0-0 prim-id) arg1) + (set! (-> v0-0 prim-core action) (collide-action)) + (set! (-> v0-0 prim-core collide-as) (collide-spec)) + (set! (-> v0-0 prim-core collide-with) (collide-spec)) + (set! (-> v0-0 transform-index) -2) + (set! (-> v0-0 prim-core prim-type) -2) + v0-0 + ) + ) + +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere. +(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg1 80))) + (set! (-> (the-as collide-shape-prim-sphere v0-0) pat) + (new 'static 'pat-surface :mode (pat-mode obstacle) :material (pat-material stone)) + ) + (set! (-> (the-as collide-shape-prim-sphere v0-0) prim-core prim-type) -1) + (the-as collide-shape-prim-sphere v0-0) + ) + ) + +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh. +(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 uint)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg2 80))) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh) #f) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-id) (the-as int arg1)) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-cache-id) (the-as uint 0)) + (set! (-> (the-as collide-shape-prim-mesh v0-0) prim-core prim-type) 1) + (the-as collide-shape-prim-mesh v0-0) + ) + ) + +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-group. +(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 (the-as uint arg2) 80))) + (set! (-> (the-as collide-shape-prim-group v0-0) num-children) arg1) + (set! (-> (the-as collide-shape-prim-group v0-0) num-alloc-children) arg1) + (set! (-> (the-as collide-shape-prim-group v0-0) prim-core prim-type) 0) + (set! (-> (the-as collide-shape-prim-group v0-0) child) + (the-as (inline-array collide-shape-prim) (&+ (the-as collide-shape-prim-group v0-0) 80)) + ) + (the-as collide-shape-prim-group v0-0) + ) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this collide-shape-prim-group)) + (the-as int (-> this num-children)) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; WARN: Return type mismatch collide-shape vs collide-shape-moving. +(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum)) + (let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1))) + (set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0) + (set! (-> (the-as collide-shape-moving v0-0) gspot-normal quad) (-> *y-vector* quad)) + (set! (-> (the-as collide-shape-moving v0-0) surf) *standard-ground-surface*) + (the-as collide-shape-moving v0-0) + ) + ) + +(define *collide-shape-prim-backgnd* (new 'static 'collide-shape-prim-mesh + :cshape #f + :prim-core (new 'static 'collide-prim-core + :world-sphere (new 'static 'vector :w 204800000.0) + :collide-as (collide-spec backgnd) + :action (collide-action solid) + :prim-type 2 + ) + :local-sphere (new 'static 'vector :w 204800000.0) + :mesh #f + ) + ) + +(define *collide-shape-prim-water* (new 'static 'collide-shape-prim-mesh + :cshape #f + :prim-core (new 'static 'collide-prim-core + :world-sphere (new 'static 'vector :w 204800000.0) + :collide-as (collide-spec water) + :action (collide-action solid) + :prim-type 2 + ) + :local-sphere (new 'static 'vector :w 204800000.0) + :mesh #f + ) + ) + +(define-perm *collide-rider-pool* collide-rider-pool (new 'global 'collide-rider-pool)) diff --git a/goal_src/jak3/engine/collide/collide-touch-h.gc b/goal_src/jak3/engine/collide/collide-touch-h.gc index 0ce2056627..9b83819d83 100644 --- a/goal_src/jak3/engine/collide/collide-touch-h.gc +++ b/goal_src/jak3/engine/collide/collide-touch-h.gc @@ -7,3 +7,148 @@ ;; DECOMP BEGINS +(deftype touching-prim (structure) + "A collide primitive that's touching another. +Potentially also stores the triangle that is involved." + ((cprim collide-shape-prim) + (has-tri? symbol) + (tri collide-tri-result :inline) + ) + ) + + +(deftype touching-prims-entry (structure) + "A record of two primitives touching." + ((next touching-prims-entry) + (prev touching-prims-entry) + (allocated? symbol) + (u float) + (prim1 touching-prim :inline) + (prim2 touching-prim :inline) + ) + (:methods + (touching-prims-entry-method-9 () none) + (touching-prims-entry-method-10 () none) + (touching-prims-entry-method-11 () none) + (touching-prims-entry-method-12 () none) + ) + ) + + +(deftype touching-prims-entry-pool (structure) + "A pool of up to 64 touching prim records." + ((head touching-prims-entry) + (nodes touching-prims-entry 64 :inline) + ) + (:methods + (new (symbol type) _type_) + (touching-prims-entry-pool-method-9 () none) + (touching-prims-entry-pool-method-10 () none) + (init-list! (_type_) none) + (touching-prims-entry-pool-method-12 () none) + ) + ) + + +(defmethod init-list! ((this touching-prims-entry-pool)) + (let ((prev (the-as touching-prims-entry #f))) + (let ((current (the-as touching-prims-entry (-> this nodes)))) + (set! (-> this head) current) + (countdown (a0-1 64) + (set! (-> current prev) prev) + (let ((next (&+ current 240))) + (set! (-> current next) (the-as touching-prims-entry next)) + (set! (-> current allocated?) #f) + (set! prev current) + (set! current (the-as touching-prims-entry next)) + ) + ) + ) + (set! (-> prev next) #f) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch structure vs touching-prims-entry-pool. +(defmethod new touching-prims-entry-pool ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((gp-0 (t9-0 allocation v1-1))) + ((method-of-type touching-prims-entry-pool init-list!) (the-as touching-prims-entry-pool gp-0)) + (the-as touching-prims-entry-pool gp-0) + ) + ) + ) + +(deftype touching-shapes-entry (structure) + "A record of two collide shapes touching, +storing a record of the primitives involved." + ((cshape1 collide-shape) + (cshape2 collide-shape) + (resolve-u int8) + (head touching-prims-entry) + (handle1 handle) + (handle2 handle) + ) + :pack-me + (:methods + (get-head (_type_) touching-prims-entry) + (get-next (_type_ touching-shapes-entry) touching-prims-entry) + (touching-shapes-entry-method-11 () none) + (touching-shapes-entry-method-12 () none) + (touching-shapes-entry-method-13 () none) + (touching-shapes-entry-method-14 () none) + ) + ) + + +(deftype touching-list (structure) + "Contains a record of touching collide shape pairs." + ((num-touching-shapes int32) + (resolve-u int8) + (touching-shapes touching-shapes-entry 32 :inline) + ) + (:methods + (new (symbol type) _type_) + (touching-list-method-9 () none) + (touching-list-method-10 () none) + (touching-list-method-11 () none) + (touching-list-method-12 () none) + (touching-list-method-13 () none) + ) + ) + + +;; WARN: Return type mismatch structure vs touching-list. +(defmethod new touching-list ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as touching-list v0-0) num-touching-shapes) 0) + (set! (-> (the-as touching-list v0-0) resolve-u) 0) + (the-as touching-list v0-0) + ) + ) + ) + +(defmethod get-head ((this touching-shapes-entry)) + (-> this head) + ) + +;; WARN: Return type mismatch collide-shape vs touching-prims-entry. +(defmethod get-next ((this touching-shapes-entry) (arg0 touching-shapes-entry)) + (the-as touching-prims-entry (-> arg0 cshape1)) + ) + +(kmemopen global "collide-touching-lists") + +(define-perm *touching-prims-entry-pool* touching-prims-entry-pool (new 'global 'touching-prims-entry-pool)) + +(define-perm *touching-list* touching-list (new 'global 'touching-list)) + +(kmemclose) diff --git a/goal_src/jak3/engine/collide/pat-h.gc b/goal_src/jak3/engine/collide/pat-h.gc index 04ad21dc8b..cb1d578a46 100644 --- a/goal_src/jak3/engine/collide/pat-h.gc +++ b/goal_src/jak3/engine/collide/pat-h.gc @@ -5,5 +5,343 @@ ;; name in dgo: pat-h ;; dgos: GAME +;; +++pat-event +(defenum pat-event + :type uint8 + (none 0) + (deadly 1) + (endlessfall 2) + (burn 3) + (deadlyup 4) + (burnup 5) + (melt 6) + (slide 7) + (lip 8) + (lipramp 9) + (shock 10) + (shockup 11) + (hide 12) + (rail 13) + (slippery 14) + (drag 15) + (waterfloor 16) + (hang 17) + (fry 18) + (slime 19) + ) +;; ---pat-event + + +;; +++pat-material +(defenum pat-material + :type uint8 + (unknown 0) + (ice 1) + (quicksand 2) + (waterbottom 3) + (tar 4) + (sand 5) + (wood 6) + (grass 7) + (pcmetal 8) + (snow 9) + (deepsnow 10) + (hotcoals 11) + (lava 12) + (crwood 13) + (gravel 14) + (dirt 15) + (metal 16) + (straw 17) + (tube 18) + (swamp 19) + (stopproj 20) + (rotate 21) + (neutral 22) + (stone 23) + (crmetal 24) + (carpet 25) + (grmetal 26) + (shmetal 27) + (hdwood 28) + (squish 29) + (mhshroom 30) + (forest 31) + (mhswamp 32) + (dmaker 33) + ) +;; ---pat-material + + +;; +++pat-mode +(defenum pat-mode + :type uint8 + (ground 0) + (wall 1) + (obstacle 2) + (halfpipe 3) + ) +;; ---pat-mode + + ;; DECOMP BEGINS +(deftype pat-surface (uint32) + ((skip uint8 :offset 0 :size 7) + (mode pat-mode :offset 7 :size 3) + (material pat-material :offset 10 :size 6) + (camera uint8 :offset 16 :size 1) + (event pat-event :offset 18 :size 6) + (skip2 uint8 :offset 24 :size 5) + (noentity uint8 :offset 0 :size 1) + (nocamera uint8 :offset 1 :size 1) + (noedge uint8 :offset 2 :size 1) + (nogrind uint8 :offset 3 :size 1) + (nojak uint8 :offset 4 :size 1) + (noboard uint8 :offset 5 :size 1) + (nopilot uint8 :offset 6 :size 1) + (probe uint8 :offset 24 :size 1) + (nomech uint8 :offset 25 :size 1) + (noproj uint8 :offset 26 :size 1) + (noendlessfall uint8 :offset 27 :size 1) + (noprobe uint8 :offset 28 :size 1) + (nolineofsight uint8 :offset 16 :size 1) + (board uint8 :offset 4 :size 1) + ) + ) + + +(defun-debug pat-material->string ((arg0 pat-surface)) + (case (-> arg0 material) + (((pat-material deepsnow)) + "deepsnow" + ) + (((pat-material neutral)) + "neutral" + ) + (((pat-material carpet)) + "carpet" + ) + (((pat-material shmetal)) + "shmetal" + ) + (((pat-material grmetal)) + "grmetal" + ) + (((pat-material lava)) + "lava" + ) + (((pat-material crmetal)) + "crmetal" + ) + (((pat-material pcmetal)) + "pcmetal" + ) + (((pat-material grass)) + "grass" + ) + (((pat-material snow)) + "snow" + ) + (((pat-material swamp)) + "swamp" + ) + (((pat-material stone)) + "stone" + ) + (((pat-material hotcoals)) + "hotcoals" + ) + (((pat-material unknown)) + "unknown" + ) + (((pat-material dirt)) + "dirt" + ) + (((pat-material dmaker)) + "dmaker" + ) + (((pat-material tube)) + "tube" + ) + (((pat-material forest)) + "forest" + ) + (((pat-material stopproj)) + "stopproj" + ) + (((pat-material mhshroom)) + "mhshroom" + ) + (((pat-material mhswamp)) + "mhswamp" + ) + (((pat-material tar)) + "tar" + ) + (((pat-material straw)) + "straw" + ) + (((pat-material wood)) + "wood" + ) + (((pat-material quicksand)) + "quicksand" + ) + (((pat-material squish)) + "squish" + ) + (((pat-material ice)) + "ice" + ) + (((pat-material rotate)) + "rotate" + ) + (((pat-material crwood)) + "crwood" + ) + (((pat-material waterbottom)) + "waterbottom" + ) + (((pat-material hdwood)) + "hdwood" + ) + (((pat-material sand)) + "sand" + ) + (((pat-material gravel)) + "gravel" + ) + (((pat-material metal)) + "metal" + ) + (else + "*unknown*" + ) + ) + ) + +(defun-debug pat-mode->string ((arg0 pat-surface)) + (case (-> arg0 mode) + (((pat-mode wall)) + "wall" + ) + (((pat-mode halfpipe)) + "halfpipe" + ) + (((pat-mode obstacle)) + "obstacle" + ) + (((pat-mode ground)) + "ground" + ) + (else + "*unknown*" + ) + ) + ) + +(defun-debug pat-event->string ((arg0 pat-surface)) + (case (-> arg0 event) + (((pat-event burn)) + "burn" + ) + (((pat-event deadly)) + "deadly" + ) + (((pat-event waterfloor)) + "waterfloor" + ) + (((pat-event slippery)) + "slippery" + ) + (((pat-event melt)) + "melt" + ) + (((pat-event endlessfall)) + "endlessfall" + ) + (((pat-event burnup)) + "burnup" + ) + (((pat-event hide)) + "hide" + ) + (((pat-event deadlyup)) + "deadlyup" + ) + (((pat-event fry)) + "fry" + ) + (((pat-event slime)) + "slime" + ) + (((pat-event drag)) + "drag" + ) + (((pat-event shockup)) + "shockup" + ) + (((pat-event slide)) + "slide" + ) + (((pat-event hang)) + "hang" + ) + (((pat-event lipramp)) + "lipramp" + ) + (((pat-event rail)) + "rail" + ) + (((pat-event none)) + "none" + ) + (((pat-event lip)) + "lip" + ) + (((pat-event shock)) + "shock" + ) + (else + "*unknown*" + ) + ) + ) + +(deftype pat-mode-info (structure) + ((name string) + (wall-angle float) + (color rgba) + (hilite-color rgba) + ) + ) + + +(define *pat-mode-info* (new 'static 'inline-array pat-mode-info 4 + (new 'static 'pat-mode-info + :name "ground" + :wall-angle 0.2 + :color (new 'static 'rgba :r #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "wall" + :wall-angle 2.0 + :color (new 'static 'rgba :b #x7f :a #x40) + :hilite-color (new 'static 'rgba :b #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "obstacle" + :wall-angle 0.82 + :color (new 'static 'rgba :r #x7f :b #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :b #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "halfpipe" + :wall-angle -2.0 + :color (new 'static 'rgba :r #x7f :g #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + ) + ) diff --git a/goal_src/jak3/engine/data/art-h.gc b/goal_src/jak3/engine/data/art-h.gc index 03655f48bf..522d7f92a6 100644 --- a/goal_src/jak3/engine/data/art-h.gc +++ b/goal_src/jak3/engine/data/art-h.gc @@ -225,7 +225,7 @@ actor, like the mesh, animations, shadow mesh, skeleton, etc." ) -(defmethod relocate ((this art-cloth-geo) (arg0 int)) +(defmethod relocate ((this art-cloth-geo) (offset int)) this ) diff --git a/goal_src/jak3/engine/engine/engines.gc b/goal_src/jak3/engine/engine/engines.gc index 3db7a4f04c..c431f00067 100644 --- a/goal_src/jak3/engine/engine/engines.gc +++ b/goal_src/jak3/engine/engine/engines.gc @@ -5,5 +5,61 @@ ;; name in dgo: engines ;; dgos: GAME +;; +++part-local-space-flags +(defenum part-local-space-flags + :type uint32 + :bitfield #t + ) +;; ---part-local-space-flags + + ;; DECOMP BEGINS +(kmemopen global "engines") + +(define *background-draw-engine* (new 'global 'engine 'draw 10 connection)) + +(define *matrix-engine* (new 'global 'boxed-array handle 384)) + +(set! (-> *matrix-engine* length) 0) + +(define *cloth-engine* (new 'global 'boxed-array handle 32)) + +(set! (-> *cloth-engine* length) 0) + +(define *part-engine* (new 'global 'engine 'sparticle-launcher 256 connection)) + +(deftype particle-local-space-info (connection) + ((params basic 3 :overlay-at param1) + (mat-prev matrix :inline) + (mat-new matrix :inline) + (hand handle) + (flags part-local-space-flags) + (pad uint32 1) + ) + ) + + +(define *cam-post-hook-engine* (new 'global 'engine 'cam-post-hook-engine 4 connection)) + +(define *part-local-space-engine* + (new 'global 'engine 'particle-local-space-info 15 particle-local-space-info) + ) + +(define *camera-engine* (new 'global 'engine 'camera-eng 128 connection)) + +(when *debug-segment* +(define *debug-engine* (new 'debug 'engine 'debug 64 connection)) + +) +(define *pad-engine* (new 'global 'engine 'pad 4 connection)) + +(define *lightning-engine* (new 'global 'engine 'lightning-control 64 connection)) + +(define *hud-engine* (new 'global 'engine 'hud 16 connection)) + +(define *prim-engine* (new 'global 'engine 'prim-strip 128 connection)) + +(define *task-manager-engine* (new 'global 'engine 'task-manager 16 connection)) + +(kmemclose) diff --git a/goal_src/jak3/engine/entity/res-h.gc b/goal_src/jak3/engine/entity/res-h.gc index 305021d225..2fd4cb2508 100644 --- a/goal_src/jak3/engine/entity/res-h.gc +++ b/goal_src/jak3/engine/entity/res-h.gc @@ -5,5 +5,70 @@ ;; name in dgo: res-h ;; dgos: GAME +(deftype res-tag-pair (uint64) + "The indices of two [[res-tag]]s. If the specific key-frame time is in between two + res-tags, this type is used to return the indices of the first res-tag before and after + the specified time." + ((lo int32 :offset 0) + (hi int32 :offset 32) + ) + ;; made-up type + ) + + +;; +++res-lump-flags +(defenum res-lump-flags + :type uint16 + :bitfield #t + (sorted 0) + (rlf1 1) + ) +;; ---res-lump-flags + + +(define-extern *res-static-buf* pointer) + ;; DECOMP BEGINS +(deftype res-tag (uint128) + "Metadata about a property in a [[res-lump]], such as name, element type and element count." + ((name symbol :offset 0 :size 32) + (key-frame float :offset 32 :size 32) + (elt-type type :offset 64 :size 32) + (data-offset uint16 :offset 96 :size 16) + (elt-count uint32 :offset 112 :size 15) + (inlined? uint8 :offset 127 :size 1) + ) + ) + +(deftype res-lump (basic) + "A collection of [[res-tag]]s and their data." + ((length int32) + (allocated-length int16) + (flags res-lump-flags) + (data-base pointer) + (data-top pointer) + (data-size int32) + (extra entity-links) + (tag (pointer res-tag)) + ) + (:methods + (new (symbol type int int) _type_) + (get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer) + (get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure) + (get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128) + (get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float) + (get-tag-index-data (_type_ int) pointer) + (get-tag-data (_type_ res-tag) pointer) + (allocate-data-memory-for-tag! (_type_ res-tag) res-tag) + (sort! (_type_) _type_) + (add-data! (_type_ res-tag pointer) res-lump) + (add-32bit-data! (_type_ res-tag object) res-lump) + (lookup-tag-idx (_type_ symbol symbol float) res-tag-pair :no-virtual) + (make-property-data (_type_ float res-tag-pair pointer) pointer) + (get-curve-data! (_type_ curve symbol symbol float) symbol) + ) + ) + + +(define *res-key-string* (new 'global 'string 64 (the-as string #f))) diff --git a/goal_src/jak3/engine/entity/res.gc b/goal_src/jak3/engine/entity/res.gc index 07945ee4ce..705de189d9 100644 --- a/goal_src/jak3/engine/entity/res.gc +++ b/goal_src/jak3/engine/entity/res.gc @@ -5,5 +5,956 @@ ;; name in dgo: res ;; dgos: GAME +#|@file +res is a generic storage system for not very large data, used mostly for the game entities. +These res files store collections of data, which can be as values (int8, int16, int32, int64, uint8, uint16, uint32, uint64, float, vector), or any structure (as references), which are tagged and identified with a res-tag. +The data is stored similar to an unboxed inline-array, the type of the data is stored in the res-tag. + +A res-lump stores and is used to access all of the data for a single "resource", a collection of varying data. +This is similar to a C++ map or C# dictionary. The key is a res-tag and the value is the corresponding binary data. + +A res-tag is a tag that contains information about a particular property of this resource, such as type, name, and amount of elements. +For example, information about an array of vectors that make up a path - for a moving platform - or an integer to store its entity ID. + +Keyframes are used to specify when/where the data is relevant. +For example (this is made-up), say you have a camera spline, and you want the FOV to change at three specific points: +when it starts, somewhere in the middle, and at the end. +You would store an array of three FOV values. The key-frame field could then be used to say at which point in the spline +the FOV should be at that value. If the camera is somewhere between those points, the result could then be interpolated. + +Properties are looked up from a res-lump using their name (a symbol). +You can look up the data of the property you want directly using the various get-property methods. +Curves can be quickly filled in using the get-curve-data! method. + + +This is updated from the entity system used in Crash 2, which had most of these features and worked very similarly! +|# + +(declare-type nav-mesh basic) +(declare-type collide-mesh basic) + +(define-extern part-group-pointer? (function pointer symbol)) + +(defmacro res-ref? (tag) + "Checks resource tag, and returns #t if resource data is a reference type, #f if it is inlined." + `(zero? (-> ,tag inlined?)) + ) + +;; There are four common types of lookup: +;; data. This is something like (pointer int32) or (inline-array vector), it should have a size. +;; struct. This will get a GOAL struct or basic. Like a string. +;; value. This will get a value. Possibly even a 128-bit value, though this does not appear to work properly. +;; float. This will get a float. If the value stored is an int, it will be converted to a float. + +(defmacro res-lump-data (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time -1000000000.0)) + "Helper macro to get data from a res-lump without interpolation." + `(the-as ,type ((method-of-type res-lump get-property-data) + ,lump + ,name + 'interp + ,time + (the-as pointer #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-data-exact (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time 0.0)) + "Helper macro to get start of data from a res-lump." + `(the-as ,type ((method-of-type res-lump get-property-data) + ,lump + ,name + 'exact + ,time + (the-as pointer #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-struct (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time -1000000000.0)) + `(the-as ,type ((method-of-type res-lump get-property-struct) + ,lump + ,name + 'interp + ,time + (the-as structure #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-struct-exact (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time 0.0)) + `(the-as ,type ((method-of-type res-lump get-property-struct) + ,lump + ,name + 'exact + ,time + (the-as structure #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-value (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (default (the-as uint128 0)) &key (time -1000000000.0)) + "Helper macro to get a value from a res-lump with no interpolation." + `(the-as ,type ((method-of-type res-lump get-property-value) + ,lump + ,name + 'interp + ,time + ,default + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-float (lump name &key (tag-ptr (the-as (pointer res-tag) #f)) &key (default 0.0) &key (time -1000000000.0)) + "Helper macro to get a float from a res-lump with no interpolation." + `((method-of-type res-lump get-property-value-float) + ,lump + ,name + 'interp + ,time + ,default + ,tag-ptr + *res-static-buf* + ) + ) + ;; DECOMP BEGINS +(defmethod print ((this res-tag)) + (if (zero? (-> this inlined?)) + (format + #t + "#" + (-> this name) + (-> this key-frame) + (-> this elt-type) + (-> this elt-count) + ) + (format + #t + "#" + (-> this name) + (-> this key-frame) + (-> this elt-type) + (-> this elt-count) + ) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this res-tag)) + (the-as int (if (zero? (-> this inlined?)) + (* (-> this elt-count) 4) + (* (-> this elt-count) (-> this elt-type size)) + ) + ) + ) + +(defmethod get-tag-index-data ((this res-lump) (arg0 int)) + "Get the data address of the n'th tag." + (&+ (-> this data-base) (-> this tag arg0 data-offset)) + ) + +(defmethod get-tag-data ((this res-lump) (arg0 res-tag)) + "Get the data address of the specified tag." + (&+ (-> this data-base) (-> arg0 data-offset)) + ) + +(defmethod new res-lump ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* (+ arg0 -1) 16) arg1))))) + (set! (-> v0-0 allocated-length) arg0) + (set! (-> v0-0 data-size) arg1) + (set! (-> v0-0 length) 0) + (set! (-> v0-0 data-base) (&-> (-> v0-0 tag) arg0)) + (set! (-> v0-0 data-top) (&-> (-> v0-0 tag) arg0)) + v0-0 + ) + ) + +(defmethod length ((this res-lump)) + (-> this length) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this res-lump)) + (the-as int (+ (-> this type psize) (* (-> this allocated-length) 16) (-> this data-size))) + ) + + +;; WARN: Return type mismatch int vs res-tag-pair. +(defmethod lookup-tag-idx ((this res-lump) (arg0 symbol) (arg1 symbol) (arg2 float)) + "Look up the index of the tag containing with the given name and timestamp. + Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits. + Depending on the mode, they may be the same, or they may be two tags that you should interpolate + between, if the exact time was not found. + + @param name-sym should be the name of the thing you want. + @param time is for the timestamp you want. + If mode = 'base, then both the indices are the same and the timestamp is ignored. + If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found). + If mode = 'exact, then it requires an exact timestamp match and both indices are the same. + If things go wrong, returns a negative number." + (local-vars (t0-1 int)) + (if (or (not this) (zero? this) (<= (-> this length) 0)) + (return (new 'static 'res-tag-pair :lo #xffffffff :hi #xffffffff)) + ) + (if (zero? (-> this flags)) + (sort! this) + ) + (let ((v1-8 -1) + (a0-2 -1) + ) + (let ((a1-1 -1) + (a2-1 (the-as object arg0)) + ) + (let ((a3-2 (+ (-> this length) -1)) + (t0-0 0) + ) + (while (>= a3-2 t0-0) + (let* ((t1-2 (+ t0-0 (/ (- a3-2 t0-0) 2))) + (t2-5 (- (the-as int a2-1) (the-as uint (the-as int (-> this tag t1-2 name))))) + ) + (cond + ((zero? t2-5) + (set! t0-1 t1-2) + (goto cfg-19) + ) + ((< t2-5 0) + (set! a3-2 (+ t1-2 -1)) + ) + (else + (set! t0-0 (+ t1-2 1)) + ) + ) + ) + ) + ) + (set! t0-1 -1) + (label cfg-19) + (if (< t0-1 0) + (return (the-as res-tag-pair t0-1)) + ) + (while (and (> t0-1 0) (= (the-as symbol a2-1) (-> this tag (+ t0-1 -1) name))) + (+! t0-1 -1) + ) + (when (= arg1 'base) + (set! a0-2 t0-1) + (set! v1-8 t0-1) + (goto cfg-60) + ) + (let ((a3-14 t0-1) + (t0-4 (&-> (-> this tag) t0-1)) + ) + (while (not (or (>= a3-14 (-> this length)) (< (the-as int a2-1) (the-as int (-> t0-4 0 name))))) + (cond + ((!= arg0 (-> t0-4 0 name)) + ) + ((= (-> t0-4 0 key-frame) arg2) + (set! a0-2 a3-14) + (set! v1-8 a3-14) + (goto cfg-60) + ) + ((and (>= arg2 (-> t0-4 0 key-frame)) (!= arg1 'exact)) + (set! a0-2 a3-14) + (set! v1-8 a3-14) + (if (= (-> t0-4 0 key-frame) -1000000000.0) + (set! a1-1 a3-14) + ) + ) + ((< arg2 (-> t0-4 0 key-frame)) + (if (and (!= a0-2 a1-1) (= arg1 'interp)) + (set! v1-8 a3-14) + ) + (goto cfg-60) + ) + ) + (+! a3-14 1) + (set! t0-4 (&-> t0-4 1)) + ) + ) + ) + (label cfg-60) + (the-as res-tag-pair (logior (logand (the-as uint #xffffffff) a0-2) (shl v1-8 32))) + ) + ) + +(defmethod make-property-data ((this res-lump) (arg1 float) (tag-pair res-tag-pair) (arg3 pointer)) + "Returns (a pointer to) the value data of a property with the tag-pair. + If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time + with the result written into buf. buf must have enough space to copy all of the data. + Otherwise, simply returns an address to the resource binary." + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (let* ((t0-2 (-> this tag (-> tag-pair lo))) + (t1-2 (-> this tag (-> tag-pair hi))) + (v1-6 (-> t0-2 elt-count)) + ) + (cond + ((zero? (-> t0-2 inlined?)) + (&+ (-> this data-base) (-> t0-2 data-offset)) + ) + ((or (not arg3) + (= (-> tag-pair lo) (-> tag-pair hi)) + (!= v1-6 (-> t1-2 elt-count)) + (!= (-> t0-2 elt-type) (-> t1-2 elt-type)) + ) + (let ((a0-4 t0-2)) + (&+ (-> this data-base) (-> a0-4 data-offset)) + ) + ) + (else + (let* ((f0-2 (/ (- arg1 (-> t0-2 key-frame)) (- (-> t1-2 key-frame) (-> t0-2 key-frame)))) + (a1-4 this) + (a2-7 t0-2) + (a1-6 (&+ (-> a1-4 data-base) (-> a2-7 data-offset))) + (a2-13 (&+ (-> this data-base) (-> t1-2 data-offset))) + ) + (case (-> t0-2 elt-type symbol) + (('float) + (dotimes (a0-8 (the-as int v1-6)) + (set! (-> (the-as (pointer float) (&+ arg3 (* a0-8 4)))) + (+ (* (-> (the-as (pointer float) (&+ a1-6 (* a0-8 4)))) (- 1.0 f0-2)) + (* (-> (the-as (pointer float) (&+ a2-13 (* a0-8 4)))) f0-2) + ) + ) + ) + arg3 + ) + (('integer 'sinteger 'uinteger 'int64 'uint64) + (let ((a0-10 (the int (* 4096.0 f0-2)))) + (dotimes (t0-10 (the-as int v1-6)) + (set! (-> (the-as (pointer int64) (&+ arg3 (* t0-10 8)))) + (sar + (+ (* (the-as int (-> (the-as (pointer uint64) (&+ a1-6 (* t0-10 8))))) (- 4096 a0-10)) + (* (the-as int (-> (the-as (pointer uint64) (&+ a2-13 (* t0-10 8))))) a0-10) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int8) + (let ((a0-12 (the int (* 4096.0 f0-2)))) + (dotimes (t0-11 (the-as int v1-6)) + (set! (-> (the-as (pointer int8) (&+ arg3 t0-11))) + (sar + (+ (* (-> (the-as (pointer int8) (&+ a1-6 t0-11))) (- 4096 a0-12)) + (* (-> (the-as (pointer int8) (&+ a2-13 t0-11))) a0-12) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint8) + (let ((a0-14 (the int (* 4096.0 f0-2)))) + (dotimes (t0-12 (the-as int v1-6)) + (set! (-> (the-as (pointer uint8) (&+ arg3 t0-12))) + (shr + (+ (* (-> (the-as (pointer uint8) (&+ a1-6 t0-12))) (the-as uint (- 4096 a0-14))) + (* (-> (the-as (pointer uint8) (&+ a2-13 t0-12))) (the-as uint a0-14)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int16) + (let ((a0-16 (the int (* 4096.0 f0-2)))) + (dotimes (t0-13 (the-as int v1-6)) + (set! (-> (the-as (pointer int16) (&+ arg3 (* t0-13 2)))) + (sar + (+ (* (-> (the-as (pointer int16) (&+ a1-6 (* t0-13 2)))) (- 4096 a0-16)) + (* (-> (the-as (pointer int16) (&+ a2-13 (* t0-13 2)))) a0-16) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint16) + (let ((a0-18 (the int (* 4096.0 f0-2)))) + (dotimes (t0-14 (the-as int v1-6)) + (set! (-> (the-as (pointer uint16) (&+ arg3 (* t0-14 2)))) + (shr + (+ (* (-> (the-as (pointer uint16) (&+ a1-6 (* t0-14 2)))) (the-as uint (- 4096 a0-18))) + (* (-> (the-as (pointer uint16) (&+ a2-13 (* t0-14 2)))) (the-as uint a0-18)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int32) + (let ((a0-20 (the int (* 4096.0 f0-2)))) + (dotimes (t0-15 (the-as int v1-6)) + (set! (-> (the-as (pointer int32) (&+ arg3 (* t0-15 4)))) + (sar + (+ (* (-> (the-as (pointer int32) (&+ a1-6 (* t0-15 4)))) (- 4096 a0-20)) + (* (-> (the-as (pointer int32) (&+ a2-13 (* t0-15 4)))) a0-20) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint32) + (let ((a0-22 (the int (* 4096.0 f0-2)))) + (dotimes (t0-16 (the-as int v1-6)) + (set! (-> (the-as (pointer uint32) (&+ arg3 (* t0-16 4)))) + (shr + (+ (* (-> (the-as (pointer uint32) (&+ a1-6 (* t0-16 4)))) (the-as uint (- 4096 a0-22))) + (* (-> (the-as (pointer uint32) (&+ a2-13 (* t0-16 4)))) (the-as uint a0-22)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('vector) + (let ((a0-23 f0-2)) + (.mov vf3 a0-23) + ) + (let ((a0-25 (- 1.0 f0-2))) + (.mov vf4 a0-25) + ) + (dotimes (a0-26 (the-as int v1-6)) + (let ((t0-18 (+ (* a0-26 16) (the-as int a1-6)))) + (.lvf vf1 (&-> (the-as (pointer int128) t0-18))) + ) + (let ((t0-20 (+ (* a0-26 16) (the-as int a2-13)))) + (.lvf vf2 (&-> (the-as (pointer int128) t0-20))) + ) + (.mul.x.vf vf1 vf1 vf4) + (.mul.x.vf vf2 vf2 vf3) + (.add.vf vf1 vf1 vf2) + (.svf (&-> (the-as (pointer uint128) (+ (* a0-26 16) (the-as int arg3))) 0) vf1) + ) + arg3 + ) + (else + (let ((a0-27 t0-2)) + (&+ (-> this data-base) (-> a0-27 data-offset)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod get-property-data ((this res-lump) + (name symbol) + (mode symbol) + (time float) + (arg3 pointer) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns an address to a given property's data at a specific time stamp, or default on error. + @param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f + @param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode." + (let ((s3-0 (lookup-tag-idx this name mode time))) + (cond + ((< (the-as int s3-0) 0) + (empty) + ) + (else + (set! arg3 (make-property-data this time s3-0 arg5)) + (if arg4 + (set! (-> arg4 0) (-> this tag (-> s3-0 lo))) + ) + ) + ) + ) + arg3 + ) + +;; WARN: Return type mismatch object vs structure. +(defmethod get-property-struct ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 structure) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns a given struct property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int s3-0) 0) + (empty) + ) + (else + (set! arg3 (the-as structure (make-property-data this arg2 s3-0 arg5))) + (let ((v1-4 (-> this tag (-> s3-0 lo)))) + (if arg4 + (set! (-> arg4 0) v1-4) + ) + (if (zero? (-> v1-4 inlined?)) + (set! arg3 (the-as structure (-> (the-as (pointer uint32) arg3)))) + (empty) + ) + ) + ) + ) + ) + (the-as structure arg3) + ) + +;; WARN: Return type mismatch int vs uint128. +(defmethod get-property-value ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 uint128) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns a given value property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int a2-1) 0) + (empty) + ) + (else + (let* ((a0-2 (-> a2-1 lo)) + (s1-0 (-> this tag a0-2)) + (s0-0 (-> s1-0 elt-type)) + (gp-1 (make-property-data this arg2 a2-1 arg5)) + ) + (if arg4 + (set! (-> arg4 0) s1-0) + ) + (cond + ((type-type? (the-as type s0-0) uinteger) + (case (-> s1-0 elt-type size) + ((1) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint8) gp-1)))) + ) + ((2) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint16) gp-1)))) + ) + ((4) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint32) gp-1)))) + ) + ((16) + (set! arg3 (-> (the-as (pointer uint128) gp-1))) + ) + (else + (set! arg3 (the-as uint128 (-> (the-as (pointer uint64) gp-1)))) + ) + ) + ) + ((type-type? (the-as type s0-0) integer) + (case (-> s1-0 elt-type size) + ((1) + (set! arg3 (the-as uint128 (-> (the-as (pointer int8) gp-1)))) + ) + ((2) + (set! arg3 (the-as uint128 (-> (the-as (pointer int16) gp-1)))) + ) + ((4) + (set! arg3 (the-as uint128 (-> (the-as (pointer int32) gp-1)))) + ) + ((16) + (set! arg3 (-> (the-as (pointer uint128) gp-1))) + ) + (else + (set! arg3 (the-as uint128 (-> (the-as (pointer uint64) gp-1)))) + ) + ) + ) + ((type-type? (the-as type s0-0) float) + (set! arg3 (the-as uint128 (the int (-> (the-as (pointer float) gp-1))))) + ) + (else + (empty) + ) + ) + ) + ) + ) + ) + (the-as uint128 arg3) + ) + +(defmethod get-property-value-float ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 float) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + (local-vars (v1-8 uint) (v1-11 int)) + (let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int a2-1) 0) + (empty) + ) + (else + (let* ((a0-2 (-> a2-1 lo)) + (s1-0 (-> this tag a0-2)) + (s0-0 (-> s1-0 elt-type)) + (gp-1 (make-property-data this arg2 a2-1 arg5)) + ) + (if arg4 + (set! (-> arg4 0) s1-0) + ) + (cond + ((type-type? (the-as type s0-0) float) + (set! arg3 (-> (the-as (pointer float) gp-1))) + ) + ((type-type? (the-as type s0-0) uinteger) + (case (-> s1-0 elt-type size) + ((1) + (set! v1-8 (-> (the-as (pointer uint8) gp-1))) + ) + ((2) + (set! v1-8 (-> (the-as (pointer uint16) gp-1))) + ) + ((4) + (set! v1-8 (-> (the-as (pointer uint32) gp-1))) + ) + ((16) + (set! v1-8 (the-as uint (-> (the-as (pointer uint128) gp-1)))) + ) + (else + (set! v1-8 (-> (the-as (pointer uint64) gp-1))) + ) + ) + (set! arg3 (the float v1-8)) + ) + ((type-type? (the-as type s0-0) integer) + (case (-> s1-0 elt-type size) + ((1) + (set! v1-11 (-> (the-as (pointer int8) gp-1))) + ) + ((2) + (set! v1-11 (-> (the-as (pointer int16) gp-1))) + ) + ((4) + (set! v1-11 (-> (the-as (pointer int32) gp-1))) + ) + ((16) + (set! v1-11 (the-as int (-> (the-as (pointer uint128) gp-1)))) + ) + (else + (set! v1-11 (the-as int (-> (the-as (pointer uint64) gp-1)))) + ) + ) + (set! arg3 (the float v1-11)) + ) + (else + (empty) + ) + ) + ) + ) + ) + ) + arg3 + ) + +(defmethod sort! ((this res-lump)) + "Sort all tags based on name, then key-frame." + (let ((v1-0 -1)) + (while (nonzero? v1-0) + (set! v1-0 0) + (let ((a1-0 0) + (a2-1 (+ (-> this length) -2)) + ) + (while (>= a2-1 a1-0) + (let* ((a3-2 (-> this tag a1-0)) + (t0-3 (-> this tag (+ a1-0 1))) + (t1-3 (-> a3-2 name)) + (t2-1 (-> t0-3 name)) + ) + (when (or (< (the-as int t2-1) (the-as int t1-3)) (and (= t1-3 t2-1) (< (-> t0-3 key-frame) (-> a3-2 key-frame)))) + (+! v1-0 1) + (set! (-> this tag a1-0) t0-3) + (set! (-> this tag (+ a1-0 1)) a3-2) + ) + ) + (+! a1-0 1) + ) + ) + ) + ) + (set! (-> this flags) (res-lump-flags sorted)) + this + ) + +(defmethod allocate-data-memory-for-tag! ((this res-lump) (arg0 res-tag)) + "Find space for the data described by arg0 in this. + Returns a tag with data-offset set correctly for this res-lump. + If the lump already contains memory for the given tag, and it is big enough, + it will be reused. Alignment will be at least 8 bytes. + If the input tag has elt-count = 0, it will return a tag for elt-count = 1." + (local-vars (resource-mem pointer)) + (let* ((tag-pair (lookup-tag-idx this (-> arg0 name) 'exact (-> arg0 key-frame))) + (existing-tag (-> this tag (-> tag-pair lo))) + ) + 0 + (if (and (>= (the-as int tag-pair) 0) (!= (-> arg0 key-frame) (-> arg0 key-frame))) + (set! tag-pair (new 'static 'res-tag-pair :lo #xffffffff :hi #xffffffff)) + ) + (if (zero? (-> arg0 elt-count)) + (set! arg0 (copy-and-set-field arg0 elt-count 1)) + ) + (let ((data-size (length arg0))) + (cond + ((and (>= (the-as int tag-pair) 0) (>= (length existing-tag) data-size)) + (set! resource-mem (&+ (-> this data-base) (-> existing-tag data-offset))) + (when (logtest? (the-as int resource-mem) 7) + (set! resource-mem (logand -16 (&+ (-> this data-top) 15))) + (set! (-> this data-top) (&+ resource-mem data-size)) + ) + ) + (else + (set! resource-mem (logand -16 (&+ (-> this data-top) 15))) + (set! (-> this data-top) (&+ resource-mem data-size)) + ) + ) + (let* ((a0-22 arg0) + (s4-1 (copy-and-set-field a0-22 data-offset (&- resource-mem (the-as uint (-> this data-base))))) + ) + (when (>= (the-as int (&+ resource-mem data-size)) (the-as int (&+ (-> this data-base) (-> this data-size)))) + (format + 0 + "ERROR: attempting to a new tag ~`res-tag`P data of #x~X bytes to ~A, but data memory is full.~%" + s4-1 + data-size + this + ) + (return (the-as res-tag #f)) + ) + (cond + ((< (the-as int tag-pair) 0) + (cond + ((>= (-> this length) (-> this allocated-length)) + (format 0 "ERROR: attempting to a new tag ~`res-tag`P to ~A, but tag memory is full.~%" s4-1 this) + (return (the-as res-tag #f)) + ) + (else + (set! (-> this tag (-> this length)) s4-1) + (+! (-> this length) 1) + (sort! this) + ) + ) + ) + (else + (set! (-> this tag (-> tag-pair lo)) s4-1) + ) + ) + s4-1 + ) + ) + ) + ) + +(defmethod add-data! ((this res-lump) (tag res-tag) (arg2 pointer)) + "Given a tag and a pointer to its data, copy it to this res-lump. + This doesn't seem to do the right thing if the given tag is a non-inline tag + with > 1 element." + (let ((a0-2 (allocate-data-memory-for-tag! this tag))) + (when a0-2 + (let* ((v1-2 this) + (a1-1 a0-2) + (s4-0 (&+ (-> v1-2 data-base) (-> a1-1 data-offset))) + ) + (cond + ((zero? (-> a0-2 inlined?)) + (length a0-2) + (set! (-> (the-as (pointer pointer) s4-0) 0) arg2) + ) + (else + (let ((a2-1 (length a0-2))) + (mem-copy! s4-0 arg2 a2-1) + ) + ) + ) + ) + ) + ) + this + ) + +(defmethod add-32bit-data! ((this res-lump) (arg0 res-tag) (arg1 object)) + "Add a single 32-bit value using [[add-data!]]." + (local-vars (sv-16 object)) + (set! sv-16 arg1) + (let* ((v1-0 arg0) + (a1-4 (copy-and-set-field v1-0 inlined? 1)) + ) + (add-data! this a1-4 (& sv-16)) + ) + ) + +(defmethod get-curve-data! ((this res-lump) (arg0 curve) (arg1 symbol) (arg2 symbol) (arg3 float)) + "Read curve data and write it to curve-target. Return #t if both + control points and knots data was succesfully read, #f otherwise." + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((s5-0 #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((a0-2 (get-property-data this arg1 'exact arg3 (the-as pointer #f) (& sv-16) *res-static-buf*))) + (when a0-2 + (set! (-> arg0 cverts) (the-as (inline-array vector) a0-2)) + (set! (-> arg0 num-cverts) (the-as int (-> sv-16 elt-count))) + (when (< 256 (-> arg0 num-cverts)) + (format + 0 + "ERROR: curve has ~D control points--only ~D are allowed. Increase MAX-CURVE-CONTROL-POINTS or shorten the curve.~%" + (-> arg0 num-cverts) + 256 + ) + (set! (-> arg0 num-cverts) 256) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((a0-6 (get-property-data this arg2 'exact arg3 (the-as pointer #f) (& sv-32) *res-static-buf*))) + (when a0-6 + (set! (-> arg0 knots) (the-as (pointer float) a0-6)) + (set! (-> arg0 num-knots) (the-as int (-> sv-32 elt-count))) + (set! s5-0 #t) + ) + ) + ) + ) + s5-0 + ) + ) + +;; WARN: Return type mismatch int vs res-lump. +(defmethod mem-usage ((this res-lump) (usage memory-usage-block) (flags int)) + (local-vars (sv-16 int)) + (let ((s3-0 49) + (s2-0 "res") + ) + (cond + ((logtest? flags 256) + (set! s3-0 45) + (set! s2-0 "camera") + ) + ((logtest? flags 64) + (set! s3-0 44) + (set! s2-0 "entity") + ) + ((logtest? flags 512) + (set! s3-0 77) + (set! s2-0 "art-joint-geo") + ) + ) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let ((v1-19 (asize-of this))) + (+! (-> usage data s3-0 used) v1-19) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-19 15))) + ) + (dotimes (s1-0 (-> this length)) + (when (zero? (-> this tag s1-0 inlined?)) + (let* ((a1-4 this) + (a0-15 s1-0) + (s0-0 (the-as object (-> (the-as (pointer int32) (&+ (-> a1-4 data-base) (-> a1-4 tag a0-15 data-offset)))))) + ) + (when (not (part-group-pointer? (the-as pointer s0-0))) + (let ((v1-34 (rtype-of (the-as int s0-0)))) + (cond + ((or (= v1-34 symbol) (or (= v1-34 type) (= v1-34 pair))) + ) + ((= v1-34 string) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let ((v1-48 ((method-of-type (rtype-of (the-as int s0-0)) asize-of) (the-as int s0-0)))) + (+! (-> usage data s3-0 used) v1-48) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-48 15))) + ) + ) + ((or (= v1-34 nav-mesh) (= v1-34 collide-mesh)) + (let ((a0-48 (the-as (array object) s0-0))) + ((method-of-type (rtype-of a0-48) mem-usage) a0-48 usage flags) + ) + ) + ((= v1-34 array) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let* ((a0-53 (the-as (array object) s0-0)) + (v1-68 ((method-of-type (rtype-of a0-53) asize-of) a0-53)) + ) + (+! (-> usage data s3-0 used) v1-68) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-68 15))) + ) + (set! sv-16 0) + (while (< sv-16 (-> (the-as array s0-0) length)) + (let ((a0-63 (-> (the-as (array object) s0-0) sv-16))) + ((method-of-type (rtype-of a0-63) mem-usage) a0-63 usage flags) + ) + (set! sv-16 (+ sv-16 1)) + ) + ) + (else + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let* ((a0-68 (the-as int s0-0)) + (v1-96 ((method-of-type (rtype-of a0-68) asize-of) a0-68)) + ) + (+! (-> usage data s3-0 used) v1-96) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-96 15))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as res-lump 0) + ) + +(define *res-static-buf* (malloc 'global 128)) diff --git a/goal_src/jak3/engine/game/fact-h.gc b/goal_src/jak3/engine/game/fact-h.gc index 77b67b7be7..2b04d8497b 100644 --- a/goal_src/jak3/engine/game/fact-h.gc +++ b/goal_src/jak3/engine/game/fact-h.gc @@ -5,5 +5,605 @@ ;; name in dgo: fact-h ;; dgos: GAME +;; +++enemy-option +(defenum enemy-option + :bitfield #t + :type uint32 + (user0 0) ;; 1 + (user1 1) ;; 2 + (user2 2) ;; 4 + (user3 3) ;; 8 + (user4 4) ;; 16 + (user5 5) ;; 32 + (user6 6) ;; 64 + (user7 7) ;; 128 + (user8 8) ;; 256 + (user9 9) ;; 512 + (user10 10) ;; 1024 + (user11 11) ;; 2048 + (user12 12) ;; 4096 + (user13 13) ;; 8192 + (user14 14) ;; 16k + (user15 15) + + (dormant 16) ;; hi 1 + (dormant-aware 17) ;; hi 2 + (ambush 18) ;; hi 4 + (spawner 19) ;; hi 8 + (prespawned 20) ;; hi 16 + (multi-focus 21) ;; hi 32 + (has-trigger 22) + (idle-til-trigger 23) ;; hi 128 + (knocked-into-water 24) ;; hi 256 + (water 25) ;; hi 512 + ) +;; ---enemy-option + + +;; +++actor-option +(defenum actor-option + :bitfield #t + :type uint64 + (blocked 0) ;; 1 + (spawns-fuel-cell 1) ;; 2 + (draw-blocker 2) ;; 4 + (loop 3) ;; 8 + (reflect 4) ;; 16 + (wait-for-cue 5) ;; 32 + (auto-pickup 6) ;; 64 + (fuel-cell-no-jump 7) ;; 128 + (suck-in 8) ;; 256 + (fade-out 9) ;; 512 + (big-collision 10) ;; 1024 + (racer-only 11) ;; 2048 + (no-reaction 12) ;; 4096 + (no-shadow 13) ;; 8192 + (wait-for-task-complete 14) ;; 16384 + (respawn-delay 15) ;; 32768 + + (no-amb-sound 16) ;; hi 1 + (user17 17) ;; hi 2 + (user18 18) ;; hi 4 + (user19 19) ;; hi 8 + (user20 20) ;; hi 16 + (cond-hide 21) ;; hi 32 + (cond-respawn 22) ;; hi 64 + (fall 23) ;; hi 128 + (mirror 24) ;; hi 256 + (cond-low-ammo 25) ;; hi 512 + (no-distance-check-fadeout 26) ;; 1024 + (no-track 27) ;; hi 2048 + (dont-override-fact 28) + ) +;; ---actor-option + + +(declare-type actor-group inline-array-class) +(define-extern process-task-mask (function process task-mask)) + ;; DECOMP BEGINS +(deftype fact-bank (basic) + ((eco-level-max float) + (eco-single-inc float) + (eco-full-inc float) + (eco-single-timeout seconds) + (eco-full-timeout seconds) + (dummy seconds) + (health-max-default float) + (health-max-max float) + (health-small-inc float) + (health-single-inc float) + (health-default-inc float) + (health-darkjak-inc float) + (health-darkjak-min float) + (health-darkjak-error float) + (eco-pill-green-max-default float) + (eco-pill-dark-max-default float) + (eco-pill-light-max-default float) + (eco-green-max-default float) + (default-eco-pill-green-inc float) + (default-eco-pill-dark-inc float) + (default-eco-pill-light-inc float) + (buzzer-max-default float) + (buzzer-single-inc float) + (suck-bounce-dist meters) + (suck-suck-dist meters) + (ammo-yellow-max float) + (ammo-red-max float) + (ammo-blue-max float) + (ammo-dark-max float) + (ammo-yellow-start float) + (ammo-red-start float) + (ammo-blue-start float) + (ammo-dark-start float) + (shield-max float) + (shield-use-speed float) + (shield-time-min seconds) + (trick-point-max float) + (super-skill-inc float) + (lightjak-regen-inc float) + (lightjak-swoop-inc float) + (lightjak-freeze-inc float) + (lightjak-freeze-min float) + (lightjak-freeze-duration seconds) + (lightjak-shield-inc float) + (lightjak-shield-hit-inc float) + (darkjak-spin-inc float) + (darkjak-punch-inc float) + (darkjak-flop-inc float) + (darkjak-uppercut-inc float) + (darkjak-bomb0-inc float) + (darkjak-bomb1-inc float) + (darkjak-smack-inc float) + (darkjak-bomb-min float) + (darkjak-button-invis-inc float) + ) + ) + + +(define *FACT-bank* (new 'static 'fact-bank + :eco-level-max 2.0 + :eco-single-inc 1.0 + :eco-full-inc 5.0 + :eco-single-timeout (seconds 5) + :eco-full-timeout (seconds 20) + :dummy (seconds 15) + :health-max-default 8.0 + :health-max-max 16.0 + :health-small-inc 1.0 + :health-single-inc 1.0 + :health-default-inc 2.0 + :health-darkjak-inc 0.1 + :health-darkjak-min 1.05 + :health-darkjak-error 0.05 + :eco-pill-green-max-default 50.0 + :eco-pill-dark-max-default 100.0 + :eco-pill-light-max-default 100.0 + :eco-green-max-default 100.0 + :buzzer-max-default 7.0 + :buzzer-single-inc 1.0 + :suck-bounce-dist (meters 18) + :suck-suck-dist (meters 7.5) + :ammo-yellow-max 100.0 + :ammo-red-max 50.0 + :ammo-blue-max 100.0 + :ammo-dark-max 5.0 + :ammo-yellow-start 100.0 + :ammo-red-start 20.0 + :ammo-blue-start 100.0 + :ammo-dark-start 5.0 + :shield-max 100.0 + :shield-use-speed 10.0 + :shield-time-min (seconds 1.5) + :trick-point-max 999999.0 + :super-skill-inc 3.0 + :lightjak-swoop-inc 1.0 + :lightjak-freeze-inc 50.0 + :lightjak-freeze-min 2.0 + :lightjak-freeze-duration (seconds 15) + :lightjak-shield-inc 3.0 + :lightjak-shield-hit-inc 2.0 + :darkjak-spin-inc 4.0 + :darkjak-punch-inc 4.0 + :darkjak-flop-inc 6.0 + :darkjak-uppercut-inc 6.0 + :darkjak-bomb0-inc 100.0 + :darkjak-bomb1-inc 100.0 + :darkjak-smack-inc 15.0 + :darkjak-bomb-min 50.0 + :darkjak-button-invis-inc 20.0 + ) + ) + +(defun-debug pickup-type->string ((arg0 pickup-type)) + (case arg0 + (((pickup-type eco-pill-dark)) + "eco-pill-dark" + ) + (((pickup-type ammo-dark-light-random)) + "ammo-dark-light-random" + ) + (((pickup-type ammo-random)) + "ammo-random" + ) + (((pickup-type eco-blue)) + "eco-blue" + ) + (((pickup-type gun-yellow-1)) + "gun-yellow-1" + ) + (((pickup-type pass-red)) + "pass-red" + ) + (((pickup-type eco-pill-green)) + "eco-pill-green" + ) + (((pickup-type eco-red)) + "eco-red" + ) + (((pickup-type dark-eco-crystal)) + "dark-eco-crystal" + ) + (((pickup-type skill)) + "skill" + ) + (((pickup-type karma)) + "karma" + ) + (((pickup-type eco-dark)) + "eco-dark" + ) + (((pickup-type gun-red-3)) + "gun-red-3" + ) + (((pickup-type gun-dark-1)) + "gun-dark-1" + ) + (((pickup-type gun-yellow-3)) + "gun-yellow-3" + ) + (((pickup-type gem)) + "gem" + ) + (((pickup-type eco-green)) + "eco-green" + ) + (((pickup-type darkjak)) + "darkjak" + ) + (((pickup-type ammo-yellow)) + "ammo-yellow" + ) + (((pickup-type gun-blue-1)) + "gun-blue-1" + ) + (((pickup-type pass-blue)) + "pass-blue" + ) + (((pickup-type ammo-light-random)) + "ammo-light-random" + ) + (((pickup-type gun-dark-2)) + "gun-dark-2" + ) + (((pickup-type ammo-red)) + "ammo-red" + ) + (((pickup-type lightjak)) + "lightjak" + ) + (((pickup-type fuel-cell)) + "fuel-cell" + ) + (((pickup-type gun-blue-2)) + "gun-blue-2" + ) + (((pickup-type buzzer)) + "buzzer" + ) + (((pickup-type gun-dark-3)) + "gun-dark-3" + ) + (((pickup-type gun-red-1)) + "gun-red-1" + ) + (((pickup-type gun-blue-3)) + "gun-blue-3" + ) + (((pickup-type shield)) + "shield" + ) + (((pickup-type eco-pill-random)) + "eco-pill-random" + ) + (((pickup-type health-max)) + "health-max" + ) + (((pickup-type light-eco-crystal)) + "light-eco-crystal" + ) + (((pickup-type board)) + "board" + ) + (((pickup-type none)) + "none" + ) + (((pickup-type pass-green)) + "pass-green" + ) + (((pickup-type light-random)) + "light-random" + ) + (((pickup-type gun-yellow-2)) + "gun-yellow-2" + ) + (((pickup-type pass-slumb-genb)) + "pass-slumb-genb" + ) + (((pickup-type money)) + "money" + ) + (((pickup-type eco-yellow)) + "eco-yellow" + ) + (((pickup-type ammo-dark)) + "ammo-dark" + ) + (((pickup-type trick-judge)) + "trick-judge" + ) + (((pickup-type eco-pill-light)) + "eco-pill-light" + ) + (((pickup-type trick-point)) + "trick-point" + ) + (((pickup-type ammo-blue)) + "ammo-blue" + ) + (((pickup-type pass-yellow)) + "pass-yellow" + ) + (((pickup-type gun-red-2)) + "gun-red-2" + ) + (((pickup-type health)) + "health" + ) + (else + "*unknown*" + ) + ) + ) + +(deftype fact-info (basic) + ((process process) + (pickup-type pickup-type) + (pickup-amount float) + (pickup-spawn-amount float) + (options actor-option) + (fade-time time-frame) + ) + (:methods + (new (symbol type process pickup-type float) _type_) + (fact-info-method-9 () none) + (reset! (_type_ symbol) none) + (pickup-collectable! (_type_ pickup-type float handle) float) + ) + ) + + +(deftype fact-info-target (fact-info) + ((eco-type int32) + (eco-level float) + (eco-pickup-time time-frame) + (eco-timeout seconds) + (eco-source handle) + (eco-source-time time-frame) + (health float) + (health-max float) + (health-pickup-time time-frame) + (buzzer float) + (buzzer-max float) + (eco-pill-green float) + (eco-pill-green-max float) + (eco-pill-green-pickup-time time-frame) + (eco-pill-dark-pickup-time time-frame) + (eco-pill-light-pickup-time time-frame) + (money-pickup-time time-frame) + (buzzer-pickup-time time-frame) + (task-pickup-time time-frame) + (stop-time-timeout time-frame) + (darkjak-start-time time-frame) + (darkjak-effect-time time-frame) + (lightjak-start-time time-frame) + (lightjak-effect-time time-frame) + (ammo-pickup-time time-frame) + (shield-pickup-time time-frame) + (shield-start-time time-frame) + (shield-use-time time-frame) + (shield-level float) + (shield-attack-id uint32) + (trick-point float) + (trick-point-pickup-time time-frame) + (trick-point-start-time time-frame) + (trick-point-duration time-frame) + (gem-pickup-time time-frame) + (skill-pickup-time time-frame) + (karma-pickup-time time-frame) + (eco-green float) + (eco-green-max float) + (eco-green-pickup-time time-frame) + ) + (:methods + (new (symbol type process-drawable pickup-type float) _type_) + (get-gun-ammo (_type_) float) + ) + ) + + +(deftype fact-info-enemy (fact-info) + ((speed float) + (idle-distance meters) + (notice-top meters) + (notice-bottom meters) + (cam-horz meters) + (cam-vert meters) + (cam-notice-dist meters) + (enemy-options enemy-option) + (trig-dist meters) + (trig-actor-group (pointer actor-group)) + (trig-mask-count int8) + (trig-mask uint8 2) + ) + (:methods + (new (symbol type process (pointer float) pickup-type float) _type_) + (clear-mask-bits (_type_ int) none) + ) + ) + + +(deftype fact-info-crate (fact-info) + ((suck-count int32) + ) + (:methods + (new (symbol type process pickup-type float) _type_) + ) + ) + + +;; WARN: Return type mismatch object vs fact-info. +(defmethod new fact-info ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float)) + (local-vars (sv-16 fact-info) (sv-20 res-lump) (sv-24 task-mask)) + (set! sv-16 (object-new allocation type-to-make (the-as int (-> type-to-make size)))) + (set! sv-20 (the-as res-lump (-> arg0 entity))) + (set! sv-24 (process-task-mask arg0)) + (when (zero? sv-16) + (go process-drawable-art-error "memory") + (return (the-as fact-info 0)) + ) + (set! (-> sv-16 process) arg0) + (set! (-> sv-16 pickup-type) arg1) + (set! (-> sv-16 pickup-amount) arg2) + (let ((s4-1 (-> (lookup-tag-idx sv-20 'eco-info 'base -1000000000.0) lo))) + (when (>= (the-as int s4-1) 0) + (let ((s3-0 (the-as int s4-1)) + (s2-0 (-> sv-20 tag s4-1)) + ) + 0 + (while (= (-> s2-0 name) (-> sv-20 tag s4-1 name)) + (let ((v1-17 (make-property-data sv-20 0.0 (the-as res-tag-pair s3-0) (the-as pointer #f))) + (a0-7 (the int (-> s2-0 key-frame))) + ) + (when (or (< a0-7 0) (and (-> arg0 entity) (logtest? sv-24 (ash 1 a0-7)))) + (when v1-17 + (let ((a0-15 (-> s2-0 elt-count))) + (set! (-> sv-16 pickup-type) (the-as pickup-type (-> (the-as (pointer int32) v1-17)))) + (set! (-> sv-16 pickup-amount) (if (< (the-as uint 1) a0-15) + (the float (-> (the-as (pointer int32) v1-17) 1)) + arg2 + ) + ) + ) + ) + ) + ) + (+! s3-0 1) + (set! s2-0 (-> sv-20 tag s3-0)) + ) + ) + ) + ) + (set! (-> sv-16 options) (res-lump-value sv-20 'options actor-option :time -1000000000.0)) + (if (logtest? (-> sv-16 options) (actor-option fade-out respawn-delay)) + (set! (-> sv-16 fade-time) (the-as time-frame (the int (* 300.0 (res-lump-float sv-20 'timeout))))) + ) + (the-as fact-info sv-16) + ) + +(defmethod pickup-collectable! ((this fact-info) (arg0 pickup-type) (arg1 float) (arg2 handle)) + 0.0 + ) + +(deftype fact-info-enemy-defaults (basic) + ((idle-distance meters) + (pickup-type int32) + (pickup-amount float) + ) + ) + + +(define *fact-info-enemy-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(defmethod new fact-info-enemy ((allocation symbol) + (type-to-make type) + (arg0 process) + (arg1 (pointer float)) + (arg2 pickup-type) + (arg3 float) + ) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((gp-0 + (the-as + fact-info-enemy + ((method-of-type fact-info new) allocation type-to-make arg0 (the-as pickup-type (-> arg1 1)) (-> arg1 2)) + ) + ) + ) + (let ((s5-0 (-> gp-0 process entity))) + (set! (-> gp-0 speed) (res-lump-float s5-0 'speed :default 1.0)) + (set! (-> gp-0 idle-distance) (res-lump-float s5-0 'idle-distance :default (-> arg1 0))) + (set! (-> gp-0 notice-top) (res-lump-float s5-0 'notice-top :default 4096000.0)) + (set! (-> gp-0 notice-bottom) (res-lump-float s5-0 'notice-bottom :default 4096000.0)) + (set! (-> gp-0 cam-horz) (res-lump-float s5-0 'cam-horz)) + (set! (-> gp-0 cam-vert) (res-lump-float s5-0 'cam-vert)) + (set! (-> gp-0 cam-notice-dist) (res-lump-float s5-0 'cam-notice-dist :default -4096.0)) + (set! (-> gp-0 enemy-options) (res-lump-value s5-0 'enemy-options enemy-option :time -1000000000.0)) + (let ((s4-1 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-11 (res-lump-data s5-0 'trigger pointer :tag-ptr (& sv-16)))) + (when v1-11 + (logior! (-> gp-0 enemy-options) (enemy-option has-trigger)) + (let ((a0-13 0)) + (dotimes (a1-11 (the-as int (-> sv-16 elt-count))) + (let ((a2-12 (-> (the-as (pointer uint32) (&+ v1-11 (* a1-11 4)))))) + (when (and (nonzero? a2-12) (< a0-13 2)) + (set! (-> gp-0 trig-mask a0-13) a2-12) + (set! s4-1 (logior s4-1 a2-12)) + (+! a0-13 1) + ) + ) + ) + (set! (-> gp-0 trig-mask-count) a0-13) + ) + ) + ) + (set! (-> gp-0 trig-dist) (if (logtest? s4-1 1) + (res-lump-float s5-0 'trig-dist :default 327680.0) + 327680.0 + ) + ) + (when (logtest? s4-1 2) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data s5-0 'trig-ag pointer :tag-ptr (& sv-32)))) + (if (and v1-20 (nonzero? (-> sv-32 elt-count))) + (set! (-> gp-0 trig-actor-group) (the-as (pointer actor-group) v1-20)) + (clear-mask-bits gp-0 2) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod clear-mask-bits ((this fact-info-enemy) (arg0 int)) + (let ((v1-0 (lognot arg0))) + (dotimes (a1-1 (-> this trig-mask-count)) + (logand! (-> this trig-mask a1-1) v1-0) + ) + ) + 0 + (none) + ) + +(defmethod new fact-info-crate ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float)) + (let ((gp-0 (the-as fact-info-crate ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2)))) + (let ((a0-1 (-> gp-0 process entity))) + (set! (-> gp-0 suck-count) (res-lump-value a0-1 'suck-count int :time -1000000000.0)) + ) + gp-0 + ) + ) + +(defmethod new fact-info-target ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 pickup-type) (arg2 float)) + (let ((gp-0 (the-as fact-info-target ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2)))) + (set! (-> gp-0 eco-source) (the-as handle #f)) + (reset! gp-0 #f) + gp-0 + ) + ) diff --git a/goal_src/jak3/engine/game/game-info-h.gc b/goal_src/jak3/engine/game/game-info-h.gc index a86391574f..dc2e154d25 100644 --- a/goal_src/jak3/engine/game/game-info-h.gc +++ b/goal_src/jak3/engine/game/game-info-h.gc @@ -5,5 +5,414 @@ ;; name in dgo: game-info-h ;; dgos: GAME +;; +++game-vehicles +(defenum game-vehicles + :type uint64 + :bitfield #t + ) +;; ---game-vehicles + + +;; +++game-items +(defenum game-items + :type uint64 + :bitfield #t + ) +;; ---game-items + + +;; +++pickup-type +(defenum pickup-type + :type int32 + (none 0) + (eco-yellow 1) + (eco-red 2) + (eco-blue 3) + (eco-dark 4) + (eco-green 5) + (eco-pill-green 6) + (eco-pill-dark 7) + (eco-pill-light 8) + (eco-pill-random 9) + (money 10) + (fuel-cell 11) + (buzzer 12) + (darkjak 13) + (lightjak 14) + (ammo-yellow 15) + (ammo-red 16) + (ammo-blue 17) + (ammo-dark 18) + (shield 19) + (health 20) + (trick-point 21) + (trick-judge 22) + (gem 23) + (skill 24) + (karma 25) + (gun-red-1 26) + (gun-red-2 27) + (gun-red-3 28) + (gun-yellow-1 29) + (gun-yellow-2 30) + (gun-yellow-3 31) + (gun-blue-1 32) + (gun-blue-2 33) + (gun-blue-3 34) + (gun-dark-1 35) + (gun-dark-2 36) + (gun-dark-3 37) + (board 38) + (pass-red 39) + (pass-green 40) + (pass-yellow 41) + (pass-blue 42) + (ammo-random 43) + (health-max 44) + (light-eco-crystal 45) + (dark-eco-crystal 46) + (pass-slumb-genb 47) + (ammo-light-random 48) + (ammo-dark-light-random 49) + (light-random 50) + ) +;; ---pickup-type + + +;; +++highscore-flags +(defenum highscore-flags + :bitfield #t + :type uint8 + (time) + ) +;; ---highscore-flags + + +;; +++continue-flags +;; TODO copied from jak 2 +(defenum continue-flags + :type uint32 + :bitfield #t + ;(continue-flag-0 0) + (scene-wait 1) + (change-continue 2) + (no-auto 3) + (no-blackout 4) + (game-start 5) + (demo-end 6) + (warp-gate 7) + (demo 8) + (intro 9) + (hero-mode 10) + (demo-movie 11) + (title 12) + (title-movie 13) + (continue-flag-14 14) + (continue-flag-15 15) + (continue-flag-16 16) + (test 17) + (record-path 18) + (pilot 19) + (pilot-dax 20) + (record-sig 21) + (indax 22) + ) +;; ---continue-flags + + +(declare-type game-info basic) +(define-extern *game-info* game-info) +(declare-type entity-perm-array inline-array-class) + ;; DECOMP BEGINS +(local-vars (gp-0 game-info)) + +(deftype game-bank (basic) + ((life-max-default float) + (life-start-default float) + (life-single-inc float) + (money-task-inc float) + (money-oracle-inc float) + ) + ) + + +(define *GAME-bank* (new 'static 'game-bank + :life-max-default 99.0 + :life-start-default 5.0 + :life-single-inc 1.0 + :money-task-inc 90.0 + :money-oracle-inc 120.0 + ) + ) + +(deftype actor-id (uint32) + () + ) + +(deftype highscore-info (structure) + ((flags highscore-flags) + (award-scores float 3) + (bronze-score float :overlay-at (-> award-scores 0)) + (silver-score float :overlay-at (-> award-scores 1)) + (gold-score float :overlay-at (-> award-scores 2)) + ) + (:methods + (get-rank (_type_ float) int) + ) + ) + + +(deftype level-buffer-state (structure) + ((name symbol) + (display? symbol) + (force-vis? symbol) + (force-inside? symbol) + ) + :pack-me + ) + + +(deftype level-buffer-state-small (structure) + ((name basic) + (display? symbol) + ) + ) + + +(deftype load-state (basic) + ((want level-buffer-state 10 :inline) + (want-exp level-buffer-state 10 :inline) + (target level-buffer-state 10 :inline) + (want-sound sound-bank-state 3 :inline) + (want-exp-sound sound-bank-state 6 :inline) + (target-sound sound-bank-state 6 :inline) + (vis-nick symbol) + (command-list pair) + (object-name string 256) + (object-status basic 256) + (update-callback basic) + ) + (:methods + (new (symbol type) _type_) + (load-state-method-9 () none) + (load-state-method-10 () none) + (load-state-method-11 () none) + (load-state-method-12 () none) + (load-state-method-13 () none) + (load-state-method-14 () none) + (load-state-method-15 () none) + (load-state-method-16 () none) + (load-state-method-17 () none) + (load-state-method-18 () none) + (load-state-method-19 () none) + (load-state-method-20 () none) + (load-state-method-21 () none) + ) + ) + + +;; WARN: Return type mismatch none vs load-state. +(defmethod new load-state ((allocation symbol) (type-to-make type)) + (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> a0-1 update-callback) #f) + (the-as load-state ((method-of-object a0-1 load-state-method-9))) + ) + ) + +(deftype continue-point (basic) + ((name string) + (level symbol) + (flags continue-flags) + (trans vector :inline) + (camera-trans vector :inline) + (quat vector4h :inline) + (camera-rot vector3s 3 :inline) + (on-goto pair :offset 76) + (vis-nick symbol :offset 80) + (vehicle-type uint8 :offset 84) + (want-count int8 :offset 85) + (want level-buffer-state-small :offset 88) + (want-sound symbol 3 :offset 92) + ) + (:methods + (continue-point-method-9 () none) + (continue-point-method-10 () none) + (continue-point-method-11 () none) + ) + ) + + +(deftype game-info (basic) + ((mode symbol) + (save-name string) + (life float) + (life-max float) + (money float) + (money-total float) + (money-per-level uint8 32) + (deaths-per-level uint8 32) + (buzzer-total float) + (fuel float) + (gem float) + (gem-total float) + (skill float) + (skill-total float) + (skill-high-watermark float) + (light-crystal float) + (dark-crystal float) + (karma float) + (eco-pill-dark float) + (eco-pill-dark-total float) + (eco-pill-light float) + (eco-pill-light-total float) + (features game-feature) + (debug-features game-feature) + (old-features game-feature) + (items game-items) + (debug-items game-items) + (old-items game-items) + (secrets game-secrets) + (purchase-secrets game-secrets) + (gun-type pickup-type) + (gun-ammo float 4) + (shield float) + (vehicles game-vehicles) + (debug-vehicles game-vehicles) + (old-vehicles game-vehicles) + (score float) + (score-owner handle) + (timer time-frame) + (timer-owner handle) + (timer-flash symbol) + (counter float) + (counter-flash basic) + (health-bar float) + (health-bar-owner uint64) + (enemies-killed float) + (civilians-killed float) + (marauders-killed float) + (shots-fired float 4) + (shots-hit float 4) + (crates-opened float) + (health-collected float) + (board-time uint64) + (attack-id uint32) + (perm-list entity-perm-array) + (task-perm-list entity-perm-array) + (current-continue continue-point) + (last-continue continue-point) + (task-node-commands pair :offset 416) + (task-node-exclusive pair) + (task-counter uint32) + (unknown-arr4 (array uint16)) + (level-opened uint8 32) + (total-deaths int32) + (continue-deaths int32) + (task-deaths int32) + (total-trys int32) + (game-start-time uint64) + (continue-time uint64) + (death-time uint64) + (hit-time uint64) + (task-pickup-time uint64) + (unknown-arr0 (array uint64)) + (unknown-arr1 (array uint64)) + (unknown-arr2 (array uint64)) + (death-pos vector-array) + (stop-watch-start time-frame) + (stop-watch-stop time-frame) + (blackout-time time-frame) + (letterbox-time time-frame) + (hint-play-time time-frame) + (display-text-time time-frame) + (display-text-handle handle) + (death-movie-tick int32) + (want-auto-save symbol) + (auto-save-proc handle) + (auto-save-status mc-status-code) + (auto-save-card int32) + (auto-save-which int32) + (auto-save-count int32) + (pov-camera-handle handle) + (other-camera-handle handle) + (controller handle 2) + (race-timer time-frame) + (race-current-lap-count int32) + (race-total-lap-count int32) + (race-position int32) + (race-number-turbos int32) + (bot-health float 3) + (demo-state uint32) + (wanted-flash symbol) + (distance float) + (kiosk-timeout time-frame) + (pause-start-time time-frame) + (game-score (array float)) + (goal float) + (miss float) + (miss-max float) + (unknown-arr3 (array uint64)) + (live-eco-pill-count int32) + (live-gem-count int32) + (air-supply float) + (homing-beacon int32) + (dark-eco-pickup int32) + (green-eco-pickup int32) + (health-bar-vehicle float) + (dust-storm handle) + (flut-count int32) + (death-resetter resetter-spec :inline) + (current-vehicle uint8) + (vehicle-turbo-ready float) + (percent-complete float) + ) + (:methods + (game-info-method-9 () none) + (game-info-method-10 () none) + (game-info-method-11 () none) + (game-info-method-12 () none) + (game-info-method-13 () none) + (game-info-method-14 () none) + (game-info-method-15 () none) + (game-info-method-16 () none) + (game-info-method-17 () none) + (game-info-method-18 () none) + (game-info-method-19 () none) + (game-info-method-20 () none) + (game-info-method-21 () none) + (game-info-method-22 () none) + (game-info-method-23 () none) + (game-info-method-24 () none) + (game-info-method-25 () none) + (get-next-attack-id! (_type_) uint) + (game-info-method-27 () none) + (game-info-method-28 () none) + (game-info-method-29 () none) + (game-info-method-30 () none) + (game-info-method-31 () none) + (game-info-method-32 () none) + (game-info-method-33 () none) + (game-info-method-34 () none) + ) + ) + + +(defmethod get-next-attack-id! ((this game-info)) + (let ((v0-0 (+ (-> this attack-id) 1))) + (set! (-> this attack-id) v0-0) + v0-0 + ) + ) + +(set! gp-0 (when (or (not *game-info*) (zero? *game-info*)) + (set! gp-0 (new 'static 'game-info :mode 'debug :current-continue #f :last-continue #f)) + (set! (-> gp-0 unknown-arr0) (new 'global 'boxed-array uint64 138)) + (set! (-> gp-0 unknown-arr3) (new 'global 'boxed-array uint64 138)) + (set! (-> gp-0 unknown-arr1) (new 'global 'boxed-array uint64 32)) + (set! (-> gp-0 unknown-arr2) (new 'global 'boxed-array uint64 32)) + (set! *game-info* gp-0) + gp-0 + ) + ) diff --git a/goal_src/jak3/engine/game/main-h.gc b/goal_src/jak3/engine/game/main-h.gc index 766f912de4..efc9fb580f 100644 --- a/goal_src/jak3/engine/game/main-h.gc +++ b/goal_src/jak3/engine/game/main-h.gc @@ -11,18 +11,38 @@ (defenum collide-spec :bitfield #t :type uint32 - (cs0 0) - (cs1 1) - (cs2 2) - (cs3 3) - (cs4 4) - (cs5 5) - (cs6 6) - (cs7 7) - (cs8 8) - (cs9 9) - (cs10 10) - (cs11 11) + (backgnd 0) + (jak 1) + (bot 2) + (crate 3) + (civilian 4) + (enemy 5) + (obstacle 6) + (vehicle-sphere 7) + (hit-by-player-list 8) + (hit-by-others-list 9) + (player-list 10) + (water 11) + (collectable 12) + (blocking-plane 13) + (projectile 14) + (jak-vulnerable 15) + (camera-blocker 16) + (los-blocker 17) + (notice-blue-eco-powerup 18) + (tobot 19) + (pusher 20) + (vehicle-mesh 21) + (bot-targetable 22) + (jak-vehicle 23) + (special-obstacle 24) + (mech-punch 25) + (obstacle-for-jak 26) + (vehicle-mesh-probeable 27) + (impenetrable-obj 28) + (shield 29) + (vehicle-mesh-no-block-use 30) + (vehicle-sphere-no-probe 31) ) ;; ---main-h:collide-spec @@ -435,7 +455,7 @@ :show-back-faces? #t :show-normals? #f :ghost-hidden? #t - :cspec (collide-spec cs3 cs4 cs5) + :cspec (collide-spec crate civilian enemy) :track #x1 :bbox-radius 24576.0 :camera-to-bbox-dist 65536.0 diff --git a/goal_src/jak3/engine/game/penetrate-h.gc b/goal_src/jak3/engine/game/penetrate-h.gc index 68ad9d53e8..b1fc9be11b 100644 --- a/goal_src/jak3/engine/game/penetrate-h.gc +++ b/goal_src/jak3/engine/game/penetrate-h.gc @@ -5,5 +5,77 @@ ;; name in dgo: penetrate-h ;; dgos: GAME +;; +++penetrate +(defenum penetrate + :type uint64 + :bitfield #t + (touch 0) + (generic-attack 1) + (lunge 2) + (flop 3) + (punch 4) + (spin 5) + (roll 6) + (uppercut 7) + (bonk 8) + (tube 9) + (vehicle 10) + (flut-attack 11) + (board 12) + (mech 13) + (mech-punch 14) + (mech-bonk 15) + (dark-skin 16) + (dark-punch 17) + (dark-bomb 18) + (dark-smack 19) + (flut 20) + (shield 21) + (explode 22) + (jak-yellow-shot 23) + (jak-red-shot 24) + (jak-blue-shot 25) + (jak-dark-shot 26) + (enemy-yellow-shot 27) + (enemy-dark-shot 28) + (eco-yellow 29) + (eco-red 30) + (eco-blue 31) + (eco-green 32) + (knocked 33) + (jak-red-shockwave 34) + (jak-dark-nuke 35) + (jak-dark-blackhole 36) + (emp-blast 37) + (penetrate-38 38) + (penetrate-39 39) + (penetrate-40 40) + (penetrate-41 41) + (penetrate-42 42) + (penetrate-43 43) + (penetrate-44 44) + (penetrate-45 45) + (penetrate-46 46) + (penetrate-47 47) + (penetrate-48 48) + (penetrate-49 49) + (penetrate-50 50) + (penetrate-51 51) + (penetrate-52 52) + (penetrate-53 53) + (penetrate-54 54) + (penetrate-55 55) + (penetrate-56 56) + (penetrate-57 57) + (penetrate-58 58) + (penetrate-59 59) + (penetrate-60 60) + (penetrate-61 61) + (penetrate-62 62) + (penetrate-63 63) + ) +;; ---penetrate + + ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/gfx/background/prototype-h.gc b/goal_src/jak3/engine/gfx/background/prototype-h.gc index 4f9a4d7873..3d3e995018 100644 --- a/goal_src/jak3/engine/gfx/background/prototype-h.gc +++ b/goal_src/jak3/engine/gfx/background/prototype-h.gc @@ -5,5 +5,190 @@ ;; name in dgo: prototype-h ;; dgos: GAME +;; +++prototype-flags +(defenum prototype-flags + :bitfield #t + :type uint16 + (disable 0) ;; set from debug menu, for debugging + (tpage-alpha 2) + (vanish 3) + (visible 5) ;; set by prototypes-game-visible-set! to hide things on purpose + (no-collide 6) + (tpage-water 7) + ) +;; ---prototype-flags + + +;; +++instance-flags +(defenum instance-flags + :type uint16 + :bitfield #t + (no-collide 0) + ) +;; ---instance-flags + + +(declare-type prototype-tie drawable) +(declare-type collide-hash-fragment-array basic) + ;; DECOMP BEGINS +(deftype prototype-bucket (basic) + ((name string) + (flags prototype-flags) + (texture-masks-index uint16) + (in-level uint16) + (utextures uint16) + (geometry drawable 4) + (dists vector :inline) + (rdists vector :inline) + (near-plane meters :overlay-at (-> dists data 0)) + (near-stiff meters :overlay-at (-> dists data 1)) + (mid-plane meters :overlay-at (-> dists data 2)) + (far-plane meters :overlay-at (-> dists data 3)) + (rlength-near float :overlay-at (-> rdists data 0)) + (rlength-stiff float :overlay-at (-> rdists data 1)) + (rlength-mid float :overlay-at (-> rdists data 2)) + (stiffness float :overlay-at (-> rdists data 3)) + ) + ) + + +(deftype prototype-bucket-shrub (prototype-bucket) + ((next uint32 4) + (count uint16 4) + (mod-count uint16 4) + (last dma-packet 4) + (next-clear uint128 :overlay-at (-> next 0)) + (count-clear uint64 :overlay-at (-> count 0)) + (last-clear uint128 :overlay-at (-> last 0)) + ) + ) + + +(deftype prototype-inline-array-shrub (drawable) + ((length int16 :offset 6) + (data prototype-bucket-shrub 1 :inline :offset 32) + (pad uint32) + ) + ) + + +(deftype prototype-array-shrub-info (basic) + ((prototype-inline-array-shrub prototype-inline-array-shrub) + (wind-vectors uint32) + (wind-count int32) + ) + ) + + +(deftype prototype-bucket-tie (prototype-bucket) + ((next uint32 12) + (count uint16 12) + (frag-count uint8 4) + (index-start uint8 4) + (base-qw uint16 4) + (tie-rvanish float) + (tie-vanish-far float) + (envmap-rfade float) + (envmap-fade-far float) + (envmap-shader adgif-shader) + (tint-color uint32) + (collide-hash-fragment-array collide-hash-fragment-array) + (tie-colors time-of-day-palette) + (data uint32 :dynamic) + (color-index-qwc uint32 :dynamic) + (scissor-frag-count uint8 :overlay-at (-> frag-count 0)) + (near-frag-count uint8 :overlay-at (-> frag-count 1)) + (mid-frag-count uint8 :overlay-at (-> frag-count 2)) + (far-frag-count uint8 :overlay-at (-> frag-count 3)) + (scissor-index-start uint8 :overlay-at (-> index-start 0)) + (near-index-start uint8 :overlay-at (-> index-start 1)) + (mid-index-start uint8 :overlay-at (-> index-start 2)) + (far-index-start uint8 :overlay-at (-> index-start 3)) + (scissor-base-qw uint16 :overlay-at (-> base-qw 0)) + (near-base-qw uint16 :overlay-at (-> base-qw 1)) + (mid-base-qw uint16 :overlay-at (-> base-qw 2)) + (far-base-qw uint16 :overlay-at (-> base-qw 3)) + (tie-next uint32 4 :overlay-at (-> next 0)) + (tie-scissor-next uint32 :overlay-at (-> next 0)) + (tie-near-next uint32 :overlay-at (-> next 1)) + (tie-mid-next uint32 :overlay-at (-> next 2)) + (tie-far-next uint32 :overlay-at (-> next 3)) + (trans-next uint32 4 :overlay-at (-> next 0)) + (trans-scissor-next uint32 4 :overlay-at (-> next 0)) + (trans-near-next uint32 :overlay-at (-> next 1)) + (trans-mid-next uint32 :overlay-at (-> next 2)) + (trans-far-next uint32 :overlay-at (-> next 3)) + (water-next uint32 4 :overlay-at (-> next 0)) + (water-scissor-next uint32 4 :overlay-at (-> next 0)) + (water-near-next uint32 :overlay-at (-> next 1)) + (water-mid-next uint32 :overlay-at (-> next 2)) + (water-far-next uint32 :overlay-at (-> next 3)) + (envmap-next uint32 4 :overlay-at (-> next 4)) + (envmap-scissor-next uint32 4 :overlay-at (-> next 4)) + (envmap-near-next uint32 :overlay-at (-> next 5)) + (envmap-mid-next uint32 :overlay-at (-> next 6)) + (envmap-far-next uint32 :overlay-at (-> next 7)) + (generic-next uint32 3 :overlay-at (-> next 8)) + (generic-near-next uint32 :overlay-at (-> next 8)) + (generic-mid-next uint32 :overlay-at (-> next 9)) + (generic-far-next uint32 :overlay-at (-> next 10)) + (vanish-next uint32 :overlay-at (-> next 11)) + (tie-count uint16 4 :overlay-at (-> count 0)) + (tie-scissor-count uint16 :overlay-at (-> count 0)) + (tie-near-count uint16 :overlay-at (-> count 1)) + (tie-mid-count uint16 :overlay-at (-> count 2)) + (tie-far-count uint16 :overlay-at (-> count 3)) + (trans-count uint16 4 :overlay-at (-> count 0)) + (trans-scissor-count uint16 :overlay-at (-> count 0)) + (trans-near-count uint16 :overlay-at (-> count 1)) + (trans-mid-count uint16 :overlay-at (-> count 2)) + (trans-far-count uint16 :overlay-at (-> count 3)) + (water-count uint16 4 :overlay-at (-> count 0)) + (water-scissor-count uint16 :overlay-at (-> count 0)) + (water-near-count uint16 :overlay-at (-> count 1)) + (water-mid-count uint16 :overlay-at (-> count 2)) + (water-far-count uint16 :overlay-at (-> count 3)) + (envmap-count uint16 4 :overlay-at (-> count 4)) + (envmap-scissor-count uint16 :overlay-at (-> count 4)) + (envmap-near-count uint16 :overlay-at (-> count 5)) + (envmap-mid-count uint16 :overlay-at (-> count 6)) + (envmap-far-count uint16 :overlay-at (-> count 7)) + (generic-count uint16 3 :overlay-at (-> count 8)) + (generic-near-count uint16 :overlay-at (-> count 8)) + (generic-mid-count uint16 :overlay-at (-> count 9)) + (generic-far-count uint16 :overlay-at (-> count 10)) + (vanish-count uint16 :overlay-at (-> count 11)) + (next-clear uint128 3 :overlay-at (-> next 0)) + (count-clear uint64 3 :overlay-at (-> count 0)) + (tie-geom prototype-tie 4 :overlay-at (-> geometry 0)) + ) + ) + + +(deftype prototype-array-tie (array) + ((array-data prototype-bucket-tie :dynamic :offset 16) + ) + (:methods + (prototype-array-tie-method-9 () none) + ) + ) + + +(deftype proxy-prototype-array-tie (basic) + ((prototype-array-tie prototype-array-tie) + (wind-vectors uint32) + (wind-count uint16) + (prototype-max-qwc uint16) + ) + ) + + +(deftype instance (drawable) + ((bucket-index uint16 :offset 6) + (origin matrix4h :inline) + (flags instance-flags :overlay-at (-> origin data 7)) + (wind-index uint16 :overlay-at (-> origin data 15)) + ) + ) diff --git a/goal_src/jak3/engine/gfx/background/wind-h.gc b/goal_src/jak3/engine/gfx/background/wind-h.gc index fa6fafdc7a..c1b5187e1f 100644 --- a/goal_src/jak3/engine/gfx/background/wind-h.gc +++ b/goal_src/jak3/engine/gfx/background/wind-h.gc @@ -7,3 +7,78 @@ ;; DECOMP BEGINS +(deftype wind-vector (structure) + ((wind-pos vector4w :inline) + (wind-vel vector4w :inline) + (stiffness float :overlay-at (-> wind-vel data 3)) + ) + ) + + +(define *wind-scales* (new 'static 'boxed-array :type uint8 + #x2 + #x5 + #x2 + #x3 + #x2 + #x2 + #x3 + #x10 + #xa + #x2 + #x4 + #x2 + #x8 + #x2 + #x2 + #x10 + #x2 + #x2 + #x8 + #x2 + #x10 + #x2 + #x4 + #x10 + #xa + #x2 + #x4 + #x2 + #x8 + #x2 + #x2 + #x10 + ) + ) + +(deftype wind-work (basic) + ((wind-array vector 64 :inline) + (wind-normal vector :inline) + (wind-temp vector :inline) + (wind-force float 64) + (wind-const vector :inline) + (wind-time uint32) + (wait-to-vu0 uint32) + (wait-to-spr uint32) + (wait-from-spr uint32) + (spr-index uint32) + (count uint32) + (next-count uint32) + (last-count uint32) + (to-spr uint32) + (from-spr uint32) + (next-mem uint32) + (last-mem uint32) + (next-spr uint32) + (last-spr uint32) + (to-ptrs uint32 3) + ) + ) + + +(deftype wind-dma (structure) + ((buffer0 wind-vector 128 :inline) + (buffer1 wind-vector 128 :inline) + (buffer2 wind-vector 128 :inline) + ) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc b/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc index 9a489e49a2..ce5ea3c255 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc @@ -7,3 +7,107 @@ ;; DECOMP BEGINS +(deftype merc-matrix (structure) + ((quad uint128 8) + (vector vector 8 :inline :overlay-at (-> quad 0)) + (tag uint64 :overlay-at (-> quad 0)) + ) + ) + + +(deftype generic-merc-tag (dma-packet) + ((next-ptr uint32 :overlay-at vif1) + (size uint32 :overlay-at vif0) + ) + ) + + +(deftype generic-merc-ctrl (structure) + ((tag generic-merc-tag :inline) + (lights vu-lights :inline) + (header merc-ctrl-header :inline) + (effect merc-effect :inline) + ) + ) + + +(deftype generic-merc-ctrl-with-sfx (generic-merc-ctrl) + ((sfx-data uint128 11) + ) + ) + + +(deftype generic-merc-input (structure) + ((geo-tag generic-merc-tag :inline) + (geo-block uint8 1296) + (byte-header merc-byte-header :inline :overlay-at (-> geo-block 0)) + (matrix merc-matrix 9 :inline) + (control generic-merc-ctrl-with-sfx :inline) + (end-tag generic-merc-tag :inline) + (shader adgif-shader :inline) + ) + ) + + +(deftype generic-merc-output (structure) + ((info gsf-info :inline) + (header gsf-header :inline) + (index-kick-table uint16 80) + (index-table uint8 160 :overlay-at (-> index-kick-table 0)) + (inverse-table uint8 256) + (vertex-table gsf-vertex 72 :inline) + ) + ) + + +(deftype generic-merc-dcache (structure) + ((output-a generic-merc-output :inline) + (output-b generic-merc-output :inline) + (inv-table-1 uint8 544) + (inv-table-7 uint8 544) + (inv-safety uint8 16) + (effect-data uint8 1584) + ) + ) + + +(deftype gm-shadow (structure) + ((perspective matrix :inline) + (isometric matrix :inline) + (inv-camera-rot matrix :inline) + (envmap-shader adgif-shader :inline) + (current-chain uint32) + (next-chain uint32) + (buf-index uint32) + (fragment-count uint32) + (write-limit int32) + (indexed-input-base generic-merc-input) + (other-input-base generic-merc-input) + (indexed-output-base generic-merc-output) + (other-output-base generic-merc-output) + (p-input uint32) + (gsf-buf generic-merc-dcache) + (p-fheader merc-fp-header) + (curr-chain basic) + (mercneric-convert basic) + (generic-prepare-dma-single basic) + (generic-prepare-dma-double basic) + (generic-light-proc basic) + (generic-envmap-proc basic) + (high-speed-reject basic) + (dummy-0 uint32) + (hsr-xmult vector :inline) + (hsr-ymult vector :inline) + (warp-consts vector :inline) + ) + ) + + +(deftype generic-merc-work (structure) + ((input-a generic-merc-input :inline) + (input-b generic-merc-input :inline) + (ctrl generic-merc-ctrl-with-sfx :inline) + (shadow gm-shadow :inline) + (stack uint128 16) + ) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc b/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc index d2c4ac219f..27a7fd74b1 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc @@ -5,5 +5,409 @@ ;; name in dgo: merc-h ;; dgos: GAME +;; +++effect-bits +(defenum effect-bits + :type uint8 + :bitfield #t + (texscroll 0) + (no-fade-out 1) ;; translucent. + (ripple 2) + (emerc 3) ;; envmap?? + (ignore-tod-for-envmap-tint 4) ;; color thing + (force-mercneric 5) ;; some mercneric-only effect + (cross-fade 6) ;; WARP? + (ignore-alpha 7) + ) +;; ---effect-bits + + ;; DECOMP BEGINS +(deftype ripple-merc-query (inline-array-class) + "Information about which merc vertices to apply the 'ripple' effect to." + ((start-vertex int32) + (vertex-skip int32) + (vertex-count int32) + (current-loc int32) + (data vector :inline :dynamic) + ) + ) + + +(set! (-> ripple-merc-query heap-base) (the-as uint 16)) + +(deftype merc-byte-header (structure) + "Header for a single [[merc-fragment]] uploaded to the VU." + ((srcdest-off uint8) + (rgba-off uint8) + (lump-off uint8) + (fp-off uint8) + (mat1-cnt uint8) + (mat2-cnt uint8) + (mat3-cnt uint8) + (samecopy-cnt uint8) + (crosscopy-cnt uint8) + (strip-len uint8) + (mm-quadword-fp-off uint8) + (mm-quadword-size uint8) + (perc-off uint8) + (mat-slot uint8 10) + ) + ) + + +(deftype merc-fragment (structure) + "A single merc fragment that fits into VU memory." + ((header merc-byte-header :inline) + (rest uint8 1) + ) + (:methods + (login-adgifs (_type_) merc-fragment) + ) + ) + + +(deftype merc-vtx (structure) + "A packed merc vertex." + ((mat-0 uint8) + (mat-1 uint8) + (nrm-x uint8) + (pos-x uint8) + (dst-0 uint8) + (dst-1 uint8) + (nrm-y uint8) + (pos-y uint8) + (tex-s uint8) + (tex-t uint8) + (nrm-z uint8) + (pos-z uint8) + ) + ) + + +(deftype merc-fp-header (structure) + "Merc header for a [[merc-fragment]]'s floating point data." + ((x-add float) + (y-add float) + (z-add float) + (shader-cnt uint8) + (kick-info-offset uint8) + (kick-info-step uint8) + (hword-cnt uint8) + ) + ) + + +;; WARN: Return type mismatch int vs merc-fp-header. +(defun merc-fragment-fp-data ((frag merc-fragment)) + "Get the floating point data of a [[merc-fragment]]." + (the-as merc-fp-header (+ (the-as uint frag) (* (-> frag header mm-quadword-fp-off) 16))) + ) + +(deftype merc-mat-dest (structure) + "Metadata for a merc matrix upload." + ((matrix-number uint8) + (matrix-dest uint8) + ) + :pack-me + ) + + +(deftype merc-fragment-control (structure) + "Data about a [[merc-fragment]] needed for merc DMA generation." + ((unsigned-four-count uint8) + (lump-four-count uint8) + (fp-qwc uint8) + (mat-xfer-count uint8) + (mat-dest-data merc-mat-dest :dynamic) + ) + ) + + +(deftype merc-blend-data (structure) + "Packed BLERC data." + ((int8-data int8 :dynamic) + ) + ) + + +(deftype merc-blend-ctrl (structure) + "Information about the vertices of a model modified by BLERC." + ((blend-vtx-count uint8) + (nonzero-index-count uint8) + (bt-index uint8 :dynamic) + ) + ) + + +(deftype mei-envmap-tint (structure) + "Data for the extra 'envmap tint' effect." + ((fade0 float) + (fade1 float) + (tint rgba) + (dummy int32) + ) + ) + + +(deftype mei-texture-scroll (structure) + "Data for the extra 'texscroll' effect." + ((max-dist float) + (st-int-scale uint8) + (time-factor uint8) + (scroll-dir uint8) + (cached-time uint8) + (time-delta uint8) + (dummy uint8 7) + ) + ) + + +(deftype mei-ripple (structure) + "Data for the extra 'ripple' effect." + ((x-base float) + (z-base float) + (grid-size float) + (angle float) + ) + ) + + +(deftype merc-extra-info (structure) + "Info for merc extra effects." + ((envmap-tint-offset uint8) + (shader-offset uint8) + (texture-scroll-offset uint8) + (ripple-offset uint8) + (dummy uint8 12) + ) + ) + + +(deftype merc-effect (structure) + "A collection of [[merc-fragment]]s with data for any extra effects." + ((frag-geo merc-fragment) + (frag-ctrl merc-fragment-control) + (blend-data merc-blend-data) + (blend-ctrl merc-blend-ctrl) + (merc-effect-version uint8) + (effect-bits uint8) + (frag-count uint16) + (blend-frag-count uint16) + (tri-count uint16) + (dvert-count uint16) + (texture-index uint8) + (effect-usage uint8) + (extra-info merc-extra-info) + ) + (:methods + (login-adgifs (_type_) none) + ) + ) + + +(deftype merc-eye-ctrl (structure) + "Eye info for both eyes of a merc model." + ((eye-slot int8) + (shader-offset int8) + (shader-count int8) + (eye-ctrl-index int8) + (shader adgif-shader 6 :inline) + (left-iris-shader adgif-shader :inline :overlay-at (-> shader 0)) + (left-pupil-shader adgif-shader :inline :overlay-at (-> shader 1)) + (left-lid-shader adgif-shader :inline :overlay-at (-> shader 2)) + (right-iris-shader adgif-shader :inline :overlay-at (-> shader 3)) + (right-pupil-shader adgif-shader :inline :overlay-at (-> shader 4)) + (right-lid-shader adgif-shader :inline :overlay-at (-> shader 5)) + ) + ) + + +(deftype merc-eye-anim-frame (structure) + "A single frame of a merc eye animation." + ((pupil-trans-x int8) + (pupil-trans-y int8) + (blink int8) + (iris-scale int8 :offset 4) + (pupil-scale int8 :offset 5) + (lid-scale int8 :offset 6) + (dword uint64 :overlay-at pupil-trans-x) + ) + :pack-me + ) + + +(deftype merc-eye-anim-block (structure) + "A list of eye animation frames." + ((max-frame int16) + (data merc-eye-anim-frame :inline :dynamic) + ) + ) + + +(deftype texture-usage-group (structure) + ((data texture-masks 7 :inline) + ) + ) + + +(deftype merc-ctrl-header (structure) + "The header for a [[merc-ctrl]], +containing metadata about the model used for drawing." + ((xyz-scale float) + (st-magic uint32) + (st-out-a uint32) + (st-out-b uint32) + (st-vif-add uint32) + (st-int-off uint16) + (st-int-scale uint16) + (effect-count uint32) + (blend-target-count uint32) + (fragment-count uint16) + (tri-count uint16) + (matrix-count uint8) + (shader-count uint8) + (transform-vertex-count uint16) + (dvert-count uint16) + (one-mat-count uint16) + (two-mat-count uint16) + (two-mat-reuse-count uint16) + (three-mat-count uint16) + (three-mat-reuse-count uint16) + (shader-upload-count uint8) + (matrix-upload-count uint8) + (same-copy-count uint16) + (cross-copy-count uint16) + (num-verts uint16) + (longest-edge float) + (eye-ctrl merc-eye-ctrl) + (pad uint32 3) + (masks-padding texture-masks :inline) + (texture-usage-group texture-usage-group :overlay-at (-> masks-padding data 0 mask data 0)) + (dummy-bytes uint8 :dynamic :overlay-at fragment-count) + (envmap-tint uint32 :overlay-at fragment-count) + (query basic :overlay-at matrix-count) + (needs-clip uint8 :overlay-at dvert-count) + (use-isometric uint8 :offset 41) + (use-attached-shader uint8 :overlay-at one-mat-count) + (display-triangles uint8 :offset 43) + (death-vertex-skip uint16 :overlay-at two-mat-count) + (death-start-vertex uint16 :overlay-at two-mat-reuse-count) + (death-effect uint32 :overlay-at three-mat-count) + (use-translucent uint8 :overlay-at shader-upload-count) + (display-this-fragment uint8 :overlay-at matrix-upload-count) + (use-warp uint8 :overlay-at same-copy-count) + (ignore-alpha uint8 :offset 55) + (force-fade uint8 :overlay-at cross-copy-count) + (disable-fog uint8 :offset 57) + (disable-envmap uint8 :overlay-at num-verts) + ) + ) + + +(deftype merc-ctrl (art-element) + "The merc data for a single model as it's stored in an art group. +Consists of a header and a list of [[merc-effect]]s." + ((num-joints int32 :overlay-at length) + (seg-table (array uint64) :overlay-at (-> pad 0)) + (header merc-ctrl-header :inline) + (effect merc-effect :dynamic) + ) + ) + + +(deftype merc-vu1-low-mem (structure) + ((tri-strip-gif gs-gif-tag :inline) + (ad-gif gs-gif-tag :inline) + (hvdf-offset vector :inline) + (perspective uint128 4) + (fog vector :inline) + ) + ) + + +(deftype emerc-vu1-low-mem (structure) + ((tri-strip-gif gs-gif-tag :inline) + (ad-gif gs-gif-tag :inline) + (hvdf-offset vector :inline) + (perspective vector 4 :inline) + (fog vector :inline) + (unperspect vector :inline) + ) + ) + + +(deftype texture-login-data (structure) + ((default-texture-index int32) + (current-texture-index int32) + (texture-usage-group texture-usage-group) + (merc-ctrl-header merc-ctrl-header) + (name basic) + ) + ) + + +(deftype ripple-wave (structure) + ((scale float) + (offs float) + (xdiv int16) + (zdiv int16) + (speed float) + (xmul float) + (zmul float) + (delta float) + ) + :pack-me + ) + + +(deftype ripple-wave-set (basic) + ((count int32) + (converted basic) + (normal-scale float) + (wave ripple-wave 4 :inline) + (frame-save uint64) + ) + ) + + +(deftype ripple-control (basic) + ((global-scale float) + (last-frame-scale float) + (close-fade-dist float) + (far-fade-dist float) + (faded-scale float) + (individual-normal-scale float) + (waveform ripple-wave-set) + (send-query symbol) + (query ripple-merc-query) + ) + (:methods + (new (symbol type) _type_) + ) + ) + + +(defmethod new ripple-control ((allocation symbol) (type-to-make type)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 global-scale) 0.0) + (set! (-> v0-0 last-frame-scale) -0.001) + (set! (-> v0-0 close-fade-dist) 4096000000.0) + (set! (-> v0-0 far-fade-dist) 8192000000.0) + (set! (-> v0-0 faded-scale) -0.001) + (set! (-> v0-0 waveform) #f) + (set! (-> v0-0 individual-normal-scale) 1.0) + (set! (-> v0-0 send-query) #f) + (set! (-> v0-0 query) #f) + v0-0 + ) + ) + +(deftype death-info (basic) + ((vertex-skip uint16) + (timer uint8) + (overlap uint8) + (effect uint32) + (sound symbol) + ) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc b/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc index 528dd9ef46..5a3e81d4e1 100644 --- a/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc @@ -5,5 +5,234 @@ ;; name in dgo: shadow-cpu-h ;; dgos: GAME +;; +++shadow-flags +(defenum shadow-flags + :bitfield #t + :type int32 + (shdf00) ;; unused + (disable-fade) + (shdf02) ;; only set, never used. + (shdf03) + (shdf04) ;; unused + (disable-draw) + (shdf06) + (shdf07) + ) +;; ---shadow-flags + + +(declare-type shadow-vu1-constants structure) + ;; DECOMP BEGINS +(deftype shadow-settings (structure) + "Settings used to draw a shadow." + ((center vector :inline) + (flags shadow-flags :overlay-at (-> center data 3)) + (shadow-dir vector :inline) + (dist-to-locus float :overlay-at (-> shadow-dir data 3)) + (bot-plane plane :inline) + (top-plane plane :inline) + (fade-dist float :offset 64) + (fade-start float) + (dummy-2 int32) + (shadow-type int32) + ) + ) + + +(deftype shadow-control (basic) + ((settings shadow-settings :inline) + ) + (:methods + (new (symbol type float float float vector float float) _type_) + (enable-draw (shadow-control) int) + (disable-draw (shadow-control) int) + (set-top-plane-offset (shadow-control float) int) + (set-bottom-plane-offset (shadow-control float) int) + (probe-line-for-shadow (_type_ vector float float float) none) + (shadow-control-method-14 (_type_ vector vector float float float) none) + ) + ) + + +(defmethod enable-draw ((this shadow-control)) + (logclear! (-> this settings flags) (shadow-flags disable-draw)) + 0 + ) + +(defmethod disable-draw ((this shadow-control)) + (logior! (-> this settings flags) (shadow-flags disable-draw)) + 0 + ) + +(defmethod set-bottom-plane-offset ((this shadow-control) (arg0 float)) + (set! (-> this settings bot-plane w) (- arg0)) + 0 + ) + +(defmethod set-top-plane-offset ((this shadow-control) (arg0 float)) + (set! (-> this settings top-plane w) (- arg0)) + 0 + ) + +(deftype shadow-data (structure) + "DMA data for the shadow renderer." + ((dma-unpack-template dma-packet :inline) + (dma-cnt dma-tag) + (vif-nop vif-tag) + (vif-unpack-v4-8 vif-tag) + (pdc basic) + (dist float) + (waits uint32) + (inside-volume? uint32) + ) + ) + + +(deftype shadow-work (structure) + ((shadow-data shadow-data :inline) + (inbuf uint128 600) + ) + ) + + +(deftype shadow-bucket (structure) + ((first pointer) + (next pointer) + (bucket-id bucket-id) + (shadow-color rgba) + (constants shadow-vu1-constants) + ) + :allow-misaligned + ) + + +(deftype shadow-globals (structure) + ((num-buckets uint32) + (cur-bucket uint32) + (bucket shadow-bucket 3 :inline) + ) + ) + + +(define *shadow-globals* (new 'global 'shadow-globals)) + +(set! (-> *shadow-globals* bucket 0 bucket-id) (bucket-id shadow)) + +(set! (-> *shadow-globals* bucket 1 bucket-id) (bucket-id shadow2)) + +(set! (-> *shadow-globals* bucket 2 bucket-id) (bucket-id shadow3)) + +(deftype shadow-vertex (structure) + ((x float) + (y float) + (z float) + (weight float) + ) + ) + + +(deftype shadow-matrix-ref (structure) + ((joint-0 uint8) + (joint-1 uint8) + ) + ) + + +(deftype shadow-edge (structure) + ((ind-0 uint8) + (ind-1 uint8) + (tri-0 uint8) + (tri-1 uint8) + ) + ) + +(deftype shadow-tri (structure) + ((ind-0 uint8) + (ind-1 uint8) + (ind-2 uint8) + (faces uint8) + ) + ) + + +;; og:preserve-this duplicate type definition +;; (deftype shadow-edge (structure) +;; ((ind-0 uint8) +;; (ind-1 uint8) +;; (tri-0 uint8) +;; (tri-1 uint8) +;; ) +;; ) + + +(deftype shadow-frag-header (structure) + ((qwc-data uint32) + (num-joints uint32) + (num-verts uint16) + (num-twos uint16) + (num-single-tris uint16) + (num-single-edges uint16) + (num-double-tris uint16) + (num-double-edges uint16) + (ofs-verts uint32) + (ofs-refs uint32) + (ofs-single-tris uint32) + (ofs-single-edges uint32) + (ofs-double-tris uint32) + (ofs-double-edges uint32) + ) + ) + + +(deftype shadow-frag-ref (structure) + ((header shadow-frag-header) + (qwc uint32) + ) + :pack-me + ) + + +(deftype shadow-geo (art-element) + "The low poly model used for drawing the shadow." + ((version uint32 :overlay-at (-> pad 0)) + (total-size uint32 :overlay-at (-> pad 4)) + (total-qwc uint32) + (num-joints uint32) + (num-fragments uint32) + (frags shadow-frag-ref :inline :dynamic) + ) + ) + + +(defmethod new shadow-control ((allocation symbol) + (type-to-make type) + (arg0 float) + (arg1 float) + (arg2 float) + (arg3 vector) + (arg4 float) + (arg5 float) + ) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (if arg3 + (set! (-> v0-0 settings center quad) (-> arg3 quad)) + ) + (set! (-> v0-0 settings flags) (the-as shadow-flags arg4)) + (set-vector! (-> v0-0 settings shadow-dir) 0.0 -1.0 0.0 arg2) + (set-vector! (-> v0-0 settings bot-plane) 0.0 1.0 0.0 (- arg0)) + (set-vector! (-> v0-0 settings top-plane) 0.0 1.0 0.0 (- arg1)) + (set! (-> v0-0 settings fade-dist) arg5) + (set! (-> v0-0 settings shadow-type) 0) + v0-0 + ) + ) + +(define *shadow* #f) + +(define *shadow-object* #f) + +(define *shadow-debug* #f) + +(define *shadow-dma-buf* (new 'global 'dma-buffer 512)) diff --git a/goal_src/jak3/engine/gfx/foreground/shadow-vu1-h.gc b/goal_src/jak3/engine/gfx/foreground/shadow-vu1-h.gc index 4129eed94e..170bb06dcd 100644 --- a/goal_src/jak3/engine/gfx/foreground/shadow-vu1-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/shadow-vu1-h.gc @@ -7,3 +7,4 @@ ;; DECOMP BEGINS +;; No code! \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/generic/generic-work-h.gc b/goal_src/jak3/engine/gfx/generic/generic-work-h.gc index c2c154a25e..904737a1a2 100644 --- a/goal_src/jak3/engine/gfx/generic/generic-work-h.gc +++ b/goal_src/jak3/engine/gfx/generic/generic-work-h.gc @@ -7,3 +7,78 @@ ;; DECOMP BEGINS +(deftype generic-input-buffer (structure) + ((data uint128 473) + (merc generic-merc-work :inline :overlay-at (-> data 0)) + (tie generic-tie-work :inline :overlay-at (-> data 0)) + ) + ) + + +(deftype generic-debug (structure) + ((locks uint32 4) + (timer uint32 32) + (count uint32 32) + (vps uint32 32) + (buffer int32) + (start-addr int32) + (lock int32) + ) + ) + + +(deftype generic-vu1-header (structure) + ((matrix matrix :inline) + (strgif generic-gif-tag :inline) + (adcmds gs-adcmd 2 :inline) + (adnop1 gs-adcmd :inline :overlay-at (-> adcmds 0)) + (adnop2 gs-adcmd :inline :overlay-at (-> adcmds 1)) + (dps uint16 :overlay-at (-> adcmds 0 word 3)) + (kickoff uint16 :overlay-at (-> adnop2 w)) + (strips uint16 :overlay-at (-> strgif data 3)) + ) + ) + + +(deftype generic-vu1-texbuf (structure) + ((header generic-vu1-header :inline) + (shader uint32 :dynamic) + ) + ) + + +(deftype generic-texbuf (structure) + ((tag dma-packet :inline) + (header generic-vu1-header :inline) + (shader uint32 :dynamic) + ) + ) + + +(deftype generic-effect-work (structure) + ((consts generic-consts :inline) + (storage generic-storage :inline) + (storage2 generic-storage :inline) + (lights vu-lights :inline) + ) + ) + + +(deftype generic-effect-buffer (structure) + ((outbuf-0 uint8 3552) + (work generic-effect-work :inline) + (outbuf-1 uint8 3552) + ) + ) + + +(deftype generic-work (structure) + ((saves generic-saves :inline) + (storage generic-storage :inline) + (in-buf generic-input-buffer :inline) + (fx-buf generic-effect-buffer :inline) + ) + ) + + +(define *generic-debug* (new 'global 'generic-debug)) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc index 43ef8b7a1d..01bd38a6cf 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc @@ -5,5 +5,261 @@ ;; name in dgo: lightning-h ;; dgos: GAME +;; +++lightning-mode +(defenum lightning-mode + :type uint8 + (lm-1 -1) + (lm0 0) + (lm1 1) + (lm2 2) + (lm3 3) + ) +;; ---lightning-mode + + +;; +++lightning-spec-flags +(defenum lightning-spec-flags + :type uint16 + :bitfield #t + (lsf0 0) + (lsf1 1) + (lsf2 2) + (lsf3 3) + (lsf4 4) + (lsf5 5) + (lsf6 6) + (lsf7 7) + (lsf8 8) + (lsf9 9) + (lsf10 10) + (lsf11 11) + (lsf12 12) + (lsf13 13) + (lsf14 14) + (lsf15 15) + ) +;; ---lightning-spec-flags + +(declare-type lightning-spec basic) +(define-extern *lightning-spec-id-table* (array lightning-spec)) + +(define-extern process-drawable-art-error (state string process-drawable)) + ;; DECOMP BEGINS +(deftype lightning-spec (basic) + ((name string) + (flags lightning-spec-flags) + (rand-func uint8) + (adjust-distance uint8) + (start-color rgba) + (end-color rgba) + (fade-to-color rgba) + (fade-start-factor float) + (fade-time float) + (texture texture-id) + (reduction float) + (num-points int32) + (box-size float) + (merge-factor float) + (merge-count int32) + (radius float) + (duration float) + (duration-rand float) + (sound symbol) + (delay float) + (delay-rand float) + ) + ) + + +(defun lookup-lightning-spec-by-name ((arg0 string)) + (let* ((s5-0 *lightning-spec-id-table*) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 s4-0) + (let ((s2-0 (-> s5-0 s3-0))) + (if (and (nonzero? s2-0) (string= arg0 (-> s2-0 name))) + (return s2-0) + ) + ) + ) + ) + (the-as lightning-spec #f) + ) + +(deftype lightning-state (structure) + ((mode uint8) + (counter float) + (points-to-draw int32) + (box-size float) + (gcf-control gcf-control :inline) + (line vector-array) + (meet vector-array) + (path vector-array) + (start-color rgba) + (end-color rgba) + ) + ) + + +(deftype lightning-control (basic) + ((spec lightning-spec) + (process (pointer process)) + (state lightning-state :inline) + ) + (:methods + (new (symbol type lightning-spec process float) _type_) + (change-mode (_type_ lightning-mode) lightning-mode) + (get-mode (_type_) lightning-mode) + (set-point! (_type_ int vector) none) + (set-first-meet-point (_type_ vector) none) + (set-last-meet-point (_type_ vector) none) + ) + ) + + +(defmethod change-mode ((this lightning-control) (arg0 lightning-mode)) + (let ((v1-1 (!= arg0 (-> this state mode)))) + (case arg0 + (((lightning-mode lm3)) + (if v1-1 + (set! (-> this state counter) 0.0) + ) + ) + (((lightning-mode lm1)) + (set! (-> this state start-color) (-> this spec start-color)) + (set! (-> this state end-color) (-> this spec end-color)) + ) + ) + ) + (set! (-> this state mode) (the-as uint arg0)) + arg0 + ) + +;; WARN: Return type mismatch uint vs lightning-mode. +(defmethod get-mode ((this lightning-control)) + (the-as lightning-mode (-> this state mode)) + ) + +(defmethod set-point! ((this lightning-control) (arg0 int) (arg1 vector)) + (let ((v1-0 (-> this state))) + (when (and (-> v1-0 path) (>= arg0 0) (< arg0 (-> v1-0 path length))) + (set! (-> v1-0 path data arg0 quad) (-> arg1 quad)) + (when (and (< (+ (-> v1-0 points-to-draw) -1) arg0) (case (-> v1-0 mode) + ((2 3) + #t + ) + (else + #f + ) + ) + ) + (set! (-> v1-0 line data arg0 quad) (-> arg1 quad)) + (set! (-> v1-0 meet data arg0 quad) (-> arg1 quad)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch (inline-array vector) vs none. +(defmethod set-first-meet-point ((this lightning-control) (arg0 vector)) + (set! (-> this state meet data 0 quad) (-> arg0 quad)) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod set-last-meet-point ((this lightning-control) (arg0 vector)) + (set! (-> this state meet data (+ (-> this state points-to-draw) -1) quad) (-> arg0 quad)) + (none) + ) + +(defmethod relocate ((this lightning-control) (offset int)) + (&+! (-> this state line) offset) + (&+! (-> this state meet) offset) + (if (-> this state path) + (&+! (-> this state path) offset) + ) + (let ((v1-8 (-> this spec))) + (if (and (>= (the-as int v1-8) (-> *kernel-context* relocating-min)) + (< (the-as int v1-8) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this spec) offset) + ) + ) + this + ) + +;; WARN: Return type mismatch object vs lightning-control. +(defmethod new lightning-control ((allocation symbol) (type-to-make type) (arg0 lightning-spec) (arg1 process) (arg2 float)) + (with-pp + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as lightning-control gp-0)) + (go process-drawable-art-error "memory") + (set! gp-0 0) + (goto cfg-14) + ) + (let ((s3-0 (-> arg0 num-points))) + (let ((f0-0 (-> arg0 box-size))) + (when (logtest? (-> arg0 flags) (lightning-spec-flags lsf4)) + (let ((f1-1 (fmax 1.0 (fmin 5.0 (/ arg2 (* 4096.0 (the float (-> arg0 adjust-distance)))))))) + (set! s3-0 (* s3-0 (the int f1-1))) + (set! f0-0 (* f0-0 f1-1)) + ) + ) + (set! (-> (the-as lightning-control gp-0) state box-size) f0-0) + ) + (set! (-> (the-as lightning-control gp-0) process) (process->ppointer arg1)) + (set! (-> (the-as lightning-control gp-0) state mode) (the-as uint 1)) + (set! (-> (the-as lightning-control gp-0) state line) + ((method-of-type vector-array new) allocation vector-array s3-0) + ) + (set! (-> (the-as lightning-control gp-0) state meet) + ((method-of-type vector-array new) allocation vector-array s3-0) + ) + (let ((v1-18 (-> arg0 rand-func))) + (set! (-> (the-as lightning-control gp-0) state path) + (if (or (= v1-18 2) (= v1-18 3)) + ((method-of-type vector-array new) allocation vector-array s3-0) + (the-as vector-array #f) + ) + ) + ) + (set! (-> (the-as lightning-control gp-0) state counter) 0.0) + (set! (-> (the-as lightning-control gp-0) state points-to-draw) s3-0) + ) + (set! (-> (the-as lightning-control gp-0) spec) arg0) + (set! (-> (the-as lightning-control gp-0) state start-color) (-> arg0 start-color)) + (set! (-> (the-as lightning-control gp-0) state end-color) (-> arg0 end-color)) + (add-connection *lightning-engine* pp nothing (the-as lightning-control gp-0) #f #f) + (label cfg-14) + (the-as lightning-control gp-0) + ) + ) + ) + +(deftype lightning-probe-vars (basic) + ((src-joint-index uint32) + (next-spawn-time time-frame) + (last-valid-time time-frame) + (point vector 2 :inline) + (start-pos vector :inline :overlay-at (-> point 0)) + (end-pos vector :inline :overlay-at (-> point 1)) + (probe-dirs (inline-array vector)) + ) + ) + + +(define *lightning-probe-vars* + (new 'static 'lightning-probe-vars :probe-dirs (new 'static 'inline-array vector 6 + (new 'static 'vector :z 1.0 :w 1.0) + (new 'static 'vector :x 1.0 :w 1.0) + (new 'static 'vector :z -1.0 :w 1.0) + (new 'static 'vector :x -1.0 :w 1.0) + (new 'static 'vector :y 1.0 :w 1.0) + (new 'static 'vector :y -1.0 :w 1.0) + ) + ) + ) diff --git a/goal_src/jak3/engine/gfx/texture/texture.gc b/goal_src/jak3/engine/gfx/texture/texture.gc index 53496d1041..e4901e9701 100644 --- a/goal_src/jak3/engine/gfx/texture/texture.gc +++ b/goal_src/jak3/engine/gfx/texture/texture.gc @@ -34,18 +34,18 @@ (the-as int (+ (-> this type size) (* (-> this length) 4))) ) -(defmethod mem-usage ((this texture-page) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 84 (-> arg0 length))) - (set! (-> arg0 data 83 name) "texture") - (+! (-> arg0 data 83 count) (-> this length)) +(defmethod mem-usage ((this texture-page) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 84 (-> usage length))) + (set! (-> usage data 83 name) "texture") + (+! (-> usage data 83 count) (-> this length)) (let ((v1-7 (+ (asize-of this) (* (-> this dram-size) 4)))) (dotimes (a0-6 (-> this length)) (if (-> this data a0-6) (+! v1-7 112) ) ) - (+! (-> arg0 data 83 used) v1-7) - (+! (-> arg0 data 83 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 83 used) v1-7) + (+! (-> usage data 83 total) (logand -16 (+ v1-7 15))) ) this ) diff --git a/goal_src/jak3/engine/gfx/vu1-user-h.gc b/goal_src/jak3/engine/gfx/vu1-user-h.gc index 87f5ac93e7..a4de5470b9 100644 --- a/goal_src/jak3/engine/gfx/vu1-user-h.gc +++ b/goal_src/jak3/engine/gfx/vu1-user-h.gc @@ -375,7 +375,7 @@ (bucket347 347) (bucket348 348) (bucket349 349) - (bucket350 350) + (shadow 350) (bucket351 351) (bucket352 352) (bucket353 353) @@ -597,8 +597,8 @@ (bucket569 569) (bucket570 570) (bucket571 571) - (bucket572 572) - (bucket573 573) + (shadow2 572) + (shadow3 573) (bucket574 574) (bucket575 575) (bucket576 576) diff --git a/goal_src/jak3/engine/physics/dynamics-h.gc b/goal_src/jak3/engine/physics/dynamics-h.gc index b42ab8dc29..fa1d233b6f 100644 --- a/goal_src/jak3/engine/physics/dynamics-h.gc +++ b/goal_src/jak3/engine/physics/dynamics-h.gc @@ -7,3 +7,52 @@ ;; DECOMP BEGINS +(deftype dynamics (basic) + ((name symbol) + (gravity-max meters) + (gravity-length meters) + (gravity vector :inline) + (gravity-normal vector :inline) + (walk-distance meters) + (run-distance meters) + ) + (:methods + (set-gravity-length (_type_ float) none) + ) + ) + + +(defmethod set-gravity-length ((this dynamics) (arg0 float)) + (set! (-> this gravity-length) arg0) + (vector-float*! (-> this gravity) (-> this gravity-normal) arg0) + 0 + (none) + ) + +(defun time-to-apex ((arg0 float) (arg1 float)) + (the int (/ arg0 (- (* 0.0033333334 arg1)))) + ) + +(defun time-to-ground ((arg0 float) (arg1 float) (arg2 float)) + (let ((f0-0 0.0) + (v0-0 0) + ) + (while (< (- arg2) f0-0) + (set! arg0 (- arg0 (* 0.0033333334 arg1))) + (+! f0-0 (* 0.0033333334 arg0)) + (+! v0-0 1) + ) + v0-0 + ) + ) + +(define *standard-dynamics* (new 'static 'dynamics + :name 'standard + :gravity-max (meters 40) + :gravity-length (meters 60) + :gravity (new 'static 'vector :y 245760.0 :w 1.0) + :gravity-normal (new 'static 'vector :y 1.0 :w 1.0) + :walk-distance (meters 2) + :run-distance (meters 5) + ) + ) diff --git a/goal_src/jak3/engine/ps2/memcard-h.gc b/goal_src/jak3/engine/ps2/memcard-h.gc index 997866c023..7650374ea2 100644 --- a/goal_src/jak3/engine/ps2/memcard-h.gc +++ b/goal_src/jak3/engine/ps2/memcard-h.gc @@ -5,5 +5,135 @@ ;; name in dgo: memcard-h ;; dgos: GAME +;; +++mc-status-code +(defenum mc-status-code + :type uint32 + (busy 0) + (ok 1) + (bad-handle 2) + (format-failed 3) + (internal-error 4) + (write-error 5) + (read-error 6) + (new-game 7) + (no-memory 8) + (no-card 9) + (no-last 10) + (no-format 11) + (no-file 12) + (no-save 13) + (no-space 14) + (bad-version 15) + (no-process 16) + (no-auto-save 17) + ) +;; ---mc-status-code + + ;; DECOMP BEGINS +(deftype mc-handle (int32) + () + ) + +(deftype mc-file-info (structure) + "Data stored in a save file." + ((present int32) + (blind-data float 16) + (blind-data-int8 int8 64 :overlay-at (-> blind-data 0)) + (level-index int32 :overlay-at (-> blind-data 0)) + (gem-count float :overlay-at (-> blind-data 1)) + (skill-count float :overlay-at (-> blind-data 2)) + (completion-percentage float :overlay-at (-> blind-data 3)) + (minute uint8 :overlay-at (-> blind-data 5)) + (hour uint8 :overlay-at (-> blind-data-int8 21)) + (week uint8 :overlay-at (-> blind-data-int8 22)) + (day uint8 :overlay-at (-> blind-data-int8 23)) + (month uint8 :overlay-at (-> blind-data 6)) + (year uint8 :overlay-at (-> blind-data-int8 25)) + (language uint8 :overlay-at (-> blind-data-int8 26)) + (game-time0 uint32 :overlay-at (-> blind-data 8)) + (game-time1 uint32 :overlay-at (-> blind-data 9)) + (purchase-secrets uint32 :overlay-at (-> blind-data 10)) + (secrets uint32 :overlay-at (-> blind-data 12)) + (features uint32 :overlay-at (-> blind-data 14)) + ) + :pack-me + ) + + +(deftype mc-slot-info (structure) + "Data about a memory card slot." + ((handle mc-handle) + (known int32) + (formatted int32) + (inited int32) + (last-file int32) + (mem-required int32) + (mem-actual int32) + (file mc-file-info 4 :inline) + ) + :pack-me + ) + + +(defun mc-sync () + "Synchronize the memory card state." + (let ((v0-0 0)) + (while (zero? v0-0) + (mc-run) + (set! v0-0 (the-as int (mc-check-result))) + ) + v0-0 + ) + ) + +(defun show-mc-info ((buf dma-buffer)) + "Display the memory card debug text." + (let ((slot (new 'stack-no-clear 'mc-slot-info))) + (dotimes (slot-idx 2) + (mc-get-slot-info slot-idx slot) + (cond + ((zero? (-> slot known)) + (format (clear *temp-string*) "SLOT ~D: EXAMINING SLOT~%" slot-idx) + *temp-string* + ) + ((zero? (-> slot handle)) + (format (clear *temp-string*) "SLOT ~D: NO CARD~%" slot-idx) + *temp-string* + ) + ((zero? (-> slot formatted)) + (format (clear *temp-string*) "SLOT ~D: CARD [~D] : NOT FORMATTED~%" slot-idx (-> slot handle)) + *temp-string* + ) + ((zero? (-> slot inited)) + (format + (clear *temp-string*) + "SLOT ~D: CARD [~D] : NO FILE [~D/~D]~%" + slot-idx + (-> slot handle) + (-> slot mem-required) + (-> slot mem-actual) + ) + *temp-string* + ) + (else + (format (clear *temp-string*) "SLOT ~D: CARD [~D] : " slot-idx (-> slot handle)) + *temp-string* + (format + *temp-string* + "SAVES ~D ~D ~D ~D : LAST ~D~%" + (-> slot file 0 present) + (-> slot file 1 present) + (-> slot file 2 present) + (-> slot file 3 present) + (-> slot last-file) + ) + ) + ) + (draw-string-xy *temp-string* buf 32 (+ (* 12 slot-idx) 8) (font-color red) (font-flags shadow)) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/sound/speech-h.gc b/goal_src/jak3/engine/sound/speech-h.gc index 8a1a1af2f0..5cf0a9ba5a 100644 --- a/goal_src/jak3/engine/sound/speech-h.gc +++ b/goal_src/jak3/engine/sound/speech-h.gc @@ -5,5 +5,156 @@ ;; name in dgo: speech-h ;; dgos: GAME +;; +++speech-type-flag +(defenum speech-type-flag + :type uint8 + :bitfield #t + (random-order 0) + (linked-next 1) + (skip-first-time 2) + (first-time 3) + ) +;; ---speech-type-flag + + +;; +++speech-type +(defenum speech-type + :type int8 + (speech-type-0) + (speech-type-1) + (speech-type-2) + (speech-type-3) + (speech-type-4) + (speech-type-5) + (speech-type-6) + (speech-type-7) + (speech-type-8) + (speech-type-9) + (speech-type-10) + (speech-type-11) + (speech-type-12) + (speech-type-13) + (speech-type-14) + (speech-type-15) + (speech-type-16) + (speech-type-17) + (speech-type-18) + (speech-type-19) + (speech-type-20) + (speech-type-21) + (speech-type-22) + (speech-type-23) + (speech-type-24) + (speech-type-25) + (speech-type-26) + (speech-type-27) + (speech-type-28) + (speech-type-29) + (speech-type-30) + (speech-type-31) + (speech-type-32) + (speech-type-33) + (speech-type-34) + (speech-type-35) + (speech-type-36) + (speech-type-37) + (speech-type-38) + (speech-type-39) + (speech-type-40) + (speech-type-41) + (speech-type-42) + (speech-type-43) + (speech-type-44) + (speech-type-45) + (speech-type-46) + (speech-type-47) + (speech-type-48) + (speech-type-49) + (speech-type-50) + (speech-type-51) + (speech-type-52) + (speech-type-53) + (speech-type-54) + (speech-type-55) + (speech-type-56) + ) +;; ---speech-type + + +;; +++speech-channel-flag +(defenum speech-channel-flag + :type uint8 + :bitfield #t + (disable 0) + ) +;; ---speech-channel-flag + + ;; DECOMP BEGINS +(deftype speech-type-info (structure) + ((channel uint8) + (flags speech-type-flag) + (priority int8) + (delay-pre-time uint16) + (request-timeout uint16) + (min-delay uint16) + (max-delay uint16) + (delay uint16) + (play-index int16) + (list (array string)) + (time uint64) + ) + ) + + +(deftype speech-request (structure) + ((handle handle) + (time time-frame) + (priority float) + (speech-type speech-type) + ) + :pack-me + ) + + +(deftype speech-channel (structure) + ((flags speech-channel-flag) + (gui-channel gui-channel) + (delay uint16) + (id sound-id) + (update-time time-frame) + (start-time time-frame) + (end-time time-frame) + (request speech-request :inline) + (last-request speech-request :inline) + (target-pos vector :inline) + (speech-table (pointer speech-type-info)) + ) + (:methods + (speech-channel-method-9 () none) + (speech-channel-method-10 () none) + (speech-channel-method-11 () none) + (speech-channel-method-12 () none) + (speech-channel-method-13 () none) + (speech-channel-method-14 () none) + ) + ) + + +(deftype speech-control (structure) + ((channel-array speech-channel 2 :inline) + (speech-table speech-type-info 61) + ) + (:methods + (speech-control-method-9 () none) + (speech-control-method-10 () none) + (speech-control-method-11 () none) + (speech-control-method-12 () none) + (speech-control-method-13 () none) + (speech-control-method-14 () none) + (speech-control-method-15 () none) + (speech-control-method-16 () none) + (speech-control-method-17 () none) + ) + ) diff --git a/goal_src/jak3/engine/target/surface-h.gc b/goal_src/jak3/engine/target/surface-h.gc index 34ec876344..a4d27e6196 100644 --- a/goal_src/jak3/engine/target/surface-h.gc +++ b/goal_src/jak3/engine/target/surface-h.gc @@ -5,5 +5,1249 @@ ;; name in dgo: surface-h ;; dgos: GAME +;; +++surface-flag +;; TODO copied from jak 2 +(defenum surface-flag + :bitfield #t + :type uint32 + + (look-around 0) ;; 1 + (xz-local 1) ;; 2 + (smooth-collision 2) ;; 4 + (no-turn-around 3) ;; 8 + (turn-to-pad 4) ;; 16 + (turn-to-vel 5) ;; 32 + (no-jump 6) ;; 64 + (no-attack 7) ;; 128 + (no-hands 8) ;; 256 + (no-feet 9) ;; 512 + (check-edge 10) ;; 1024 + (air 11) ;; 2048 + (attack 12) ;; 4096 + (duck 13) ;; 8192 + (momentum 14) ;; 16384 + (turn-when-centered 15) ;; 32768 + + (turn-to-alt 16) ;; hi 1 + (spin 17) ;; hi 2 + (super 18) ;; hi 4 + (gun-inactive 19) ;; hi 8 + (gun-hide 20) ;; hi 16 + (gun-off 21) ;; hi 32 + (gun-fast-exit 22) ;; hi 64 + (gun-direct 23) ;; hi 128 + (gun-strafe 24) ;; hi 256 + (gun-no-twist 25) ;; hi 512 + (laser-hide 26) ;; hi 1024 + (no-board 27) ;; hi 2048 + (gun-turn-fast 28) ;; hi 4096 + (sf29 29) + ) +;; ---surface-flag + + +(declare-type target process-focusable) +(define-extern rail-surface-touch (function none :behavior target)) +(define-extern gravel-surface-touch (function none)) +(define-extern mushroom-surface-touch (function none)) + +(declare-type collide-shape trsqv) +(declare-type collide-shape-moving collide-shape) +(declare-type control-info collide-shape-moving) + +(declare-type surface basic) +(define-extern *dark-jump-mods* surface) +(define-extern *flop-land-mods* surface) +(define-extern *pole-mods* surface) +(define-extern *grab-mods* surface) +(define-extern *edge-grab-mods* surface) +(define-extern *stone-surface* surface) +(define-extern *gravel-surface* surface) +(define-extern *edge-surface* surface) +(define-extern *wade-surface* surface) +(define-extern *quicksand-surface* surface) +(define-extern *tar-surface* surface) +(define-extern *ice-surface* surface) +(define-extern *rail-surface* surface) +(define-extern *mushroom-surface* surface) + ;; DECOMP BEGINS +(deftype surface (basic) + "Definition of a bunch of parameters for different types of surfaces. +Parameters include values such as max speed, friction, callback functions that run +on impact, during touch, on exit, etc." + ((name symbol) + (data float 30) + (turnv float :overlay-at (-> data 0)) + (turnvf float :overlay-at (-> data 23)) + (turnvv float :overlay-at (-> data 1)) + (turnvvf float :overlay-at (-> data 24)) + (tiltv float :overlay-at (-> data 2)) + (tiltvf float :overlay-at (-> data 25)) + (tiltvv float :overlay-at (-> data 3)) + (tiltvvf float :overlay-at (-> data 26)) + (vel-turn float :overlay-at (-> data 27)) + (transv-max float :overlay-at (-> data 4)) + (target-speed float :overlay-at (-> data 5)) + (seek0 float :overlay-at (-> data 6)) + (seek90 float :overlay-at (-> data 7)) + (seek180 float :overlay-at (-> data 8)) + (fric float :overlay-at (-> data 9)) + (nonlin-fric-dist float :overlay-at (-> data 10)) + (slip-factor float :overlay-at (-> data 11)) + (slide-factor float :overlay-at (-> data 12)) + (slope-up-factor float :overlay-at (-> data 13)) + (slope-down-factor float :overlay-at (-> data 14)) + (slope-slip-angle float :overlay-at (-> data 15)) + (impact-fric float :overlay-at (-> data 16)) + (bend-factor float :overlay-at (-> data 17)) + (bend-speed float :overlay-at (-> data 18)) + (alignv float :overlay-at (-> data 19)) + (slope-up-traction float :overlay-at (-> data 20)) + (align-speed float :overlay-at (-> data 21)) + (slope-change-preserve float :overlay-at (-> data 22)) + (hook function 5) + (active-hook (function none) :overlay-at (-> hook 0)) + (touch-hook (function none) :overlay-at (-> hook 1)) + (impact-hook (function control-info (pointer float) vector none) :overlay-at (-> hook 2)) + (mult-hook (function surface surface surface int none) :overlay-at (-> hook 3)) + (exit-hook function :overlay-at (-> hook 4)) + (dataw uint32 2) + (mode symbol :overlay-at (-> dataw 0)) + (flags surface-flag :overlay-at (-> dataw 1)) + ) + ) + + +(defun calc-terminal-vel ((arg0 float) (arg1 float) (arg2 float)) + (- (* (/ (- (* 0.016666668 arg0) arg1) arg2) (- 1.0 arg2)) arg1) + ) + +(defun calc-terminal2-vel ((arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (let ((f0-4 (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2)))) + (- f0-4 (+ arg1 (* arg2 (* f0-4 f0-4)))) + ) + ) + +(defun calc-terminal4-vel ((arg0 float) (arg1 float) (arg2 float)) + (let ((f0-5 (sqrtf (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2))))) + (- f0-5 (+ arg1 (* arg2 (* f0-5 f0-5 f0-5 f0-5)))) + ) + ) + +;; ERROR: Function may read a register that is not set: t3 +(defmethod print ((this surface)) + (local-vars (t3-0 none)) + (format + #t + "# this turnv) + (-> this turnvv) + (-> this tiltv) + (-> this tiltvv) + (-> this transv-max) + t3-0 + ) + (format #t " tm:~m rv:~R rvv:~R @ #x~X>" (-> this target-speed) (-> this seek0) (-> this seek90) this) + this + ) + +(defun surface-interp! ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 float)) + (dotimes (v1-0 30) + (set! (-> arg0 data v1-0) (+ (* (-> arg2 data v1-0) arg3) (* (-> arg1 data v1-0) (- 1.0 arg3)))) + ) + (dotimes (v1-3 5) + (set! (-> arg0 hook v1-3) (cond + ((and (nonzero? (-> arg2 hook v1-3)) (!= (-> arg2 hook v1-3) nothing)) + (-> arg2 hook v1-3) + ) + ((and (nonzero? (-> arg1 hook v1-3)) (!= (-> arg1 hook v1-3) nothing)) + (-> arg1 hook v1-3) + ) + (else + nothing + ) + ) + ) + ) + (dotimes (v1-6 2) + (set! (-> arg0 dataw v1-6) (-> arg2 dataw v1-6)) + ) + arg0 + ) + +(defun surface-mult! ((arg0 surface) (arg1 surface) (arg2 surface)) + (dotimes (v1-0 30) + (set! (-> arg0 data v1-0) (* (-> arg2 data v1-0) (-> arg1 data v1-0))) + ) + (dotimes (v1-3 5) + (set! (-> arg0 hook v1-3) (cond + ((and (nonzero? (-> arg2 hook v1-3)) (!= (-> arg2 hook v1-3) nothing)) + (-> arg2 hook v1-3) + ) + ((and (nonzero? (-> arg1 hook v1-3)) (!= (-> arg1 hook v1-3) nothing)) + (-> arg1 hook v1-3) + ) + (else + nothing + ) + ) + ) + ) + (dotimes (v1-6 2) + (set! (-> arg0 dataw v1-6) (-> arg2 dataw v1-6)) + ) + (set! (-> arg0 flags) (logior (-> arg1 flags) (-> arg2 flags))) + ((-> arg0 mult-hook) arg0 arg1 arg2 1) + arg0 + ) + +;; WARN: Return type mismatch float vs none. +(defun surface-clamp-speed ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (when (= arg3 1) + (set! (-> arg0 transv-max) (fmin (-> arg0 transv-max) (-> arg1 transv-max))) + (set! (-> arg0 target-speed) (fmin (-> arg0 target-speed) (-> arg1 target-speed))) + ) + (none) + ) + +(define *walk-mods* (new 'static 'surface + :name 'run + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag look-around) + ) + ) + +(define *walk-no-turn-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + ) + ) + +(define *turn-around-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :fric 0.1 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around) + ) + ) + +(define *jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *double-jump-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 32768.0 + :target-speed 32768.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *smack-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air gun-inactive) + ) + ) + +(define *high-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 26624.0 + :target-speed 26624.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *launch-jump-mods* (new 'static 'surface + :name 'launch-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 61440.0 + :target-speed 61440.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag no-attack check-edge air) + ) + ) + +(define *forward-high-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 45056.0 + :target-speed 45056.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *flip-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 80281.6 + :target-speed 51200.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *forward-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 65536.0 + :target-speed 65536.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +(define *forward-pole-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 53248.0 + :target-speed 53248.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air gun-hide gun-fast-exit) + ) + ) + +(let ((v1-20 (copy *jump-mods* 'global))) + (set! (-> v1-20 flags) (surface-flag check-edge air super)) + (set! (-> v1-20 name) 'high-jump) + (set! (-> v1-20 target-speed) 245760.0) + (set! (-> v1-20 transv-max) 245760.0) + (set! (-> v1-20 seek0) 0.9) + (set! *dark-jump-mods* v1-20) + ) + +(define *roll-mods* (new 'static 'surface + :name 'roll + :turnv 131072.0 + :turnvf 30.0 + :turnvv 5461.3335 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 11468.8 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag no-turn-around attack gun-inactive gun-no-twist no-board) + ) + ) + +(define *roll-flip-mods* + (new 'static 'surface + :name 'roll-flip + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 103219.195 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag no-turn-around check-edge air attack gun-inactive gun-no-twist no-board) + ) + ) + +(define *flop-mods* (new 'static 'surface + :name 'flop + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 0.3 + :seek180 1.5 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag air attack gun-inactive gun-no-twist) + ) + ) + +(let ((a0-9 (new 'static 'surface + :name 'flop + :turnv 9102.223 + :turnvf 30.0 + :turnvv 9102.223 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.1 + :seek180 0.15 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag air gun-inactive gun-no-twist) + ) + ) + ) + (set! (-> a0-9 mult-hook) surface-clamp-speed) + (set! *flop-land-mods* a0-9) + ) + +(define *wade-mods* (new 'static 'surface + :name 'wade + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 0.5 + :seek180 0.5 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'wade + :flags (surface-flag look-around) + ) + ) + +(define *swim-mods* (new 'static 'surface + :name 'swim + :turnv 49152.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 28672.0 + :target-speed 28672.0 + :seek0 0.75 + :seek90 0.2 + :seek180 0.2 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'swim + :flags (surface-flag gun-off) + ) + ) + +(define *dive-mods* (new 'static 'surface + :name 'swim + :turnv 21845.334 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 20480.0 + :target-speed 20480.0 + :seek0 0.05 + :seek90 0.05 + :seek180 0.05 + :fric 1.0 + :nonlin-fric-dist 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :align-speed 1.0 + :mode 'dive + :flags (surface-flag xz-local gun-off gun-fast-exit) + ) + ) + +(define *dive-bottom-mods* (new 'static 'surface + :name 'swim-bottom + :turnv 21845.334 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 20480.0 + :target-speed 20480.0 + :seek0 0.1 + :seek90 0.05 + :seek180 0.05 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'dive + :flags (surface-flag xz-local gun-off gun-fast-exit) + ) + ) + +(let ((v1-30 (copy *walk-mods* 'global))) + (set! (-> v1-30 name) 'pole) + (set! (-> v1-30 flags) (surface-flag gun-hide gun-fast-exit)) + (set! *pole-mods* v1-30) + ) + +(let ((v1-32 (copy *walk-mods* 'global))) + (set! (-> v1-32 name) 'grab) + (set! (-> v1-32 flags) (surface-flag sf29)) + (set! *grab-mods* v1-32) + ) + +(let ((v1-34 (copy *walk-mods* 'global))) + (set! (-> v1-34 name) 'edge-grab) + (set! (-> v1-34 flags) (surface-flag gun-inactive gun-no-twist sf29)) + (set! *edge-grab-mods* v1-34) + ) + +(define *empty-mods* (new 'static 'surface + :name 'empty + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :flags (surface-flag gun-off) + ) + ) + +(define *empty-mods-allow-gun* (new 'static 'surface + :name 'empty + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :flags (surface-flag gun-inactive gun-no-twist sf29) + ) + ) + +(define *neutral-mods* (new 'static 'surface + :name 'walk + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + ) + ) + +(let ((v1-38 (new 'static 'surface + :name '*stone-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *stone-surface* v1-38) + (set! (-> v1-38 exit-hook) nothing) + (set! (-> v1-38 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-38 touch-hook) nothing) + (set! (-> v1-38 active-hook) nothing) + ) + +(let ((v1-39 (new 'static 'surface + :name '*mushroom-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 0.25 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *mushroom-surface* v1-39) + (set! (-> v1-39 exit-hook) nothing) + (set! (-> v1-39 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-39 touch-hook) (lambda () (mushroom-surface-touch) (none))) + (set! (-> v1-39 active-hook) nothing) + ) + +(let ((v1-40 (new 'static 'surface + :name '*gravel-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-down-factor 32768.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *gravel-surface* v1-40) + (set! (-> v1-40 exit-hook) nothing) + (set! (-> v1-40 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-40 touch-hook) (lambda () (gravel-surface-touch) (none))) + (set! (-> v1-40 active-hook) nothing) + ) + +(let ((v1-41 (new 'static 'surface + :name '*edge-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 30720.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 18432.0 + :slope-slip-angle 10922.667 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :align-speed 1.0 + ) + ) + ) + (set! *edge-surface* v1-41) + (set! (-> v1-41 exit-hook) nothing) + (set! (-> v1-41 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-41 touch-hook) nothing) + (set! (-> v1-41 active-hook) nothing) + ) + +(let ((v1-42 (new 'static 'surface + :name '*wade-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.7 + :target-speed 0.7 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.6 + :slope-up-traction 1.0 + :align-speed 0.6 + ) + ) + ) + (set! *wade-surface* v1-42) + (set! (-> v1-42 exit-hook) nothing) + (set! (-> v1-42 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-42 touch-hook) nothing) + (set! (-> v1-42 active-hook) nothing) + ) + +(let ((v1-43 (new 'static 'surface + :name '*quicksand-surface* + :turnv 0.25 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.5 + :target-speed 0.5 + :seek0 81920.0 + :seek90 83968.0 + :seek180 165888.0 + :fric 329728.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 1.0 + :align-speed 0.5 + ) + ) + ) + (set! *quicksand-surface* v1-43) + (set! (-> v1-43 exit-hook) nothing) + (set! (-> v1-43 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-43 touch-hook) nothing) + (set! (-> v1-43 active-hook) nothing) + ) + +(let ((v1-44 (new 'static 'surface + :name '*tar-surface* + :turnv 0.25 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.4 + :target-speed 0.4 + :seek0 81920.0 + :seek90 83968.0 + :seek180 165888.0 + :fric 329728.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 1.0 + :align-speed 0.5 + ) + ) + ) + (set! *tar-surface* v1-44) + (set! (-> v1-44 exit-hook) nothing) + (set! (-> v1-44 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-44 touch-hook) nothing) + (set! (-> v1-44 active-hook) nothing) + ) + +(let ((v1-45 (new 'static 'surface + :name '*ice-surface* + :turnv 0.5 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.5 + :target-speed 1.5 + :seek0 24576.0 + :seek90 24576.0 + :seek180 24576.0 + :fric 23756.8 + :nonlin-fric-dist 4091904.0 + :slip-factor 0.7 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-pad) + ) + ) + ) + (set! *ice-surface* v1-45) + (set! (-> v1-45 exit-hook) nothing) + (set! (-> v1-45 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-45 touch-hook) nothing) + (set! (-> v1-45 active-hook) nothing) + ) + +(let ((v1-46 (new 'static 'surface + :name '*rail-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + :flags (surface-flag no-attack) + ) + ) + ) + (set! *rail-surface* v1-46) + (set! (-> v1-46 exit-hook) nothing) + (set! (-> v1-46 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-46 touch-hook) (lambda () (rail-surface-touch) (none))) + (set! (-> v1-46 active-hook) nothing) + ) + +(define *standard-ground-surface* *stone-surface*) + +(define *swim-surface* *stone-surface*) diff --git a/goal_src/jak3/engine/ui/gui-h.gc b/goal_src/jak3/engine/ui/gui-h.gc index 57f5271941..234957553b 100644 --- a/goal_src/jak3/engine/ui/gui-h.gc +++ b/goal_src/jak3/engine/ui/gui-h.gc @@ -5,5 +5,132 @@ ;; name in dgo: gui-h ;; dgos: GAME +;; +++gui-connection-flags +(defenum gui-connection-flags + :type uint8 + :bitfield #t + (gcf0 0) + (gcf1 1) + (fo-curve 2) + (fo-min 3) + (fo-max 4) + ) +;; ---gui-connection-flags + + +;; +++gui-channel +(defenum gui-channel + :type uint8 + :bitfield #f + (none 0) + (art-load 16) + (art-load-next 17) + (background 18) + (jak 19) + (daxter 20) + (sig 21) + (ashelin 22) + (beast 23) + (jak-effect-1 24) + (pecker 25) + (jak-effect-2 26) + (gun 27) + (hal 28) + (voicebox 29) + (guard 30) + (jak-mode 31) + (alert 32) + (citizen 33) + (bbush 34) + (rider 35) + (task 36) + (voice 47) + (movie 64) + (blackout 65) + (query 66) + (message 67) + (notice 68) + (subtitle 69) + (supertitle 70) + (notice-low 71) + (resetter 72) + (progress 73) + (freeze 74) + (subtitle-pc 78) ;; custom + (screen 79) + (hud-upper-right 80) + (hud-upper-left 81) + (hud-lower-right 82) + (hud-lower-left 83) + (hud-lower-left-1 84) + (hud-lower-left-2 85) + (hud-center-right 86) + (hud-center-left 87) + (hud-middle-right 88) + (hud-middle-left 89) + (hud-upper-center 90) + (hud-upper-center-2 91) + (hud-lower-center 92) + (hud-auto-save 93) + (hud-auto-save-message 94) + (hud 95) + (max 96) + ) +;; ---gui-channel + + +;; +++gui-status +(defenum gui-status + :type uint8 ;; not sure + :bitfield #f + (unknown 0) + (pending 1) + (ready 2) + (active 3) + (hide 4) + (stop 5) + ) +;; ---gui-status + + +;; +++gui-action +(defenum gui-action + :type uint8 + :bitfield #f + (none 0) + (queue 1) + (play 2) + (playing 3) + (stop 4) + (stopping 5) + (abort 6) + (hide 7) + (hidden 8) + (fade 9) + ) +;; ---gui-action + + ;; DECOMP BEGINS +(deftype gui-connection (connection) + ((priority float :overlay-at param0) + (action gui-action :overlay-at param1) + (channel gui-channel :offset 21) + (anim-part uint8 :offset 22) + (flags gui-connection-flags :offset 23) + (name string :overlay-at param2) + (id sound-id :overlay-at param3) + (handle handle :overlay-at next0) + (time-stamp time-frame :overlay-at next1) + (hold-time time-frame) + (fo-min int16) + (fo-max int16) + (fo-curve int8) + (fade uint8) + (volume int16) + ) + ) + + +;; type gui-control is defined here, but it is unknown to the decompiler diff --git a/goal_src/jak3/engine/util/smush-control-h.gc b/goal_src/jak3/engine/util/smush-control-h.gc index 815131048b..e40f94fc2d 100644 --- a/goal_src/jak3/engine/util/smush-control-h.gc +++ b/goal_src/jak3/engine/util/smush-control-h.gc @@ -7,3 +7,117 @@ ;; DECOMP BEGINS +(deftype smush-control (structure) + "This holds information about the current state of an object's smush." + ((start-time time-frame) + (period float) + (duration float) + (amp float) + (damp-amp float) + (damp-period float) + (ticks float) + ) + (:methods + (set-zero! (_type_) _type_) + (update! (_type_) float) + (get-no-update (_type_) float) + (activate! (_type_ float int int float float clock) _type_) + (nonzero-amplitude? (_type_) symbol) + (die-on-next-update! (_type_) _type_) + ) + ) + + +(defmethod nonzero-amplitude? ((this smush-control)) + "Is the smush currently active?" + (!= (-> this amp) 0.0) + ) + +(defmethod set-zero! ((this smush-control)) + "Reset this [[smush-control]]." + (set! (-> this period) 0.0) + (set! (-> this duration) 0.0) + (set! (-> this amp) 0.0) + (set! (-> this damp-amp) 0.0) + (set! (-> this damp-period) 0.0) + (set! (-> this ticks) 0.0) + this + ) + +(defmethod update! ((this smush-control)) + "Calculate the next smush amplitude and update the smush state." + (cond + ((!= (-> this amp) 0.0) + (let* ((elapsed-time (the float (- (current-time) (-> this start-time)))) + (period (-> this period)) + (f28-0 (- elapsed-time (* (the float (the int (/ elapsed-time period))) period))) + ) + (when (>= (- elapsed-time (-> this ticks)) (-> this period)) + (set! (-> this amp) (* (-> this amp) (-> this damp-amp))) + (set! (-> this period) (* (-> this period) (-> this damp-period))) + (set! (-> this ticks) elapsed-time) + (if (< (-> this damp-period) 0.0) + (set-zero! this) + ) + ) + (if (>= elapsed-time (-> this duration)) + (set-zero! this) + ) + (* (sin (/ (* 65536.0 f28-0) (-> this period))) + (* (-> this amp) (/ (- (-> this duration) elapsed-time) (-> this duration))) + ) + ) + ) + (else + 0.0 + ) + ) + ) + +(defmethod get-no-update ((this smush-control)) + "Get the next amplitude, but do not update the smush state." + (cond + ((!= (-> this amp) 0.0) + (let* ((elapsed-time (the float (- (current-time) (-> this start-time)))) + (period (-> this period)) + (f0-4 (- elapsed-time (* (the float (the int (/ elapsed-time period))) period))) + ) + (* (sin (/ (* 65536.0 f0-4) (-> this period))) + (* (-> this amp) (/ (- (-> this duration) elapsed-time) (-> this duration))) + ) + ) + ) + (else + 0.0 + ) + ) + ) + +(defmethod die-on-next-update! ((this smush-control)) + "Set the dampening period so the smush stops on the next update." + (if (!= (-> this amp) 0.0) + (set! (-> this damp-period) -1.0) + ) + this + ) + +(defmethod activate! ((this smush-control) + (amplitude float) + (period int) + (duration int) + (damp-amplitude float) + (damp-period float) + (clock clock) + ) + "Start the smush with the given parameters." + (when (>= (fabs (* 0.2 (-> this amp))) (fabs (get-no-update this))) + (set! (-> this amp) amplitude) + (set! (-> this period) (the float period)) + (set! (-> this duration) (the float duration)) + (set! (-> this damp-amp) damp-amplitude) + (set! (-> this damp-period) damp-period) + (set! (-> this ticks) 0.0) + (set! (-> this start-time) (-> clock frame-counter)) + ) + this + ) diff --git a/goal_src/jak3/engine/util/sync-info-h.gc b/goal_src/jak3/engine/util/sync-info-h.gc index c136561142..ebc28da79b 100644 --- a/goal_src/jak3/engine/util/sync-info-h.gc +++ b/goal_src/jak3/engine/util/sync-info-h.gc @@ -5,5 +5,14 @@ ;; name in dgo: sync-info-h ;; dgos: GAME +;; +++sync-flags +(defenum sync-flags + :type uint64 + :bitfield #t + (pong 0) + ) +;; ---sync-flags + + ;; DECOMP BEGINS diff --git a/goal_src/jak3/kernel/gkernel.gc b/goal_src/jak3/kernel/gkernel.gc index e369685d67..3394420146 100644 --- a/goal_src/jak3/kernel/gkernel.gc +++ b/goal_src/jak3/kernel/gkernel.gc @@ -46,7 +46,7 @@ ;; `relocate` method. This method is used by the kernel to move the process (and its heap) ;; in memory. For this reason, `relocate` is a method available on all objects. -(defmethod relocate ((this object) (arg0 int)) +(defmethod relocate ((this object) (offset int)) "Most general relocate method." this ) diff --git a/test/decompiler/reference/jak1/engine/anim/joint-exploder_REF.gc b/test/decompiler/reference/jak1/engine/anim/joint-exploder_REF.gc index 406cce1c79..b1595de58f 100644 --- a/test/decompiler/reference/jak1/engine/anim/joint-exploder_REF.gc +++ b/test/decompiler/reference/jak1/engine/anim/joint-exploder_REF.gc @@ -698,11 +698,11 @@ ;; definition for method 7 of type joint-exploder ;; INFO: Return type mismatch process-drawable vs joint-exploder. -(defmethod relocate ((this joint-exploder) (arg0 int)) +(defmethod relocate ((this joint-exploder) (offset int)) (if (nonzero? (-> this joints)) - (&+! (-> this joints) arg0) + (&+! (-> this joints) offset) ) - (the-as joint-exploder ((method-of-type process-drawable relocate) this arg0)) + (the-as joint-exploder ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function joint-exploder-init-by-other diff --git a/test/decompiler/reference/jak1/engine/anim/joint_REF.gc b/test/decompiler/reference/jak1/engine/anim/joint_REF.gc index f5948f9af8..54de02716d 100644 --- a/test/decompiler/reference/jak1/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak1/engine/anim/joint_REF.gc @@ -8,13 +8,13 @@ ) ;; definition for method 8 of type joint -(defmethod mem-usage ((this joint) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 66 (-> arg0 length))) - (set! (-> arg0 data 65 name) "joint") - (+! (-> arg0 data 65 count) 1) +(defmethod mem-usage ((this joint) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 66 (-> usage length))) + (set! (-> usage data 65 name) "joint") + (+! (-> usage data 65 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 65 used) v1-6) - (+! (-> arg0 data 65 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 65 used) v1-6) + (+! (-> usage data 65 total) (logand -16 (+ v1-6 15))) ) this ) @@ -95,16 +95,16 @@ ) ;; definition for method 8 of type joint-anim-drawable -(defmethod mem-usage ((this joint-anim-drawable) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 77 (-> arg0 length))) - (set! (-> arg0 data 76 name) "joint-anim-drawable") - (+! (-> arg0 data 76 count) 1) +(defmethod mem-usage ((this joint-anim-drawable) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 77 (-> usage length))) + (set! (-> usage data 76 name) "joint-anim-drawable") + (+! (-> usage data 76 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 76 used) v1-6) - (+! (-> arg0 data 76 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 76 used) v1-6) + (+! (-> usage data 76 total) (logand -16 (+ v1-6 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -282,19 +282,19 @@ ) ;; definition for method 8 of type art-mesh-anim -(defmethod mem-usage ((this art-mesh-anim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 72 (-> arg0 length))) - (set! (-> arg0 data 71 name) "art-mesh-anim") - (+! (-> arg0 data 71 count) 1) +(defmethod mem-usage ((this art-mesh-anim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 72 (-> usage length))) + (set! (-> usage data 71 name) "art-mesh-anim") + (+! (-> usage data 71 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 71 used) v1-6) - (+! (-> arg0 data 71 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 71 used) v1-6) + (+! (-> usage data 71 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -326,34 +326,34 @@ ) ;; definition for method 8 of type art-joint-anim -(defmethod mem-usage ((this art-joint-anim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 75 (-> arg0 length))) - (set! (-> arg0 data 74 name) "art-joint-anim") - (+! (-> arg0 data 74 count) 1) +(defmethod mem-usage ((this art-joint-anim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 75 (-> usage length))) + (set! (-> usage data 74 name) "art-joint-anim") + (+! (-> usage data 74 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 74 used) v1-6) - (+! (-> arg0 data 74 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 74 used) v1-6) + (+! (-> usage data 74 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) - (jacc-mem-usage (-> this frames) arg0 arg1) + (jacc-mem-usage (-> this frames) usage flags) (dotimes (s4-1 (-> this length)) - (set! (-> arg0 length) (max 67 (-> arg0 length))) - (set! (-> arg0 data 66 name) "joint-anim-compressed") - (+! (-> arg0 data 66 count) 1) + (set! (-> usage length) (max 67 (-> usage length))) + (set! (-> usage data 66 name) "joint-anim-compressed") + (+! (-> usage data 66 count) 1) (let ((v1-22 (asize-of (-> this data s4-1)))) - (+! (-> arg0 data 66 used) v1-22) - (+! (-> arg0 data 66 total) (logand -16 (+ v1-22 15))) + (+! (-> usage data 66 used) v1-22) + (+! (-> usage data 66 total) (logand -16 (+ v1-22 15))) ) ) (when (and (nonzero? (-> this eye-anim-data)) (-> this eye-anim-data)) - (set! (-> arg0 length) (max 109 (-> arg0 length))) - (set! (-> arg0 data 108 name) "eye-anim") - (+! (-> arg0 data 108 count) 1) + (set! (-> usage length) (max 109 (-> usage length))) + (set! (-> usage data 108 name) "eye-anim") + (+! (-> usage data 108 count) 1) (let ((v1-41 (* (* (+ (-> this eye-anim-data max-frame) 1) 2) 8))) - (+! (-> arg0 data 108 used) v1-41) - (+! (-> arg0 data 108 total) (logand -16 (+ v1-41 15))) + (+! (-> usage data 108 used) v1-41) + (+! (-> usage data 108 total) (logand -16 (+ v1-41 15))) ) ) this @@ -462,20 +462,20 @@ ) ;; definition for method 8 of type art-group -(defmethod mem-usage ((this art-group) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 71 (-> arg0 length))) - (set! (-> arg0 data 70 name) "art-group") - (+! (-> arg0 data 70 count) 1) +(defmethod mem-usage ((this art-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 71 (-> usage length))) + (set! (-> usage data 70 name) "art-group") + (+! (-> usage data 70 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 70 used) v1-6) - (+! (-> arg0 data 70 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 70 used) v1-6) + (+! (-> usage data 70 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) (if (-> this data s3-0) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) ) this @@ -483,9 +483,9 @@ ;; definition for method 7 of type art-group ;; INFO: Return type mismatch art-group vs none. -(defmethod relocate ((this art-group) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this art-group) (heap kheap) (name (pointer uint8))) (let ((s4-0 (clear *temp-string*))) - (string<-charp s4-0 arg1) + (string<-charp s4-0 name) (set! this (cond ((not this) (format 0 "ERROR: art-group ~A is not a valid file.~%" s4-0) @@ -522,19 +522,19 @@ ) ;; definition for method 8 of type art-mesh-geo -(defmethod mem-usage ((this art-mesh-geo) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 73 (-> arg0 length))) - (set! (-> arg0 data 72 name) "art-mesh-geo") - (+! (-> arg0 data 72 count) 1) +(defmethod mem-usage ((this art-mesh-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 73 (-> usage length))) + (set! (-> usage data 72 name) "art-mesh-geo") + (+! (-> usage data 72 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 72 used) v1-6) - (+! (-> arg0 data 72 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 72 used) v1-6) + (+! (-> usage data 72 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -650,19 +650,19 @@ ) ;; definition for method 8 of type art-joint-geo -(defmethod mem-usage ((this art-joint-geo) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 74 (-> arg0 length))) - (set! (-> arg0 data 73 name) "art-joint-geo") - (+! (-> arg0 data 73 count) 1) +(defmethod mem-usage ((this art-joint-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 74 (-> usage length))) + (set! (-> usage data 73 name) "art-joint-geo") + (+! (-> usage data 73 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 73 used) v1-6) - (+! (-> arg0 data 73 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 73 used) v1-6) + (+! (-> usage data 73 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/collide/collide-frag_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-frag_REF.gc index 53440715c0..71b7790143 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-frag_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-frag_REF.gc @@ -49,32 +49,32 @@ ;; definition for method 8 of type collide-fragment ;; INFO: Return type mismatch int vs collide-fragment. -(defmethod mem-usage ((this collide-fragment) (arg0 memory-usage-block) (arg1 int)) - (let ((s5-0 (if (logtest? arg1 1) +(defmethod mem-usage ((this collide-fragment) (usage memory-usage-block) (flags int)) + (let ((s5-0 (if (logtest? flags 1) 53 50 ) ) (s4-0 (-> this mesh)) ) - (set! (-> arg0 data s5-0 name) (symbol->string 'collide-fragment)) - (+! (-> arg0 data s5-0 count) 1) + (set! (-> usage data s5-0 name) (symbol->string 'collide-fragment)) + (+! (-> usage data s5-0 count) 1) (let ((v1-11 (+ (asize-of this) (asize-of s4-0)))) - (+! (-> arg0 data s5-0 used) v1-11) - (+! (-> arg0 data s5-0 total) (logand -16 (+ v1-11 15))) + (+! (-> usage data s5-0 used) v1-11) + (+! (-> usage data s5-0 total) (logand -16 (+ v1-11 15))) ) - (set! (-> arg0 data (+ s5-0 1) name) "collision-poly") - (+! (-> arg0 data (+ s5-0 1) count) (-> s4-0 poly-count)) + (set! (-> usage data (+ s5-0 1) name) "collision-poly") + (+! (-> usage data (+ s5-0 1) count) (-> s4-0 poly-count)) (let ((v1-22 (+ (-> s4-0 strip-data-len) (-> s4-0 poly-count)))) - (+! (-> arg0 data (+ s5-0 1) used) v1-22) - (+! (-> arg0 data (+ s5-0 1) total) v1-22) + (+! (-> usage data (+ s5-0 1) used) v1-22) + (+! (-> usage data (+ s5-0 1) total) v1-22) ) - (set! (-> arg0 data (+ s5-0 2) name) "collision-vertex") - (+! (-> arg0 data (+ s5-0 2) count) (-> s4-0 vertex-count)) + (set! (-> usage data (+ s5-0 2) name) "collision-vertex") + (+! (-> usage data (+ s5-0 2) count) (-> s4-0 vertex-count)) (let ((v1-31 (* (-> s4-0 vertex-data-qwc) 16))) - (+! (-> arg0 data (+ s5-0 2) used) v1-31) - (let ((v0-2 (+ (-> arg0 data (+ s5-0 2) total) v1-31))) - (set! (-> arg0 data (+ s5-0 2) total) v0-2) + (+! (-> usage data (+ s5-0 2) used) v1-31) + (let ((v0-2 (+ (-> usage data (+ s5-0 2) total) v1-31))) + (set! (-> usage data (+ s5-0 2) total) v0-2) (the-as collide-fragment v0-2) ) ) @@ -135,16 +135,16 @@ ) ;; definition for method 8 of type drawable-inline-array-collide-fragment -(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc index 3b9bcc9287..507ea001fb 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc @@ -9,20 +9,20 @@ ;; definition for method 8 of type collide-mesh ;; INFO: Return type mismatch int vs collide-mesh. -(defmethod mem-usage ((this collide-mesh) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 79 (-> arg0 length))) - (set! (-> arg0 data 78 name) "collide-mesh") - (+! (-> arg0 data 78 count) 1) +(defmethod mem-usage ((this collide-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 79 (-> usage length))) + (set! (-> usage data 78 name) "collide-mesh") + (+! (-> usage data 78 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 78 used) v1-6) - (+! (-> arg0 data 78 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 78 used) v1-6) + (+! (-> usage data 78 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 79 (-> arg0 length))) - (set! (-> arg0 data 78 name) "collide-mesh") - (+! (-> arg0 data 78 count) 1) + (set! (-> usage length) (max 79 (-> usage length))) + (set! (-> usage data 78 name) "collide-mesh") + (+! (-> usage data 78 count) 1) (let ((v1-16 (* (-> this num-verts) 16))) - (+! (-> arg0 data 78 used) v1-16) - (+! (-> arg0 data 78 total) (logand -16 (+ v1-16 15))) + (+! (-> usage data 78 used) v1-16) + (+! (-> usage data 78 total) (logand -16 (+ v1-16 15))) ) (the-as collide-mesh 0) ) diff --git a/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc index 50b357f1a7..233b60f365 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc @@ -36,7 +36,6 @@ ) ;; definition for method 9 of type trajectory -;; INFO: this function exists in multiple non-identical object files (defmethod eval-position! ((this trajectory) (time float) (result vector)) (vector+float*! result (-> this initial-position) (-> this initial-velocity) time) (+! (-> result y) (* 0.5 time time (-> this gravity))) @@ -44,14 +43,14 @@ ) ;; definition for method 7 of type nav-enemy -(defmethod relocate ((this nav-enemy) (arg0 int)) +(defmethod relocate ((this nav-enemy) (offset int)) (if (nonzero? (-> this neck)) - (set! (-> this neck) (the-as joint-mod (+ (the-as int (-> this neck)) arg0))) + (set! (-> this neck) (the-as joint-mod (+ (the-as int (-> this neck)) offset))) ) (if (nonzero? (-> this rand-gen)) - (set! (-> this rand-gen) (the-as random-generator (+ (the-as int (-> this rand-gen)) arg0))) + (set! (-> this rand-gen) (the-as random-generator (+ (the-as int (-> this rand-gen)) offset))) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 42 of type nav-enemy diff --git a/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc index 3a64fe3584..33fb49f96e 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc @@ -145,8 +145,8 @@ ;; definition for method 7 of type process-taskable ;; INFO: Return type mismatch process-drawable vs process-taskable. -(defmethod relocate ((this process-taskable) (arg0 int)) - (the-as process-taskable ((method-of-type process-drawable relocate) this arg0)) +(defmethod relocate ((this process-taskable) (offset int)) + (the-as process-taskable ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 46 of type process-taskable diff --git a/test/decompiler/reference/jak1/engine/common-obs/rigid-body_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/rigid-body_REF.gc index de0588c079..a79b6d823e 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/rigid-body_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/rigid-body_REF.gc @@ -393,13 +393,13 @@ ) ;; definition for method 7 of type rigid-body-platform -(defmethod relocate ((this rigid-body-platform) (arg0 int)) +(defmethod relocate ((this rigid-body-platform) (offset int)) (if (nonzero? (-> this control-point-array)) (set! (-> this control-point-array) - (the-as rigid-body-control-point-inline-array (+ (the-as int (-> this control-point-array)) arg0)) + (the-as rigid-body-control-point-inline-array (+ (the-as int (-> this control-point-array)) offset)) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 22 of type rigid-body-platform diff --git a/test/decompiler/reference/jak1/engine/debug/memory-usage_REF.gc b/test/decompiler/reference/jak1/engine/debug/memory-usage_REF.gc index 85369e1dbd..09822132ef 100644 --- a/test/decompiler/reference/jak1/engine/debug/memory-usage_REF.gc +++ b/test/decompiler/reference/jak1/engine/debug/memory-usage_REF.gc @@ -5,7 +5,6 @@ (declare-file (debug)) ;; definition for method 3 of type memory-usage-block -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this memory-usage-block)) (format #t "-------------------------------------------------------------~%") (format #t " # name count bytes used aligned bytes~%") @@ -35,7 +34,7 @@ ) ;; definition for method 8 of type object -(defmethod mem-usage ((this object) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this object) (usage memory-usage-block) (flags int)) (if this (format #t "WARNING: mem-usage called on object, probably not what was wanted for ~A~%" this) ) @@ -88,23 +87,23 @@ ) ;; definition for method 8 of type process-tree -(defmethod mem-usage ((this process-tree) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this process-tree) (usage memory-usage-block) (flags int)) (let ((v1-0 87)) (let* ((a0-1 *dead-pool-list*) (a3-0 (car a0-1)) ) (while (not (null? a0-1)) - (set! (-> arg0 data v1-0 name) (symbol->string (the-as symbol a3-0))) + (set! (-> usage data v1-0 name) (symbol->string (the-as symbol a3-0))) (+! v1-0 1) (set! a0-1 (cdr a0-1)) (set! a3-0 (car a0-1)) ) ) - (set! (-> arg0 length) (max (-> arg0 length) v1-0)) + (set! (-> usage length) (max (-> usage length) v1-0)) ) - (set! (-> arg0 data 93 name) "*debug-dead-pool*") - (set! *temp-mem-usage* arg0) - (when (logtest? arg1 32) + (set! (-> usage data 93 name) "*debug-dead-pool*") + (set! *temp-mem-usage* usage) + (when (logtest? flags 32) (let* ((s5-0 87) (s4-0 *dead-pool-list*) (v1-4 (car s4-0)) diff --git a/test/decompiler/reference/jak1/engine/draw/draw-node_REF.gc b/test/decompiler/reference/jak1/engine/draw/draw-node_REF.gc index b4dbaafab7..3a20c540fb 100644 --- a/test/decompiler/reference/jak1/engine/draw/draw-node_REF.gc +++ b/test/decompiler/reference/jak1/engine/draw/draw-node_REF.gc @@ -65,13 +65,13 @@ ) ;; definition for method 8 of type drawable-inline-array-node -(defmethod mem-usage ((this drawable-inline-array-node) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 62 (-> arg0 length))) - (set! (-> arg0 data 61 name) "draw-node") - (+! (-> arg0 data 61 count) (-> this length)) +(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 62 (-> usage length))) + (set! (-> usage data 61 name) "draw-node") + (+! (-> usage data 61 count) (-> this length)) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 61 used) v1-6) - (+! (-> arg0 data 61 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 61 used) v1-6) + (+! (-> usage data 61 total) (logand -16 (+ v1-6 15))) ) this ) diff --git a/test/decompiler/reference/jak1/engine/draw/drawable-group_REF.gc b/test/decompiler/reference/jak1/engine/draw/drawable-group_REF.gc index f04b2c521a..6624cb7896 100644 --- a/test/decompiler/reference/jak1/engine/draw/drawable-group_REF.gc +++ b/test/decompiler/reference/jak1/engine/draw/drawable-group_REF.gc @@ -43,16 +43,16 @@ ) ;; definition for method 8 of type drawable-group -(defmethod mem-usage ((this drawable-group) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) "drawable-group") - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 0 used) v1-6) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc b/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc index c304293293..4cc0f82d22 100644 --- a/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc @@ -3,30 +3,30 @@ ;; definition for method 8 of type drawable-ambient ;; INFO: Return type mismatch int vs drawable-ambient. -(defmethod mem-usage ((this drawable-ambient) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 50 (-> arg0 length))) - (set! (-> arg0 data 49 name) "ambient") - (+! (-> arg0 data 49 count) 1) +(defmethod mem-usage ((this drawable-ambient) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 50 (-> usage length))) + (set! (-> usage data 49 name) "ambient") + (+! (-> usage data 49 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 49 used) v1-6) - (+! (-> arg0 data 49 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 49 used) v1-6) + (+! (-> usage data 49 total) (logand -16 (+ v1-6 15))) ) - (mem-usage (-> this ambient) arg0 (logior arg1 128)) + (mem-usage (-> this ambient) usage (logior flags 128)) (the-as drawable-ambient 0) ) ;; definition for method 8 of type drawable-inline-array-ambient ;; INFO: Return type mismatch int vs drawable-inline-array-ambient. -(defmethod mem-usage ((this drawable-inline-array-ambient) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-ambient) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) (the-as drawable-inline-array-ambient 0) ) diff --git a/test/decompiler/reference/jak1/engine/entity/entity_REF.gc b/test/decompiler/reference/jak1/engine/entity/entity_REF.gc index ecbfc05733..c0e89198bf 100644 --- a/test/decompiler/reference/jak1/engine/entity/entity_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/entity_REF.gc @@ -12,30 +12,30 @@ ;; definition for method 8 of type drawable-actor ;; INFO: Return type mismatch int vs drawable-actor. -(defmethod mem-usage ((this drawable-actor) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 44 (-> arg0 length))) - (set! (-> arg0 data 43 name) "entity") - (+! (-> arg0 data 43 count) 1) +(defmethod mem-usage ((this drawable-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 44 (-> usage length))) + (set! (-> usage data 43 name) "entity") + (+! (-> usage data 43 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 43 used) v1-6) - (+! (-> arg0 data 43 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 43 used) v1-6) + (+! (-> usage data 43 total) (logand -16 (+ v1-6 15))) ) - (mem-usage (-> this actor) arg0 (logior arg1 64)) + (mem-usage (-> this actor) usage (logior flags 64)) (the-as drawable-actor 0) ) ;; definition for method 8 of type drawable-inline-array-actor ;; INFO: Return type mismatch int vs drawable-inline-array-actor. -(defmethod mem-usage ((this drawable-inline-array-actor) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) (the-as drawable-inline-array-actor 0) ) @@ -373,7 +373,6 @@ ) ;; definition for method 2 of type process -;; INFO: this function exists in multiple non-identical object files (defmethod print ((this process)) (format #t diff --git a/test/decompiler/reference/jak1/engine/entity/relocate_REF.gc b/test/decompiler/reference/jak1/engine/entity/relocate_REF.gc index 299c6222b5..05a821f7c6 100644 --- a/test/decompiler/reference/jak1/engine/entity/relocate_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/relocate_REF.gc @@ -2,19 +2,19 @@ (in-package goal) ;; definition for method 7 of type process -(defmethod relocate ((this process) (arg0 int)) +(defmethod relocate ((this process) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) - (&+! (-> this ppointer 0) arg0) + (&+! (-> this ppointer 0) offset) (let ((v1-5 (-> this entity))) (if (and v1-5 (= (-> v1-5 extra process) this)) - (&+! (-> v1-5 extra process) arg0) + (&+! (-> v1-5 extra process) offset) ) ) (let ((v1-7 (-> this connection-list next1))) @@ -23,22 +23,22 @@ (if (and (>= (the-as int a0-14) (-> *kernel-context* relocating-min)) (< (the-as int a0-14) (-> *kernel-context* relocating-max)) ) - (&+! (-> v1-7 prev1) arg0) + (&+! (-> v1-7 prev1) offset) ) ) (let ((a0-19 (-> (the-as connection v1-7) param1))) (if (and (>= a0-19 (-> *kernel-context* relocating-min)) (< a0-19 (-> *kernel-context* relocating-max))) - (+! (-> (the-as connection v1-7) param1) arg0) + (+! (-> (the-as connection v1-7) param1) offset) ) ) (let ((a0-24 (-> (the-as connection v1-7) param2))) (if (and (>= a0-24 (-> *kernel-context* relocating-min)) (< a0-24 (-> *kernel-context* relocating-max))) - (+! (-> (the-as connection v1-7) param2) arg0) + (+! (-> (the-as connection v1-7) param2) offset) ) ) (let ((a0-29 (-> (the-as connection v1-7) param3))) (if (and (>= a0-29 (-> *kernel-context* relocating-min)) (< a0-29 (-> *kernel-context* relocating-max))) - (+! (-> (the-as connection v1-7) param3) arg0) + (+! (-> (the-as connection v1-7) param3) offset) ) ) (set! v1-7 (-> (the-as connection v1-7) next1)) @@ -48,130 +48,130 @@ (if (and (>= (the-as int v1-10) (-> *kernel-context* relocating-min)) (< (the-as int v1-10) (-> *kernel-context* relocating-max)) ) - (&+! (-> this self) arg0) + (&+! (-> this self) offset) ) ) (let ((v1-15 (-> this ppointer))) (if (and (>= (the-as int v1-15) (-> *kernel-context* relocating-min)) (< (the-as int v1-15) (-> *kernel-context* relocating-max)) ) - (&+! (-> this ppointer) arg0) + (&+! (-> this ppointer) offset) ) ) (let ((s4-0 (&+ (-> this heap-base) 4))) (while (< (the-as int s4-0) (the-as int (-> this heap-cur))) - (relocate s4-0 arg0) + (relocate s4-0 offset) (&+! s4-0 (logand -16 (+ (asize-of s4-0) 15))) ) ) - (&+! (-> this main-thread) arg0) - (&+! (-> this top-thread) arg0) - (&+! (-> this heap-base) arg0) - (&+! (-> this heap-cur) arg0) - (&+! (-> this heap-top) arg0) + (&+! (-> this main-thread) offset) + (&+! (-> this top-thread) offset) + (&+! (-> this heap-base) offset) + (&+! (-> this heap-cur) offset) + (&+! (-> this heap-top) offset) (let ((a2-4 (asize-of this)) (a1-22 (&-> this type)) ) (cond - ((>= arg0 0) - (qmem-copy->! (&+ a1-22 arg0) a1-22 a2-4) + ((>= offset 0) + (qmem-copy->! (&+ a1-22 offset) a1-22 a2-4) ) ((< a2-4 2560) - (qmem-copy<-! (&+ a1-22 arg0) a1-22 a2-4) + (qmem-copy<-! (&+ a1-22 offset) a1-22 a2-4) ) (else - (ultimate-memcpy (&+ a1-22 arg0) a1-22 (the-as uint a2-4)) + (ultimate-memcpy (&+ a1-22 offset) a1-22 (the-as uint a2-4)) ) ) ) (set! (-> *kernel-context* relocating-process) #f) - (&+ this arg0) + (&+ this offset) ) ;; definition for method 7 of type cpu-thread -(defmethod relocate ((this cpu-thread) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this cpu-thread) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type process-drawable ;; INFO: Return type mismatch process vs process-drawable. -(defmethod relocate ((this process-drawable) (arg0 int)) +(defmethod relocate ((this process-drawable) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this node-list)) - (&+! (-> this node-list) arg0) + (&+! (-> this node-list) offset) ) (if (nonzero? (-> this draw)) - (&+! (-> this draw) arg0) + (&+! (-> this draw) offset) ) (if (nonzero? (-> this skel)) - (&+! (-> this skel) arg0) + (&+! (-> this skel) offset) ) (if (nonzero? (-> this nav)) - (&+! (-> this nav) arg0) + (&+! (-> this nav) offset) ) (if (nonzero? (-> this align)) - (&+! (-> this align) arg0) + (&+! (-> this align) offset) ) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) (if (nonzero? (-> this vol)) - (&+! (-> this vol) arg0) + (&+! (-> this vol) offset) ) (if (nonzero? (-> this fact)) - (&+! (-> this fact) arg0) + (&+! (-> this fact) offset) ) (if (nonzero? (-> this link)) - (&+! (-> this link) arg0) + (&+! (-> this link) offset) ) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) (if (nonzero? (-> this water)) - (&+! (-> this water) arg0) + (&+! (-> this water) offset) ) (if (nonzero? (-> this sound)) - (&+! (-> this sound) arg0) + (&+! (-> this sound) offset) ) - (the-as process-drawable ((method-of-type process relocate) this arg0)) + (the-as process-drawable ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type collide-shape -(defmethod relocate ((this collide-shape) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this root-prim) arg0) +(defmethod relocate ((this collide-shape) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this root-prim) offset) (if (-> this riders) - (&+! (-> this riders) arg0) + (&+! (-> this riders) offset) ) this ) ;; definition for method 7 of type collide-shape-moving ;; INFO: Return type mismatch collide-shape vs collide-shape-moving. -(defmethod relocate ((this collide-shape-moving) (arg0 int)) +(defmethod relocate ((this collide-shape-moving) (offset int)) (if (-> this dynam) - (&+! (-> this dynam) arg0) + (&+! (-> this dynam) offset) ) - (the-as collide-shape-moving ((method-of-type collide-shape relocate) this arg0)) + (the-as collide-shape-moving ((method-of-type collide-shape relocate) this offset)) ) ;; definition for method 7 of type collide-sticky-rider-group -(defmethod relocate ((this collide-sticky-rider-group) (arg0 int)) +(defmethod relocate ((this collide-sticky-rider-group) (offset int)) (countdown (v1-0 (-> this num-riders)) (let ((a2-2 (-> this rider v1-0))) (if (-> a2-2 sticky-prim) - (&+! (-> a2-2 sticky-prim) arg0) + (&+! (-> a2-2 sticky-prim) offset) ) ) ) @@ -179,78 +179,78 @@ ) ;; definition for method 7 of type collide-shape-prim -(defmethod relocate ((this collide-shape-prim) (arg0 int)) - (&+! (-> this cshape) arg0) +(defmethod relocate ((this collide-shape-prim) (offset int)) + (&+! (-> this cshape) offset) this ) ;; definition for method 7 of type collide-shape-prim-group -(defmethod relocate ((this collide-shape-prim-group) (arg0 int)) - (&+! (-> this cshape) arg0) +(defmethod relocate ((this collide-shape-prim-group) (offset int)) + (&+! (-> this cshape) offset) (countdown (v1-2 (-> this num-prims)) - (&+! (-> this prims v1-2) arg0) + (&+! (-> this prims v1-2) offset) ) this ) ;; definition for method 7 of type fact-info -(defmethod relocate ((this fact-info) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this fact-info) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type draw-control -(defmethod relocate ((this draw-control) (arg0 int)) - (&+! (-> this skeleton) arg0) - (&+! (-> this process) arg0) +(defmethod relocate ((this draw-control) (offset int)) + (&+! (-> this skeleton) offset) + (&+! (-> this process) offset) (when (-> this ripple) (if (-> this ripple query) - (&+! (-> this ripple query) arg0) + (&+! (-> this ripple query) offset) ) - (&+! (-> this ripple) arg0) + (&+! (-> this ripple) offset) ) (let ((v1-14 (-> this shadow-ctrl))) (if (and (>= (the-as int v1-14) (-> *kernel-context* relocating-min)) (< (the-as int v1-14) (-> *kernel-context* relocating-max)) ) - (&+! (-> this shadow-ctrl) arg0) + (&+! (-> this shadow-ctrl) offset) ) ) this ) ;; definition for method 7 of type joint-control -(defmethod relocate ((this joint-control) (arg0 int)) +(defmethod relocate ((this joint-control) (offset int)) (if (-> this effect) - (&+! (-> this effect) arg0) + (&+! (-> this effect) offset) ) - (set! (-> this root-channel) (the-as (inline-array joint-control-channel) (&+ (-> this root-channel) arg0))) + (set! (-> this root-channel) (the-as (inline-array joint-control-channel) (&+ (-> this root-channel) offset))) (countdown (v1-6 (-> this allocated-length)) - (&+! (-> this channel v1-6 parent) arg0) + (&+! (-> this channel v1-6 parent) offset) ) this ) ;; definition for method 7 of type cspace-array -(defmethod relocate ((this cspace-array) (arg0 int)) +(defmethod relocate ((this cspace-array) (offset int)) (countdown (v1-0 (-> this length)) (let ((a2-2 (-> this data v1-0))) (if (-> a2-2 parent) - (&+! (-> a2-2 parent) arg0) + (&+! (-> a2-2 parent) offset) ) - (&+! (-> a2-2 bone) arg0) + (&+! (-> a2-2 bone) offset) (let ((a3-6 (-> a2-2 param1))) (if (and (>= (the-as int a3-6) (-> *kernel-context* relocating-min)) (< (the-as int a3-6) (-> *kernel-context* relocating-max)) ) - (&+! (-> a2-2 param1) arg0) + (&+! (-> a2-2 param1) offset) ) ) (let ((a3-11 (-> a2-2 param2))) (if (and (>= (the-as int a3-11) (-> *kernel-context* relocating-min)) (< (the-as int a3-11) (-> *kernel-context* relocating-max)) ) - (&+! (-> a2-2 param2) arg0) + (&+! (-> a2-2 param2) offset) ) ) ) @@ -259,64 +259,64 @@ ) ;; definition for method 7 of type nav-control -(defmethod relocate ((this nav-control) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this shape) arg0) +(defmethod relocate ((this nav-control) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this shape) offset) this ) ;; definition for method 7 of type path-control -(defmethod relocate ((this path-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this path-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type vol-control -(defmethod relocate ((this vol-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this vol-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type water-control -(defmethod relocate ((this water-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this water-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type actor-link-info -(defmethod relocate ((this actor-link-info) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this actor-link-info) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type align-control -(defmethod relocate ((this align-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this align-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type joint-mod -(defmethod relocate ((this joint-mod) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this joint) arg0) +(defmethod relocate ((this joint-mod) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this joint) offset) this ) ;; definition for method 7 of type joint-mod-wheel -(defmethod relocate ((this joint-mod-wheel) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this joint-mod-wheel) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type effect-control -(defmethod relocate ((this effect-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this effect-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type sparticle-launch-control -(defmethod relocate ((this sparticle-launch-control) (arg0 int)) - (&+! (-> this proc) arg0) +(defmethod relocate ((this sparticle-launch-control) (offset int)) + (&+! (-> this proc) offset) (countdown (v1-2 (-> this length)) (let* ((a0-3 (-> this data v1-2)) (a2-0 (-> a0-3 origin)) @@ -324,7 +324,7 @@ (if (and (>= (the-as int a2-0) (-> *kernel-context* relocating-min)) (< (the-as int a2-0) (-> *kernel-context* relocating-max)) ) - (&+! (-> a0-3 origin) arg0) + (&+! (-> a0-3 origin) offset) ) ) ) @@ -348,66 +348,66 @@ ;; definition for method 7 of type camera-master ;; INFO: Return type mismatch process vs camera-master. -(defmethod relocate ((this camera-master) (arg0 int)) +(defmethod relocate ((this camera-master) (offset int)) (if (nonzero? (-> this water-drip)) - (&+! (-> this water-drip) arg0) + (&+! (-> this water-drip) offset) ) - (the-as camera-master ((method-of-type process relocate) this arg0)) + (the-as camera-master ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type time-of-day-proc ;; INFO: Return type mismatch process vs time-of-day-proc. -(defmethod relocate ((this time-of-day-proc) (arg0 int)) +(defmethod relocate ((this time-of-day-proc) (offset int)) (if (nonzero? (-> this stars)) - (&+! (-> this stars) arg0) + (&+! (-> this stars) offset) ) (if (nonzero? (-> this sun)) - (&+! (-> this sun) arg0) + (&+! (-> this sun) offset) ) (if (nonzero? (-> this green-sun)) - (&+! (-> this green-sun) arg0) + (&+! (-> this green-sun) offset) ) (if (nonzero? (-> this moon)) - (&+! (-> this moon) arg0) + (&+! (-> this moon) offset) ) - (the-as time-of-day-proc ((method-of-type process relocate) this arg0)) + (the-as time-of-day-proc ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type swingpole ;; INFO: Return type mismatch process vs swingpole. -(defmethod relocate ((this swingpole) (arg0 int)) +(defmethod relocate ((this swingpole) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) - (the-as swingpole ((method-of-type process relocate) this arg0)) + (the-as swingpole ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type part-tracker ;; INFO: Return type mismatch process vs part-tracker. -(defmethod relocate ((this part-tracker) (arg0 int)) +(defmethod relocate ((this part-tracker) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) - (the-as part-tracker ((method-of-type process relocate) this arg0)) + (the-as part-tracker ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type manipy ;; INFO: Return type mismatch process-drawable vs manipy. -(defmethod relocate ((this manipy) (arg0 int)) +(defmethod relocate ((this manipy) (offset int)) (if (nonzero? (-> this joint 0)) - (&+! (-> this joint 0) arg0) + (&+! (-> this joint 0) offset) ) (if (nonzero? (-> this joint 1)) - (&+! (-> this joint 1) arg0) + (&+! (-> this joint 1) offset) ) (if (nonzero? (-> this joint 2)) - (&+! (-> this joint 2) arg0) + (&+! (-> this joint 2) offset) ) (if (nonzero? (-> this joint 3)) - (&+! (-> this joint 3) arg0) + (&+! (-> this joint 3) offset) ) - (the-as manipy ((method-of-type process-drawable relocate) this arg0)) + (the-as manipy ((method-of-type process-drawable relocate) this offset)) ) diff --git a/test/decompiler/reference/jak1/engine/game/game-save_REF.gc b/test/decompiler/reference/jak1/engine/game/game-save_REF.gc index af4fb7482d..88e30abcbc 100644 --- a/test/decompiler/reference/jak1/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/jak1/engine/game/game-save_REF.gc @@ -1236,11 +1236,11 @@ ;; definition for method 7 of type auto-save ;; INFO: Return type mismatch process vs auto-save. -(defmethod relocate ((this auto-save) (arg0 int)) +(defmethod relocate ((this auto-save) (offset int)) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) - (the-as auto-save ((method-of-type process relocate) this arg0)) + (the-as auto-save ((method-of-type process relocate) this offset)) ) ;; definition for function auto-save-post diff --git a/test/decompiler/reference/jak1/engine/gfx/background/prototype_REF.gc b/test/decompiler/reference/jak1/engine/gfx/background/prototype_REF.gc index ba0c808b20..60d4a7f558 100644 --- a/test/decompiler/reference/jak1/engine/gfx/background/prototype_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/background/prototype_REF.gc @@ -48,88 +48,88 @@ ) ;; definition for method 8 of type prototype-array-tie -(defmethod mem-usage ((this prototype-array-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this prototype-array-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-8 (asize-of this))) - (+! (-> arg0 data 0 used) v1-8) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 0 used) v1-8) + (+! (-> usage data 0 total) (logand -16 (+ v1-8 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this array-data s3-0) arg0 arg1) + (mem-usage (-> this array-data s3-0) usage flags) ) this ) ;; definition for method 8 of type prototype-bucket-tie -(defmethod mem-usage ((this prototype-bucket-tie) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this prototype-bucket-tie) (usage memory-usage-block) (flags int)) (dotimes (s3-0 4) (let ((a0-1 (-> this geometry-override s3-0))) (if (nonzero? a0-1) - (mem-usage a0-1 arg0 (logior arg1 1)) + (mem-usage a0-1 usage (logior flags 1)) ) ) ) - (set! (-> arg0 length) (max 81 (-> arg0 length))) - (set! (-> arg0 data 80 name) "string") - (+! (-> arg0 data 80 count) 1) + (set! (-> usage length) (max 81 (-> usage length))) + (set! (-> usage data 80 name) "string") + (+! (-> usage data 80 count) 1) (let ((v1-13 (asize-of (-> this name)))) - (+! (-> arg0 data 80 used) v1-13) - (+! (-> arg0 data 80 total) (logand -16 (+ v1-13 15))) + (+! (-> usage data 80 used) v1-13) + (+! (-> usage data 80 total) (logand -16 (+ v1-13 15))) ) (when (nonzero? (-> this tie-colors)) - (set! (-> arg0 length) (max 17 (-> arg0 length))) - (set! (-> arg0 data 16 name) "tie-pal") - (+! (-> arg0 data 16 count) 1) + (set! (-> usage length) (max 17 (-> usage length))) + (set! (-> usage data 16 name) "tie-pal") + (+! (-> usage data 16 count) 1) (let ((v1-25 (asize-of (-> this tie-colors)))) - (+! (-> arg0 data 16 used) v1-25) - (+! (-> arg0 data 16 total) (logand -16 (+ v1-25 15))) + (+! (-> usage data 16 used) v1-25) + (+! (-> usage data 16 total) (logand -16 (+ v1-25 15))) ) ) (if (nonzero? (-> this collide-frag)) - (mem-usage (-> this collide-frag) arg0 (logior arg1 1)) + (mem-usage (-> this collide-frag) usage (logior flags 1)) ) this ) ;; definition for method 8 of type prototype-inline-array-shrub -(defmethod mem-usage ((this prototype-inline-array-shrub) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this prototype-inline-array-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-8 (asize-of this))) - (+! (-> arg0 data 0 used) v1-8) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 0 used) v1-8) + (+! (-> usage data 0 total) (logand -16 (+ v1-8 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) ;; definition for method 8 of type prototype-bucket-shrub -(defmethod mem-usage ((this prototype-bucket-shrub) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 25 (-> arg0 length))) - (set! (-> arg0 data 24 name) "prototype-bucket-shrub") - (+! (-> arg0 data 24 count) 1) +(defmethod mem-usage ((this prototype-bucket-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 25 (-> usage length))) + (set! (-> usage data 24 name) "prototype-bucket-shrub") + (+! (-> usage data 24 count) 1) (let ((v1-5 112)) - (+! (-> arg0 data 24 used) v1-5) - (+! (-> arg0 data 24 total) (logand -16 (+ v1-5 15))) + (+! (-> usage data 24 used) v1-5) + (+! (-> usage data 24 total) (logand -16 (+ v1-5 15))) ) (dotimes (s3-0 4) (let ((a0-5 (-> this geometry s3-0))) (if (nonzero? a0-5) - (mem-usage a0-5 arg0 (logior arg1 1)) + (mem-usage a0-5 usage (logior flags 1)) ) ) ) - (set! (-> arg0 length) (max 81 (-> arg0 length))) - (set! (-> arg0 data 80 name) "string") - (+! (-> arg0 data 80 count) 1) + (set! (-> usage length) (max 81 (-> usage length))) + (set! (-> usage data 80 name) "string") + (+! (-> usage data 80 count) 1) (let ((v1-22 (asize-of (-> this name)))) - (+! (-> arg0 data 80 used) v1-22) - (+! (-> arg0 data 80 total) (logand -16 (+ v1-22 15))) + (+! (-> usage data 80 used) v1-22) + (+! (-> usage data 80 total) (logand -16 (+ v1-22 15))) ) this ) diff --git a/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc b/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc index 3081320984..9f815cd98d 100644 --- a/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc @@ -76,7 +76,6 @@ ) ;; definition for method 3 of type merc-fragment-control -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this merc-fragment-control)) (format #t "[~8x] ~A~%" this 'merc-fragment-control) (format #t "~Tunsigned-four-count: ~D~%" (-> this unsigned-four-count)) @@ -124,7 +123,6 @@ ) ;; definition for method 3 of type merc-ctrl -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this merc-ctrl)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) @@ -139,9 +137,9 @@ ) ;; definition for method 8 of type merc-ctrl -(defmethod mem-usage ((this merc-ctrl) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this merc-ctrl) (usage memory-usage-block) (flags int)) (if (-> this extra) - (mem-usage (-> this extra) arg0 arg1) + (mem-usage (-> this extra) usage flags) ) (let ((ctrl-mem (+ 32 80 (* (-> this header effect-count) 32)))) (dotimes (effect-idx (the-as int (-> this header effect-count))) @@ -158,11 +156,11 @@ ) ) ) - (set! (-> arg0 length) (max 76 (-> arg0 length))) - (set! (-> arg0 data 75 name) "merc-ctrl") - (+! (-> arg0 data 75 count) 1) - (+! (-> arg0 data 75 used) ctrl-mem) - (+! (-> arg0 data 75 total) (logand -16 (+ ctrl-mem 15))) + (set! (-> usage length) (max 76 (-> usage length))) + (set! (-> usage data 75 name) "merc-ctrl") + (+! (-> usage data 75 count) 1) + (+! (-> usage data 75 used) ctrl-mem) + (+! (-> usage data 75 total) (logand -16 (+ ctrl-mem 15))) ) (let ((effect-mem 0)) (dotimes (effect-idx2 (the-as int (-> this header effect-count))) @@ -183,21 +181,21 @@ ) ) (when (nonzero? effect-mem) - (set! (-> arg0 length) (max 78 (-> arg0 length))) - (set! (-> arg0 data 77 name) "blend-shape") - (+! (-> arg0 data 77 count) 1) - (+! (-> arg0 data 77 used) effect-mem) - (+! (-> arg0 data 77 total) (logand -16 (+ effect-mem 15))) + (set! (-> usage length) (max 78 (-> usage length))) + (set! (-> usage data 77 name) "blend-shape") + (+! (-> usage data 77 count) 1) + (+! (-> usage data 77 used) effect-mem) + (+! (-> usage data 77 total) (logand -16 (+ effect-mem 15))) ) ) (when (nonzero? (-> this header eye-ctrl)) (let ((a0-28 (-> this header eye-ctrl))) - (set! (-> arg0 length) (max 109 (-> arg0 length))) - (set! (-> arg0 data 108 name) "eye-anim") - (+! (-> arg0 data 108 count) 1) + (set! (-> usage length) (max 109 (-> usage length))) + (set! (-> usage data 108 name) "eye-anim") + (+! (-> usage data 108 count) 1) (let ((v1-47 (asize-of a0-28))) - (+! (-> arg0 data 108 used) v1-47) - (+! (-> arg0 data 108 total) (logand -16 (+ v1-47 15))) + (+! (-> usage data 108 used) v1-47) + (+! (-> usage data 108 total) (logand -16 (+ v1-47 15))) ) ) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc index f95d2181bf..9d0801cf43 100644 --- a/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc @@ -27,18 +27,18 @@ ) ;; definition for method 8 of type texture-page -(defmethod mem-usage ((this texture-page) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 80 (-> arg0 length))) - (set! (-> arg0 data 79 name) "texture") - (+! (-> arg0 data 79 count) (-> this length)) +(defmethod mem-usage ((this texture-page) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 80 (-> usage length))) + (set! (-> usage data 79 name) "texture") + (+! (-> usage data 79 count) (-> this length)) (let ((v1-7 (- (asize-of this) (the-as int (* (-> this size) 4))))) (dotimes (a0-6 (-> this length)) (if (-> this data a0-6) (+! v1-7 64) ) ) - (+! (-> arg0 data 79 used) v1-7) - (+! (-> arg0 data 79 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 79 used) v1-7) + (+! (-> usage data 79 total) (logand -16 (+ v1-7 15))) ) this ) @@ -2152,7 +2152,7 @@ ;; definition for method 7 of type texture-page-dir ;; INFO: Return type mismatch texture-page-dir vs none. -(defmethod relocate ((this texture-page-dir) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this texture-page-dir) (heap kheap) (name (pointer uint8))) (set! *texture-page-dir* this) (none) ) @@ -2196,7 +2196,7 @@ ;; definition for method 7 of type texture-page ;; INFO: Return type mismatch texture-page vs none. -(defmethod relocate ((this texture-page) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this texture-page) (heap kheap) (name (pointer uint8))) (local-vars (s4-0 texture-page-dir-entry)) (cond ((or (not this) (not (file-info-correct-version? (-> this info) (file-kind tpage) 0))) @@ -2214,7 +2214,7 @@ (let ((a3-0 (-> this id))) (set! s4-0 (-> *texture-page-dir* entries a3-0)) (set! (-> *texture-relocate-later* memcpy) #f) - ((-> *texture-pool* allocate-func) *texture-pool* this arg0 (the-as int a3-0)) + ((-> *texture-pool* allocate-func) *texture-pool* this heap (the-as int a3-0)) ) (not (-> *texture-relocate-later* memcpy)) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/tfrag/tfrag_REF.gc b/test/decompiler/reference/jak1/engine/gfx/tfrag/tfrag_REF.gc index afdd2f13d3..db529eaee9 100644 --- a/test/decompiler/reference/jak1/engine/gfx/tfrag/tfrag_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/tfrag/tfrag_REF.gc @@ -10,51 +10,51 @@ ) ;; definition for method 8 of type tfragment -(defmethod mem-usage ((this tfragment) (arg0 memory-usage-block) (arg1 int)) - (when (logtest? arg1 2) - (+! (-> arg0 data 19 count) 1) +(defmethod mem-usage ((this tfragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) + (+! (-> usage data 19 count) 1) (let ((v1-6 (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)))) - (+! (-> arg0 data 19 used) v1-6) - (+! (-> arg0 data 19 total) (logand -4 (+ v1-6 3))) + (+! (-> usage data 19 used) v1-6) + (+! (-> usage data 19 total) (logand -4 (+ v1-6 3))) ) (set! this this) (goto cfg-16) ) (let ((s4-0 1)) - (set! (-> arg0 length) (max (-> arg0 length) (+ s4-0 8))) - (set! (-> arg0 data s4-0 name) (symbol->string 'tfragment)) - (+! (-> arg0 data s4-0 count) 1) + (set! (-> usage length) (max (-> usage length) (+ s4-0 8))) + (set! (-> usage data s4-0 name) (symbol->string 'tfragment)) + (+! (-> usage data s4-0 count) 1) (let ((v1-22 (asize-of this))) - (+! (-> arg0 data s4-0 used) v1-22) - (+! (-> arg0 data s4-0 total) (logand -16 (+ v1-22 15))) + (+! (-> usage data s4-0 used) v1-22) + (+! (-> usage data s4-0 total) (logand -16 (+ v1-22 15))) ) - (set! (-> arg0 data (+ s4-0 1) name) "tfragment-base") - (+! (-> arg0 data (+ s4-0 1) count) 1) + (set! (-> usage data (+ s4-0 1) name) "tfragment-base") + (+! (-> usage data (+ s4-0 1) count) 1) (let ((v1-33 (* (-> this dma-qwc 0) 16))) - (+! (-> arg0 data (+ s4-0 1) used) v1-33) - (+! (-> arg0 data (+ s4-0 1) total) v1-33) + (+! (-> usage data (+ s4-0 1) used) v1-33) + (+! (-> usage data (+ s4-0 1) total) v1-33) ) - (set! (-> arg0 data (+ s4-0 2) name) "tfragment-common") - (+! (-> arg0 data (+ s4-0 2) count) 1) + (set! (-> usage data (+ s4-0 2) name) "tfragment-common") + (+! (-> usage data (+ s4-0 2) count) 1) (let ((v1-43 (* (- (-> this dma-qwc 1) (-> this dma-qwc 0)) 16))) - (+! (-> arg0 data (+ s4-0 2) used) v1-43) - (+! (-> arg0 data (+ s4-0 2) total) v1-43) + (+! (-> usage data (+ s4-0 2) used) v1-43) + (+! (-> usage data (+ s4-0 2) total) v1-43) ) - (set! (-> arg0 data (+ s4-0 3) name) "tfragment-level0") + (set! (-> usage data (+ s4-0 3) name) "tfragment-level0") (when (nonzero? (-> this num-level0-colors)) - (+! (-> arg0 data (+ s4-0 3) count) 1) + (+! (-> usage data (+ s4-0 3) count) 1) (let ((v1-55 (* (- (-> this dma-qwc 2) (-> this dma-qwc 0)) 16))) - (+! (-> arg0 data (+ s4-0 3) used) v1-55) - (+! (-> arg0 data (+ s4-0 3) total) v1-55) + (+! (-> usage data (+ s4-0 3) used) v1-55) + (+! (-> usage data (+ s4-0 3) total) v1-55) ) ) - (set! (-> arg0 data (+ s4-0 4) name) "tfragment-level1") + (set! (-> usage data (+ s4-0 4) name) "tfragment-level1") (when (not (or (= (-> this dma-level-1) (-> this dma-common)) (= (-> this dma-level-1) (-> this dma-base)) (zero? (-> this num-level1-colors)) ) ) - (+! (-> arg0 data (+ s4-0 4) count) 1) + (+! (-> usage data (+ s4-0 4) count) 1) (let ((v1-70 (* (- (-> this dma-qwc 3) (the-as @@ -66,23 +66,23 @@ ) ) ) - (+! (-> arg0 data (+ s4-0 4) used) v1-70) - (+! (-> arg0 data (+ s4-0 4) total) v1-70) + (+! (-> usage data (+ s4-0 4) used) v1-70) + (+! (-> usage data (+ s4-0 4) total) v1-70) ) ) - (set! (-> arg0 data (+ s4-0 5) name) "tfragment-color") - (+! (-> arg0 data (+ s4-0 5) count) 1) + (set! (-> usage data (+ s4-0 5) name) "tfragment-color") + (+! (-> usage data (+ s4-0 5) count) 1) (let ((v1-79 - (if (logtest? arg1 1) + (if (logtest? flags 1) 0 (the-as int (* (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)) 2)) ) ) ) - (+! (-> arg0 data (+ s4-0 5) used) v1-79) - (+! (-> arg0 data (+ s4-0 5) total) (logand -16 (+ v1-79 15))) + (+! (-> usage data (+ s4-0 5) used) v1-79) + (+! (-> usage data (+ s4-0 5) total) (logand -16 (+ v1-79 15))) ) - (set! (-> arg0 data (+ s4-0 6) name) "tfragment-debug") + (set! (-> usage data (+ s4-0 6) name) "tfragment-debug") ) (label cfg-16) this @@ -108,40 +108,40 @@ ) ;; definition for method 8 of type drawable-inline-array-tfrag -(defmethod mem-usage ((this drawable-inline-array-tfrag) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) ;; definition for method 8 of type drawable-tree-tfrag -(defmethod mem-usage ((this drawable-tree-tfrag) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) "drawable-group") - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-tree-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 0 used) v1-6) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) ) (when (nonzero? (-> this time-of-day-pal)) - (set! (-> arg0 length) (max 9 (-> arg0 length))) - (set! (-> arg0 data 8 name) "tfragment-pal") - (+! (-> arg0 data 8 count) 1) + (set! (-> usage length) (max 9 (-> usage length))) + (set! (-> usage data 8 name) "tfragment-pal") + (+! (-> usage data 8 count) 1) (let ((v1-18 (asize-of (-> this time-of-day-pal)))) - (+! (-> arg0 data 8 used) v1-18) - (+! (-> arg0 data 8 total) (logand -16 (+ v1-18 15))) + (+! (-> usage data 8 used) v1-18) + (+! (-> usage data 8 total) (logand -16 (+ v1-18 15))) ) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this arrays s3-0) arg0 arg1) + (mem-usage (-> this arrays s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/gfx/tie/tie_REF.gc b/test/decompiler/reference/jak1/engine/gfx/tie/tie_REF.gc index 8d768a71d2..6c95420cb2 100644 --- a/test/decompiler/reference/jak1/engine/gfx/tie/tie_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/tie/tie_REF.gc @@ -66,30 +66,30 @@ ) ;; definition for method 8 of type drawable-tree-instance-tie -(defmethod mem-usage ((this drawable-tree-instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-tree-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) - (mem-usage (-> this prototypes prototype-array-tie) arg0 (logior arg1 1)) + (mem-usage (-> this prototypes prototype-array-tie) usage (logior flags 1)) this ) ;; definition for method 8 of type tie-fragment -(defmethod mem-usage ((this tie-fragment) (arg0 memory-usage-block) (arg1 int)) - (when (logtest? arg1 2) +(defmethod mem-usage ((this tie-fragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) (let ((v1-3 (* (-> this color-count) 4)) (a0-2 (cond - ((logtest? arg1 4) + ((logtest? flags 4) 20 ) - ((logtest? arg1 8) + ((logtest? flags 8) 21 ) (else @@ -98,53 +98,53 @@ ) ) ) - (+! (-> arg0 data a0-2 count) 1) - (+! (-> arg0 data a0-2 used) v1-3) - (+! (-> arg0 data a0-2 total) (logand -4 (+ v1-3 3))) + (+! (-> usage data a0-2 count) 1) + (+! (-> usage data a0-2 used) v1-3) + (+! (-> usage data a0-2 total) (logand -4 (+ v1-3 3))) ) - (set! (-> arg0 length) (max 23 (-> arg0 length))) + (set! (-> usage length) (max 23 (-> usage length))) (set! this this) (goto cfg-13) ) - (set! (-> arg0 length) (max 18 (-> arg0 length))) - (set! (-> arg0 data 9 name) "tie-fragment") - (set! (-> arg0 data 10 name) "tie-gif") - (set! (-> arg0 data 11 name) "tie-points") - (set! (-> arg0 data 12 name) "tie-colors") - (set! (-> arg0 data 14 name) "tie-debug") - (set! (-> arg0 data 13 name) "tie-draw-points") - (set! (-> arg0 data 17 name) "tie-generic") - (+! (-> arg0 data 9 count) 1) + (set! (-> usage length) (max 18 (-> usage length))) + (set! (-> usage data 9 name) "tie-fragment") + (set! (-> usage data 10 name) "tie-gif") + (set! (-> usage data 11 name) "tie-points") + (set! (-> usage data 12 name) "tie-colors") + (set! (-> usage data 14 name) "tie-debug") + (set! (-> usage data 13 name) "tie-draw-points") + (set! (-> usage data 17 name) "tie-generic") + (+! (-> usage data 9 count) 1) (let ((v1-21 (asize-of this))) - (+! (-> arg0 data 9 used) v1-21) - (+! (-> arg0 data 9 total) (logand -16 (+ v1-21 15))) + (+! (-> usage data 9 used) v1-21) + (+! (-> usage data 9 total) (logand -16 (+ v1-21 15))) ) (let ((v1-26 (* (-> this gif-count) 16))) - (+! (-> arg0 data 10 count) (-> this tex-count)) - (+! (-> arg0 data 10 used) v1-26) - (+! (-> arg0 data 10 total) (logand -16 (+ v1-26 15))) + (+! (-> usage data 10 count) (-> this tex-count)) + (+! (-> usage data 10 used) v1-26) + (+! (-> usage data 10 total) (logand -16 (+ v1-26 15))) ) (let ((v1-31 (* (-> this vertex-count) 16))) - (+! (-> arg0 data 11 count) (-> this vertex-count)) - (+! (-> arg0 data 11 used) v1-31) - (+! (-> arg0 data 11 total) (logand -16 (+ v1-31 15))) + (+! (-> usage data 11 count) (-> this vertex-count)) + (+! (-> usage data 11 used) v1-31) + (+! (-> usage data 11 total) (logand -16 (+ v1-31 15))) ) (let ((v1-36 (* (-> this dp-qwc) 16))) - (+! (-> arg0 data 13 count) (* (-> this dp-qwc) 16)) - (+! (-> arg0 data 13 used) v1-36) - (+! (-> arg0 data 13 total) (logand -16 (+ v1-36 15))) + (+! (-> usage data 13 count) (* (-> this dp-qwc) 16)) + (+! (-> usage data 13 used) v1-36) + (+! (-> usage data 13 total) (logand -16 (+ v1-36 15))) ) (let ((v1-41 (* (-> this generic-count) 16))) - (+! (-> arg0 data 17 count) 1) - (+! (-> arg0 data 17 used) v1-41) - (+! (-> arg0 data 17 total) (logand -16 (+ v1-41 15))) + (+! (-> usage data 17 count) 1) + (+! (-> usage data 17 used) v1-41) + (+! (-> usage data 17 total) (logand -16 (+ v1-41 15))) ) (when (nonzero? (-> this debug-lines)) (dotimes (s4-0 (-> this debug-lines length)) - (+! (-> arg0 data 14 count) (-> (the-as (pointer int32) (-> this debug-lines s4-0)) 0)) + (+! (-> usage data 14 count) (-> (the-as (pointer int32) (-> this debug-lines s4-0)) 0)) (let ((v1-52 (asize-of (the-as basic (-> this debug-lines s4-0))))) - (+! (-> arg0 data 12 used) v1-52) - (+! (-> arg0 data 12 total) (logand -16 (+ v1-52 15))) + (+! (-> usage data 12 used) v1-52) + (+! (-> usage data 12 total) (logand -16 (+ v1-52 15))) ) ) ) @@ -153,29 +153,29 @@ ) ;; definition for method 8 of type instance-tie -(defmethod mem-usage ((this instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 19 (-> arg0 length))) - (set! (-> arg0 data 18 name) "instance-tie") - (+! (-> arg0 data 18 count) 1) +(defmethod mem-usage ((this instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 19 (-> usage length))) + (set! (-> usage data 18 name) "instance-tie") + (+! (-> usage data 18 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 18 used) v1-6) - (+! (-> arg0 data 18 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 18 used) v1-6) + (+! (-> usage data 18 total) (logand -16 (+ v1-6 15))) ) (when (nonzero? (-> this error)) - (set! (-> arg0 length) (max 24 (-> arg0 length))) - (set! (-> arg0 data 23 name) "instance-tie-colors*") - (set! (-> arg0 data 19 name) "instance-tie-colors0") - (set! (-> arg0 data 20 name) "instance-tie-colors1") - (set! (-> arg0 data 21 name) "instance-tie-colors2") - (set! (-> arg0 data 22 name) "instance-tie-colors3") - (+! (-> arg0 data 23 count) 1) + (set! (-> usage length) (max 24 (-> usage length))) + (set! (-> usage data 23 name) "instance-tie-colors*") + (set! (-> usage data 19 name) "instance-tie-colors0") + (set! (-> usage data 20 name) "instance-tie-colors1") + (set! (-> usage data 21 name) "instance-tie-colors2") + (set! (-> usage data 22 name) "instance-tie-colors3") + (+! (-> usage data 23 count) 1) (let ((s3-0 (-> this bucket-ptr))) - (+ (-> arg0 data 19 used) (-> arg0 data 20 used) (-> arg0 data 21 used) (-> arg0 data 22 used)) + (+ (-> usage data 19 used) (-> usage data 20 used) (-> usage data 21 used) (-> usage data 22 used)) (dotimes (s2-0 4) (let ((a0-10 (-> s3-0 geometry-override s2-0))) (when (nonzero? a0-10) (let ((t9-1 (method-of-object a0-10 mem-usage)) - (a1-2 arg0) + (a1-2 usage) (v1-29 s2-0) ) (t9-1 a0-10 a1-2 (logior (logior (cond @@ -194,7 +194,7 @@ ) 2 ) - arg1 + flags ) ) ) @@ -207,31 +207,31 @@ ) ;; definition for method 8 of type drawable-inline-array-instance-tie -(defmethod mem-usage ((this drawable-inline-array-instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) ;; definition for method 8 of type prototype-tie -(defmethod mem-usage ((this prototype-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this prototype-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/level/level_REF.gc b/test/decompiler/reference/jak1/engine/level/level_REF.gc index eaaea8eb63..0e9b8d9edd 100644 --- a/test/decompiler/reference/jak1/engine/level/level_REF.gc +++ b/test/decompiler/reference/jak1/engine/level/level_REF.gc @@ -77,7 +77,7 @@ ;; definition for method 7 of type bsp-header ;; INFO: Return type mismatch bsp-header vs none. -(defmethod relocate ((this bsp-header) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this bsp-header) (heap kheap) (name (pointer uint8))) (let ((s5-0 (-> *level* loading-level))) (if s5-0 (set! this (cond @@ -883,60 +883,60 @@ ) ;; definition for method 8 of type level -(defmethod mem-usage ((this level) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this level) (usage memory-usage-block) (flags int)) (when (= (-> this status) 'active) - (set! (-> arg0 length) (max 65 (-> arg0 length))) - (set! (-> arg0 data 64 name) "entity-links") - (+! (-> arg0 data 64 count) (-> this entity length)) + (set! (-> usage length) (max 65 (-> usage length))) + (set! (-> usage data 64 name) "entity-links") + (+! (-> usage data 64 count) (-> this entity length)) (let ((v1-8 (asize-of (-> this entity)))) - (+! (-> arg0 data 64 used) v1-8) - (+! (-> arg0 data 64 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 64 used) v1-8) + (+! (-> usage data 64 total) (logand -16 (+ v1-8 15))) ) - (set! (-> arg0 length) (max 65 (-> arg0 length))) - (set! (-> arg0 data 64 name) "ambient-links") - (+! (-> arg0 data 64 count) (-> this ambient length)) + (set! (-> usage length) (max 65 (-> usage length))) + (set! (-> usage data 64 name) "ambient-links") + (+! (-> usage data 64 count) (-> this ambient length)) (let ((v1-18 (asize-of (-> this ambient)))) - (+! (-> arg0 data 64 used) v1-18) - (+! (-> arg0 data 64 total) (logand -16 (+ v1-18 15))) + (+! (-> usage data 64 used) v1-18) + (+! (-> usage data 64 total) (logand -16 (+ v1-18 15))) ) - (mem-usage (-> this art-group) arg0 arg1) - (set! (-> arg0 length) (max 64 (-> arg0 length))) - (set! (-> arg0 data 63 name) "level-code") - (+! (-> arg0 data 63 count) 1) + (mem-usage (-> this art-group) usage flags) + (set! (-> usage length) (max 64 (-> usage length))) + (set! (-> usage data 63 name) "level-code") + (+! (-> usage data 63 count) 1) (let ((v1-30 (&- (-> this code-memory-end) (the-as uint (-> this code-memory-start))))) - (+! (-> arg0 data 63 used) v1-30) - (+! (-> arg0 data 63 total) (logand -16 (+ v1-30 15))) + (+! (-> usage data 63 used) v1-30) + (+! (-> usage data 63 total) (logand -16 (+ v1-30 15))) ) (countdown (s3-0 (-> this loaded-texture-page-count)) - (mem-usage (-> this loaded-texture-page s3-0) arg0 arg1) + (mem-usage (-> this loaded-texture-page s3-0) usage flags) ) (countdown (s3-1 8) (let ((s2-0 (-> this vis-info s3-1))) (when s2-0 (cond ((zero? s3-1) - (set! (-> arg0 length) (max 60 (-> arg0 length))) - (set! (-> arg0 data 59 name) "bsp-leaf-vis-self") - (+! (-> arg0 data 59 count) 1) + (set! (-> usage length) (max 60 (-> usage length))) + (set! (-> usage data 59 name) "bsp-leaf-vis-self") + (+! (-> usage data 59 count) 1) (let ((v1-50 (asize-of s2-0))) - (+! (-> arg0 data 59 used) v1-50) - (+! (-> arg0 data 59 total) (logand -16 (+ v1-50 15))) + (+! (-> usage data 59 used) v1-50) + (+! (-> usage data 59 total) (logand -16 (+ v1-50 15))) ) ) (else - (set! (-> arg0 length) (max 61 (-> arg0 length))) - (set! (-> arg0 data 60 name) "bsp-leaf-vis-adj") - (+! (-> arg0 data 60 count) 1) + (set! (-> usage length) (max 61 (-> usage length))) + (set! (-> usage data 60 name) "bsp-leaf-vis-adj") + (+! (-> usage data 60 count) 1) (let ((v1-61 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) - (+! (-> arg0 data 60 used) v1-61) - (+! (-> arg0 data 60 total) (logand -16 (+ v1-61 15))) + (+! (-> usage data 60 used) v1-61) + (+! (-> usage data 60 total) (logand -16 (+ v1-61 15))) ) ) ) ) ) ) - (mem-usage (-> this bsp) arg0 arg1) + (mem-usage (-> this bsp) usage flags) ) this ) @@ -1119,9 +1119,9 @@ ) ;; definition for method 8 of type level-group -(defmethod mem-usage ((this level-group) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this level-group) (usage memory-usage-block) (flags int)) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this level s3-0) arg0 arg1) + (mem-usage (-> this level s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak1/engine/load/loader_REF.gc b/test/decompiler/reference/jak1/engine/load/loader_REF.gc index cbd02a7000..ca27055835 100644 --- a/test/decompiler/reference/jak1/engine/load/loader_REF.gc +++ b/test/decompiler/reference/jak1/engine/load/loader_REF.gc @@ -27,30 +27,30 @@ ;; definition for method 8 of type load-dir ;; INFO: Return type mismatch symbol vs load-dir. -(defmethod mem-usage ((this load-dir) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 82 (-> arg0 length))) - (set! (-> arg0 data 81 name) "array") - (+! (-> arg0 data 81 count) 1) +(defmethod mem-usage ((this load-dir) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 82 (-> usage length))) + (set! (-> usage data 81 name) "array") + (+! (-> usage data 81 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 81 used) v1-6) - (+! (-> arg0 data 81 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 81 used) v1-6) + (+! (-> usage data 81 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 82 (-> arg0 length))) - (set! (-> arg0 data 81 name) "array") - (set! (-> arg0 data 81 count) (-> arg0 data 81 count)) + (set! (-> usage length) (max 82 (-> usage length))) + (set! (-> usage data 81 name) "array") + (set! (-> usage data 81 count) (-> usage data 81 count)) (let ((v1-15 (asize-of (-> this string-array)))) - (+! (-> arg0 data 81 used) v1-15) - (+! (-> arg0 data 81 total) (logand -16 (+ v1-15 15))) + (+! (-> usage data 81 used) v1-15) + (+! (-> usage data 81 total) (logand -16 (+ v1-15 15))) ) - (set! (-> arg0 length) (max 82 (-> arg0 length))) - (set! (-> arg0 data 81 name) "array") - (set! (-> arg0 data 81 count) (-> arg0 data 81 count)) + (set! (-> usage length) (max 82 (-> usage length))) + (set! (-> usage data 81 name) "array") + (set! (-> usage data 81 count) (-> usage data 81 count)) (let ((v1-24 (asize-of (-> this data-array)))) - (+! (-> arg0 data 81 used) v1-24) - (+! (-> arg0 data 81 total) (logand -16 (+ v1-24 15))) + (+! (-> usage data 81 used) v1-24) + (+! (-> usage data 81 total) (logand -16 (+ v1-24 15))) ) (dotimes (s3-0 (-> this data-array length)) - (mem-usage (-> this data-array s3-0) arg0 arg1) + (mem-usage (-> this data-array s3-0) usage flags) ) (the-as load-dir #f) ) diff --git a/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc b/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc index ca9356b4a7..fe2d0f566e 100644 --- a/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc +++ b/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc @@ -1955,34 +1955,34 @@ ;; definition for method 8 of type nav-mesh ;; INFO: Return type mismatch int vs nav-mesh. -(defmethod mem-usage ((this nav-mesh) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) +(defmethod mem-usage ((this nav-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 45 used) v1-6) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 45 used) v1-6) + (+! (-> usage data 45 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-16 (* (-> this vertex-count) 16))) - (+! (-> arg0 data 45 used) v1-16) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-16 15))) + (+! (-> usage data 45 used) v1-16) + (+! (-> usage data 45 total) (logand -16 (+ v1-16 15))) ) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-26 (* (-> this poly-count) 8))) - (+! (-> arg0 data 45 used) v1-26) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-26 15))) + (+! (-> usage data 45 used) v1-26) + (+! (-> usage data 45 total) (logand -16 (+ v1-26 15))) ) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-38 (/ (* (* (-> this poly-count) (-> this poly-count)) 2) 8))) - (+! (-> arg0 data 45 used) v1-38) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-38 15))) + (+! (-> usage data 45 used) v1-38) + (+! (-> usage data 45 total) (logand -16 (+ v1-38 15))) ) (the-as nav-mesh 0) ) diff --git a/test/decompiler/reference/jak1/engine/target/target2_REF.gc b/test/decompiler/reference/jak1/engine/target/target2_REF.gc index 7916ebab6d..3d39faf8b7 100644 --- a/test/decompiler/reference/jak1/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target2_REF.gc @@ -244,15 +244,15 @@ ;; definition for method 7 of type first-person-hud ;; INFO: Return type mismatch process vs first-person-hud. -(defmethod relocate ((this first-person-hud) (arg0 int)) +(defmethod relocate ((this first-person-hud) (offset int)) (dotimes (v1-0 (-> this nb-of-particles)) (when (-> this particles v1-0 part) (if (nonzero? (-> this particles v1-0 part)) - (&+! (-> this particles v1-0 part) arg0) + (&+! (-> this particles v1-0 part) offset) ) ) ) - (the-as first-person-hud ((method-of-type process relocate) this arg0)) + (the-as first-person-hud ((method-of-type process relocate) this offset)) ) ;; definition for method 14 of type first-person-hud diff --git a/test/decompiler/reference/jak1/engine/ui/hud_REF.gc b/test/decompiler/reference/jak1/engine/ui/hud_REF.gc index 407c4937b9..3429267cfb 100644 --- a/test/decompiler/reference/jak1/engine/ui/hud_REF.gc +++ b/test/decompiler/reference/jak1/engine/ui/hud_REF.gc @@ -3,13 +3,13 @@ ;; definition for method 7 of type hud ;; INFO: Return type mismatch process vs hud. -(defmethod relocate ((this hud) (arg0 int)) +(defmethod relocate ((this hud) (offset int)) (dotimes (v1-0 (-> this nb-of-particles)) (if (nonzero? (-> this particles v1-0 part)) - (&+! (-> this particles v1-0 part) arg0) + (&+! (-> this particles v1-0 part) offset) ) ) - (the-as hud ((method-of-type process relocate) this arg0)) + (the-as hud ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type hud diff --git a/test/decompiler/reference/jak1/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak1/engine/ui/progress/progress_REF.gc index b1bec61033..bcada01f89 100644 --- a/test/decompiler/reference/jak1/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak1/engine/ui/progress/progress_REF.gc @@ -909,24 +909,24 @@ ) ;; definition for method 7 of type game-count-info -(defmethod relocate ((this game-count-info) (arg0 int)) +(defmethod relocate ((this game-count-info) (offset int)) (set! *game-counts* this) this ) ;; definition for method 7 of type progress ;; INFO: Return type mismatch process vs progress. -(defmethod relocate ((this progress) (arg0 int)) +(defmethod relocate ((this progress) (offset int)) (dotimes (v1-0 (-> this nb-of-particles)) (when (-> this particles v1-0 part) (if (nonzero? (-> this particles v1-0 part)) (set! (-> this particles v1-0 part) - (the-as sparticle-launch-control (&+ (the-as pointer (-> this particles v1-0 part)) arg0)) + (the-as sparticle-launch-control (&+ (the-as pointer (-> this particles v1-0 part)) offset)) ) ) ) ) - (the-as progress ((method-of-type process relocate) this arg0)) + (the-as progress ((method-of-type process relocate) this offset)) ) ;; definition for method 21 of type progress diff --git a/test/decompiler/reference/jak1/engine/ui/text_REF.gc b/test/decompiler/reference/jak1/engine/ui/text_REF.gc index 2a9c35a433..900ae1b211 100644 --- a/test/decompiler/reference/jak1/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak1/engine/ui/text_REF.gc @@ -32,7 +32,6 @@ ) ;; definition for method 3 of type game-text-info -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this game-text-info)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tlength: ~D~%" (-> this length)) @@ -44,21 +43,21 @@ ) ;; definition for method 8 of type game-text-info -(defmethod mem-usage ((this game-text-info) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 81 (-> arg0 length))) - (set! (-> arg0 data 80 name) "string") - (+! (-> arg0 data 80 count) 1) +(defmethod mem-usage ((this game-text-info) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 81 (-> usage length))) + (set! (-> usage data 80 name) "string") + (+! (-> usage data 80 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 80 used) v1-6) - (+! (-> arg0 data 80 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 80 used) v1-6) + (+! (-> usage data 80 total) (logand -16 (+ v1-6 15))) ) (dotimes (s4-0 (-> this length)) - (set! (-> arg0 length) (max 81 (-> arg0 length))) - (set! (-> arg0 data 80 name) "string") - (+! (-> arg0 data 80 count) 1) + (set! (-> usage length) (max 81 (-> usage length))) + (set! (-> usage data 80 name) "string") + (+! (-> usage data 80 count) 1) (let ((v1-18 (asize-of (-> this data s4-0 text)))) - (+! (-> arg0 data 80 used) v1-18) - (+! (-> arg0 data 80 total) (logand -16 (+ v1-18 15))) + (+! (-> usage data 80 used) v1-18) + (+! (-> usage data 80 total) (logand -16 (+ v1-18 15))) ) ) this diff --git a/test/decompiler/reference/jak1/kernel/gkernel_REF.gc b/test/decompiler/reference/jak1/kernel/gkernel_REF.gc index 786f7de10b..d6c2a65626 100644 --- a/test/decompiler/reference/jak1/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak1/kernel/gkernel_REF.gc @@ -26,7 +26,7 @@ (define *last-loado-debug-usage* 0) ;; definition for method 7 of type object -(defmethod relocate ((this object) (arg0 int)) +(defmethod relocate ((this object) (offset int)) this ) @@ -373,7 +373,6 @@ ) ;; definition for method 2 of type process -;; INFO: this function exists in multiple non-identical object files (defmethod print ((this process)) (format #t "#<~A ~S ~A :state ~S " (-> this type) (-> this name) (-> this status) (if (-> this state) (-> this state name) diff --git a/test/decompiler/reference/jak1/levels/beach/beach-obs_REF.gc b/test/decompiler/reference/jak1/levels/beach/beach-obs_REF.gc index 1f29be4e96..48ab1cd374 100644 --- a/test/decompiler/reference/jak1/levels/beach/beach-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/beach-obs_REF.gc @@ -1026,11 +1026,11 @@ ) ;; definition for method 7 of type flutflutegg -(defmethod relocate ((this flutflutegg) (arg0 int)) +(defmethod relocate ((this flutflutegg) (offset int)) (if (nonzero? (-> this wobbler)) - (&+! (-> this wobbler) arg0) + (&+! (-> this wobbler) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 20 of type flutflutegg diff --git a/test/decompiler/reference/jak1/levels/beach/beach-rocks_REF.gc b/test/decompiler/reference/jak1/levels/beach/beach-rocks_REF.gc index 5a4f6bd7c4..d2d2d45d19 100644 --- a/test/decompiler/reference/jak1/levels/beach/beach-rocks_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/beach-rocks_REF.gc @@ -263,14 +263,14 @@ ) ;; definition for method 7 of type beach-rock -(defmethod relocate ((this beach-rock) (arg0 int)) +(defmethod relocate ((this beach-rock) (offset int)) (if (nonzero? (-> this part-falling)) - (set! (-> this part-falling) (the-as sparticle-launch-control (+ (the-as int (-> this part-falling)) arg0))) + (set! (-> this part-falling) (the-as sparticle-launch-control (+ (the-as int (-> this part-falling)) offset))) ) (if (nonzero? (-> this part-landing)) - (set! (-> this part-landing) (the-as sparticle-launch-control (+ (the-as int (-> this part-landing)) arg0))) + (set! (-> this part-landing) (the-as sparticle-launch-control (+ (the-as int (-> this part-landing)) offset))) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 10 of type beach-rock diff --git a/test/decompiler/reference/jak1/levels/beach/lurkerworm_REF.gc b/test/decompiler/reference/jak1/levels/beach/lurkerworm_REF.gc index 6b652f81ec..3b9e48517b 100644 --- a/test/decompiler/reference/jak1/levels/beach/lurkerworm_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/lurkerworm_REF.gc @@ -42,14 +42,14 @@ ;; definition for method 7 of type lurkerworm ;; INFO: Return type mismatch process-drawable vs lurkerworm. -(defmethod relocate ((this lurkerworm) (arg0 int)) +(defmethod relocate ((this lurkerworm) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this twister)) - (&+! (-> this twister) arg0) + (&+! (-> this twister) offset) ) - (the-as lurkerworm ((method-of-type process-drawable relocate) this arg0)) + (the-as lurkerworm ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type lurkerworm diff --git a/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc b/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc index 246ec8277b..c69050d4a6 100644 --- a/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc @@ -119,19 +119,19 @@ ) ;; definition for method 7 of type pelican -(defmethod relocate ((this pelican) (arg0 int)) +(defmethod relocate ((this pelican) (offset int)) (countdown (v1-0 8) (if (nonzero? (-> this path-data v1-0)) - (&+! (-> this path-data v1-0) arg0) + (&+! (-> this path-data v1-0) offset) ) ) (if (nonzero? (-> this path-cache)) - (&+! (-> this path-cache) arg0) + (&+! (-> this path-cache) offset) ) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc b/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc index 82f9a95a9e..da28c21612 100644 --- a/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc @@ -139,17 +139,17 @@ ;; definition for method 7 of type seagullflock ;; INFO: Return type mismatch process vs seagullflock. -(defmethod relocate ((this seagullflock) (arg0 int)) +(defmethod relocate ((this seagullflock) (offset int)) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) (if (nonzero? (-> this link)) - (&+! (-> this link) arg0) + (&+! (-> this link) offset) ) (if (nonzero? (-> this squall)) - (&+! (-> this squall) arg0) + (&+! (-> this squall) offset) ) - (the-as seagullflock ((method-of-type process relocate) this arg0)) + (the-as seagullflock ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type seagullflock diff --git a/test/decompiler/reference/jak1/levels/citadel/citadel-obs_REF.gc b/test/decompiler/reference/jak1/levels/citadel/citadel-obs_REF.gc index 066eced864..4a40ed1d05 100644 --- a/test/decompiler/reference/jak1/levels/citadel/citadel-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/citadel/citadel-obs_REF.gc @@ -1037,11 +1037,11 @@ ;; definition for method 7 of type citb-coil ;; INFO: Return type mismatch process-drawable vs citb-coil. -(defmethod relocate ((this citb-coil) (arg0 int)) +(defmethod relocate ((this citb-coil) (offset int)) (if (nonzero? (-> this part-off)) - (&+! (-> this part-off) arg0) + (&+! (-> this part-off) offset) ) - (the-as citb-coil ((method-of-type process-drawable relocate) this arg0)) + (the-as citb-coil ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type citb-coil @@ -1318,14 +1318,14 @@ ;; definition for method 7 of type citb-generator ;; INFO: Return type mismatch process-drawable vs citb-generator. -(defmethod relocate ((this citb-generator) (arg0 int)) +(defmethod relocate ((this citb-generator) (offset int)) (if (nonzero? (-> this part-broken)) - (&+! (-> this part-broken) arg0) + (&+! (-> this part-broken) offset) ) (if (nonzero? (-> this part-mushroom)) - (&+! (-> this part-mushroom) arg0) + (&+! (-> this part-mushroom) offset) ) - (the-as citb-generator ((method-of-type process-drawable relocate) this arg0)) + (the-as citb-generator ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type citb-generator diff --git a/test/decompiler/reference/jak1/levels/citadel/citadel-sages_REF.gc b/test/decompiler/reference/jak1/levels/citadel/citadel-sages_REF.gc index d3775dfddd..d960cf55fe 100644 --- a/test/decompiler/reference/jak1/levels/citadel/citadel-sages_REF.gc +++ b/test/decompiler/reference/jak1/levels/citadel/citadel-sages_REF.gc @@ -314,11 +314,11 @@ ;; definition for method 7 of type citb-sage ;; INFO: Return type mismatch process-taskable vs citb-sage. -(defmethod relocate ((this citb-sage) (arg0 int)) +(defmethod relocate ((this citb-sage) (offset int)) (if (nonzero? (-> this part-impact)) - (&+! (-> this part-impact) arg0) + (&+! (-> this part-impact) offset) ) - (the-as citb-sage ((method-of-type process-taskable relocate) this arg0)) + (the-as citb-sage ((method-of-type process-taskable relocate) this offset)) ) ;; definition for method 10 of type citb-sage diff --git a/test/decompiler/reference/jak1/levels/citadel/citb-drop-plat_REF.gc b/test/decompiler/reference/jak1/levels/citadel/citb-drop-plat_REF.gc index a2f86d5b35..bc869fa9ec 100644 --- a/test/decompiler/reference/jak1/levels/citadel/citb-drop-plat_REF.gc +++ b/test/decompiler/reference/jak1/levels/citadel/citb-drop-plat_REF.gc @@ -384,11 +384,11 @@ ;; definition for method 7 of type citb-drop-plat ;; INFO: Return type mismatch process-drawable vs citb-drop-plat. -(defmethod relocate ((this citb-drop-plat) (arg0 int)) +(defmethod relocate ((this citb-drop-plat) (offset int)) (if (nonzero? (-> this child-array)) - (&+! (-> this child-array) arg0) + (&+! (-> this child-array) offset) ) - (the-as citb-drop-plat ((method-of-type process-drawable relocate) this arg0)) + (the-as citb-drop-plat ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function citb-drop-plat-spawn-children diff --git a/test/decompiler/reference/jak1/levels/common/battlecontroller_REF.gc b/test/decompiler/reference/jak1/levels/common/battlecontroller_REF.gc index f526691223..32219a2df9 100644 --- a/test/decompiler/reference/jak1/levels/common/battlecontroller_REF.gc +++ b/test/decompiler/reference/jak1/levels/common/battlecontroller_REF.gc @@ -654,18 +654,18 @@ battlecontroller-default-event-handler ) ;; definition for method 7 of type battlecontroller -(defmethod relocate ((this battlecontroller) (arg0 int)) +(defmethod relocate ((this battlecontroller) (offset int)) (dotimes (v1-0 (-> this spawner-count)) (let ((a0-3 (-> this spawner-array v1-0))) (if (nonzero? (-> a0-3 path)) - (&+! (-> a0-3 path) arg0) + (&+! (-> a0-3 path) offset) ) ) ) (if (nonzero? (-> this path-spawn)) - (&+! (-> this path-spawn) arg0) + (&+! (-> this path-spawn) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 10 of type battlecontroller diff --git a/test/decompiler/reference/jak1/levels/demo/static-screen_REF.gc b/test/decompiler/reference/jak1/levels/demo/static-screen_REF.gc index d58c696dea..c882bf8001 100644 --- a/test/decompiler/reference/jak1/levels/demo/static-screen_REF.gc +++ b/test/decompiler/reference/jak1/levels/demo/static-screen_REF.gc @@ -23,21 +23,21 @@ ;; definition for method 7 of type static-screen ;; INFO: Return type mismatch process vs static-screen. -(defmethod relocate ((this static-screen) (arg0 int)) +(defmethod relocate ((this static-screen) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) (dotimes (v1-2 1) (if (nonzero? (-> this part v1-2)) - (&+! (-> this part v1-2) arg0) + (&+! (-> this part v1-2) offset) ) ) - (the-as static-screen ((method-of-type process relocate) this arg0)) + (the-as static-screen ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type static-screen diff --git a/test/decompiler/reference/jak1/levels/finalboss/light-eco_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/light-eco_REF.gc index 489b9cf2c2..a70f73347d 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/light-eco_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/light-eco_REF.gc @@ -746,11 +746,11 @@ ;; definition for method 7 of type light-eco-mother ;; INFO: Return type mismatch projectile vs light-eco-mother. -(defmethod relocate ((this light-eco-mother) (arg0 int)) +(defmethod relocate ((this light-eco-mother) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as light-eco-mother ((method-of-type projectile relocate) (the-as projectile this) arg0)) + (the-as light-eco-mother ((method-of-type projectile relocate) (the-as projectile this) offset)) ) ;; definition for function light-eco-mother-init-by-other diff --git a/test/decompiler/reference/jak1/levels/finalboss/robotboss-h_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/robotboss-h_REF.gc index 0fa9391cbc..c0956fce98 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/robotboss-h_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/robotboss-h_REF.gc @@ -132,21 +132,21 @@ ;; definition for method 7 of type robotboss ;; INFO: Return type mismatch process-drawable vs robotboss. -(defmethod relocate ((this robotboss) (arg0 int)) +(defmethod relocate ((this robotboss) (offset int)) (dotimes (v1-0 7) (if (nonzero? (-> this particle v1-0)) - (&+! (-> this particle v1-0) arg0) + (&+! (-> this particle v1-0) offset) ) ) (dotimes (v1-3 4) (if (nonzero? (-> this looping-sound v1-3)) - (&+! (-> this looping-sound v1-3) arg0) + (&+! (-> this looping-sound v1-3) offset) ) ) (if (nonzero? (-> this yellow-gun)) - (&+! (-> this yellow-gun) arg0) + (&+! (-> this yellow-gun) offset) ) - (the-as robotboss ((method-of-type process-drawable relocate) this arg0)) + (the-as robotboss ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type robotboss diff --git a/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc index 13bcbdd410..0d4b1322dd 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc @@ -620,14 +620,14 @@ ;; definition for method 7 of type redshot ;; INFO: Return type mismatch arcing-shot vs redshot. -(defmethod relocate ((this redshot) (arg0 int)) +(defmethod relocate ((this redshot) (offset int)) (if (nonzero? (-> this shot-particle)) - (&+! (-> this shot-particle) arg0) + (&+! (-> this shot-particle) offset) ) (if (nonzero? (-> this test-particle)) - (&+! (-> this test-particle) arg0) + (&+! (-> this test-particle) offset) ) - (the-as redshot ((method-of-type arcing-shot relocate) this arg0)) + (the-as redshot ((method-of-type arcing-shot relocate) this offset)) ) ;; definition for method 10 of type redshot diff --git a/test/decompiler/reference/jak1/levels/finalboss/sage-finalboss_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/sage-finalboss_REF.gc index 8b64033067..b96cb68097 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/sage-finalboss_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/sage-finalboss_REF.gc @@ -231,16 +231,16 @@ ;; definition for method 7 of type sage-finalboss ;; INFO: Return type mismatch process-taskable vs sage-finalboss. -(defmethod relocate ((this sage-finalboss) (arg0 int)) +(defmethod relocate ((this sage-finalboss) (offset int)) (dotimes (v1-0 9) (if (nonzero? (-> this particle v1-0 part)) - (&+! (-> this particle v1-0 part) arg0) + (&+! (-> this particle v1-0 part) offset) ) ) (if (nonzero? (-> this particle-whiteout)) - (&+! (-> this particle-whiteout) arg0) + (&+! (-> this particle-whiteout) offset) ) - (the-as sage-finalboss ((method-of-type process-taskable relocate) this arg0)) + (the-as sage-finalboss ((method-of-type process-taskable relocate) this offset)) ) ;; definition for method 10 of type sage-finalboss diff --git a/test/decompiler/reference/jak1/levels/flut_common/flutflut_REF.gc b/test/decompiler/reference/jak1/levels/flut_common/flutflut_REF.gc index c5cedacdb6..0b77c47f3d 100644 --- a/test/decompiler/reference/jak1/levels/flut_common/flutflut_REF.gc +++ b/test/decompiler/reference/jak1/levels/flut_common/flutflut_REF.gc @@ -46,13 +46,13 @@ ;; definition for method 7 of type flutflut ;; INFO: Return type mismatch process-drawable vs flutflut. -(defmethod relocate ((this flutflut) (arg0 int)) +(defmethod relocate ((this flutflut) (offset int)) (countdown (v1-0 2) (if (-> this path-data v1-0) - (&+! (-> this path-data v1-0) arg0) + (&+! (-> this path-data v1-0) offset) ) ) - (the-as flutflut ((method-of-type process-drawable relocate) this arg0)) + (the-as flutflut ((method-of-type process-drawable relocate) this offset)) ) ;; definition for symbol *flutflut-shadow-control*, type shadow-control diff --git a/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc b/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc index e883fe3bd7..4fa5501cad 100644 --- a/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc @@ -578,14 +578,14 @@ ;; definition for method 7 of type periscope ;; INFO: Return type mismatch process-drawable vs periscope. -(defmethod relocate ((this periscope) (arg0 int)) +(defmethod relocate ((this periscope) (offset int)) (if (nonzero? (-> this grips)) - (&+! (-> this grips) arg0) + (&+! (-> this grips) offset) ) (if (nonzero? (-> this part-aligned)) - (&+! (-> this part-aligned) arg0) + (&+! (-> this part-aligned) offset) ) - (the-as periscope ((method-of-type process-drawable relocate) this arg0)) + (the-as periscope ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type periscope diff --git a/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc b/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc index 79bedaba8d..9e83996d76 100644 --- a/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc @@ -1218,11 +1218,11 @@ ) ;; definition for method 7 of type jngpusher -(defmethod relocate ((this jngpusher) (arg0 int)) +(defmethod relocate ((this jngpusher) (offset int)) (if (nonzero? (-> this back-prim)) - (&+! (-> this back-prim) arg0) + (&+! (-> this back-prim) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc b/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc index 816bf037cc..c6b5b07bf3 100644 --- a/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc @@ -68,22 +68,22 @@ ) ;; definition for method 7 of type plant-boss -(defmethod relocate ((this plant-boss) (arg0 int)) +(defmethod relocate ((this plant-boss) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) (if (nonzero? (-> this body)) - (&+! (-> this body) arg0) + (&+! (-> this body) offset) ) (dotimes (v1-8 3) (if (nonzero? (-> this attack-prim v1-8)) - (&+! (-> this attack-prim v1-8) arg0) + (&+! (-> this attack-prim v1-8) offset) ) (if (nonzero? (-> this death-prim v1-8)) - (&+! (-> this death-prim v1-8) arg0) + (&+! (-> this death-prim v1-8) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition of type plant-boss-arm diff --git a/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc b/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc index 1a8a5f2d11..d184237744 100644 --- a/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc @@ -455,11 +455,11 @@ ) ;; definition for method 7 of type darkecobarrel -(defmethod relocate ((this darkecobarrel) (arg0 int)) +(defmethod relocate ((this darkecobarrel) (offset int)) (if (nonzero? (-> this spawn-array)) - (&+! (-> this spawn-array) arg0) + (&+! (-> this spawn-array) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc b/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc index 561a3e1500..af9b6efcc4 100644 --- a/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc @@ -983,17 +983,17 @@ ) ;; definition for method 7 of type driller-lurker -(defmethod relocate ((this driller-lurker) (arg0 int)) +(defmethod relocate ((this driller-lurker) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) (if (nonzero? (-> this drill)) - (&+! (-> this drill) arg0) + (&+! (-> this drill) offset) ) (if (nonzero? (-> this sound2)) - (&+! (-> this sound2) arg0) + (&+! (-> this sound2) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 10 of type driller-lurker diff --git a/test/decompiler/reference/jak1/levels/maincave/gnawer_REF.gc b/test/decompiler/reference/jak1/levels/maincave/gnawer_REF.gc index 2037911b7a..60b4a34002 100644 --- a/test/decompiler/reference/jak1/levels/maincave/gnawer_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/gnawer_REF.gc @@ -1395,14 +1395,14 @@ ) ;; definition for method 7 of type gnawer -(defmethod relocate ((this gnawer) (arg0 int)) +(defmethod relocate ((this gnawer) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this sound2)) - (&+! (-> this sound2) arg0) + (&+! (-> this sound2) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type gnawer diff --git a/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc b/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc index b31792036d..69bae576bc 100644 --- a/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc @@ -1629,11 +1629,11 @@ ;; definition for method 7 of type mother-spider ;; INFO: Return type mismatch process-drawable vs mother-spider. -(defmethod relocate ((this mother-spider) (arg0 int)) +(defmethod relocate ((this mother-spider) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (the-as mother-spider ((method-of-type process-drawable relocate) this arg0)) + (the-as mother-spider ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type mother-spider diff --git a/test/decompiler/reference/jak1/levels/misty/balloonlurker_REF.gc b/test/decompiler/reference/jak1/levels/misty/balloonlurker_REF.gc index 65e1705c12..d5801a2522 100644 --- a/test/decompiler/reference/jak1/levels/misty/balloonlurker_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/balloonlurker_REF.gc @@ -883,20 +883,20 @@ ) ;; definition for method 7 of type balloonlurker -(defmethod relocate ((this balloonlurker) (arg0 int)) +(defmethod relocate ((this balloonlurker) (offset int)) (if (nonzero? (-> this propeller)) - (&+! (-> this propeller) arg0) + (&+! (-> this propeller) offset) ) (if (nonzero? (-> this rudder)) - (&+! (-> this rudder) arg0) + (&+! (-> this rudder) offset) ) (if (nonzero? (-> this mine 0)) - (&+! (-> this mine 0) arg0) + (&+! (-> this mine 0) offset) ) (if (nonzero? (-> this mine 1)) - (&+! (-> this mine 1) arg0) + (&+! (-> this mine 1) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/misty/misty-conveyor_REF.gc b/test/decompiler/reference/jak1/levels/misty/misty-conveyor_REF.gc index c9584714b2..98affb1b43 100644 --- a/test/decompiler/reference/jak1/levels/misty/misty-conveyor_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/misty-conveyor_REF.gc @@ -598,11 +598,11 @@ ) ;; definition for method 7 of type keg-conveyor -(defmethod relocate ((this keg-conveyor) (arg0 int)) +(defmethod relocate ((this keg-conveyor) (offset int)) (if (nonzero? (-> this pivot)) - (&+! (-> this pivot) arg0) + (&+! (-> this pivot) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type keg-conveyor diff --git a/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc b/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc index 0ae435e303..84bf8a6f30 100644 --- a/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc @@ -670,11 +670,11 @@ ;; definition for method 7 of type mistycannon-missile ;; INFO: Return type mismatch process-drawable vs mistycannon-missile. -(defmethod relocate ((this mistycannon-missile) (arg0 int)) +(defmethod relocate ((this mistycannon-missile) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as mistycannon-missile ((method-of-type process-drawable relocate) this arg0)) + (the-as mistycannon-missile ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type mistycannon-missile diff --git a/test/decompiler/reference/jak1/levels/ogre/ogre-obs_REF.gc b/test/decompiler/reference/jak1/levels/ogre/ogre-obs_REF.gc index eecdd0b040..7b23bbd16a 100644 --- a/test/decompiler/reference/jak1/levels/ogre/ogre-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/ogre/ogre-obs_REF.gc @@ -933,13 +933,13 @@ ) ;; definition for method 7 of type ogre-bridge -(defmethod relocate ((this ogre-bridge) (arg0 int)) +(defmethod relocate ((this ogre-bridge) (offset int)) (dotimes (v1-0 8) (if (nonzero? (-> this joint-mod-array v1-0)) - (&+! (-> this joint-mod-array v1-0) arg0) + (&+! (-> this joint-mod-array v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for function ogre-bridge-update-joints diff --git a/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc b/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc index 9491535d2c..e7dbf2e5f7 100644 --- a/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc +++ b/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc @@ -758,11 +758,11 @@ ) ;; definition for method 7 of type ogreboss-super-boulder -(defmethod relocate ((this ogreboss-super-boulder) (arg0 int)) +(defmethod relocate ((this ogreboss-super-boulder) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/racer_common/racer_REF.gc b/test/decompiler/reference/jak1/levels/racer_common/racer_REF.gc index b3cde075e9..7e4717d416 100644 --- a/test/decompiler/reference/jak1/levels/racer_common/racer_REF.gc +++ b/test/decompiler/reference/jak1/levels/racer_common/racer_REF.gc @@ -45,13 +45,13 @@ ;; definition for method 7 of type racer ;; INFO: Return type mismatch process-drawable vs racer. -(defmethod relocate ((this racer) (arg0 int)) +(defmethod relocate ((this racer) (offset int)) (countdown (v1-0 2) (if (-> this path-data v1-0) - (&+! (-> this path-data v1-0) arg0) + (&+! (-> this path-data v1-0) offset) ) ) - (the-as racer ((method-of-type process-drawable relocate) this arg0)) + (the-as racer ((method-of-type process-drawable relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/robocave/cave-trap_REF.gc b/test/decompiler/reference/jak1/levels/robocave/cave-trap_REF.gc index 3d92f02ac0..311f0d3616 100644 --- a/test/decompiler/reference/jak1/levels/robocave/cave-trap_REF.gc +++ b/test/decompiler/reference/jak1/levels/robocave/cave-trap_REF.gc @@ -306,11 +306,11 @@ ) ;; definition for method 7 of type cave-trap -(defmethod relocate ((this cave-trap) (arg0 int)) +(defmethod relocate ((this cave-trap) (offset int)) (if (nonzero? (-> this alt-actors)) - (&+! (-> this alt-actors) arg0) + (&+! (-> this alt-actors) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type cave-trap diff --git a/test/decompiler/reference/jak1/levels/snow/ice-cube_REF.gc b/test/decompiler/reference/jak1/levels/snow/ice-cube_REF.gc index a162facb8d..9eca63f49c 100644 --- a/test/decompiler/reference/jak1/levels/snow/ice-cube_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/ice-cube_REF.gc @@ -619,17 +619,17 @@ ) ;; definition for method 7 of type ice-cube -(defmethod relocate ((this ice-cube) (arg0 int)) +(defmethod relocate ((this ice-cube) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this part3)) - (&+! (-> this part3) arg0) + (&+! (-> this part3) offset) ) (if (nonzero? (-> this part4)) - (&+! (-> this part4) arg0) + (&+! (-> this part4) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type ice-cube diff --git a/test/decompiler/reference/jak1/levels/snow/snow-ball_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-ball_REF.gc index 35ef266764..99a6a0c223 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-ball_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-ball_REF.gc @@ -609,13 +609,13 @@ ) ;; definition for method 7 of type snow-ball -(defmethod relocate ((this snow-ball) (arg0 int)) +(defmethod relocate ((this snow-ball) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this path v1-0)) - (&+! (-> this path v1-0) arg0) + (&+! (-> this path v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type snow-ball diff --git a/test/decompiler/reference/jak1/levels/snow/snow-bumper_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-bumper_REF.gc index 0b89c27b0a..05423b1786 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-bumper_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-bumper_REF.gc @@ -312,11 +312,11 @@ ) ;; definition for method 7 of type snow-bumper -(defmethod relocate ((this snow-bumper) (arg0 int)) +(defmethod relocate ((this snow-bumper) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type snow-bumper diff --git a/test/decompiler/reference/jak1/levels/snow/snow-obs_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-obs_REF.gc index 32d57f1769..668ed5e0e7 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-obs_REF.gc @@ -1069,14 +1069,14 @@ ) ;; definition for method 7 of type snow-fort-gate -(defmethod relocate ((this snow-fort-gate) (arg0 int)) +(defmethod relocate ((this snow-fort-gate) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this part3)) - (&+! (-> this part3) arg0) + (&+! (-> this part3) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type snow-fort-gate diff --git a/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc index 672bfa2aeb..9c86124ceb 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc @@ -636,11 +636,11 @@ ;; definition for method 7 of type ram-boss-proj ;; INFO: Return type mismatch projectile vs ram-boss-proj. -(defmethod relocate ((this ram-boss-proj) (arg0 int)) +(defmethod relocate ((this ram-boss-proj) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as ram-boss-proj ((method-of-type projectile relocate) this arg0)) + (the-as ram-boss-proj ((method-of-type projectile relocate) this offset)) ) ;; definition for method 28 of type ram-boss-proj @@ -1041,14 +1041,14 @@ ;; definition for method 7 of type ram-boss ;; INFO: Return type mismatch nav-enemy vs ram-boss. -(defmethod relocate ((this ram-boss) (arg0 int)) +(defmethod relocate ((this ram-boss) (offset int)) (if (nonzero? (-> this shield-jmod)) - (&+! (-> this shield-jmod) arg0) + (&+! (-> this shield-jmod) offset) ) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as ram-boss ((method-of-type nav-enemy relocate) this arg0)) + (the-as ram-boss ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 47 of type ram-boss diff --git a/test/decompiler/reference/jak1/levels/snow/snow-ram_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-ram_REF.gc index bd43dcbb9a..76ced45b88 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-ram_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-ram_REF.gc @@ -343,11 +343,11 @@ ;; definition for method 7 of type ram ;; INFO: Return type mismatch process-drawable vs ram. -(defmethod relocate ((this ram) (arg0 int)) +(defmethod relocate ((this ram) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as ram ((method-of-type process-drawable relocate) this arg0)) + (the-as ram ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type ram diff --git a/test/decompiler/reference/jak1/levels/snow/yeti_REF.gc b/test/decompiler/reference/jak1/levels/snow/yeti_REF.gc index 2bb15d9efe..ef39a3934b 100644 --- a/test/decompiler/reference/jak1/levels/snow/yeti_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/yeti_REF.gc @@ -564,11 +564,11 @@ ) ;; definition for method 7 of type yeti-slave -(defmethod relocate ((this yeti-slave) (arg0 int)) +(defmethod relocate ((this yeti-slave) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for function yeti-slave-init-by-other diff --git a/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc b/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc index 7272e06b5d..5ff29f694e 100644 --- a/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc @@ -768,11 +768,11 @@ ) ;; definition for method 7 of type bully -(defmethod relocate ((this bully) (arg0 int)) +(defmethod relocate ((this bully) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type bully diff --git a/test/decompiler/reference/jak1/levels/sunken/helix-water_REF.gc b/test/decompiler/reference/jak1/levels/sunken/helix-water_REF.gc index 6725e8ada6..eaa96692f1 100644 --- a/test/decompiler/reference/jak1/levels/sunken/helix-water_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/helix-water_REF.gc @@ -699,11 +699,11 @@ ) ;; definition for method 7 of type helix-water -(defmethod relocate ((this helix-water) (arg0 int)) +(defmethod relocate ((this helix-water) (offset int)) (if (nonzero? (-> this alt-actors)) - (&+! (-> this alt-actors) arg0) + (&+! (-> this alt-actors) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type helix-water diff --git a/test/decompiler/reference/jak1/levels/sunken/orbit-plat_REF.gc b/test/decompiler/reference/jak1/levels/sunken/orbit-plat_REF.gc index 09ea1034f3..925e64b78b 100644 --- a/test/decompiler/reference/jak1/levels/sunken/orbit-plat_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/orbit-plat_REF.gc @@ -247,11 +247,11 @@ ;; definition for method 7 of type orbit-plat-bottom ;; INFO: Return type mismatch process-drawable vs orbit-plat-bottom. -(defmethod relocate ((this orbit-plat-bottom) (arg0 int)) +(defmethod relocate ((this orbit-plat-bottom) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as orbit-plat-bottom ((method-of-type process-drawable relocate) this arg0)) + (the-as orbit-plat-bottom ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type orbit-plat-bottom diff --git a/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc b/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc index 605953ec28..02a9865af4 100644 --- a/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc @@ -1106,11 +1106,11 @@ ) ;; definition for method 7 of type puffer -(defmethod relocate ((this puffer) (arg0 int)) +(defmethod relocate ((this puffer) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type puffer diff --git a/test/decompiler/reference/jak1/levels/sunken/square-platform_REF.gc b/test/decompiler/reference/jak1/levels/sunken/square-platform_REF.gc index f976135396..b9ad305236 100644 --- a/test/decompiler/reference/jak1/levels/sunken/square-platform_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/square-platform_REF.gc @@ -434,17 +434,17 @@ ) ;; definition for method 7 of type square-platform -(defmethod relocate ((this square-platform) (arg0 int)) +(defmethod relocate ((this square-platform) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this part3)) - (&+! (-> this part3) arg0) + (&+! (-> this part3) offset) ) (if (nonzero? (-> this part4)) - (&+! (-> this part4) arg0) + (&+! (-> this part4) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type square-platform diff --git a/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc b/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc index c034df919d..678461606e 100644 --- a/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc @@ -683,14 +683,14 @@ ) ;; definition for method 7 of type steam-cap -(defmethod relocate ((this steam-cap) (arg0 int)) +(defmethod relocate ((this steam-cap) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this part3)) - (&+! (-> this part3) arg0) + (&+! (-> this part3) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 10 of type steam-cap diff --git a/test/decompiler/reference/jak1/levels/sunken/sunken-pipegame_REF.gc b/test/decompiler/reference/jak1/levels/sunken/sunken-pipegame_REF.gc index 81a890afcb..36d410c3c9 100644 --- a/test/decompiler/reference/jak1/levels/sunken/sunken-pipegame_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/sunken-pipegame_REF.gc @@ -959,22 +959,22 @@ ) ;; definition for method 7 of type sunken-pipegame -(defmethod relocate ((this sunken-pipegame) (arg0 int)) +(defmethod relocate ((this sunken-pipegame) (offset int)) (dotimes (v1-0 3) (let ((a0-4 (-> this prize v1-0))) (when (nonzero? (-> a0-4 sucked-up-part)) (if (nonzero? (-> a0-4 sucked-up-part)) - (&+! (-> a0-4 sucked-up-part) arg0) + (&+! (-> a0-4 sucked-up-part) offset) ) ) (when (nonzero? (-> a0-4 blown-out-part)) (if (nonzero? (-> a0-4 blown-out-part)) - (&+! (-> a0-4 blown-out-part) arg0) + (&+! (-> a0-4 blown-out-part) offset) ) ) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type sunken-pipegame diff --git a/test/decompiler/reference/jak1/levels/swamp/billy_REF.gc b/test/decompiler/reference/jak1/levels/swamp/billy_REF.gc index 6588171309..d4d769f5df 100644 --- a/test/decompiler/reference/jak1/levels/swamp/billy_REF.gc +++ b/test/decompiler/reference/jak1/levels/swamp/billy_REF.gc @@ -48,13 +48,13 @@ ) ;; definition for method 7 of type billy -(defmethod relocate ((this billy) (arg0 int)) +(defmethod relocate ((this billy) (offset int)) (countdown (v1-0 3) (if (nonzero? (-> this path-data v1-0)) - (&+! (-> this path-data v1-0) arg0) + (&+! (-> this path-data v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition of type billy-snack diff --git a/test/decompiler/reference/jak1/levels/swamp/kermit_REF.gc b/test/decompiler/reference/jak1/levels/swamp/kermit_REF.gc index 848a2f7ed9..e02f904bd3 100644 --- a/test/decompiler/reference/jak1/levels/swamp/kermit_REF.gc +++ b/test/decompiler/reference/jak1/levels/swamp/kermit_REF.gc @@ -429,8 +429,8 @@ ) ;; definition for method 7 of type joint-mod-tracker -(defmethod relocate ((this joint-mod-tracker) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this joint-mod-tracker) (offset int)) + (&+! (-> this process) offset) this ) @@ -694,14 +694,14 @@ ;; definition for method 7 of type kermit ;; INFO: Return type mismatch nav-enemy vs kermit. -(defmethod relocate ((this kermit) (arg0 int)) +(defmethod relocate ((this kermit) (offset int)) (if (nonzero? (-> this tongue-control)) - (&+! (-> this tongue-control) arg0) + (&+! (-> this tongue-control) offset) ) (if (nonzero? (-> this charging-part)) - (&+! (-> this charging-part) arg0) + (&+! (-> this charging-part) offset) ) - (the-as kermit ((method-of-type nav-enemy relocate) this arg0)) + (the-as kermit ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 10 of type kermit diff --git a/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc b/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc index e963eb6ec1..1bf37aef46 100644 --- a/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc +++ b/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc @@ -67,13 +67,13 @@ ) ;; definition for method 7 of type swamp-bat -(defmethod relocate ((this swamp-bat) (arg0 int)) +(defmethod relocate ((this swamp-bat) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this path-list v1-0)) - (&+! (-> this path-list v1-0) arg0) + (&+! (-> this path-list v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition of type swamp-bat-slave diff --git a/test/decompiler/reference/jak1/levels/title/title-obs_REF.gc b/test/decompiler/reference/jak1/levels/title/title-obs_REF.gc index b1f03c4fbf..c29b8ef3c7 100644 --- a/test/decompiler/reference/jak1/levels/title/title-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/title/title-obs_REF.gc @@ -42,11 +42,11 @@ ;; definition for method 7 of type logo ;; INFO: Return type mismatch process-drawable vs logo. -(defmethod relocate ((this logo) (arg0 int)) +(defmethod relocate ((this logo) (offset int)) (if (nonzero? (-> this main-joint)) - (&+! (-> this main-joint) arg0) + (&+! (-> this main-joint) offset) ) - (the-as logo ((method-of-type process-drawable relocate) this arg0)) + (the-as logo ((method-of-type process-drawable relocate) this offset)) ) ;; definition of type logo-slave @@ -70,11 +70,11 @@ ;; definition for method 7 of type logo-slave ;; INFO: Return type mismatch process-drawable vs logo-slave. -(defmethod relocate ((this logo-slave) (arg0 int)) +(defmethod relocate ((this logo-slave) (offset int)) (if (nonzero? (-> this main-joint)) - (&+! (-> this main-joint) arg0) + (&+! (-> this main-joint) offset) ) - (the-as logo-slave ((method-of-type process-drawable relocate) this arg0)) + (the-as logo-slave ((method-of-type process-drawable relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/training/training-obs_REF.gc b/test/decompiler/reference/jak1/levels/training/training-obs_REF.gc index e2f2f7bb66..bbfa9124ea 100644 --- a/test/decompiler/reference/jak1/levels/training/training-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/training/training-obs_REF.gc @@ -77,11 +77,11 @@ ;; definition for method 7 of type training-cam ;; INFO: Return type mismatch process vs training-cam. -(defmethod relocate ((this training-cam) (arg0 int)) +(defmethod relocate ((this training-cam) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) - (the-as training-cam ((method-of-type process relocate) this arg0)) + (the-as training-cam ((method-of-type process relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc b/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc index 2045917eb4..622ba778a0 100644 --- a/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc +++ b/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc @@ -302,9 +302,9 @@ ;; definition for method 7 of type vehicle-controller ;; INFO: Return type mismatch int vs vehicle-controller. -(defmethod relocate ((this vehicle-controller) (arg0 int)) +(defmethod relocate ((this vehicle-controller) (offset int)) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) (the-as vehicle-controller 0) ) @@ -1334,12 +1334,12 @@ ) ;; definition for method 7 of type fishermans-boat -(defmethod relocate ((this fishermans-boat) (arg0 int)) - (relocate (-> this controller) arg0) +(defmethod relocate ((this fishermans-boat) (offset int)) + (relocate (-> this controller) offset) (if (nonzero? (-> this propeller)) - (&+! (-> this propeller) arg0) + (&+! (-> this propeller) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 30 of type fishermans-boat diff --git a/test/decompiler/reference/jak1/levels/village1/village-obs_REF.gc b/test/decompiler/reference/jak1/levels/village1/village-obs_REF.gc index 370978cd36..b303ddbd22 100644 --- a/test/decompiler/reference/jak1/levels/village1/village-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/village1/village-obs_REF.gc @@ -217,11 +217,11 @@ ;; definition for method 7 of type windmill-sail ;; INFO: Return type mismatch process-drawable vs windmill-sail. -(defmethod relocate ((this windmill-sail) (arg0 int)) +(defmethod relocate ((this windmill-sail) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as windmill-sail ((method-of-type process-drawable relocate) this arg0)) + (the-as windmill-sail ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type windmill-sail @@ -1009,11 +1009,11 @@ ) ;; definition for method 7 of type hutlamp -(defmethod relocate ((this hutlamp) (arg0 int)) +(defmethod relocate ((this hutlamp) (offset int)) (if (nonzero? (-> this pivot)) - (&+! (-> this pivot) arg0) + (&+! (-> this pivot) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/village2/assistant-village2_REF.gc b/test/decompiler/reference/jak1/levels/village2/assistant-village2_REF.gc index c840b4e9e2..b7a197ec54 100644 --- a/test/decompiler/reference/jak1/levels/village2/assistant-village2_REF.gc +++ b/test/decompiler/reference/jak1/levels/village2/assistant-village2_REF.gc @@ -23,13 +23,13 @@ ;; definition for method 7 of type assistant-levitator ;; INFO: Return type mismatch process-taskable vs assistant-levitator. -(defmethod relocate ((this assistant-levitator) (arg0 int)) +(defmethod relocate ((this assistant-levitator) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this particle v1-0)) - (&+! (-> this particle v1-0) arg0) + (&+! (-> this particle v1-0) offset) ) ) - (the-as assistant-levitator ((method-of-type process-taskable relocate) this arg0)) + (the-as assistant-levitator ((method-of-type process-taskable relocate) this offset)) ) ;; definition for method 10 of type assistant-levitator diff --git a/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc b/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc index 1533ec4574..adcf36a107 100644 --- a/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc +++ b/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc @@ -716,14 +716,14 @@ ) ;; definition for method 7 of type swamp-blimp -(defmethod relocate ((this swamp-blimp) (arg0 int)) +(defmethod relocate ((this swamp-blimp) (offset int)) (if (nonzero? (-> this gondola)) - (&+! (-> this gondola) arg0) + (&+! (-> this gondola) offset) ) (if (nonzero? (-> this bag)) - (&+! (-> this bag) arg0) + (&+! (-> this bag) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak1/levels/village_common/villagep-obs_REF.gc b/test/decompiler/reference/jak1/levels/village_common/villagep-obs_REF.gc index 5c21dc9e4a..9ffb59f48e 100644 --- a/test/decompiler/reference/jak1/levels/village_common/villagep-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/village_common/villagep-obs_REF.gc @@ -913,11 +913,11 @@ ;; definition for method 7 of type village-cam ;; INFO: Return type mismatch process vs village-cam. -(defmethod relocate ((this village-cam) (arg0 int)) +(defmethod relocate ((this village-cam) (offset int)) (if (nonzero? (-> this root-override)) - (&+! (-> this root-override) arg0) + (&+! (-> this root-override) offset) ) - (the-as village-cam ((method-of-type process relocate) this arg0)) + (the-as village-cam ((method-of-type process relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc index 281615175b..bc735f1035 100644 --- a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc +++ b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc @@ -22,11 +22,11 @@ ) ;; definition for method 7 of type enemy -(defmethod relocate ((this enemy) (arg0 int)) +(defmethod relocate ((this enemy) (offset int)) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 117 of type enemy diff --git a/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc index b4303c008a..05bcbb105a 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc @@ -823,11 +823,11 @@ ;; definition for method 7 of type joint-exploder ;; WARN: Return type mismatch process-drawable vs joint-exploder. -(defmethod relocate ((this joint-exploder) (arg0 int)) +(defmethod relocate ((this joint-exploder) (offset int)) (if (nonzero? (-> this joints)) - (&+! (-> this joints) arg0) + (&+! (-> this joints) offset) ) - (the-as joint-exploder ((method-of-type process-drawable relocate) this arg0)) + (the-as joint-exploder ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function joint-exploder-init-by-other diff --git a/test/decompiler/reference/jak2/engine/anim/joint_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint_REF.gc index 9625a2b39a..bbb5cd4872 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint_REF.gc @@ -8,13 +8,13 @@ ) ;; definition for method 8 of type joint -(defmethod mem-usage ((this joint) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 68 (-> arg0 length))) - (set! (-> arg0 data 67 name) "joint") - (+! (-> arg0 data 67 count) 1) +(defmethod mem-usage ((this joint) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 68 (-> usage length))) + (set! (-> usage data 67 name) "joint") + (+! (-> usage data 67 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 67 used) v1-6) - (+! (-> arg0 data 67 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 67 used) v1-6) + (+! (-> usage data 67 total) (logand -16 (+ v1-6 15))) ) this ) @@ -72,16 +72,16 @@ ) ;; definition for method 8 of type joint-anim-drawable -(defmethod mem-usage ((this joint-anim-drawable) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 80 (-> arg0 length))) - (set! (-> arg0 data 79 name) "joint-anim-drawable") - (+! (-> arg0 data 79 count) 1) +(defmethod mem-usage ((this joint-anim-drawable) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 80 (-> usage length))) + (set! (-> usage data 79 name) "joint-anim-drawable") + (+! (-> usage data 79 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 79 used) v1-6) - (+! (-> arg0 data 79 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 79 used) v1-6) + (+! (-> usage data 79 total) (logand -16 (+ v1-6 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -307,43 +307,43 @@ ) ;; definition for method 8 of type art-mesh-anim -(defmethod mem-usage ((this art-mesh-anim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 75 (-> arg0 length))) - (set! (-> arg0 data 74 name) "art-mesh-anim") - (+! (-> arg0 data 74 count) 1) +(defmethod mem-usage ((this art-mesh-anim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 75 (-> usage length))) + (set! (-> usage data 74 name) "art-mesh-anim") + (+! (-> usage data 74 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 74 used) v1-6) - (+! (-> arg0 data 74 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 74 used) v1-6) + (+! (-> usage data 74 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) ;; definition for method 8 of type art-joint-anim -(defmethod mem-usage ((this art-joint-anim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 78 (-> arg0 length))) - (set! (-> arg0 data 77 name) "art-joint-anim") - (+! (-> arg0 data 77 count) 1) +(defmethod mem-usage ((this art-joint-anim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 78 (-> usage length))) + (set! (-> usage data 77 name) "art-joint-anim") + (+! (-> usage data 77 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 77 used) v1-6) - (+! (-> arg0 data 77 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 77 used) v1-6) + (+! (-> usage data 77 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) - (jacc-mem-usage (-> this frames) arg0 arg1) + (jacc-mem-usage (-> this frames) usage flags) (when (and (nonzero? (-> this eye-anim)) (-> this eye-anim)) - (set! (-> arg0 length) (max 112 (-> arg0 length))) - (set! (-> arg0 data 111 name) "eye-anim") - (+! (-> arg0 data 111 count) 1) + (set! (-> usage length) (max 112 (-> usage length))) + (set! (-> usage data 111 name) "eye-anim") + (+! (-> usage data 111 count) 1) (let ((v1-26 (* (* (+ (-> this eye-anim max-frame) 1) 2) 8))) - (+! (-> arg0 data 111 used) v1-26) - (+! (-> arg0 data 111 total) (logand -16 (+ v1-26 15))) + (+! (-> usage data 111 used) v1-26) + (+! (-> usage data 111 total) (logand -16 (+ v1-26 15))) ) ) this @@ -446,20 +446,20 @@ ) ;; definition for method 8 of type art-group -(defmethod mem-usage ((this art-group) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 74 (-> arg0 length))) - (set! (-> arg0 data 73 name) "art-group") - (+! (-> arg0 data 73 count) 1) +(defmethod mem-usage ((this art-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 74 (-> usage length))) + (set! (-> usage data 73 name) "art-group") + (+! (-> usage data 73 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 73 used) v1-6) - (+! (-> arg0 data 73 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 73 used) v1-6) + (+! (-> usage data 73 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) (if (-> this data s3-0) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) ) this @@ -467,9 +467,9 @@ ;; definition for method 7 of type art-group ;; WARN: Return type mismatch art-group vs none. -(defmethod relocate ((this art-group) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this art-group) (heap kheap) (name (pointer uint8))) (let ((s4-0 (clear *temp-string*))) - (string<-charp s4-0 arg1) + (string<-charp s4-0 name) (set! this (cond ((not this) @@ -539,19 +539,19 @@ ) ;; definition for method 8 of type art-mesh-geo -(defmethod mem-usage ((this art-mesh-geo) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 76 (-> arg0 length))) - (set! (-> arg0 data 75 name) "art-mesh-geo") - (+! (-> arg0 data 75 count) 1) +(defmethod mem-usage ((this art-mesh-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 76 (-> usage length))) + (set! (-> usage data 75 name) "art-mesh-geo") + (+! (-> usage data 75 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 75 used) v1-6) - (+! (-> arg0 data 75 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 75 used) v1-6) + (+! (-> usage data 75 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -630,19 +630,19 @@ ) ;; definition for method 8 of type art-joint-geo -(defmethod mem-usage ((this art-joint-geo) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 77 (-> arg0 length))) - (set! (-> arg0 data 76 name) "art-joint-geo") - (+! (-> arg0 data 76 count) 1) +(defmethod mem-usage ((this art-joint-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 77 (-> usage length))) + (set! (-> usage data 76 name) "art-joint-geo") + (+! (-> usage data 76 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 76 used) v1-6) - (+! (-> arg0 data 76 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 76 used) v1-6) + (+! (-> usage data 76 total) (logand -16 (+ v1-6 15))) ) (if (-> this extra) - (mem-usage (-> this extra) arg0 (logior arg1 512)) + (mem-usage (-> this extra) usage (logior flags 512)) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-frag_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-frag_REF.gc index c3fa31c597..ba29727f42 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-frag_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-frag_REF.gc @@ -25,32 +25,32 @@ ;; definition for method 8 of type collide-fragment ;; WARN: Return type mismatch int vs collide-fragment. -(defmethod mem-usage ((this collide-fragment) (arg0 memory-usage-block) (arg1 int)) - (let ((s5-0 (if (logtest? arg1 1) +(defmethod mem-usage ((this collide-fragment) (usage memory-usage-block) (flags int)) + (let ((s5-0 (if (logtest? flags 1) 54 50 ) ) (s4-0 (-> this mesh)) ) - (set! (-> arg0 data s5-0 name) (symbol->string 'collide-fragment)) - (+! (-> arg0 data s5-0 count) 1) + (set! (-> usage data s5-0 name) (symbol->string 'collide-fragment)) + (+! (-> usage data s5-0 count) 1) (let ((v1-11 (+ (asize-of this) (asize-of s4-0)))) - (+! (-> arg0 data s5-0 used) v1-11) - (+! (-> arg0 data s5-0 total) (logand -16 (+ v1-11 15))) + (+! (-> usage data s5-0 used) v1-11) + (+! (-> usage data s5-0 total) (logand -16 (+ v1-11 15))) ) - (set! (-> arg0 data (+ s5-0 1) name) "collision-poly") - (+! (-> arg0 data (+ s5-0 1) count) (-> s4-0 poly-count)) + (set! (-> usage data (+ s5-0 1) name) "collision-poly") + (+! (-> usage data (+ s5-0 1) count) (-> s4-0 poly-count)) (let ((v1-22 (+ (-> s4-0 strip-data-len) (-> s4-0 poly-count)))) - (+! (-> arg0 data (+ s5-0 1) used) v1-22) - (+! (-> arg0 data (+ s5-0 1) total) v1-22) + (+! (-> usage data (+ s5-0 1) used) v1-22) + (+! (-> usage data (+ s5-0 1) total) v1-22) ) - (set! (-> arg0 data (+ s5-0 2) name) "collision-vertex") - (+! (-> arg0 data (+ s5-0 2) count) (-> s4-0 vertex-count)) + (set! (-> usage data (+ s5-0 2) name) "collision-vertex") + (+! (-> usage data (+ s5-0 2) count) (-> s4-0 vertex-count)) (let ((v1-31 (* (-> s4-0 vertex-data-qwc) 16))) - (+! (-> arg0 data (+ s5-0 2) used) v1-31) - (let ((v0-2 (+ (-> arg0 data (+ s5-0 2) total) v1-31))) - (set! (-> arg0 data (+ s5-0 2) total) v0-2) + (+! (-> usage data (+ s5-0 2) used) v1-31) + (let ((v0-2 (+ (-> usage data (+ s5-0 2) total) v1-31))) + (set! (-> usage data (+ s5-0 2) total) v0-2) (the-as collide-fragment v0-2) ) ) @@ -87,16 +87,16 @@ ) ;; definition for method 8 of type drawable-inline-array-collide-fragment -(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc index 1af9c320bb..6184cf988f 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc @@ -9,20 +9,20 @@ ;; definition for method 8 of type collide-mesh ;; WARN: Return type mismatch int vs collide-mesh. -(defmethod mem-usage ((this collide-mesh) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 82 (-> arg0 length))) - (set! (-> arg0 data 81 name) "collide-mesh") - (+! (-> arg0 data 81 count) 1) +(defmethod mem-usage ((this collide-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 82 (-> usage length))) + (set! (-> usage data 81 name) "collide-mesh") + (+! (-> usage data 81 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 81 used) v1-6) - (+! (-> arg0 data 81 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 81 used) v1-6) + (+! (-> usage data 81 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 82 (-> arg0 length))) - (set! (-> arg0 data 81 name) "collide-mesh") - (+! (-> arg0 data 81 count) 1) + (set! (-> usage length) (max 82 (-> usage length))) + (set! (-> usage data 81 name) "collide-mesh") + (+! (-> usage data 81 count) 1) (let ((v1-16 (* (-> this num-verts) 16))) - (+! (-> arg0 data 81 used) v1-16) - (+! (-> arg0 data 81 total) (logand -16 (+ v1-16 15))) + (+! (-> usage data 81 used) v1-16) + (+! (-> usage data 81 total) (logand -16 (+ v1-16 15))) ) (the-as collide-mesh 0) ) diff --git a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc index dd5344d55f..a85eddd5de 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc @@ -797,11 +797,11 @@ For example for an elevator pre-compute the distance between the first and last ) ;; definition for method 7 of type elevator -(defmethod relocate ((this elevator) (arg0 int)) +(defmethod relocate ((this elevator) (offset int)) (if (nonzero? (-> this path-seq)) - (&+! (-> this path-seq) arg0) + (&+! (-> this path-seq) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 40 of type elevator diff --git a/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc index 6c36e680c4..5fbaa8c30b 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc @@ -257,18 +257,18 @@ This commonly includes things such as: ;; definition for method 7 of type drop-plat ;; WARN: Return type mismatch base-plat vs drop-plat. -(defmethod relocate ((this drop-plat) (arg0 int)) +(defmethod relocate ((this drop-plat) (offset int)) (if (nonzero? (-> this break-anim-name)) - (&+! (-> this break-anim-name) arg0) + (&+! (-> this break-anim-name) offset) ) (let ((v1-5 (-> this anim anim-name))) (if (and (>= (the-as int v1-5) (-> *kernel-context* relocating-min)) (< (the-as int v1-5) (-> *kernel-context* relocating-max)) ) - (set! (-> this anim anim-name) (&+ (the-as external-art-buffer (-> this anim anim-name)) arg0)) + (set! (-> this anim anim-name) (&+ (the-as external-art-buffer (-> this anim anim-name)) offset)) ) ) - (the-as drop-plat ((method-of-type base-plat relocate) this arg0)) + (the-as drop-plat ((method-of-type base-plat relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc index 941096cad8..ddd1009bec 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc @@ -57,11 +57,11 @@ ) ;; definition for method 7 of type water-anim -(defmethod relocate ((this water-anim) (arg0 int)) +(defmethod relocate ((this water-anim) (offset int)) (if (nonzero? (-> this flow)) - (&+! (-> this flow) arg0) + (&+! (-> this flow) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc index c765b5e25c..79f8f0b1af 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc @@ -95,14 +95,14 @@ ) ;; definition for method 7 of type flow-control -(defmethod relocate ((this flow-control) (arg0 int)) +(defmethod relocate ((this flow-control) (offset int)) (if (nonzero? (-> this sections)) - (&+! (-> this sections) arg0) + (&+! (-> this sections) offset) ) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 9 of type flow-control diff --git a/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc b/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc index 6a1d1e1ae1..83961e6ba3 100644 --- a/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc @@ -1440,23 +1440,23 @@ ;; definition for method 7 of type editable-player ;; WARN: Return type mismatch process-drawable vs editable-player. -(defmethod relocate ((this editable-player) (arg0 int)) +(defmethod relocate ((this editable-player) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) (let ((v1-2 (-> this current))) (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) (< (the-as int v1-2) (-> *kernel-context* relocating-max)) ) - (&+! (-> this current) arg0) + (&+! (-> this current) offset) ) ) - (the-as editable-player ((method-of-type process-drawable relocate) this arg0)) + (the-as editable-player ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 21 of type editable-player diff --git a/test/decompiler/reference/jak2/engine/debug/editable_REF.gc b/test/decompiler/reference/jak2/engine/debug/editable_REF.gc index 47d4ea02f7..9efcbe6e2c 100644 --- a/test/decompiler/reference/jak2/engine/debug/editable_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/editable_REF.gc @@ -1929,9 +1929,9 @@ ;; definition for method 7 of type editable-array ;; WARN: Return type mismatch (array editable) vs editable-array. -(defmethod relocate ((this editable-array) (arg0 int)) +(defmethod relocate ((this editable-array) (offset int)) (the-as editable-array (when (nonzero? (-> this selection)) - (let ((v0-0 (&+ (-> this selection) arg0))) + (let ((v0-0 (&+ (-> this selection) offset))) (set! (-> this selection) v0-0) v0-0 ) diff --git a/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc b/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc index 0cb5bff908..b52aa45131 100644 --- a/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc @@ -34,7 +34,7 @@ ) ;; definition for method 8 of type object -(defmethod mem-usage ((this object) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this object) (usage memory-usage-block) (flags int)) this ) @@ -97,23 +97,23 @@ in `mem-usage-block` as well as the total size in `mem-usage` ) ;; definition for method 8 of type process-tree -(defmethod mem-usage ((this process-tree) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this process-tree) (usage memory-usage-block) (flags int)) (let ((v1-0 90)) (let* ((a0-1 *dead-pool-list*) (a3-0 (car a0-1)) ) (while (not (null? a0-1)) - (set! (-> arg0 data v1-0 name) (symbol->string (the-as symbol a3-0))) + (set! (-> usage data v1-0 name) (symbol->string (the-as symbol a3-0))) (+! v1-0 1) (set! a0-1 (cdr a0-1)) (set! a3-0 (car a0-1)) ) ) - (set! (-> arg0 length) (max (-> arg0 length) v1-0)) + (set! (-> usage length) (max (-> usage length) v1-0)) ) - (set! (-> arg0 data 96 name) "*debug-dead-pool*") - (set! *temp-mem-usage* arg0) - (when (logtest? arg1 32) + (set! (-> usage data 96 name) "*debug-dead-pool*") + (set! *temp-mem-usage* usage) + (when (logtest? flags 32) (let* ((s5-0 90) (s4-0 *dead-pool-list*) (v1-4 (car s4-0)) diff --git a/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc b/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc index fd84a37229..6b4b24f05c 100644 --- a/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc @@ -217,8 +217,8 @@ ) ;; definition for method 7 of type nav-graph-editor -(defmethod relocate ((this nav-graph-editor) (arg0 int)) - (call-parent-method this arg0) +(defmethod relocate ((this nav-graph-editor) (offset int)) + (call-parent-method this offset) ) ;; definition for method 60 of type nav-graph-editor diff --git a/test/decompiler/reference/jak2/engine/draw/drawable-group_REF.gc b/test/decompiler/reference/jak2/engine/draw/drawable-group_REF.gc index e9311c442a..26f988dc42 100644 --- a/test/decompiler/reference/jak2/engine/draw/drawable-group_REF.gc +++ b/test/decompiler/reference/jak2/engine/draw/drawable-group_REF.gc @@ -32,16 +32,16 @@ ) ;; definition for method 8 of type drawable-group -(defmethod mem-usage ((this drawable-group) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) "drawable-group") - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) (let ((obj-size (asize-of this))) - (+! (-> arg0 data 0 used) obj-size) - (+! (-> arg0 data 0 total) (logand -16 (+ obj-size 15))) + (+! (-> usage data 0 used) obj-size) + (+! (-> usage data 0 total) (logand -16 (+ obj-size 15))) ) (dotimes (idx (-> this length)) - (mem-usage (-> this data idx) arg0 arg1) + (mem-usage (-> this data idx) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/entity/entity_REF.gc b/test/decompiler/reference/jak2/engine/entity/entity_REF.gc index 47dd3a29d0..1fdbf07763 100644 --- a/test/decompiler/reference/jak2/engine/entity/entity_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/entity_REF.gc @@ -12,30 +12,30 @@ ;; definition for method 8 of type drawable-actor ;; WARN: Return type mismatch int vs drawable-actor. -(defmethod mem-usage ((this drawable-actor) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 44 (-> arg0 length))) - (set! (-> arg0 data 43 name) "entity") - (+! (-> arg0 data 43 count) 1) +(defmethod mem-usage ((this drawable-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 44 (-> usage length))) + (set! (-> usage data 43 name) "entity") + (+! (-> usage data 43 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 43 used) v1-6) - (+! (-> arg0 data 43 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 43 used) v1-6) + (+! (-> usage data 43 total) (logand -16 (+ v1-6 15))) ) - (mem-usage (-> this actor) arg0 (logior arg1 64)) + (mem-usage (-> this actor) usage (logior flags 64)) (the-as drawable-actor 0) ) ;; definition for method 8 of type drawable-inline-array-actor ;; WARN: Return type mismatch int vs drawable-inline-array-actor. -(defmethod mem-usage ((this drawable-inline-array-actor) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) (the-as drawable-inline-array-actor 0) ) diff --git a/test/decompiler/reference/jak2/engine/entity/relocate_REF.gc b/test/decompiler/reference/jak2/engine/entity/relocate_REF.gc index ed5c522501..0323d63136 100644 --- a/test/decompiler/reference/jak2/engine/entity/relocate_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/relocate_REF.gc @@ -2,19 +2,19 @@ (in-package goal) ;; definition for method 7 of type process -(defmethod relocate ((this process) (arg0 int)) +(defmethod relocate ((this process) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) - (&+! (-> this ppointer 0) arg0) + (&+! (-> this ppointer 0) offset) (let ((v1-5 (-> this entity))) (if (and v1-5 (= (-> v1-5 extra process) this)) - (&+! (-> v1-5 extra process) arg0) + (&+! (-> v1-5 extra process) offset) ) ) (let ((v1-7 (-> this connection-list next1))) @@ -23,24 +23,24 @@ (if (and (>= (the-as int a0-14) (-> *kernel-context* relocating-min)) (< (the-as int a0-14) (-> *kernel-context* relocating-max)) ) - (&+! (-> v1-7 prev1) arg0) + (&+! (-> v1-7 prev1) offset) ) ) (let ((a0-19 (-> (the-as connection v1-7) param1))) (if (and (>= (the-as int a0-19) (-> *kernel-context* relocating-min)) (< (the-as int a0-19) (-> *kernel-context* relocating-max)) ) - (&+! (-> (the-as connection v1-7) param1) arg0) + (&+! (-> (the-as connection v1-7) param1) offset) ) ) (let ((a0-24 (-> (the-as connection v1-7) param2))) (if (and (>= a0-24 (-> *kernel-context* relocating-min)) (< a0-24 (-> *kernel-context* relocating-max))) - (+! (-> (the-as connection v1-7) param2) arg0) + (+! (-> (the-as connection v1-7) param2) offset) ) ) (let ((a0-29 (-> (the-as connection v1-7) param3))) (if (and (>= a0-29 (-> *kernel-context* relocating-min)) (< a0-29 (-> *kernel-context* relocating-max))) - (+! (-> (the-as connection v1-7) param3) arg0) + (+! (-> (the-as connection v1-7) param3) offset) ) ) (set! v1-7 (-> (the-as connection v1-7) next1)) @@ -50,203 +50,203 @@ (if (and (>= (the-as int v1-10) (-> *kernel-context* relocating-min)) (< (the-as int v1-10) (-> *kernel-context* relocating-max)) ) - (&+! (-> this self) arg0) + (&+! (-> this self) offset) ) ) (let ((v1-15 (-> this ppointer))) (if (and (>= (the-as int v1-15) (-> *kernel-context* relocating-min)) (< (the-as int v1-15) (-> *kernel-context* relocating-max)) ) - (&+! (-> this ppointer) arg0) + (&+! (-> this ppointer) offset) ) ) (let ((s4-0 (&+ (-> this heap-base) 4))) (while (< (the-as int s4-0) (the-as int (-> this heap-cur))) - (relocate s4-0 arg0) + (relocate s4-0 offset) (&+! s4-0 (logand -16 (+ (asize-of s4-0) 15))) ) ) - (&+! (-> this main-thread) arg0) - (&+! (-> this top-thread) arg0) - (&+! (-> this heap-base) arg0) - (&+! (-> this heap-cur) arg0) - (&+! (-> this heap-top) arg0) + (&+! (-> this main-thread) offset) + (&+! (-> this top-thread) offset) + (&+! (-> this heap-base) offset) + (&+! (-> this heap-cur) offset) + (&+! (-> this heap-top) offset) (let ((a2-4 (asize-of this)) (a1-22 (&-> this type)) ) (cond - ((>= arg0 0) - (qmem-copy->! (&+ a1-22 arg0) a1-22 a2-4) + ((>= offset 0) + (qmem-copy->! (&+ a1-22 offset) a1-22 a2-4) ) ((< a2-4 2560) - (qmem-copy<-! (&+ a1-22 arg0) a1-22 a2-4) + (qmem-copy<-! (&+ a1-22 offset) a1-22 a2-4) ) (else - (ultimate-memcpy (&+ a1-22 arg0) a1-22 (the-as uint a2-4)) + (ultimate-memcpy (&+ a1-22 offset) a1-22 (the-as uint a2-4)) ) ) ) (set! (-> *kernel-context* relocating-process) #f) - (&+ this arg0) + (&+ this offset) ) ;; definition for method 7 of type cpu-thread -(defmethod relocate ((this cpu-thread) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this cpu-thread) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type process-drawable ;; WARN: Return type mismatch process vs process-drawable. -(defmethod relocate ((this process-drawable) (arg0 int)) +(defmethod relocate ((this process-drawable) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) (let ((a0-6 (-> this nav))) (if (and (nonzero? a0-6) a0-6) - (relocate a0-6 arg0) + (relocate a0-6 offset) ) ) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this node-list)) - (&+! (-> this node-list) arg0) + (&+! (-> this node-list) offset) ) (if (nonzero? (-> this draw)) - (&+! (-> this draw) arg0) + (&+! (-> this draw) offset) ) (if (nonzero? (-> this skel)) - (&+! (-> this skel) arg0) + (&+! (-> this skel) offset) ) (if (nonzero? (-> this align)) - (&+! (-> this align) arg0) + (&+! (-> this align) offset) ) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) (if (nonzero? (-> this vol)) - (&+! (-> this vol) arg0) + (&+! (-> this vol) offset) ) (if (nonzero? (-> this fact)) - (&+! (-> this fact) arg0) + (&+! (-> this fact) offset) ) (if (nonzero? (-> this link)) - (&+! (-> this link) arg0) + (&+! (-> this link) offset) ) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) (if (nonzero? (-> this water)) - (&+! (-> this water) arg0) + (&+! (-> this water) offset) ) (if (nonzero? (-> this sound)) - (&+! (-> this sound) arg0) + (&+! (-> this sound) offset) ) (if (nonzero? (-> this carry)) - (&+! (-> this carry) arg0) + (&+! (-> this carry) offset) ) (if (nonzero? (-> this rbody)) - (&+! (-> this rbody) arg0) + (&+! (-> this rbody) offset) ) - (the-as process-drawable ((method-of-type process relocate) this arg0)) + (the-as process-drawable ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type collide-shape -(defmethod relocate ((this collide-shape) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this root-prim) arg0) +(defmethod relocate ((this collide-shape) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this root-prim) offset) this ) ;; definition for method 7 of type collide-shape-moving ;; WARN: Return type mismatch collide-shape vs collide-shape-moving. -(defmethod relocate ((this collide-shape-moving) (arg0 int)) +(defmethod relocate ((this collide-shape-moving) (offset int)) (if (-> this dynam) - (&+! (-> this dynam) arg0) + (&+! (-> this dynam) offset) ) - (the-as collide-shape-moving ((method-of-type collide-shape relocate) this arg0)) + (the-as collide-shape-moving ((method-of-type collide-shape relocate) this offset)) ) ;; definition for method 7 of type collide-shape-prim -(defmethod relocate ((this collide-shape-prim) (arg0 int)) - (&+! (-> this cshape) arg0) +(defmethod relocate ((this collide-shape-prim) (offset int)) + (&+! (-> this cshape) offset) this ) ;; definition for method 7 of type collide-shape-prim-group -(defmethod relocate ((this collide-shape-prim-group) (arg0 int)) - (&+! (-> this cshape) arg0) - (set! (-> this child) (the-as (inline-array collide-shape-prim) (&+ (the-as pointer (-> this child)) arg0))) +(defmethod relocate ((this collide-shape-prim-group) (offset int)) + (&+! (-> this cshape) offset) + (set! (-> this child) (the-as (inline-array collide-shape-prim) (&+ (the-as pointer (-> this child)) offset))) this ) ;; definition for method 7 of type fact-info -(defmethod relocate ((this fact-info) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this fact-info) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type draw-control -(defmethod relocate ((this draw-control) (arg0 int)) - (&+! (-> this skeleton) arg0) - (&+! (-> this process) arg0) +(defmethod relocate ((this draw-control) (offset int)) + (&+! (-> this skeleton) offset) + (&+! (-> this process) offset) (when (-> this ripple) (if (-> this ripple query) - (&+! (-> this ripple query) arg0) + (&+! (-> this ripple query) offset) ) - (&+! (-> this ripple) arg0) + (&+! (-> this ripple) offset) ) (let ((v1-14 (-> this shadow-ctrl))) (if (and (>= (the-as int v1-14) (-> *kernel-context* relocating-min)) (< (the-as int v1-14) (-> *kernel-context* relocating-max)) ) - (&+! (-> this shadow-ctrl) arg0) + (&+! (-> this shadow-ctrl) offset) ) ) this ) ;; definition for method 7 of type joint-control -(defmethod relocate ((this joint-control) (arg0 int)) +(defmethod relocate ((this joint-control) (offset int)) (if (-> this effect) - (&+! (-> this effect) arg0) + (&+! (-> this effect) offset) ) (if (-> this top-anim) - (&+! (-> this top-anim) arg0) + (&+! (-> this top-anim) offset) ) - (&+! (-> this root-channel) arg0) + (&+! (-> this root-channel) offset) (countdown (v1-10 (-> this allocated-length)) - (&+! (-> this channel v1-10 parent) arg0) + (&+! (-> this channel v1-10 parent) offset) ) this ) ;; definition for method 7 of type cspace-array -(defmethod relocate ((this cspace-array) (arg0 int)) +(defmethod relocate ((this cspace-array) (offset int)) (countdown (v1-0 (-> this length)) (let ((a2-2 (-> this data v1-0))) (if (-> a2-2 parent) - (&+! (-> a2-2 parent) arg0) + (&+! (-> a2-2 parent) offset) ) - (&+! (-> a2-2 bone) arg0) + (&+! (-> a2-2 bone) offset) (let ((a3-6 (-> a2-2 param1))) (if (and (>= (the-as int a3-6) (-> *kernel-context* relocating-min)) (< (the-as int a3-6) (-> *kernel-context* relocating-max)) ) - (&+! (-> a2-2 param1) arg0) + (&+! (-> a2-2 param1) offset) ) ) (let ((a3-11 (-> a2-2 param2))) (if (and (>= (the-as int a3-11) (-> *kernel-context* relocating-min)) (< (the-as int a3-11) (-> *kernel-context* relocating-max)) ) - (&+! (-> a2-2 param2) arg0) + (&+! (-> a2-2 param2) offset) ) ) ) @@ -255,63 +255,63 @@ ) ;; definition for method 7 of type path-control -(defmethod relocate ((this path-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this path-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type vol-control -(defmethod relocate ((this vol-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this vol-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type water-control -(defmethod relocate ((this water-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this water-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type actor-link-info -(defmethod relocate ((this actor-link-info) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this actor-link-info) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type align-control -(defmethod relocate ((this align-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this align-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type joint-mod -(defmethod relocate ((this joint-mod) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this joint) arg0) +(defmethod relocate ((this joint-mod) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this joint) offset) this ) ;; definition for method 7 of type joint-mod-wheel -(defmethod relocate ((this joint-mod-wheel) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this joint-mod-wheel) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type joint-mod-ik -(defmethod relocate ((this joint-mod-ik) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this joint-mod-ik) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type effect-control -(defmethod relocate ((this effect-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this effect-control) (offset int)) + (&+! (-> this process) offset) this ) ;; definition for method 7 of type sparticle-launch-control -(defmethod relocate ((this sparticle-launch-control) (arg0 int)) - (&+! (-> this proc) arg0) +(defmethod relocate ((this sparticle-launch-control) (offset int)) + (&+! (-> this proc) offset) (countdown (v1-2 (-> this length)) (let* ((a0-4 (-> this data v1-2)) (a2-0 (-> a0-4 center)) @@ -319,7 +319,7 @@ (if (and (>= (the-as int a2-0) (-> *kernel-context* relocating-min)) (< (the-as int a2-0) (-> *kernel-context* relocating-max)) ) - (&+! (-> a0-4 center) arg0) + (&+! (-> a0-4 center) offset) ) ) ) @@ -343,81 +343,81 @@ ;; definition for method 7 of type camera-master ;; WARN: Return type mismatch process vs camera-master. -(defmethod relocate ((this camera-master) (arg0 int)) +(defmethod relocate ((this camera-master) (offset int)) (if (nonzero? (-> this water-drip)) - (&+! (-> this water-drip) arg0) + (&+! (-> this water-drip) offset) ) - (the-as camera-master ((method-of-type process relocate) this arg0)) + (the-as camera-master ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type time-of-day-proc ;; WARN: Return type mismatch process vs time-of-day-proc. -(defmethod relocate ((this time-of-day-proc) (arg0 int)) +(defmethod relocate ((this time-of-day-proc) (offset int)) (if (nonzero? (-> this sun)) - (&+! (-> this sun) arg0) + (&+! (-> this sun) offset) ) (if (nonzero? (-> this green-sun)) - (&+! (-> this green-sun) arg0) + (&+! (-> this green-sun) offset) ) (if (nonzero? (-> this moon)) - (&+! (-> this moon) arg0) + (&+! (-> this moon) offset) ) - (the-as time-of-day-proc ((method-of-type process relocate) this arg0)) + (the-as time-of-day-proc ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type part-tracker ;; WARN: Return type mismatch process vs part-tracker. -(defmethod relocate ((this part-tracker) (arg0 int)) +(defmethod relocate ((this part-tracker) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) - (the-as part-tracker ((method-of-type process relocate) this arg0)) + (the-as part-tracker ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type part-spawner ;; WARN: Return type mismatch process vs part-spawner. -(defmethod relocate ((this part-spawner) (arg0 int)) +(defmethod relocate ((this part-spawner) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this part)) - (&+! (-> this part) arg0) + (&+! (-> this part) offset) ) (if (nonzero? (-> this sound)) - (&+! (-> this sound) arg0) + (&+! (-> this sound) offset) ) - (the-as part-spawner ((method-of-type process relocate) this arg0)) + (the-as part-spawner ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type lightning-tracker ;; WARN: Return type mismatch process vs lightning-tracker. -(defmethod relocate ((this lightning-tracker) (arg0 int)) +(defmethod relocate ((this lightning-tracker) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) (if (nonzero? (-> this lightning)) - (&+! (-> this lightning) arg0) + (&+! (-> this lightning) offset) ) - (the-as lightning-tracker ((method-of-type process relocate) this arg0)) + (the-as lightning-tracker ((method-of-type process relocate) this offset)) ) ;; definition for method 7 of type manipy ;; WARN: Return type mismatch process-drawable vs manipy. -(defmethod relocate ((this manipy) (arg0 int)) +(defmethod relocate ((this manipy) (offset int)) (if (nonzero? (-> this joint 0)) - (&+! (-> this joint 0) arg0) + (&+! (-> this joint 0) offset) ) (if (nonzero? (-> this joint 1)) - (&+! (-> this joint 1) arg0) + (&+! (-> this joint 1) offset) ) (if (nonzero? (-> this joint 2)) - (&+! (-> this joint 2) arg0) + (&+! (-> this joint 2) offset) ) (if (nonzero? (-> this joint 3)) - (&+! (-> this joint 3) arg0) + (&+! (-> this joint 3) offset) ) - (the-as manipy ((method-of-type process-drawable relocate) this arg0)) + (the-as manipy ((method-of-type process-drawable relocate) this offset)) ) diff --git a/test/decompiler/reference/jak2/engine/entity/res_REF.gc b/test/decompiler/reference/jak2/engine/entity/res_REF.gc index 7e5aae6ced..806af37a12 100644 --- a/test/decompiler/reference/jak2/engine/entity/res_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/res_REF.gc @@ -802,31 +802,31 @@ ;; WARN: Using new Jak 2 rtype-of ;; WARN: Using new Jak 2 rtype-of ;; WARN: Using new Jak 2 rtype-of -(defmethod mem-usage ((this res-lump) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this res-lump) (usage memory-usage-block) (flags int)) (local-vars (sv-16 int)) (let ((s3-0 48) (s2-0 "res") ) (cond - ((logtest? arg1 256) + ((logtest? flags 256) (set! s3-0 44) (set! s2-0 "camera") ) - ((logtest? arg1 64) + ((logtest? flags 64) (set! s3-0 43) (set! s2-0 "entity") ) - ((logtest? arg1 512) + ((logtest? flags 512) (set! s3-0 76) (set! s2-0 "art-joint-geo") ) ) - (set! (-> arg0 length) (max (-> arg0 length) (+ s3-0 1))) - (set! (-> arg0 data s3-0 name) s2-0) - (+! (-> arg0 data s3-0 count) 1) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) (let ((v1-19 (asize-of this))) - (+! (-> arg0 data s3-0 used) v1-19) - (+! (-> arg0 data s3-0 total) (logand -16 (+ v1-19 15))) + (+! (-> usage data s3-0 used) v1-19) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-19 15))) ) (dotimes (s1-0 (-> this length)) (when (zero? (-> this tag s1-0 inlined?)) @@ -840,46 +840,46 @@ ((or (= v1-34 symbol) (or (= v1-34 type) (= v1-34 pair))) ) ((= v1-34 string) - (set! (-> arg0 length) (max (-> arg0 length) (+ s3-0 1))) - (set! (-> arg0 data s3-0 name) s2-0) - (+! (-> arg0 data s3-0 count) 1) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) (let ((v1-48 ((method-of-type (rtype-of (the-as int s0-0)) asize-of) (the-as int s0-0)))) - (+! (-> arg0 data s3-0 used) v1-48) - (+! (-> arg0 data s3-0 total) (logand -16 (+ v1-48 15))) + (+! (-> usage data s3-0 used) v1-48) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-48 15))) ) ) ((or (= v1-34 nav-mesh) (= v1-34 collide-mesh)) (let ((a0-48 (the-as (array object) s0-0))) - ((method-of-type (rtype-of a0-48) mem-usage) a0-48 arg0 arg1) + ((method-of-type (rtype-of a0-48) mem-usage) a0-48 usage flags) ) ) ((= v1-34 array) - (set! (-> arg0 length) (max (-> arg0 length) (+ s3-0 1))) - (set! (-> arg0 data s3-0 name) s2-0) - (+! (-> arg0 data s3-0 count) 1) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) (let* ((a0-53 (the-as (array object) s0-0)) (v1-68 ((method-of-type (rtype-of a0-53) asize-of) a0-53)) ) - (+! (-> arg0 data s3-0 used) v1-68) - (+! (-> arg0 data s3-0 total) (logand -16 (+ v1-68 15))) + (+! (-> usage data s3-0 used) v1-68) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-68 15))) ) (set! sv-16 0) (while (< sv-16 (-> (the-as array s0-0) length)) (let ((a0-63 (-> (the-as (array object) s0-0) sv-16))) - ((method-of-type (rtype-of a0-63) mem-usage) a0-63 arg0 arg1) + ((method-of-type (rtype-of a0-63) mem-usage) a0-63 usage flags) ) (set! sv-16 (+ sv-16 1)) ) ) (else - (set! (-> arg0 length) (max (-> arg0 length) (+ s3-0 1))) - (set! (-> arg0 data s3-0 name) s2-0) - (+! (-> arg0 data s3-0 count) 1) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) (let* ((a0-68 (the-as int s0-0)) (v1-96 ((method-of-type (rtype-of a0-68) asize-of) a0-68)) ) - (+! (-> arg0 data s3-0 used) v1-96) - (+! (-> arg0 data s3-0 total) (logand -16 (+ v1-96 15))) + (+! (-> usage data s3-0 used) v1-96) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-96 15))) ) ) ) diff --git a/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc b/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc index f780f844b4..cf786a7e32 100644 --- a/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc @@ -1838,11 +1838,11 @@ ;; definition for method 7 of type task-manager ;; WARN: Return type mismatch process vs task-manager. -(defmethod relocate ((this task-manager) (arg0 int)) +(defmethod relocate ((this task-manager) (offset int)) (if (nonzero? (-> this link)) - (+! (-> this link) arg0) + (+! (-> this link) offset) ) - (the-as task-manager ((method-of-type process relocate) this arg0)) + (the-as task-manager ((method-of-type process relocate) this offset)) ) ;; definition for function task-manager-init-by-other diff --git a/test/decompiler/reference/jak2/engine/gfx/background/tie/tie_REF.gc b/test/decompiler/reference/jak2/engine/gfx/background/tie/tie_REF.gc index fbfaa56a56..7ef10e354d 100644 --- a/test/decompiler/reference/jak2/engine/gfx/background/tie/tie_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/background/tie/tie_REF.gc @@ -86,30 +86,30 @@ ) ;; definition for method 8 of type drawable-tree-instance-tie -(defmethod mem-usage ((this drawable-tree-instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-tree-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) - (mem-usage (-> this prototypes prototype-array-tie) arg0 (logior arg1 1)) + (mem-usage (-> this prototypes prototype-array-tie) usage (logior flags 1)) this ) ;; definition for method 8 of type tie-fragment -(defmethod mem-usage ((this tie-fragment) (arg0 memory-usage-block) (arg1 int)) - (when (logtest? arg1 2) +(defmethod mem-usage ((this tie-fragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) (let ((v1-3 (* (-> this color-count) 4)) (a0-2 (cond - ((logtest? arg1 4) + ((logtest? flags 4) 20 ) - ((logtest? arg1 8) + ((logtest? flags 8) 21 ) (else @@ -118,54 +118,54 @@ ) ) ) - (+! (-> arg0 data a0-2 count) 1) - (+! (-> arg0 data a0-2 used) v1-3) - (+! (-> arg0 data a0-2 total) (logand -4 (+ v1-3 3))) + (+! (-> usage data a0-2 count) 1) + (+! (-> usage data a0-2 used) v1-3) + (+! (-> usage data a0-2 total) (logand -4 (+ v1-3 3))) ) - (set! (-> arg0 length) (max 23 (-> arg0 length))) + (set! (-> usage length) (max 23 (-> usage length))) (set! this this) (goto cfg-13) ) - (set! (-> arg0 length) (max 18 (-> arg0 length))) - (set! (-> arg0 data 9 name) "tie-fragment") - (set! (-> arg0 data 10 name) "tie-gif") - (set! (-> arg0 data 11 name) "tie-points") - (set! (-> arg0 data 12 name) "tie-colors") - (set! (-> arg0 data 14 name) "tie-debug") - (set! (-> arg0 data 13 name) "tie-draw-points") - (set! (-> arg0 data 17 name) "tie-generic") - (+! (-> arg0 data 9 count) 1) + (set! (-> usage length) (max 18 (-> usage length))) + (set! (-> usage data 9 name) "tie-fragment") + (set! (-> usage data 10 name) "tie-gif") + (set! (-> usage data 11 name) "tie-points") + (set! (-> usage data 12 name) "tie-colors") + (set! (-> usage data 14 name) "tie-debug") + (set! (-> usage data 13 name) "tie-draw-points") + (set! (-> usage data 17 name) "tie-generic") + (+! (-> usage data 9 count) 1) (let ((v1-21 (asize-of this))) - (+! (-> arg0 data 9 used) v1-21) - (+! (-> arg0 data 9 total) (logand -16 (+ v1-21 15))) + (+! (-> usage data 9 used) v1-21) + (+! (-> usage data 9 total) (logand -16 (+ v1-21 15))) ) (let ((v1-26 (* (-> this gif-count) 16))) - (+! (-> arg0 data 10 count) (-> this tex-count)) - (+! (-> arg0 data 10 used) v1-26) - (+! (-> arg0 data 10 total) (logand -16 (+ v1-26 15))) + (+! (-> usage data 10 count) (-> this tex-count)) + (+! (-> usage data 10 used) v1-26) + (+! (-> usage data 10 total) (logand -16 (+ v1-26 15))) ) (let ((v1-31 (* (-> this vertex-count) 16))) - (+! (-> arg0 data 11 count) (-> this vertex-count)) - (+! (-> arg0 data 11 used) v1-31) - (+! (-> arg0 data 11 total) (logand -16 (+ v1-31 15))) + (+! (-> usage data 11 count) (-> this vertex-count)) + (+! (-> usage data 11 used) v1-31) + (+! (-> usage data 11 total) (logand -16 (+ v1-31 15))) ) (let ((v1-36 (* (-> this dp-qwc) 16))) - (+! (-> arg0 data 13 count) (* (-> this dp-qwc) 16)) - (+! (-> arg0 data 13 used) v1-36) - (+! (-> arg0 data 13 total) (logand -16 (+ v1-36 15))) + (+! (-> usage data 13 count) (* (-> this dp-qwc) 16)) + (+! (-> usage data 13 used) v1-36) + (+! (-> usage data 13 total) (logand -16 (+ v1-36 15))) ) (let ((v1-41 (* (-> this generic-count) 16))) - (+! (-> arg0 data 17 count) 1) - (+! (-> arg0 data 17 used) v1-41) - (+! (-> arg0 data 17 total) (logand -16 (+ v1-41 15))) + (+! (-> usage data 17 count) 1) + (+! (-> usage data 17 used) v1-41) + (+! (-> usage data 17 total) (logand -16 (+ v1-41 15))) ) (let ((s4-0 (-> this debug debug-lines))) (when (nonzero? s4-0) (dotimes (s3-0 (-> s4-0 length)) - (+! (-> arg0 data 14 count) (-> s4-0 s3-0 length)) + (+! (-> usage data 14 count) (-> s4-0 s3-0 length)) (let ((v1-52 (asize-of (-> s4-0 s3-0)))) - (+! (-> arg0 data 12 used) v1-52) - (+! (-> arg0 data 12 total) (logand -16 (+ v1-52 15))) + (+! (-> usage data 12 used) v1-52) + (+! (-> usage data 12 total) (logand -16 (+ v1-52 15))) ) ) ) @@ -175,29 +175,29 @@ ) ;; definition for method 8 of type instance-tie -(defmethod mem-usage ((this instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 19 (-> arg0 length))) - (set! (-> arg0 data 18 name) "instance-tie") - (+! (-> arg0 data 18 count) 1) +(defmethod mem-usage ((this instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 19 (-> usage length))) + (set! (-> usage data 18 name) "instance-tie") + (+! (-> usage data 18 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 18 used) v1-6) - (+! (-> arg0 data 18 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 18 used) v1-6) + (+! (-> usage data 18 total) (logand -16 (+ v1-6 15))) ) (when (nonzero? (-> this color-indices)) - (set! (-> arg0 length) (max 24 (-> arg0 length))) - (set! (-> arg0 data 23 name) "instance-tie-colors*") - (set! (-> arg0 data 19 name) "instance-tie-colors0") - (set! (-> arg0 data 20 name) "instance-tie-colors1") - (set! (-> arg0 data 21 name) "instance-tie-colors2") - (set! (-> arg0 data 22 name) "instance-tie-colors3") - (+! (-> arg0 data 23 count) 1) + (set! (-> usage length) (max 24 (-> usage length))) + (set! (-> usage data 23 name) "instance-tie-colors*") + (set! (-> usage data 19 name) "instance-tie-colors0") + (set! (-> usage data 20 name) "instance-tie-colors1") + (set! (-> usage data 21 name) "instance-tie-colors2") + (set! (-> usage data 22 name) "instance-tie-colors3") + (+! (-> usage data 23 count) 1) (let ((s3-0 (-> this bucket-ptr))) - (+ (-> arg0 data 19 used) (-> arg0 data 20 used) (-> arg0 data 21 used) (-> arg0 data 22 used)) + (+ (-> usage data 19 used) (-> usage data 20 used) (-> usage data 21 used) (-> usage data 22 used)) (dotimes (s2-0 4) (let ((a0-10 (-> s3-0 tie-geom s2-0))) (when (nonzero? a0-10) (let ((t9-1 (method-of-object a0-10 mem-usage)) - (a1-2 arg0) + (a1-2 usage) (v1-29 s2-0) ) (t9-1 a0-10 a1-2 (logior (logior (cond @@ -216,7 +216,7 @@ ) 2 ) - arg1 + flags ) ) ) @@ -229,31 +229,31 @@ ) ;; definition for method 8 of type drawable-inline-array-instance-tie -(defmethod mem-usage ((this drawable-inline-array-instance-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) ;; definition for method 8 of type prototype-tie -(defmethod mem-usage ((this prototype-tie) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this prototype-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/lightning-h_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/lightning-h_REF.gc index 88e493aabb..829bb43d1c 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/lightning-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/lightning-h_REF.gc @@ -207,17 +207,17 @@ ) ;; definition for method 7 of type lightning-control -(defmethod relocate ((this lightning-control) (arg0 int)) - (&+! (-> this state line) arg0) - (&+! (-> this state meet) arg0) +(defmethod relocate ((this lightning-control) (offset int)) + (&+! (-> this state line) offset) + (&+! (-> this state meet) offset) (if (-> this state path) - (&+! (-> this state path) arg0) + (&+! (-> this state path) offset) ) (let ((v1-8 (-> this spec))) (if (and (>= (the-as int v1-8) (-> *kernel-context* relocating-min)) (< (the-as int v1-8) (-> *kernel-context* relocating-max)) ) - (&+! (-> this spec) arg0) + (&+! (-> this spec) offset) ) ) this diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc index 2eb2d5463e..57e45cc7a2 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc @@ -281,9 +281,9 @@ ) ;; definition for method 8 of type merc-ctrl -(defmethod mem-usage ((this merc-ctrl) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this merc-ctrl) (usage memory-usage-block) (flags int)) (if (-> this extra) - (mem-usage (-> this extra) arg0 arg1) + (mem-usage (-> this extra) usage flags) ) (let ((s4-0 (+ 32 128 (* (-> this header effect-count) 32)))) (dotimes (s3-0 (the-as int (-> this header effect-count))) @@ -300,11 +300,11 @@ ) ) ) - (set! (-> arg0 length) (max 79 (-> arg0 length))) - (set! (-> arg0 data 78 name) "merc-ctrl") - (+! (-> arg0 data 78 count) 1) - (+! (-> arg0 data 78 used) s4-0) - (+! (-> arg0 data 78 total) (logand -16 (+ s4-0 15))) + (set! (-> usage length) (max 79 (-> usage length))) + (set! (-> usage data 78 name) "merc-ctrl") + (+! (-> usage data 78 count) 1) + (+! (-> usage data 78 used) s4-0) + (+! (-> usage data 78 total) (logand -16 (+ s4-0 15))) ) (let ((v1-35 0)) (dotimes (a0-15 (the-as int (-> this header effect-count))) @@ -327,21 +327,21 @@ ) ) (when (nonzero? v1-35) - (set! (-> arg0 length) (max 81 (-> arg0 length))) - (set! (-> arg0 data 80 name) "blend-shape") - (+! (-> arg0 data 80 count) 1) - (+! (-> arg0 data 80 used) v1-35) - (+! (-> arg0 data 80 total) (logand -16 (+ v1-35 15))) + (set! (-> usage length) (max 81 (-> usage length))) + (set! (-> usage data 80 name) "blend-shape") + (+! (-> usage data 80 count) 1) + (+! (-> usage data 80 used) v1-35) + (+! (-> usage data 80 total) (logand -16 (+ v1-35 15))) ) ) (when (and (-> this header eye-ctrl) (nonzero? (-> this header eye-ctrl))) (let ((a0-29 (-> this header eye-ctrl))) - (set! (-> arg0 length) (max 112 (-> arg0 length))) - (set! (-> arg0 data 111 name) "eye-anim") - (+! (-> arg0 data 111 count) 1) + (set! (-> usage length) (max 112 (-> usage length))) + (set! (-> usage data 111 name) "eye-anim") + (+! (-> usage data 111 count) 1) (let ((v1-49 (asize-of a0-29))) - (+! (-> arg0 data 111 used) v1-49) - (+! (-> arg0 data 111 total) (logand -16 (+ v1-49 15))) + (+! (-> usage data 111 used) v1-49) + (+! (-> usage data 111 total) (logand -16 (+ v1-49 15))) ) ) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc index 3bdea8c802..97ec072b4d 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/shadow-cpu_REF.gc @@ -8,13 +8,13 @@ ) ;; definition for method 8 of type shadow-geo -(defmethod mem-usage ((this shadow-geo) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 111 (-> arg0 length))) - (set! (-> arg0 data 110 name) "shadow-geo") - (+! (-> arg0 data 110 count) 1) +(defmethod mem-usage ((this shadow-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 111 (-> usage length))) + (set! (-> usage data 110 name) "shadow-geo") + (+! (-> usage data 110 count) 1) (let ((v1-6 (* (-> this total-qwc) 16))) - (+! (-> arg0 data 110 used) v1-6) - (+! (-> arg0 data 110 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 110 used) v1-6) + (+! (-> usage data 110 total) (logand -16 (+ v1-6 15))) ) this ) diff --git a/test/decompiler/reference/jak2/engine/gfx/shrub/shrubbery_REF.gc b/test/decompiler/reference/jak2/engine/gfx/shrub/shrubbery_REF.gc index ad1904c030..da37740759 100644 --- a/test/decompiler/reference/jak2/engine/gfx/shrub/shrubbery_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/shrub/shrubbery_REF.gc @@ -8,13 +8,13 @@ ) ;; definition for method 8 of type billboard -(defmethod mem-usage ((this billboard) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 34 (-> arg0 length))) - (set! (-> arg0 data 33 name) "billboard") - (+! (-> arg0 data 33 count) 1) +(defmethod mem-usage ((this billboard) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 34 (-> usage length))) + (set! (-> usage data 33 name) "billboard") + (+! (-> usage data 33 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 33 used) v1-6) - (+! (-> arg0 data 33 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 33 used) v1-6) + (+! (-> usage data 33 total) (logand -16 (+ v1-6 15))) ) this ) @@ -53,30 +53,30 @@ ) ;; definition for method 8 of type drawable-tree-instance-shrub -(defmethod mem-usage ((this drawable-tree-instance-shrub) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-tree-instance-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (when (nonzero? (-> this colors-added)) - (set! (-> arg0 length) (max 33 (-> arg0 length))) - (set! (-> arg0 data 32 name) "shrubbery-pal") - (+! (-> arg0 data 32 count) 1) + (set! (-> usage length) (max 33 (-> usage length))) + (set! (-> usage data 32 name) "shrubbery-pal") + (+! (-> usage data 32 count) 1) (let ((v1-19 (asize-of (-> this colors-added)))) - (+! (-> arg0 data 32 used) v1-19) - (+! (-> arg0 data 32 total) (logand -16 (+ v1-19 15))) + (+! (-> usage data 32 used) v1-19) + (+! (-> usage data 32 total) (logand -16 (+ v1-19 15))) ) ) (mem-usage-shrub-walk (the-as draw-node (&+ (-> this data 0) 32)) (-> (the-as drawable-group (-> this data 0)) length) - arg0 - arg1 + usage + flags ) - (mem-usage (-> this info prototype-inline-array-shrub) arg0 (logior arg1 1)) + (mem-usage (-> this info prototype-inline-array-shrub) usage (logior flags 1)) this ) @@ -91,19 +91,19 @@ ) ;; definition for method 8 of type generic-shrub-fragment -(defmethod mem-usage ((this generic-shrub-fragment) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 27 (-> arg0 length))) - (set! (-> arg0 data 25 name) "generic-shrub") - (+! (-> arg0 data 25 count) 1) +(defmethod mem-usage ((this generic-shrub-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 27 (-> usage length))) + (set! (-> usage data 25 name) "generic-shrub") + (+! (-> usage data 25 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 25 used) v1-6) - (+! (-> arg0 data 25 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 25 used) v1-6) + (+! (-> usage data 25 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 data 26 name) "generic-shrub-data") - (+! (-> arg0 data 26 count) 1) + (set! (-> usage data 26 name) "generic-shrub-data") + (+! (-> usage data 26 count) 1) (let ((v1-17 (* (+ (-> this cnt-qwc) (-> this vtx-qwc) (-> this col-qwc) (-> this stq-qwc)) 16))) - (+! (-> arg0 data 26 used) v1-17) - (+! (-> arg0 data 26 total) (logand -16 (+ v1-17 15))) + (+! (-> usage data 26 used) v1-17) + (+! (-> usage data 26 total) (logand -16 (+ v1-17 15))) ) this ) @@ -120,16 +120,16 @@ ) ;; definition for method 8 of type prototype-shrubbery -(defmethod mem-usage ((this prototype-shrubbery) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this prototype-shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) this ) @@ -183,41 +183,41 @@ ) ;; definition for method 8 of type shrubbery -(defmethod mem-usage ((this shrubbery) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 28 (-> arg0 length))) - (set! (-> arg0 data 27 name) "shrubbery") - (+! (-> arg0 data 27 count) 1) +(defmethod mem-usage ((this shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 28 (-> usage length))) + (set! (-> usage data 27 name) "shrubbery") + (+! (-> usage data 27 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 27 used) v1-6) - (+! (-> arg0 data 27 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 27 used) v1-6) + (+! (-> usage data 27 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 30 (-> arg0 length))) - (set! (-> arg0 data 29 name) "shrubbery-vertex") - (+! (-> arg0 data 29 count) 1) + (set! (-> usage length) (max 30 (-> usage length))) + (set! (-> usage data 29 name) "shrubbery-vertex") + (+! (-> usage data 29 count) 1) (let ((v1-16 (* (-> this vtx-qwc) 16))) - (+! (-> arg0 data 29 used) v1-16) - (+! (-> arg0 data 29 total) (logand -16 (+ v1-16 15))) + (+! (-> usage data 29 used) v1-16) + (+! (-> usage data 29 total) (logand -16 (+ v1-16 15))) ) - (set! (-> arg0 length) (max 31 (-> arg0 length))) - (set! (-> arg0 data 30 name) "shrubbery-color") - (+! (-> arg0 data 30 count) 1) + (set! (-> usage length) (max 31 (-> usage length))) + (set! (-> usage data 30 name) "shrubbery-color") + (+! (-> usage data 30 count) 1) (let ((v1-26 (* (-> this col-qwc) 16))) - (+! (-> arg0 data 30 used) v1-26) - (+! (-> arg0 data 30 total) (logand -16 (+ v1-26 15))) + (+! (-> usage data 30 used) v1-26) + (+! (-> usage data 30 total) (logand -16 (+ v1-26 15))) ) - (set! (-> arg0 length) (max 29 (-> arg0 length))) - (set! (-> arg0 data 28 name) "shrubbery-object") - (+! (-> arg0 data 28 count) 1) + (set! (-> usage length) (max 29 (-> usage length))) + (set! (-> usage data 28 name) "shrubbery-object") + (+! (-> usage data 28 count) 1) (let ((v1-36 (* (-> this obj-qwc) 16))) - (+! (-> arg0 data 28 used) v1-36) - (+! (-> arg0 data 28 total) (logand -16 (+ v1-36 15))) + (+! (-> usage data 28 used) v1-36) + (+! (-> usage data 28 total) (logand -16 (+ v1-36 15))) ) - (set! (-> arg0 length) (max 32 (-> arg0 length))) - (set! (-> arg0 data 31 name) "shrubbery-stq") - (+! (-> arg0 data 31 count) 1) + (set! (-> usage length) (max 32 (-> usage length))) + (set! (-> usage data 31 name) "shrubbery-stq") + (+! (-> usage data 31 count) 1) (let ((v1-46 (* (-> this stq-qwc) 16))) - (+! (-> arg0 data 31 used) v1-46) - (+! (-> arg0 data 31 total) (logand -16 (+ v1-46 15))) + (+! (-> usage data 31 used) v1-46) + (+! (-> usage data 31 total) (logand -16 (+ v1-46 15))) ) this ) diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc index 7f6b81cac9..331421858f 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc @@ -27,18 +27,18 @@ ) ;; definition for method 8 of type texture-page -(defmethod mem-usage ((this texture-page) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 83 (-> arg0 length))) - (set! (-> arg0 data 82 name) "texture") - (+! (-> arg0 data 82 count) (-> this length)) +(defmethod mem-usage ((this texture-page) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 83 (-> usage length))) + (set! (-> usage data 82 name) "texture") + (+! (-> usage data 82 count) (-> this length)) (let ((v1-7 (+ (asize-of this) (* (-> this dram-size) 4)))) (dotimes (a0-6 (-> this length)) (if (-> this data a0-6) (+! v1-7 112) ) ) - (+! (-> arg0 data 82 used) v1-7) - (+! (-> arg0 data 82 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 82 used) v1-7) + (+! (-> usage data 82 total) (logand -16 (+ v1-7 15))) ) this ) @@ -1649,7 +1649,7 @@ ;; definition for method 7 of type texture-page-dir ;; WARN: Return type mismatch texture-page-dir vs none. -(defmethod relocate ((this texture-page-dir) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this texture-page-dir) (heap kheap) (name (pointer uint8))) (set! *texture-page-dir* this) (none) ) diff --git a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc index c791faff79..f8b0978599 100644 --- a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc @@ -27,78 +27,78 @@ ) ;; definition for method 8 of type bsp-header -(defmethod mem-usage ((this bsp-header) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 work-bsp) this) +(defmethod mem-usage ((this bsp-header) (usage memory-usage-block) (flags int)) + (set! (-> usage work-bsp) this) (when (nonzero? (-> this info)) - (set! (-> arg0 length) (max 85 (-> arg0 length))) - (set! (-> arg0 data 84 name) "array") - (+! (-> arg0 data 84 count) 1) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "array") + (+! (-> usage data 84 count) 1) (let ((v1-8 (asize-of (-> this info)))) - (+! (-> arg0 data 84 used) v1-8) - (+! (-> arg0 data 84 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 84 used) v1-8) + (+! (-> usage data 84 total) (logand -16 (+ v1-8 15))) ) ) (if (nonzero? (-> this drawable-trees)) - (mem-usage (-> this drawable-trees) arg0 arg1) + (mem-usage (-> this drawable-trees) usage flags) ) (if (nonzero? (-> this collide-hash)) - (mem-usage (-> this collide-hash) arg0 arg1) + (mem-usage (-> this collide-hash) usage flags) ) - (set! (-> arg0 length) (max 65 (-> arg0 length))) - (set! (-> arg0 data 43 name) "entity") - (set! (-> arg0 data 44 name) "camera") - (set! (-> arg0 data 64 name) "pat") - (set! (-> arg0 data 60 name) "bsp-node") - (set! (-> arg0 length) (max 59 (-> arg0 length))) - (set! (-> arg0 data 58 name) "bsp-main") - (+! (-> arg0 data 58 count) 1) + (set! (-> usage length) (max 65 (-> usage length))) + (set! (-> usage data 43 name) "entity") + (set! (-> usage data 44 name) "camera") + (set! (-> usage data 64 name) "pat") + (set! (-> usage data 60 name) "bsp-node") + (set! (-> usage length) (max 59 (-> usage length))) + (set! (-> usage data 58 name) "bsp-main") + (+! (-> usage data 58 count) 1) (let ((v1-31 400)) - (+! (-> arg0 data 58 used) v1-31) - (+! (-> arg0 data 58 total) (logand -16 (+ v1-31 15))) + (+! (-> usage data 58 used) v1-31) + (+! (-> usage data 58 total) (logand -16 (+ v1-31 15))) ) - (set! (-> arg0 length) (max 62 (-> arg0 length))) - (set! (-> arg0 data 61 name) "bsp-leaf-vis-self") - (+! (-> arg0 data 61 count) 1) + (set! (-> usage length) (max 62 (-> usage length))) + (set! (-> usage data 61 name) "bsp-leaf-vis-self") + (+! (-> usage data 61 count) 1) (let ((v1-40 (-> this visible-list-length))) - (+! (-> arg0 data 61 used) v1-40) - (+! (-> arg0 data 61 total) (logand -16 (+ v1-40 15))) + (+! (-> usage data 61 used) v1-40) + (+! (-> usage data 61 total) (logand -16 (+ v1-40 15))) ) - (set! (-> arg0 length) (max 60 (-> arg0 length))) - (set! (-> arg0 data 59 name) "bsp-misc") - (+! (-> arg0 data 59 count) 1) + (set! (-> usage length) (max 60 (-> usage length))) + (set! (-> usage data 59 name) "bsp-misc") + (+! (-> usage data 59 count) 1) (let ((v1-50 (* (-> this texture-remap-table-len) 8))) - (+! (-> arg0 data 59 used) v1-50) - (+! (-> arg0 data 59 total) (logand -16 (+ v1-50 15))) + (+! (-> usage data 59 used) v1-50) + (+! (-> usage data 59 total) (logand -16 (+ v1-50 15))) ) - (set! (-> arg0 length) (max 60 (-> arg0 length))) - (set! (-> arg0 data 59 name) "bsp-misc") - (+! (-> arg0 data 59 count) 1) + (set! (-> usage length) (max 60 (-> usage length))) + (set! (-> usage data 59 name) "bsp-misc") + (+! (-> usage data 59 count) 1) (let ((v1-60 (* (-> this texture-page-count) 4))) - (+! (-> arg0 data 59 used) v1-60) - (+! (-> arg0 data 59 total) (logand -16 (+ v1-60 15))) + (+! (-> usage data 59 used) v1-60) + (+! (-> usage data 59 total) (logand -16 (+ v1-60 15))) ) (when (nonzero? (-> this unknown-basic)) - (set! (-> arg0 length) (max 60 (-> arg0 length))) - (set! (-> arg0 data 59 name) "bsp-misc") - (+! (-> arg0 data 59 count) 1) + (set! (-> usage length) (max 60 (-> usage length))) + (set! (-> usage data 59 name) "bsp-misc") + (+! (-> usage data 59 count) 1) (let ((v1-72 (asize-of (-> this unknown-basic)))) - (+! (-> arg0 data 59 used) v1-72) - (+! (-> arg0 data 59 total) (logand -16 (+ v1-72 15))) + (+! (-> usage data 59 used) v1-72) + (+! (-> usage data 59 total) (logand -16 (+ v1-72 15))) ) ) (when (nonzero? (-> this actor-birth-order)) - (set! (-> arg0 length) (max 60 (-> arg0 length))) - (set! (-> arg0 data 59 name) "bsp-misc") - (+! (-> arg0 data 59 count) 1) + (set! (-> usage length) (max 60 (-> usage length))) + (set! (-> usage data 59 name) "bsp-misc") + (+! (-> usage data 59 count) 1) (let ((v1-85 (* (-> this actors length) 4))) - (+! (-> arg0 data 59 used) v1-85) - (+! (-> arg0 data 59 total) (logand -16 (+ v1-85 15))) + (+! (-> usage data 59 used) v1-85) + (+! (-> usage data 59 total) (logand -16 (+ v1-85 15))) ) ) - (+! (-> arg0 data 64 count) (-> this pat-length)) + (+! (-> usage data 64 count) (-> this pat-length)) (let ((v1-92 (* (-> this pat-length) 4))) - (+! (-> arg0 data 64 used) v1-92) - (+! (-> arg0 data 64 total) (logand -16 (+ v1-92 15))) + (+! (-> usage data 64 used) v1-92) + (+! (-> usage data 64 total) (logand -16 (+ v1-92 15))) ) (when (nonzero? (-> this region-trees)) (let* ((s3-0 (-> this region-trees length)) @@ -106,7 +106,7 @@ (a0-39 (-> this region-trees s2-0)) ) (while (< s2-0 s3-0) - (mem-usage a0-39 arg0 (logior arg1 128)) + (mem-usage a0-39 usage (logior flags 128)) (+! s2-0 1) (set! a0-39 (-> this region-trees s2-0)) ) @@ -115,12 +115,12 @@ (let ((s3-1 (-> this cameras))) (when (nonzero? s3-1) (dotimes (s2-1 (-> s3-1 length)) - (mem-usage (-> s3-1 s2-1) arg0 (logior arg1 256)) + (mem-usage (-> s3-1 s2-1) usage (logior flags 256)) ) ) ) (if (nonzero? (-> this nodes)) - (mem-usage-bsp-tree this (-> this nodes 0) arg0 arg1) + (mem-usage-bsp-tree this (-> this nodes 0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/level/level_REF.gc b/test/decompiler/reference/jak2/engine/level/level_REF.gc index edc54a1f38..653d722a9f 100644 --- a/test/decompiler/reference/jak2/engine/level/level_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/level_REF.gc @@ -114,7 +114,7 @@ ) ;; definition for method 7 of type bsp-header -(defmethod relocate ((this bsp-header) (arg0 int)) +(defmethod relocate ((this bsp-header) (offset int)) (let ((s5-0 (-> *level* loading-level))) (when s5-0 (cond @@ -1420,56 +1420,56 @@ ) ;; definition for method 8 of type level -(defmethod mem-usage ((this level) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this level) (usage memory-usage-block) (flags int)) (when (= (-> this status) 'active) - (set! (-> arg0 length) (max 67 (-> arg0 length))) - (set! (-> arg0 data 66 name) "entity-links") - (+! (-> arg0 data 66 count) (-> this entity length)) + (set! (-> usage length) (max 67 (-> usage length))) + (set! (-> usage data 66 name) "entity-links") + (+! (-> usage data 66 count) (-> this entity length)) (let ((v1-8 (asize-of (-> this entity)))) - (+! (-> arg0 data 66 used) v1-8) - (+! (-> arg0 data 66 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 66 used) v1-8) + (+! (-> usage data 66 total) (logand -16 (+ v1-8 15))) ) - (mem-usage (-> this art-group) arg0 arg1) - (set! (-> arg0 length) (max 66 (-> arg0 length))) - (set! (-> arg0 data 65 name) "level-code") - (+! (-> arg0 data 65 count) 1) + (mem-usage (-> this art-group) usage flags) + (set! (-> usage length) (max 66 (-> usage length))) + (set! (-> usage data 65 name) "level-code") + (+! (-> usage data 65 count) 1) (let ((v1-20 (&- (-> this code-memory-end) (the-as uint (-> this code-memory-start))))) - (+! (-> arg0 data 65 used) v1-20) - (+! (-> arg0 data 65 total) (logand -16 (+ v1-20 15))) + (+! (-> usage data 65 used) v1-20) + (+! (-> usage data 65 total) (logand -16 (+ v1-20 15))) ) (countdown (s3-0 (-> this loaded-texture-page-count)) - (mem-usage (-> this loaded-texture-page s3-0) arg0 arg1) + (mem-usage (-> this loaded-texture-page s3-0) usage flags) ) (countdown (s3-1 (-> this loaded-text-info-count)) - (mem-usage (-> this loaded-text-info s3-1) arg0 arg1) + (mem-usage (-> this loaded-text-info s3-1) usage flags) ) (countdown (s3-2 8) (let ((s2-0 (-> this vis-info s3-2))) (when s2-0 (cond ((zero? s3-2) - (set! (-> arg0 length) (max 62 (-> arg0 length))) - (set! (-> arg0 data 61 name) "bsp-leaf-vis-self") - (+! (-> arg0 data 61 count) 1) + (set! (-> usage length) (max 62 (-> usage length))) + (set! (-> usage data 61 name) "bsp-leaf-vis-self") + (+! (-> usage data 61 count) 1) (let ((v1-47 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) - (+! (-> arg0 data 61 used) v1-47) - (+! (-> arg0 data 61 total) (logand -16 (+ v1-47 15))) + (+! (-> usage data 61 used) v1-47) + (+! (-> usage data 61 total) (logand -16 (+ v1-47 15))) ) ) (else - (set! (-> arg0 length) (max 63 (-> arg0 length))) - (set! (-> arg0 data 62 name) "bsp-leaf-vis-adj") - (+! (-> arg0 data 62 count) 1) + (set! (-> usage length) (max 63 (-> usage length))) + (set! (-> usage data 62 name) "bsp-leaf-vis-adj") + (+! (-> usage data 62 count) 1) (let ((v1-58 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) - (+! (-> arg0 data 62 used) v1-58) - (+! (-> arg0 data 62 total) (logand -16 (+ v1-58 15))) + (+! (-> usage data 62 used) v1-58) + (+! (-> usage data 62 total) (logand -16 (+ v1-58 15))) ) ) ) ) ) ) - (mem-usage (-> this bsp) arg0 arg1) + (mem-usage (-> this bsp) usage flags) ) this ) @@ -1672,9 +1672,9 @@ ) ;; definition for method 8 of type level-group -(defmethod mem-usage ((this level-group) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this level-group) (usage memory-usage-block) (flags int)) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this level s3-0) arg0 arg1) + (mem-usage (-> this level s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/level/region_REF.gc b/test/decompiler/reference/jak2/engine/level/region_REF.gc index 3cf1a0e607..dfeaf248ed 100644 --- a/test/decompiler/reference/jak2/engine/level/region_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/region_REF.gc @@ -3,30 +3,30 @@ ;; definition for method 8 of type drawable-region-prim ;; WARN: Return type mismatch int vs drawable-region-prim. -(defmethod mem-usage ((this drawable-region-prim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 50 (-> arg0 length))) - (set! (-> arg0 data 49 name) "region") - (+! (-> arg0 data 49 count) 1) +(defmethod mem-usage ((this drawable-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 50 (-> usage length))) + (set! (-> usage data 49 name) "region") + (+! (-> usage data 49 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 49 used) v1-6) - (+! (-> arg0 data 49 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 49 used) v1-6) + (+! (-> usage data 49 total) (logand -16 (+ v1-6 15))) ) - (mem-usage (-> this region) arg0 (logior arg1 128)) + (mem-usage (-> this region) usage (logior flags 128)) (the-as drawable-region-prim 0) ) ;; definition for method 8 of type drawable-inline-array-region-prim ;; WARN: Return type mismatch int vs drawable-inline-array-region-prim. -(defmethod mem-usage ((this drawable-inline-array-region-prim) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 1 (-> arg0 length))) - (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) - (+! (-> arg0 data 0 count) 1) +(defmethod mem-usage ((this drawable-inline-array-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) (symbol->string 'drawable-group)) + (+! (-> usage data 0 count) 1) (let ((v1-7 32)) - (+! (-> arg0 data 0 used) v1-7) - (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 0 used) v1-7) + (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this data s3-0) arg0 arg1) + (mem-usage (-> this data s3-0) usage flags) ) (the-as drawable-inline-array-region-prim 0) ) diff --git a/test/decompiler/reference/jak2/engine/load/loader_REF.gc b/test/decompiler/reference/jak2/engine/load/loader_REF.gc index b7e800207b..bad6b360a4 100644 --- a/test/decompiler/reference/jak2/engine/load/loader_REF.gc +++ b/test/decompiler/reference/jak2/engine/load/loader_REF.gc @@ -2,13 +2,13 @@ (in-package goal) ;; definition for method 8 of type subtitle-range -(defmethod mem-usage ((this subtitle-range) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 73 (-> arg0 length))) - (set! (-> arg0 data 72 name) "subtitle") - (+! (-> arg0 data 72 count) 1) +(defmethod mem-usage ((this subtitle-range) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 73 (-> usage length))) + (set! (-> usage data 72 name) "subtitle") + (+! (-> usage data 72 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 72 used) v1-6) - (+! (-> arg0 data 72 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 72 used) v1-6) + (+! (-> usage data 72 total) (logand -16 (+ v1-6 15))) ) this ) @@ -39,30 +39,30 @@ ;; definition for method 8 of type load-dir ;; WARN: Return type mismatch symbol vs load-dir. -(defmethod mem-usage ((this load-dir) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 85 (-> arg0 length))) - (set! (-> arg0 data 84 name) "array") - (+! (-> arg0 data 84 count) 1) +(defmethod mem-usage ((this load-dir) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "array") + (+! (-> usage data 84 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 84 used) v1-6) - (+! (-> arg0 data 84 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 84 used) v1-6) + (+! (-> usage data 84 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 85 (-> arg0 length))) - (set! (-> arg0 data 84 name) "array") - (set! (-> arg0 data 84 count) (-> arg0 data 84 count)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "array") + (set! (-> usage data 84 count) (-> usage data 84 count)) (let ((v1-15 (asize-of (-> this string-array)))) - (+! (-> arg0 data 84 used) v1-15) - (+! (-> arg0 data 84 total) (logand -16 (+ v1-15 15))) + (+! (-> usage data 84 used) v1-15) + (+! (-> usage data 84 total) (logand -16 (+ v1-15 15))) ) - (set! (-> arg0 length) (max 85 (-> arg0 length))) - (set! (-> arg0 data 84 name) "array") - (set! (-> arg0 data 84 count) (-> arg0 data 84 count)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "array") + (set! (-> usage data 84 count) (-> usage data 84 count)) (let ((v1-24 (asize-of (-> this data-array)))) - (+! (-> arg0 data 84 used) v1-24) - (+! (-> arg0 data 84 total) (logand -16 (+ v1-24 15))) + (+! (-> usage data 84 used) v1-24) + (+! (-> usage data 84 total) (logand -16 (+ v1-24 15))) ) (dotimes (s3-0 (-> this data-array length)) - (mem-usage (-> this data-array s3-0) arg0 arg1) + (mem-usage (-> this data-array s3-0) usage flags) ) (the-as load-dir #f) ) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc index 9fb5475eef..e273fffe43 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc @@ -27,9 +27,9 @@ ) ;; definition for method 7 of type nav-control -(defmethod relocate ((this nav-control) (arg0 int)) - (&+! (-> this process) arg0) - (&+! (-> this shape) arg0) +(defmethod relocate ((this nav-control) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this shape) offset) this ) @@ -2141,9 +2141,9 @@ Note that this doesn't actually return the nav-control, but instead adds this pr ) ;; definition for method 7 of type nav-state -(defmethod relocate ((this nav-state) (arg0 int)) +(defmethod relocate ((this nav-state) (offset int)) (break!) - (&+! (-> this nav) arg0) + (&+! (-> this nav) offset) this ) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc index 6f66c34cc2..04517aab25 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc @@ -2570,29 +2570,29 @@ ;; definition for method 8 of type nav-mesh ;; WARN: Return type mismatch int vs nav-mesh. -(defmethod mem-usage ((this nav-mesh) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) +(defmethod mem-usage ((this nav-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 45 used) v1-6) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 45 used) v1-6) + (+! (-> usage data 45 total) (logand -16 (+ v1-6 15))) ) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let ((v1-16 (* (-> this poly-count) 64))) - (+! (-> arg0 data 45 used) v1-16) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-16 15))) + (+! (-> usage data 45 used) v1-16) + (+! (-> usage data 45 total) (logand -16 (+ v1-16 15))) ) - (set! (-> arg0 length) (max 46 (-> arg0 length))) - (set! (-> arg0 data 45 name) "nav-mesh") - (+! (-> arg0 data 45 count) 1) + (set! (-> usage length) (max 46 (-> usage length))) + (set! (-> usage data 45 name) "nav-mesh") + (+! (-> usage data 45 count) 1) (let* ((v1-25 (-> this poly-count)) (v1-27 (shr (* v1-25 v1-25) 2)) ) - (+! (-> arg0 data 45 used) v1-27) - (+! (-> arg0 data 45 total) (logand -16 (+ v1-27 15))) + (+! (-> usage data 45 used) v1-27) + (+! (-> usage data 45 total) (logand -16 (+ v1-27 15))) ) (the-as nav-mesh 0) ) diff --git a/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc b/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc index d27edb27f6..fbcd892af7 100644 --- a/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc @@ -356,10 +356,10 @@ ) ;; definition for method 7 of type chain-physics -(defmethod relocate ((this chain-physics) (arg0 int)) +(defmethod relocate ((this chain-physics) (offset int)) (dotimes (v1-0 (the-as int (-> this num-joints))) (if (nonzero? (-> this chain-joints v1-0 joint-mod)) - (&+! (-> this chain-joints v1-0 joint-mod) arg0) + (&+! (-> this chain-joints v1-0 joint-mod) offset) ) ) this diff --git a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc index 84ad827d11..ae763cfa79 100644 --- a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc @@ -33,8 +33,8 @@ ) ;; definition for method 7 of type rigid-body-control -(defmethod relocate ((this rigid-body-control) (arg0 int)) - (&+! (-> this process) arg0) +(defmethod relocate ((this rigid-body-control) (offset int)) + (&+! (-> this process) offset) this ) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc index 7c89bdd409..024ab6c006 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc @@ -3,11 +3,11 @@ ;; definition for method 7 of type process-taskable ;; WARN: Return type mismatch process-focusable vs process-taskable. -(defmethod relocate ((this process-taskable) (arg0 int)) +(defmethod relocate ((this process-taskable) (offset int)) (if (nonzero? (-> this task)) - (&+! (-> this task) arg0) + (&+! (-> this task) offset) ) - (the-as process-taskable ((method-of-type process-focusable relocate) this arg0)) + (the-as process-taskable ((method-of-type process-focusable relocate) this offset)) ) ;; definition for function process-taskable-anim-loop diff --git a/test/decompiler/reference/jak2/engine/scene/scene_REF.gc b/test/decompiler/reference/jak2/engine/scene/scene_REF.gc index 8e7cac5aed..039cf5cc52 100644 --- a/test/decompiler/reference/jak2/engine/scene/scene_REF.gc +++ b/test/decompiler/reference/jak2/engine/scene/scene_REF.gc @@ -380,23 +380,23 @@ ;; definition for method 7 of type scene-player ;; WARN: Return type mismatch process-drawable vs scene-player. -(defmethod relocate ((this scene-player) (arg0 int)) +(defmethod relocate ((this scene-player) (offset int)) (let ((v1-0 *kernel-context*)) (set! (-> v1-0 relocating-process) this) (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) (set! (-> v1-0 relocating-max) (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) ) - (set! (-> v1-0 relocating-offset) arg0) + (set! (-> v1-0 relocating-offset) offset) ) (let ((v1-2 (-> this scene-list))) (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) (< (the-as int v1-2) (-> *kernel-context* relocating-max)) ) - (&+! (-> this scene-list) arg0) + (&+! (-> this scene-list) offset) ) ) - (the-as scene-player ((method-of-type process-drawable relocate) this arg0)) + (the-as scene-player ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 25 of type scene-player diff --git a/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc b/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc index a8cad4d149..3a343b92bb 100644 --- a/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc +++ b/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc @@ -614,13 +614,13 @@ ;; definition for method 8 of type collide-hash ;; INFO: Used lq/sq -(defmethod mem-usage ((this collide-hash) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 51 (-> arg0 length))) - (set! (-> arg0 data 50 name) (symbol->string 'collision)) - (+! (-> arg0 data 50 count) 1) +(defmethod mem-usage ((this collide-hash) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 51 (-> usage length))) + (set! (-> usage data 50 name) (symbol->string 'collision)) + (+! (-> usage data 50 count) 1) (let ((v1-10 (+ (* (-> this num-items) 8) 96 (* (-> this num-buckets) 4)))) - (+! (-> arg0 data 50 used) v1-10) - (+! (-> arg0 data 50 total) (logand -16 (+ v1-10 15))) + (+! (-> usage data 50 used) v1-10) + (+! (-> usage data 50 total) (logand -16 (+ v1-10 15))) ) (dotimes (v1-14 (the-as int (-> this qwc-id-bits))) (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits v1-14) (the-as uint128 0)) @@ -632,7 +632,7 @@ (when (not (logtest? (-> (the-as collide-hash-scratch #x70000000) id-bits v1-19) (ash 1 (logand a0-12 31)))) (logior! (-> (the-as collide-hash-scratch #x70000000) id-bits v1-19) (ash 1 (logand a0-12 31))) (if (= (-> this item-array s3-0 collidable type) collide-hash-fragment) - (mem-usage (-> this item-array s3-0 collidable) arg0 arg1) + (mem-usage (-> this item-array s3-0 collidable) usage flags) ) ) ) @@ -641,46 +641,46 @@ ) ;; definition for method 8 of type collide-hash-fragment -(defmethod mem-usage ((this collide-hash-fragment) (arg0 memory-usage-block) (arg1 int)) +(defmethod mem-usage ((this collide-hash-fragment) (usage memory-usage-block) (flags int)) (cond - ((logtest? arg1 1) - (set! (-> arg0 length) (max 58 (-> arg0 length))) - (set! (-> arg0 data 55 name) (symbol->string 'prototype-fragment)) - (+! (-> arg0 data 55 count) 1) - (set! (-> arg0 data 56 name) (symbol->string 'prototype-poly)) - (+! (-> arg0 data 56 count) (-> this stats num-polys)) - (set! (-> arg0 data 57 name) (symbol->string 'prototype-vertex)) - (+! (-> arg0 data 57 count) (-> this stats num-verts)) + ((logtest? flags 1) + (set! (-> usage length) (max 58 (-> usage length))) + (set! (-> usage data 55 name) (symbol->string 'prototype-fragment)) + (+! (-> usage data 55 count) 1) + (set! (-> usage data 56 name) (symbol->string 'prototype-poly)) + (+! (-> usage data 56 count) (-> this stats num-polys)) + (set! (-> usage data 57 name) (symbol->string 'prototype-vertex)) + (+! (-> usage data 57 count) (-> this stats num-verts)) (let ((a3-0 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) (a2-9 (* (-> this stats num-polys) 4)) (v1-22 (* (the-as uint 6) (-> this stats num-verts))) ) - (+! (-> arg0 data 55 used) a3-0) - (+! (-> arg0 data 55 total) (- (logand -16 (+ v1-22 15 a2-9 a3-0)) (the-as int (+ a2-9 v1-22)))) - (+! (-> arg0 data 56 used) a2-9) - (+! (-> arg0 data 56 total) a2-9) - (+! (-> arg0 data 57 used) v1-22) - (+! (-> arg0 data 57 total) v1-22) + (+! (-> usage data 55 used) a3-0) + (+! (-> usage data 55 total) (- (logand -16 (+ v1-22 15 a2-9 a3-0)) (the-as int (+ a2-9 v1-22)))) + (+! (-> usage data 56 used) a2-9) + (+! (-> usage data 56 total) a2-9) + (+! (-> usage data 57 used) v1-22) + (+! (-> usage data 57 total) v1-22) ) ) (else - (set! (-> arg0 length) (max 54 (-> arg0 length))) - (set! (-> arg0 data 51 name) (symbol->string 'collision-fragment)) - (+! (-> arg0 data 51 count) 1) - (set! (-> arg0 data 52 name) (symbol->string 'collision-poly)) - (+! (-> arg0 data 52 count) (-> this stats num-polys)) - (set! (-> arg0 data 53 name) (symbol->string 'collision-vertex)) - (+! (-> arg0 data 53 count) (-> this stats num-verts)) + (set! (-> usage length) (max 54 (-> usage length))) + (set! (-> usage data 51 name) (symbol->string 'collision-fragment)) + (+! (-> usage data 51 count) 1) + (set! (-> usage data 52 name) (symbol->string 'collision-poly)) + (+! (-> usage data 52 count) (-> this stats num-polys)) + (set! (-> usage data 53 name) (symbol->string 'collision-vertex)) + (+! (-> usage data 53 count) (-> this stats num-verts)) (let ((a3-8 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) (a2-22 (* (-> this stats num-polys) 4)) (v1-45 (* (the-as uint 6) (-> this stats num-verts))) ) - (+! (-> arg0 data 51 used) a3-8) - (+! (-> arg0 data 51 total) (- (logand -16 (+ v1-45 15 a2-22 a3-8)) (the-as int (+ a2-22 v1-45)))) - (+! (-> arg0 data 52 used) a2-22) - (+! (-> arg0 data 52 total) a2-22) - (+! (-> arg0 data 53 used) v1-45) - (+! (-> arg0 data 53 total) v1-45) + (+! (-> usage data 51 used) a3-8) + (+! (-> usage data 51 total) (- (logand -16 (+ v1-45 15 a2-22 a3-8)) (the-as int (+ a2-22 v1-45)))) + (+! (-> usage data 52 used) a2-22) + (+! (-> usage data 52 total) a2-22) + (+! (-> usage data 53 used) v1-45) + (+! (-> usage data 53 total) v1-45) ) ) ) @@ -688,16 +688,16 @@ ) ;; definition for method 8 of type collide-hash-fragment-array -(defmethod mem-usage ((this collide-hash-fragment-array) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 55 (-> arg0 length))) - (set! (-> arg0 data 54 name) (symbol->string 'prototype-collision)) - (+! (-> arg0 data 54 count) 1) +(defmethod mem-usage ((this collide-hash-fragment-array) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 55 (-> usage length))) + (set! (-> usage data 54 name) (symbol->string 'prototype-collision)) + (+! (-> usage data 54 count) 1) (let ((v1-8 (asize-of this))) - (+! (-> arg0 data 54 used) v1-8) - (+! (-> arg0 data 54 total) (logand -16 (+ v1-8 15))) + (+! (-> usage data 54 used) v1-8) + (+! (-> usage data 54 total) (logand -16 (+ v1-8 15))) ) (dotimes (s3-0 (-> this length)) - (mem-usage (-> this fragments s3-0) arg0 arg1) + (mem-usage (-> this fragments s3-0) usage flags) ) this ) diff --git a/test/decompiler/reference/jak2/engine/target/board/board-util_REF.gc b/test/decompiler/reference/jak2/engine/target/board/board-util_REF.gc index 053fdc3ec1..91d6c6e616 100644 --- a/test/decompiler/reference/jak2/engine/target/board/board-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/board-util_REF.gc @@ -3,11 +3,11 @@ ;; definition for method 7 of type board ;; WARN: Return type mismatch process-drawable vs board. -(defmethod relocate ((this board) (arg0 int)) +(defmethod relocate ((this board) (offset int)) (if (nonzero? (-> this main)) - (&+! (-> this main) arg0) + (&+! (-> this main) offset) ) - (the-as board ((method-of-type process-drawable relocate) this arg0)) + (the-as board ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function board-post diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc index 79eb01aee3..2ee39d3da8 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc @@ -331,16 +331,16 @@ ;; definition for method 7 of type gun ;; WARN: Return type mismatch process-drawable vs gun. -(defmethod relocate ((this gun) (arg0 int)) +(defmethod relocate ((this gun) (offset int)) (if (nonzero? (-> this barrel)) - (&+! (-> this barrel) arg0) + (&+! (-> this barrel) offset) ) (dotimes (v1-4 4) (if (nonzero? (-> this mag v1-4)) - (&+! (-> this mag v1-4) arg0) + (&+! (-> this mag v1-4) offset) ) ) - (the-as gun ((method-of-type process-drawable relocate) this arg0)) + (the-as gun ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function gun-post diff --git a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc index 2feb685a15..15bfb7a112 100644 --- a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc @@ -886,13 +886,13 @@ ;; definition for method 7 of type base-turret ;; WARN: Return type mismatch process-drawable vs base-turret. -(defmethod relocate ((this base-turret) (arg0 int)) +(defmethod relocate ((this base-turret) (offset int)) (countdown (v1-0 4) (if (-> this gun-recoil-jmod v1-0) - (&+! (-> this gun-recoil-jmod v1-0) arg0) + (&+! (-> this gun-recoil-jmod v1-0) offset) ) ) - (the-as base-turret ((method-of-type process-drawable relocate) this arg0)) + (the-as base-turret ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 34 of type base-turret diff --git a/test/decompiler/reference/jak2/engine/ui/text_REF.gc b/test/decompiler/reference/jak2/engine/ui/text_REF.gc index 2fa21304fb..588a9c8a6f 100644 --- a/test/decompiler/reference/jak2/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/text_REF.gc @@ -36,7 +36,7 @@ (kmemclose) ;; definition for method 7 of type game-text-info -(defmethod relocate ((this game-text-info) (arg0 int)) +(defmethod relocate ((this game-text-info) (offset int)) (let ((v1-1 (-> *level* loading-level))) (when v1-1 (set! (-> v1-1 loaded-text-info (-> v1-1 loaded-text-info-count)) this) @@ -71,21 +71,21 @@ ) ;; definition for method 8 of type game-text-info -(defmethod mem-usage ((this game-text-info) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 84 (-> arg0 length))) - (set! (-> arg0 data 83 name) "string") - (+! (-> arg0 data 83 count) 1) +(defmethod mem-usage ((this game-text-info) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 84 (-> usage length))) + (set! (-> usage data 83 name) "string") + (+! (-> usage data 83 count) 1) (let ((v1-6 (asize-of this))) - (+! (-> arg0 data 83 used) v1-6) - (+! (-> arg0 data 83 total) (logand -16 (+ v1-6 15))) + (+! (-> usage data 83 used) v1-6) + (+! (-> usage data 83 total) (logand -16 (+ v1-6 15))) ) (dotimes (s4-0 (-> this length)) - (set! (-> arg0 length) (max 84 (-> arg0 length))) - (set! (-> arg0 data 83 name) "string") - (+! (-> arg0 data 83 count) 1) + (set! (-> usage length) (max 84 (-> usage length))) + (set! (-> usage data 83 name) "string") + (+! (-> usage data 83 count) 1) (let ((v1-18 (asize-of (-> this data s4-0 text)))) - (+! (-> arg0 data 83 used) v1-18) - (+! (-> arg0 data 83 total) (logand -16 (+ v1-18 15))) + (+! (-> usage data 83 used) v1-18) + (+! (-> usage data 83 total) (logand -16 (+ v1-18 15))) ) ) this diff --git a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc index 6581ce1c3d..fb8c749cc8 100644 --- a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc @@ -26,7 +26,7 @@ (define *last-loado-debug-usage* 0) ;; definition for method 7 of type object -(defmethod relocate ((this object) (arg0 int)) +(defmethod relocate ((this object) (offset int)) this ) diff --git a/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc b/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc index bfe6dce510..9fa57e9396 100644 --- a/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc @@ -903,13 +903,13 @@ This commonly includes things such as: ) ;; definition for method 7 of type slider -(defmethod relocate ((this slider) (arg0 int)) +(defmethod relocate ((this slider) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this l-bolts v1-0)) - (&+! (-> this l-bolts v1-0) arg0) + (&+! (-> this l-bolts v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type slider diff --git a/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc b/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc index 084d42f2e8..3eeb086672 100644 --- a/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc @@ -1685,11 +1685,11 @@ ;; definition for method 7 of type atoll-tank ;; WARN: Return type mismatch process-focusable vs atoll-tank. -(defmethod relocate ((this atoll-tank) (arg0 int)) +(defmethod relocate ((this atoll-tank) (offset int)) (if (nonzero? (-> this aftermath-part)) - (&+! (-> this aftermath-part) arg0) + (&+! (-> this aftermath-part) offset) ) - (the-as atoll-tank ((method-of-type process-focusable relocate) this arg0)) + (the-as atoll-tank ((method-of-type process-focusable relocate) this offset)) ) ;; definition for method 12 of type atoll-tank diff --git a/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc b/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc index 6cfea35cf8..29910f16f7 100644 --- a/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc @@ -364,13 +364,13 @@ ;; definition for method 7 of type juicer-shot ;; WARN: Return type mismatch projectile vs juicer-shot. -(defmethod relocate ((this juicer-shot) (arg0 int)) +(defmethod relocate ((this juicer-shot) (offset int)) (dotimes (v1-0 5) (if (nonzero? (-> this lightning v1-0)) - (&+! (-> this lightning v1-0) arg0) + (&+! (-> this lightning v1-0) offset) ) ) - (the-as juicer-shot ((method-of-type projectile relocate) this arg0)) + (the-as juicer-shot ((method-of-type projectile relocate) this offset)) ) ;; definition for method 31 of type juicer-shot @@ -1861,14 +1861,14 @@ ) ;; definition for method 7 of type juicer -(defmethod relocate ((this juicer) (arg0 int)) +(defmethod relocate ((this juicer) (offset int)) (if (nonzero? (-> this intro-path)) - (&+! (-> this intro-path) arg0) + (&+! (-> this intro-path) offset) ) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type juicer diff --git a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc index f7fccbd477..5b2f375712 100644 --- a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc @@ -1352,13 +1352,13 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 7 of type krew-boss-clone ;; WARN: Return type mismatch nav-enemy vs krew-boss-clone. -(defmethod relocate ((this krew-boss-clone) (arg0 int)) +(defmethod relocate ((this krew-boss-clone) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this lightning v1-0)) - (&+! (-> this lightning v1-0) arg0) + (&+! (-> this lightning v1-0) offset) ) ) - (the-as krew-boss-clone ((method-of-type nav-enemy relocate) this arg0)) + (the-as krew-boss-clone ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 115 of type krew-boss-clone diff --git a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc index bf655f97c2..15aeb34634 100644 --- a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc @@ -1224,8 +1224,8 @@ ) ;; definition for method 7 of type roboguard-level -(defmethod relocate ((this roboguard-level) (arg0 int)) - (call-parent-method this arg0) +(defmethod relocate ((this roboguard-level) (offset int)) + (call-parent-method this offset) ) ;; definition for method 114 of type roboguard-level diff --git a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc index 3030ec00e1..ec8becb1bb 100644 --- a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc @@ -780,7 +780,6 @@ ) ;; definition for method 3 of type ik-setup -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this ik-setup)) (when (not this) (set! this this) @@ -2298,16 +2297,16 @@ ) ;; definition for method 7 of type bombbot -(defmethod relocate ((this bombbot) (arg0 int)) +(defmethod relocate ((this bombbot) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this joint-ik v1-0)) - (&+! (-> this joint-ik v1-0) arg0) + (&+! (-> this joint-ik v1-0) offset) ) ) (if (nonzero? (-> this rigidbody)) - (&+! (-> this rigidbody) arg0) + (&+! (-> this rigidbody) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 114 of type bombbot diff --git a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc index 0a8c8f87ea..2ebffecf6c 100644 --- a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc @@ -949,13 +949,13 @@ ;; definition for method 7 of type boat-manager ;; WARN: Return type mismatch process vs boat-manager. -(defmethod relocate ((this boat-manager) (arg0 int)) +(defmethod relocate ((this boat-manager) (offset int)) (dotimes (v1-0 4) (if (-> this paths v1-0) - (&+! (-> this paths v1-0) arg0) + (&+! (-> this paths v1-0) offset) ) ) - (the-as boat-manager ((method-of-type process relocate) this arg0)) + (the-as boat-manager ((method-of-type process relocate) this offset)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc index 8d3416fefe..5811b36732 100644 --- a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc @@ -2046,17 +2046,17 @@ This commonly includes things such as: ) ;; definition for method 7 of type cty-guard-turret -(defmethod relocate ((this cty-guard-turret) (arg0 int)) +(defmethod relocate ((this cty-guard-turret) (offset int)) (if (nonzero? (-> this jm-turret)) - (&+! (-> this jm-turret) arg0) + (&+! (-> this jm-turret) offset) ) (if (nonzero? (-> this jm-gunsL)) - (&+! (-> this jm-gunsL) arg0) + (&+! (-> this jm-gunsL) offset) ) (if (nonzero? (-> this jm-gunsR)) - (&+! (-> this jm-gunsR) arg0) + (&+! (-> this jm-gunsR) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type cty-guard-turret @@ -3921,17 +3921,17 @@ This commonly includes things such as: ;; definition for method 7 of type burning-bush ;; WARN: Return type mismatch process-focusable vs burning-bush. -(defmethod relocate ((this burning-bush) (arg0 int)) +(defmethod relocate ((this burning-bush) (offset int)) (if (nonzero? (-> this task)) - (&+! (-> this task) arg0) + (&+! (-> this task) offset) ) (if (nonzero? (-> this part-off)) - (&+! (-> this part-off) arg0) + (&+! (-> this part-off) offset) ) (if (nonzero? (-> this part-alert)) - (&+! (-> this part-alert) arg0) + (&+! (-> this part-alert) offset) ) - (the-as burning-bush ((method-of-type process-focusable relocate) this arg0)) + (the-as burning-bush ((method-of-type process-focusable relocate) this offset)) ) ;; definition for method 12 of type burning-bush @@ -4069,17 +4069,17 @@ This commonly includes things such as: ) ;; definition for method 7 of type barons-ship-lores -(defmethod relocate ((this barons-ship-lores) (arg0 int)) +(defmethod relocate ((this barons-ship-lores) (offset int)) (if (nonzero? (-> this paths 0)) - (&+! (-> this paths 0) arg0) + (&+! (-> this paths 0) offset) ) (if (nonzero? (-> this paths 1)) - (&+! (-> this paths 1) arg0) + (&+! (-> this paths 1) offset) ) (if (nonzero? (-> this paths 2)) - (&+! (-> this paths 2) arg0) + (&+! (-> this paths 2) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc b/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc index bc9244f843..d0bf3ba086 100644 --- a/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc @@ -1111,13 +1111,13 @@ ;; definition for method 7 of type city-neon-praxis ;; WARN: Return type mismatch process-drawable vs city-neon-praxis. -(defmethod relocate ((this city-neon-praxis) (arg0 int)) +(defmethod relocate ((this city-neon-praxis) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this parts v1-0)) - (&+! (-> this parts v1-0) arg0) + (&+! (-> this parts v1-0) offset) ) ) - (the-as city-neon-praxis ((method-of-type process-drawable relocate) this arg0)) + (the-as city-neon-praxis ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 21 of type city-neon-praxis diff --git a/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc b/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc index 7ce8202d8f..f2c19bd6b2 100644 --- a/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc @@ -3583,13 +3583,13 @@ ;; definition for method 7 of type hiphog-exterior-marquee ;; WARN: Return type mismatch process-drawable vs hiphog-exterior-marquee. -(defmethod relocate ((this hiphog-exterior-marquee) (arg0 int)) +(defmethod relocate ((this hiphog-exterior-marquee) (offset int)) (dotimes (v1-0 1) (if (nonzero? (-> this parts v1-0)) - (&+! (-> this parts v1-0) arg0) + (&+! (-> this parts v1-0) offset) ) ) - (the-as hiphog-exterior-marquee ((method-of-type process-drawable relocate) this arg0)) + (the-as hiphog-exterior-marquee ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 21 of type hiphog-exterior-marquee diff --git a/test/decompiler/reference/jak2/levels/city/port/race/errol-chal_REF.gc b/test/decompiler/reference/jak2/levels/city/port/race/errol-chal_REF.gc index 62774c59e4..3a132a79f2 100644 --- a/test/decompiler/reference/jak2/levels/city/port/race/errol-chal_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/port/race/errol-chal_REF.gc @@ -594,8 +594,8 @@ ;; definition for method 7 of type race-bike-a ;; WARN: Return type mismatch vehicle-city-racer vs race-bike-a. -(defmethod relocate ((this race-bike-a) (arg0 int)) - (the-as race-bike-a ((method-of-type vehicle-city-racer relocate) this arg0)) +(defmethod relocate ((this race-bike-a) (offset int)) + (the-as race-bike-a ((method-of-type vehicle-city-racer relocate) this offset)) ) ;; definition for method 32 of type race-bike-a @@ -688,8 +688,8 @@ ;; definition for method 7 of type race-bike-b ;; WARN: Return type mismatch vehicle-racer vs race-bike-b. -(defmethod relocate ((this race-bike-b) (arg0 int)) - (the-as race-bike-b ((method-of-type vehicle-racer relocate) this arg0)) +(defmethod relocate ((this race-bike-b) (offset int)) + (the-as race-bike-b ((method-of-type vehicle-racer relocate) this offset)) ) ;; definition for method 32 of type race-bike-b diff --git a/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc index 9c273ba9d5..0cc5550c68 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc @@ -3308,13 +3308,13 @@ ;; definition for method 7 of type neon-baron ;; WARN: Return type mismatch process vs neon-baron. -(defmethod relocate ((this neon-baron) (arg0 int)) +(defmethod relocate ((this neon-baron) (offset int)) (dotimes (v1-0 1) (if (nonzero? (-> this parts v1-0)) - (&+! (-> this parts v1-0) arg0) + (&+! (-> this parts v1-0) offset) ) ) - (the-as neon-baron ((method-of-type process relocate) this arg0)) + (the-as neon-baron ((method-of-type process relocate) this offset)) ) ;; definition for method 15 of type neon-baron diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc index 1515b5f436..2d6c053bdc 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc @@ -3837,14 +3837,14 @@ ) ;; definition for method 7 of type crimson-guard -(defmethod relocate ((this crimson-guard) (arg0 int)) +(defmethod relocate ((this crimson-guard) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) (if (nonzero? (-> this l-control)) - (&+! (-> this l-control) arg0) + (&+! (-> this l-control) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type crimson-guard diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc index b507b2127d..274a0d15fb 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc @@ -1212,11 +1212,11 @@ ;; definition for method 7 of type metalhead-grunt ;; WARN: Return type mismatch citizen-enemy vs metalhead-grunt. -(defmethod relocate ((this metalhead-grunt) (arg0 int)) +(defmethod relocate ((this metalhead-grunt) (offset int)) (if (nonzero? (-> this intro-path)) - (&+! (-> this intro-path) arg0) + (&+! (-> this intro-path) offset) ) - (the-as metalhead-grunt ((method-of-type citizen-enemy relocate) this arg0)) + (the-as metalhead-grunt ((method-of-type citizen-enemy relocate) this offset)) ) ;; definition for method 114 of type metalhead-grunt diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc index 64172112ba..4b95863c06 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc @@ -1153,8 +1153,8 @@ ) ;; definition for method 7 of type metalhead-predator -(defmethod relocate ((this metalhead-predator) (arg0 int)) - (call-parent-method this arg0) +(defmethod relocate ((this metalhead-predator) (offset int)) + (call-parent-method this offset) ) ;; definition for method 115 of type metalhead-predator diff --git a/test/decompiler/reference/jak2/levels/city/traffic/traffic-manager_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/traffic-manager_REF.gc index 91b086f751..c56458b5b2 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/traffic-manager_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/traffic-manager_REF.gc @@ -397,12 +397,12 @@ ;; definition for method 7 of type traffic-manager ;; WARN: Return type mismatch process vs traffic-manager. -(defmethod relocate ((this traffic-manager) (arg0 int)) +(defmethod relocate ((this traffic-manager) (offset int)) (set! *traffic-manager* this) (if *traffic-manager* - (set! *traffic-manager* (&+ *traffic-manager* arg0)) + (set! *traffic-manager* (&+ *traffic-manager* offset)) ) - (the-as traffic-manager ((method-of-type process relocate) this arg0)) + (the-as traffic-manager ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type traffic-manager diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/bike_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/bike_REF.gc index 287a1aae43..f52cbac275 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/bike_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/bike_REF.gc @@ -1063,29 +1063,29 @@ ) ;; definition for method 7 of type bikea -(defmethod relocate ((this bikea) (arg0 int)) +(defmethod relocate ((this bikea) (offset int)) (if (nonzero? (-> this fin-fl)) - (&+! (-> this fin-fl) arg0) + (&+! (-> this fin-fl) offset) ) (if (nonzero? (-> this fin-fr)) - (&+! (-> this fin-fr) arg0) + (&+! (-> this fin-fr) offset) ) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) (if (nonzero? (-> this rudder)) - (&+! (-> this rudder) arg0) + (&+! (-> this rudder) offset) ) (if (nonzero? (-> this brake-l)) - (&+! (-> this brake-l) arg0) + (&+! (-> this brake-l) offset) ) (if (nonzero? (-> this brake-r)) - (&+! (-> this brake-r) arg0) + (&+! (-> this brake-r) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type bikea @@ -1218,32 +1218,32 @@ ) ;; definition for method 7 of type bikeb -(defmethod relocate ((this bikeb) (arg0 int)) +(defmethod relocate ((this bikeb) (offset int)) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) (if (nonzero? (-> this rudder)) - (&+! (-> this rudder) arg0) + (&+! (-> this rudder) offset) ) (if (nonzero? (-> this rudder-f)) - (&+! (-> this rudder-f) arg0) + (&+! (-> this rudder-f) offset) ) (if (nonzero? (-> this brake-l)) - (&+! (-> this brake-l) arg0) + (&+! (-> this brake-l) offset) ) (if (nonzero? (-> this brake-r)) - (&+! (-> this brake-r) arg0) + (&+! (-> this brake-r) offset) ) (if (nonzero? (-> this flap-l)) - (&+! (-> this flap-l) arg0) + (&+! (-> this flap-l) offset) ) (if (nonzero? (-> this flap-r)) - (&+! (-> this flap-r) arg0) + (&+! (-> this flap-r) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type bikeb @@ -1384,41 +1384,41 @@ ) ;; definition for method 7 of type bikec -(defmethod relocate ((this bikec) (arg0 int)) +(defmethod relocate ((this bikec) (offset int)) (if (nonzero? (-> this fin-fl)) - (&+! (-> this fin-fl) arg0) + (&+! (-> this fin-fl) offset) ) (if (nonzero? (-> this fin-fr)) - (&+! (-> this fin-fr) arg0) + (&+! (-> this fin-fr) offset) ) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) (if (nonzero? (-> this fin2-fl)) - (&+! (-> this fin2-fl) arg0) + (&+! (-> this fin2-fl) offset) ) (if (nonzero? (-> this fin2-fr)) - (&+! (-> this fin2-fr) arg0) + (&+! (-> this fin2-fr) offset) ) (if (nonzero? (-> this rudder)) - (&+! (-> this rudder) arg0) + (&+! (-> this rudder) offset) ) (if (nonzero? (-> this brake-l)) - (&+! (-> this brake-l) arg0) + (&+! (-> this brake-l) offset) ) (if (nonzero? (-> this brake-r)) - (&+! (-> this brake-r) arg0) + (&+! (-> this brake-r) offset) ) (if (nonzero? (-> this spoiler-l)) - (&+! (-> this spoiler-l) arg0) + (&+! (-> this spoiler-l) offset) ) (if (nonzero? (-> this spoiler-r)) - (&+! (-> this spoiler-r) arg0) + (&+! (-> this spoiler-r) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type bikec @@ -1567,11 +1567,11 @@ ) ;; definition for method 7 of type guard-bike -(defmethod relocate ((this guard-bike) (arg0 int)) +(defmethod relocate ((this guard-bike) (offset int)) (if (nonzero? (-> this turret-jm)) - (&+! (-> this turret-jm) arg0) + (&+! (-> this turret-jm) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 65 of type guard-bike diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/car_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/car_REF.gc index 910af2b12a..761ec77e06 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/car_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/car_REF.gc @@ -1180,35 +1180,35 @@ ) ;; definition for method 7 of type cara -(defmethod relocate ((this cara) (arg0 int)) +(defmethod relocate ((this cara) (offset int)) (if (nonzero? (-> this steering-wheel-l)) - (&+! (-> this steering-wheel-l) arg0) + (&+! (-> this steering-wheel-l) offset) ) (if (nonzero? (-> this steering-wheel-r)) - (&+! (-> this steering-wheel-r) arg0) + (&+! (-> this steering-wheel-r) offset) ) (if (nonzero? (-> this fin-fl)) - (&+! (-> this fin-fl) arg0) + (&+! (-> this fin-fl) offset) ) (if (nonzero? (-> this fin-fr)) - (&+! (-> this fin-fr) arg0) + (&+! (-> this fin-fr) offset) ) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) (if (nonzero? (-> this rudder)) - (&+! (-> this rudder) arg0) + (&+! (-> this rudder) offset) ) (if (nonzero? (-> this rudder-l)) - (&+! (-> this rudder-l) arg0) + (&+! (-> this rudder-l) offset) ) (if (nonzero? (-> this rudder-r)) - (&+! (-> this rudder-r) arg0) + (&+! (-> this rudder-r) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type cara @@ -1351,26 +1351,26 @@ ) ;; definition for method 7 of type carb -(defmethod relocate ((this carb) (arg0 int)) +(defmethod relocate ((this carb) (offset int)) (if (nonzero? (-> this steering-wheel-l)) - (&+! (-> this steering-wheel-l) arg0) + (&+! (-> this steering-wheel-l) offset) ) (if (nonzero? (-> this steering-wheel-r)) - (&+! (-> this steering-wheel-r) arg0) + (&+! (-> this steering-wheel-r) offset) ) (if (nonzero? (-> this fin-fl)) - (&+! (-> this fin-fl) arg0) + (&+! (-> this fin-fl) offset) ) (if (nonzero? (-> this fin-fr)) - (&+! (-> this fin-fr) arg0) + (&+! (-> this fin-fr) offset) ) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type carb @@ -1510,29 +1510,29 @@ ) ;; definition for method 7 of type carc -(defmethod relocate ((this carc) (arg0 int)) +(defmethod relocate ((this carc) (offset int)) (if (nonzero? (-> this steering-wheel)) - (&+! (-> this steering-wheel) arg0) + (&+! (-> this steering-wheel) offset) ) (if (nonzero? (-> this fin-fl)) - (&+! (-> this fin-fl) arg0) + (&+! (-> this fin-fl) offset) ) (if (nonzero? (-> this fin-fr)) - (&+! (-> this fin-fr) arg0) + (&+! (-> this fin-fr) offset) ) (if (nonzero? (-> this fin-rl)) - (&+! (-> this fin-rl) arg0) + (&+! (-> this fin-rl) offset) ) (if (nonzero? (-> this fin-rr)) - (&+! (-> this fin-rr) arg0) + (&+! (-> this fin-rr) offset) ) (if (nonzero? (-> this fin2-rl)) - (&+! (-> this fin2-rl) arg0) + (&+! (-> this fin2-rl) offset) ) (if (nonzero? (-> this fin2-rr)) - (&+! (-> this fin2-rr) arg0) + (&+! (-> this fin2-rr) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type carc @@ -1679,11 +1679,11 @@ ) ;; definition for method 7 of type hellcat -(defmethod relocate ((this hellcat) (arg0 int)) +(defmethod relocate ((this hellcat) (offset int)) (if (nonzero? (-> this turret-jm)) - (&+! (-> this turret-jm) arg0) + (&+! (-> this turret-jm) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 32 of type hellcat diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc index dcb4c110d5..c251a004e7 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc @@ -131,11 +131,11 @@ ) ;; definition for method 7 of type vehicle-turret -(defmethod relocate ((this vehicle-turret) (arg0 int)) +(defmethod relocate ((this vehicle-turret) (offset int)) (if (nonzero? (-> this turret-jm)) - (&+! (-> this turret-jm) arg0) + (&+! (-> this turret-jm) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 30 of type vehicle-turret diff --git a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc index 4e31a0b893..ce52962310 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc @@ -1414,17 +1414,17 @@ If the player is too far, play a warning speech." ;; definition for method 7 of type bot ;; WARN: Return type mismatch nav-enemy vs bot. -(defmethod relocate ((this bot) (arg0 int)) +(defmethod relocate ((this bot) (offset int)) (if (nonzero? (-> this ai-ctrl)) - (&+! (-> this ai-ctrl) arg0) + (&+! (-> this ai-ctrl) offset) ) (if (nonzero? (-> this task)) - (&+! (-> this task) arg0) + (&+! (-> this task) offset) ) (if (nonzero? (-> this swivel-joint-mod)) - (&+! (-> this swivel-joint-mod) arg0) + (&+! (-> this swivel-joint-mod) offset) ) - (the-as bot ((method-of-type nav-enemy relocate) this arg0)) + (the-as bot ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 10 of type bot diff --git a/test/decompiler/reference/jak2/levels/common/airlock_REF.gc b/test/decompiler/reference/jak2/levels/common/airlock_REF.gc index e2e08f40e7..b18f7d6a6b 100644 --- a/test/decompiler/reference/jak2/levels/common/airlock_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/airlock_REF.gc @@ -121,11 +121,11 @@ ;; definition for method 7 of type com-airlock ;; WARN: Return type mismatch process-drawable vs com-airlock. -(defmethod relocate ((this com-airlock) (arg0 int)) +(defmethod relocate ((this com-airlock) (offset int)) (if (nonzero? (-> this gear)) - (&+! (-> this gear) arg0) + (&+! (-> this gear) offset) ) - (the-as com-airlock ((method-of-type process-drawable relocate) this arg0)) + (the-as com-airlock ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 22 of type com-airlock diff --git a/test/decompiler/reference/jak2/levels/common/battle_REF.gc b/test/decompiler/reference/jak2/levels/common/battle_REF.gc index 93d6eaea72..715d64cf66 100644 --- a/test/decompiler/reference/jak2/levels/common/battle_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/battle_REF.gc @@ -1711,12 +1711,12 @@ ) ;; definition for method 7 of type battle-spawner-array -(defmethod relocate ((this battle-spawner-array) (arg0 int)) +(defmethod relocate ((this battle-spawner-array) (offset int)) (dotimes (v1-0 (-> this length)) (let ((a2-3 (-> this data v1-0))) - (&+! (-> a2-3 breeds) arg0) + (&+! (-> a2-3 breeds) offset) (if (-> a2-3 intro-path) - (&+! (-> a2-3 intro-path) arg0) + (&+! (-> a2-3 intro-path) offset) ) ) ) @@ -1724,10 +1724,10 @@ ) ;; definition for method 7 of type battle -(defmethod relocate ((this battle) (arg0 int)) - (&+! (-> this spawners) arg0) - (&+! (-> this allies) arg0) - (call-parent-method this arg0) +(defmethod relocate ((this battle) (offset int)) + (&+! (-> this spawners) offset) + (&+! (-> this allies) offset) + (call-parent-method this offset) ) ;; definition for method 29 of type battle diff --git a/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc index 38ccb34d6c..a71087c14c 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc @@ -334,8 +334,8 @@ (set! (-> *amphibian-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) ;; definition for method 7 of type amphibian-joint-mod -(defmethod relocate ((this amphibian-joint-mod) (arg0 int)) - (&+! (-> this proc) arg0) +(defmethod relocate ((this amphibian-joint-mod) (offset int)) + (&+! (-> this proc) offset) this ) @@ -1784,11 +1784,11 @@ ;; definition for method 7 of type amphibian ;; WARN: Return type mismatch nav-enemy vs amphibian. -(defmethod relocate ((this amphibian) (arg0 int)) +(defmethod relocate ((this amphibian) (offset int)) (if (nonzero? (-> this tongue-mod)) - (&+! (-> this tongue-mod) arg0) + (&+! (-> this tongue-mod) offset) ) - (the-as amphibian ((method-of-type nav-enemy relocate) this arg0)) + (the-as amphibian ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 114 of type amphibian diff --git a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc index 6295d9fba1..b46af43cd0 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc @@ -1584,11 +1584,11 @@ ) ;; definition for method 7 of type centurion -(defmethod relocate ((this centurion) (arg0 int)) +(defmethod relocate ((this centurion) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type centurion diff --git a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc index aff6595ab3..75831b7b54 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc @@ -1090,14 +1090,14 @@ ) ;; definition for method 7 of type fodder -(defmethod relocate ((this fodder) (arg0 int)) +(defmethod relocate ((this fodder) (offset int)) (if (nonzero? (-> this left-eye)) - (&+! (-> this left-eye) arg0) + (&+! (-> this left-eye) offset) ) (if (nonzero? (-> this right-eye)) - (&+! (-> this right-eye) arg0) + (&+! (-> this right-eye) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for function fodder-setup-eye-control diff --git a/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc index d8bee2f22d..3195fac98c 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc @@ -1288,16 +1288,16 @@ ) ;; definition for method 7 of type grenadier -(defmethod relocate ((this grenadier) (arg0 int)) +(defmethod relocate ((this grenadier) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) (when (-> this hostile-path) (if (nonzero? (-> this hostile-path)) - (&+! (-> this hostile-path) arg0) + (&+! (-> this hostile-path) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type grenadier diff --git a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc index 3bbf812950..78109b344e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc @@ -1492,11 +1492,11 @@ ;; definition for method 7 of type grunt ;; WARN: Return type mismatch nav-enemy vs grunt. -(defmethod relocate ((this grunt) (arg0 int)) +(defmethod relocate ((this grunt) (offset int)) (if (nonzero? (-> this intro-path)) - (&+! (-> this intro-path) arg0) + (&+! (-> this intro-path) offset) ) - (the-as grunt ((method-of-type nav-enemy relocate) this arg0)) + (the-as grunt ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 114 of type grunt diff --git a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc index bf444d9ece..c4a7bc4e6e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc @@ -4280,14 +4280,14 @@ ) ;; definition for method 7 of type crimson-guard-level -(defmethod relocate ((this crimson-guard-level) (arg0 int)) +(defmethod relocate ((this crimson-guard-level) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) (if (nonzero? (-> this l-control)) - (&+! (-> this l-control) arg0) + (&+! (-> this l-control) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 203 of type crimson-guard-level diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc index 568d0f1fbf..73658ac1c3 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc @@ -861,11 +861,11 @@ ) ;; definition for method 7 of type hopper -(defmethod relocate ((this hopper) (arg0 int)) +(defmethod relocate ((this hopper) (offset int)) (if (nonzero? (-> this path-intro)) - (&+! (-> this path-intro) arg0) + (&+! (-> this path-intro) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 114 of type hopper diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc index ed16c6d584..5c00e4cd04 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc @@ -1804,20 +1804,20 @@ ;; definition for method 7 of type crimson-guard-hover ;; WARN: Return type mismatch hover-enemy vs crimson-guard-hover. -(defmethod relocate ((this crimson-guard-hover) (arg0 int)) +(defmethod relocate ((this crimson-guard-hover) (offset int)) (if (nonzero? (-> this gun-jmod)) - (&+! (-> this gun-jmod) arg0) + (&+! (-> this gun-jmod) offset) ) (if (nonzero? (-> this hips-jmod)) - (&+! (-> this hips-jmod) arg0) + (&+! (-> this hips-jmod) offset) ) (if (nonzero? (-> this smoke-part)) - (&+! (-> this smoke-part) arg0) + (&+! (-> this smoke-part) offset) ) (if (nonzero? (-> this engine-part)) - (&+! (-> this engine-part) arg0) + (&+! (-> this engine-part) offset) ) - (the-as crimson-guard-hover ((method-of-type hover-enemy relocate) this arg0)) + (the-as crimson-guard-hover ((method-of-type hover-enemy relocate) this offset)) ) ;; definition for method 10 of type crimson-guard-hover diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc index 11cb34910a..5bfeacdf48 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc @@ -1490,11 +1490,11 @@ ) ;; definition for method 7 of type flamer -(defmethod relocate ((this flamer) (arg0 int)) +(defmethod relocate ((this flamer) (offset int)) (if (nonzero? (-> this flit-joint)) - (&+! (-> this flit-joint) arg0) + (&+! (-> this flit-joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type flamer diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy-battle_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy-battle_REF.gc index 3ec15bf735..92b9fe9a2e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy-battle_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy-battle_REF.gc @@ -282,16 +282,16 @@ ) ;; definition for method 7 of type hover-enemy-manager -(defmethod relocate ((this hover-enemy-manager) (arg0 int)) +(defmethod relocate ((this hover-enemy-manager) (offset int)) (when (-> this formation) (if (nonzero? (-> this formation)) - (&+! (-> this formation) arg0) + (&+! (-> this formation) offset) ) ) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 17 of type hover-enemy-manager diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc index 2bf79fb1eb..ccbbb2a7f2 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc @@ -936,11 +936,11 @@ ;; definition for method 7 of type hover-enemy ;; WARN: Return type mismatch enemy vs hover-enemy. -(defmethod relocate ((this hover-enemy) (arg0 int)) +(defmethod relocate ((this hover-enemy) (offset int)) (if (nonzero? (-> this hover)) - (&+! (-> this hover) arg0) + (&+! (-> this hover) offset) ) - (the-as hover-enemy ((method-of-type enemy relocate) this arg0)) + (the-as hover-enemy ((method-of-type enemy relocate) this offset)) ) ;; definition for method 155 of type hover-enemy diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc index ca29087bba..f25ff1799c 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc @@ -678,14 +678,14 @@ ) ;; definition for method 7 of type hover-formation -(defmethod relocate ((this hover-formation) (arg0 int)) +(defmethod relocate ((this hover-formation) (offset int)) (if (nonzero? (-> this formation)) - (&+! (-> this formation) arg0) + (&+! (-> this formation) offset) ) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 15 of type hover-formation diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc index c5090cffd7..e92e8876ce 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc @@ -1791,9 +1791,9 @@ ) ;; definition for method 7 of type hover-nav-control -(defmethod relocate ((this hover-nav-control) (arg0 int)) +(defmethod relocate ((this hover-nav-control) (offset int)) (if (nonzero? (-> this root)) - (&+! (-> this root) arg0) + (&+! (-> this root) offset) ) this ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc index 4abe45cb42..8a0caf94ab 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc @@ -1485,17 +1485,17 @@ ;; definition for method 7 of type wasp ;; WARN: Return type mismatch hover-enemy vs wasp. -(defmethod relocate ((this wasp) (arg0 int)) +(defmethod relocate ((this wasp) (offset int)) (if (nonzero? (-> this gun-jmod)) - (&+! (-> this gun-jmod) arg0) + (&+! (-> this gun-jmod) offset) ) (if (nonzero? (-> this smoke-part)) - (&+! (-> this smoke-part) arg0) + (&+! (-> this smoke-part) offset) ) (if (nonzero? (-> this engine-part)) - (&+! (-> this engine-part) arg0) + (&+! (-> this engine-part) offset) ) - (the-as wasp ((method-of-type hover-enemy relocate) this arg0)) + (the-as wasp ((method-of-type hover-enemy relocate) this offset)) ) ;; definition for method 149 of type wasp diff --git a/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc index 81f7576be1..a9619049af 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc @@ -1227,11 +1227,11 @@ ) ;; definition for method 7 of type metalmonk -(defmethod relocate ((this metalmonk) (arg0 int)) +(defmethod relocate ((this metalmonk) (offset int)) (if (nonzero? (-> this intro-path)) - (&+! (-> this intro-path) arg0) + (&+! (-> this intro-path) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type metalmonk diff --git a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc index d6e6b448da..7ea436e1e5 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc @@ -743,7 +743,6 @@ ) ;; definition for method 3 of type ik-setup -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this ik-setup)) (when (not this) (set! this this) @@ -1384,16 +1383,16 @@ ) ;; definition for method 7 of type spyder -(defmethod relocate ((this spyder) (arg0 int)) +(defmethod relocate ((this spyder) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) (dotimes (v1-4 4) (if (nonzero? (-> this joint-ik v1-4)) - (&+! (-> this joint-ik v1-4) arg0) + (&+! (-> this joint-ik v1-4) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type spyder diff --git a/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc index bd3855eed9..f466719d93 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc @@ -210,11 +210,11 @@ ;; definition for method 7 of type fort-floor-spike ;; WARN: Return type mismatch process-drawable vs fort-floor-spike. -(defmethod relocate ((this fort-floor-spike) (arg0 int)) +(defmethod relocate ((this fort-floor-spike) (offset int)) (if (nonzero? (-> this spike-row)) - (&+! (-> this spike-row) arg0) + (&+! (-> this spike-row) offset) ) - (the-as fort-floor-spike ((method-of-type process-drawable relocate) this arg0)) + (the-as fort-floor-spike ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type fort-floor-spike diff --git a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc index 4620e57825..250d0bfe5c 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc @@ -1210,11 +1210,11 @@ ;; definition for method 7 of type gun-buoy ;; WARN: Return type mismatch nav-enemy vs gun-buoy. -(defmethod relocate ((this gun-buoy) (arg0 int)) +(defmethod relocate ((this gun-buoy) (offset int)) (if (nonzero? (-> this gun-elev-jmod)) - (&+! (-> this gun-elev-jmod) arg0) + (&+! (-> this gun-elev-jmod) offset) ) - (the-as gun-buoy ((method-of-type nav-enemy relocate) this arg0)) + (the-as gun-buoy ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 114 of type gun-buoy diff --git a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc index b8c6fa2976..80ecd0bfe3 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc @@ -1368,18 +1368,18 @@ ;; definition for method 7 of type spydroid ;; WARN: Return type mismatch nav-enemy vs spydroid. -(defmethod relocate ((this spydroid) (arg0 int)) +(defmethod relocate ((this spydroid) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this lightning v1-0)) - (&+! (-> this lightning v1-0) arg0) + (&+! (-> this lightning v1-0) offset) ) ) (when (nonzero? (-> this explode-part)) (if (nonzero? (-> this explode-part)) - (&+! (-> this explode-part) arg0) + (&+! (-> this explode-part) offset) ) ) - (the-as spydroid ((method-of-type nav-enemy relocate) this arg0)) + (the-as spydroid ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 115 of type spydroid diff --git a/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc b/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc index 5e65135c55..193cdaf26a 100644 --- a/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc @@ -1162,17 +1162,17 @@ This commonly includes things such as: ;; definition for method 7 of type air-train ;; WARN: Return type mismatch warp-gate vs air-train. -(defmethod relocate ((this air-train) (arg0 int)) +(defmethod relocate ((this air-train) (offset int)) (if (nonzero? (-> this part-exhaust-left)) - (&+! (-> this part-exhaust-left) arg0) + (&+! (-> this part-exhaust-left) offset) ) (if (nonzero? (-> this part-exhaust-right)) - (&+! (-> this part-exhaust-right) arg0) + (&+! (-> this part-exhaust-right) offset) ) (if (nonzero? (-> this part-dust)) - (&+! (-> this part-dust) arg0) + (&+! (-> this part-dust) offset) ) - (the-as air-train ((method-of-type warp-gate relocate) this arg0)) + (the-as air-train ((method-of-type warp-gate relocate) this offset)) ) ;; definition for method 10 of type air-train diff --git a/test/decompiler/reference/jak2/levels/demo/demo-obs_REF.gc b/test/decompiler/reference/jak2/levels/demo/demo-obs_REF.gc index 3c318cd0b2..5c9fe0e5ce 100644 --- a/test/decompiler/reference/jak2/levels/demo/demo-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/demo/demo-obs_REF.gc @@ -49,13 +49,13 @@ ;; definition for method 7 of type demo-control ;; WARN: Return type mismatch process vs demo-control. -(defmethod relocate ((this demo-control) (arg0 int)) +(defmethod relocate ((this demo-control) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this buffer v1-0)) - (&+! (-> this buffer v1-0) arg0) + (&+! (-> this buffer v1-0) offset) ) ) - (the-as demo-control ((method-of-type process relocate) this arg0)) + (the-as demo-control ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type demo-control diff --git a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc index 8c63f3ff3d..a02363621a 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc @@ -1141,16 +1141,16 @@ This commonly includes things such as: ;; definition for method 7 of type dig-tether ;; WARN: Return type mismatch process-drawable vs dig-tether. -(defmethod relocate ((this dig-tether) (arg0 int)) +(defmethod relocate ((this dig-tether) (offset int)) (if (nonzero? (-> this joint-one)) - (&+! (-> this joint-one) arg0) + (&+! (-> this joint-one) offset) ) (dotimes (v1-4 7) (if (nonzero? (-> this chain-joints v1-4 joint-mod)) - (&+! (-> this chain-joints v1-4 joint-mod) arg0) + (&+! (-> this chain-joints v1-4 joint-mod) offset) ) ) - (the-as dig-tether ((method-of-type process-drawable relocate) this arg0)) + (the-as dig-tether ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function dig-tether-init-by-other @@ -1522,13 +1522,13 @@ This commonly includes things such as: ;; definition for method 7 of type dig-digger ;; WARN: Return type mismatch process-drawable vs dig-digger. -(defmethod relocate ((this dig-digger) (arg0 int)) +(defmethod relocate ((this dig-digger) (offset int)) (when (nonzero? (-> this smoke-part)) (if (nonzero? (-> this smoke-part)) - (&+! (-> this smoke-part) arg0) + (&+! (-> this smoke-part) offset) ) ) - (the-as dig-digger ((method-of-type process-drawable relocate) this arg0)) + (the-as dig-digger ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type dig-digger diff --git a/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc index 72e4711a47..ef7c867900 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc @@ -1094,23 +1094,23 @@ ) ;; definition for method 7 of type drill-barons-ship-turret -(defmethod relocate ((this drill-barons-ship-turret) (arg0 int)) +(defmethod relocate ((this drill-barons-ship-turret) (offset int)) (when (-> this jmod) (if (nonzero? (-> this jmod)) - (&+! (-> this jmod) arg0) + (&+! (-> this jmod) offset) ) ) (when (-> this jmod-left) (if (nonzero? (-> this jmod-left)) - (&+! (-> this jmod-left) arg0) + (&+! (-> this jmod-left) offset) ) ) (when (-> this jmod-right) (if (nonzero? (-> this jmod-right)) - (&+! (-> this jmod-right) arg0) + (&+! (-> this jmod-right) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type drill-barons-ship diff --git a/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc index 00029099e0..669951d670 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc @@ -116,11 +116,11 @@ ;; definition for method 7 of type drill-mech-master ;; WARN: Return type mismatch process vs drill-mech-master. -(defmethod relocate ((this drill-mech-master) (arg0 int)) +(defmethod relocate ((this drill-mech-master) (offset int)) (if (nonzero? (-> this part-doom)) - (&+! (-> this part-doom) arg0) + (&+! (-> this part-doom) offset) ) - (the-as drill-mech-master ((method-of-type process relocate) this arg0)) + (the-as drill-mech-master ((method-of-type process relocate) this offset)) ) ;; definition for function drill-mech-master-event-handler diff --git a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc index ff93b64fc1..987159b28f 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc @@ -928,11 +928,11 @@ For example for an elevator pre-compute the distance between the first and last ) ;; definition for method 7 of type fire-floor -(defmethod relocate ((this fire-floor) (arg0 int)) +(defmethod relocate ((this fire-floor) (offset int)) (if (nonzero? (-> this part-off)) - (&+! (-> this part-off) arg0) + (&+! (-> this part-off) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 10 of type fire-floor @@ -1164,11 +1164,11 @@ This commonly includes things such as: ;; definition for method 7 of type drill-switch ;; WARN: Return type mismatch basebutton vs drill-switch. -(defmethod relocate ((this drill-switch) (arg0 int)) +(defmethod relocate ((this drill-switch) (offset int)) (if (nonzero? (-> this green-part)) - (&+! (-> this green-part) arg0) + (&+! (-> this green-part) offset) ) - (the-as drill-switch ((method-of-type basebutton relocate) this arg0)) + (the-as drill-switch ((method-of-type basebutton relocate) this offset)) ) ;; definition for method 10 of type drill-switch diff --git a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc index 4adc05e379..4eebc062df 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc @@ -54,11 +54,11 @@ ;; definition for method 7 of type drill-control-panel ;; WARN: Return type mismatch process-drawable vs drill-control-panel. -(defmethod relocate ((this drill-control-panel) (arg0 int)) +(defmethod relocate ((this drill-control-panel) (offset int)) (if (nonzero? (-> this debris-part)) - (&+! (-> this debris-part) arg0) + (&+! (-> this debris-part) offset) ) - (the-as drill-control-panel ((method-of-type process-drawable relocate) this arg0)) + (the-as drill-control-panel ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type drill-control-panel diff --git a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc index feded89c19..e051138518 100644 --- a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc @@ -999,17 +999,17 @@ ;; definition for method 7 of type ginsu ;; WARN: Return type mismatch nav-enemy vs ginsu. -(defmethod relocate ((this ginsu) (arg0 int)) +(defmethod relocate ((this ginsu) (offset int)) (if (nonzero? (-> this blade-jm)) - (&+! (-> this blade-jm) arg0) + (&+! (-> this blade-jm) offset) ) (if (nonzero? (-> this blade-part)) - (&+! (-> this blade-part) arg0) + (&+! (-> this blade-part) offset) ) (if (nonzero? (-> this ambush-path)) - (&+! (-> this ambush-path) arg0) + (&+! (-> this ambush-path) offset) ) - (the-as ginsu ((method-of-type nav-enemy relocate) this arg0)) + (the-as ginsu ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 183 of type ginsu diff --git a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc index 7118bf4874..409295eab0 100644 --- a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc @@ -1332,13 +1332,13 @@ The faster it's moving the fast it flaps it's wings, etc ;; definition for method 7 of type pegasus ;; WARN: Return type mismatch enemy vs pegasus. -(defmethod relocate ((this pegasus) (arg0 int)) +(defmethod relocate ((this pegasus) (offset int)) (countdown (v1-0 20) (if (-> this path-info v1-0 path-data) - (&+! (-> this path-info v1-0 path-data) arg0) + (&+! (-> this path-info v1-0 path-data) offset) ) ) - (the-as pegasus ((method-of-type enemy relocate) this arg0)) + (the-as pegasus ((method-of-type enemy relocate) this offset)) ) ;; definition for method 115 of type pegasus diff --git a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc index f59d8369d6..42587746d5 100644 --- a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc @@ -1500,8 +1500,8 @@ ) ;; definition for method 7 of type predator -(defmethod relocate ((this predator) (arg0 int)) - (call-parent-method this arg0) +(defmethod relocate ((this predator) (offset int)) + (call-parent-method this offset) ) ;; definition for method 167 of type predator @@ -1650,12 +1650,12 @@ This commonly includes things such as: ;; definition for method 7 of type predator-manager ;; WARN: Return type mismatch process vs predator-manager. -(defmethod relocate ((this predator-manager) (arg0 int)) +(defmethod relocate ((this predator-manager) (offset int)) (set! *predator-manager* this) (if *predator-manager* - (set! *predator-manager* (&+ *predator-manager* arg0)) + (set! *predator-manager* (&+ *predator-manager* offset)) ) - (the-as predator-manager ((method-of-type process relocate) this arg0)) + (the-as predator-manager ((method-of-type process relocate) this offset)) ) ;; definition for method 16 of type predator-manager diff --git a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc index 6e178edb2d..3f8382140e 100644 --- a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc @@ -446,15 +446,15 @@ If so, it transitions from [[wren::peck]] to [[wren::hunt]]" ) ;; definition for method 7 of type wren -(defmethod relocate ((this wren) (arg0 int)) +(defmethod relocate ((this wren) (offset int)) (dotimes (v1-0 2) (when (-> this fly-curve v1-0) (if (nonzero? (-> this fly-curve v1-0)) - (&+! (-> this fly-curve v1-0) arg0) + (&+! (-> this fly-curve v1-0) offset) ) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type wren diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc index fee740cecb..c28838a060 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc @@ -243,11 +243,11 @@ ;; definition for method 7 of type fort-elec-switch ;; WARN: Return type mismatch process-drawable vs fort-elec-switch. -(defmethod relocate ((this fort-elec-switch) (arg0 int)) +(defmethod relocate ((this fort-elec-switch) (offset int)) (if (nonzero? (-> this l-bolt)) - (&+! (-> this l-bolt) arg0) + (&+! (-> this l-bolt) offset) ) - (the-as fort-elec-switch ((method-of-type process-drawable relocate) this arg0)) + (the-as fort-elec-switch ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type fort-elec-switch diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc index f7a6518482..7d09ceba06 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc @@ -979,11 +979,11 @@ This commonly includes things such as: ) ;; definition for method 7 of type fort-missile -(defmethod relocate ((this fort-missile) (arg0 int)) +(defmethod relocate ((this fort-missile) (offset int)) (if (nonzero? (-> this part-doom)) - (&+! (-> this part-doom) arg0) + (&+! (-> this part-doom) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type fort-missile diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc index e502700c11..df66fccde7 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc @@ -602,19 +602,19 @@ ;; definition for method 7 of type fort-robotank-reticle ;; WARN: Return type mismatch process-drawable vs fort-robotank-reticle. -(defmethod relocate ((this fort-robotank-reticle) (arg0 int)) +(defmethod relocate ((this fort-robotank-reticle) (offset int)) (if (nonzero? (-> this shadow-jmod)) - (&+! (-> this shadow-jmod) arg0) + (&+! (-> this shadow-jmod) offset) ) (if (nonzero? (-> this sight-jmod)) - (&+! (-> this sight-jmod) arg0) + (&+! (-> this sight-jmod) offset) ) (dotimes (v1-8 3) (if (nonzero? (-> this ring-jmod v1-8)) - (&+! (-> this ring-jmod v1-8) arg0) + (&+! (-> this ring-jmod v1-8) offset) ) ) - (the-as fort-robotank-reticle ((method-of-type process-drawable relocate) this arg0)) + (the-as fort-robotank-reticle ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function fort-robotank-reticle-init-by-other @@ -1549,11 +1549,11 @@ ;; definition for method 7 of type fort-robotank-turret ;; WARN: Return type mismatch process-focusable vs fort-robotank-turret. -(defmethod relocate ((this fort-robotank-turret) (arg0 int)) +(defmethod relocate ((this fort-robotank-turret) (offset int)) (if (nonzero? (-> this gun-elev-jmod)) - (&+! (-> this gun-elev-jmod) arg0) + (&+! (-> this gun-elev-jmod) offset) ) - (the-as fort-robotank-turret ((method-of-type process-focusable relocate) this arg0)) + (the-as fort-robotank-turret ((method-of-type process-focusable relocate) this offset)) ) ;; definition for function fort-robotank-turret-init-by-other diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc index c64df43dd5..0a3469aef5 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc @@ -1044,30 +1044,30 @@ ) ;; definition for method 7 of type fort-robotank -(defmethod relocate ((this fort-robotank) (arg0 int)) +(defmethod relocate ((this fort-robotank) (offset int)) (if (nonzero? (-> this barrel-part)) - (&+! (-> this barrel-part) arg0) + (&+! (-> this barrel-part) offset) ) (if (nonzero? (-> this roller-jmod)) - (&+! (-> this roller-jmod) arg0) + (&+! (-> this roller-jmod) offset) ) (if (nonzero? (-> this vibe-jmod)) - (&+! (-> this vibe-jmod) arg0) + (&+! (-> this vibe-jmod) offset) ) (if (nonzero? (-> this idle-sound)) - (&+! (-> this idle-sound) arg0) + (&+! (-> this idle-sound) offset) ) (if (nonzero? (-> this barrel-sound)) - (&+! (-> this barrel-sound) arg0) + (&+! (-> this barrel-sound) offset) ) (let ((v1-20 (-> this path-info))) (when (nonzero? v1-20) (dotimes (a0-2 (-> this path-count)) (if (nonzero? (-> v1-20 data a0-2 path)) - (&+! (-> v1-20 data a0-2 path) arg0) + (&+! (-> v1-20 data a0-2 path) offset) ) ) - (&+! (-> this path-info) arg0) + (&+! (-> this path-info) offset) ) ) (dotimes (v1-24 2) @@ -1085,14 +1085,14 @@ joint-mod (-> (the-as (pointer uint32) (&+ (&+ (the-as (pointer uint32) this) (* 144 v1-24)) (* a0-4 16))) 55) ) - arg0 + offset ) ) ) ) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type fort-robotank diff --git a/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc b/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc index f7fd52e6bc..9621d355ad 100644 --- a/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc @@ -1085,14 +1085,14 @@ ;; definition for method 7 of type fort-turret ;; WARN: Return type mismatch enemy vs fort-turret. -(defmethod relocate ((this fort-turret) (arg0 int)) +(defmethod relocate ((this fort-turret) (offset int)) (if (nonzero? (-> this gun-tilt-jm)) - (&+! (-> this gun-tilt-jm) arg0) + (&+! (-> this gun-tilt-jm) offset) ) (if (nonzero? (-> this gun-shadow-jm)) - (&+! (-> this gun-shadow-jm) arg0) + (&+! (-> this gun-shadow-jm) offset) ) - (the-as fort-turret ((method-of-type enemy relocate) this arg0)) + (the-as fort-turret ((method-of-type enemy relocate) this offset)) ) ;; definition for method 115 of type fort-turret diff --git a/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc index cddab3103b..fe7ad8a3d8 100644 --- a/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc @@ -411,11 +411,11 @@ This commonly includes things such as: ;; definition for method 7 of type fort-elec-belt-inst ;; WARN: Return type mismatch process-drawable vs fort-elec-belt-inst. -(defmethod relocate ((this fort-elec-belt-inst) (arg0 int)) +(defmethod relocate ((this fort-elec-belt-inst) (offset int)) (if (nonzero? (-> this l-bolt)) - (&+! (-> this l-bolt) arg0) + (&+! (-> this l-bolt) offset) ) - (the-as fort-elec-belt-inst ((method-of-type process-drawable relocate) this arg0)) + (the-as fort-elec-belt-inst ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type fort-elec-belt-inst @@ -571,11 +571,11 @@ This commonly includes things such as: ;; definition for method 7 of type fort-elec-belt ;; WARN: Return type mismatch process vs fort-elec-belt. -(defmethod relocate ((this fort-elec-belt) (arg0 int)) +(defmethod relocate ((this fort-elec-belt) (offset int)) (if (nonzero? (-> this path)) - (&+! (-> this path) arg0) + (&+! (-> this path) offset) ) - (the-as fort-elec-belt ((method-of-type process relocate) this arg0)) + (the-as fort-elec-belt ((method-of-type process relocate) this offset)) ) ;; definition for method 11 of type fort-elec-belt @@ -655,7 +655,6 @@ This commonly includes things such as: ) ;; definition for method 3 of type fort-conveyor -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this fort-conveyor)) (when (not this) (set! this this) @@ -675,14 +674,12 @@ This commonly includes things such as: ) ;; definition for method 22 of type fort-conveyor -;; INFO: this function exists in multiple non-identical object files (defmethod get-art-group ((this fort-conveyor)) "@returns The respective [[art-group]] for the [[conveyor]]" (art-group-get-by-name *level* "skel-fort-conveyor" (the-as (pointer uint32) #f)) ) ;; definition for method 23 of type fort-conveyor -;; INFO: this function exists in multiple non-identical object files ;; WARN: Return type mismatch collide-shape-moving vs none. (defmethod reset-root! ((this fort-conveyor)) "Re-initializes the `root` [[trsqv]]" @@ -713,7 +710,6 @@ This commonly includes things such as: ) ;; definition for method 24 of type fort-conveyor -;; INFO: this function exists in multiple non-identical object files ;; WARN: Return type mismatch vector vs none. (defmethod init! ((this fort-conveyor)) "Initializes defaults for things like the `speed` and `belt-radius`" @@ -727,7 +723,6 @@ This commonly includes things such as: ) ;; definition for method 25 of type fort-conveyor -;; INFO: this function exists in multiple non-identical object files (defmethod set-and-get-ambient-sound! ((this fort-conveyor)) "So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]] and return it as well. Otherwise, set it to `0`" diff --git a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc index c82a29f22f..bb5d0fb42a 100644 --- a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc +++ b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc @@ -2461,8 +2461,8 @@ ;; definition for method 7 of type gun-dummy ;; WARN: Return type mismatch process-focusable vs gun-dummy. -(defmethod relocate ((this gun-dummy) (arg0 int)) - (the-as gun-dummy ((method-of-type process-focusable relocate) this arg0)) +(defmethod relocate ((this gun-dummy) (offset int)) + (the-as gun-dummy ((method-of-type process-focusable relocate) this offset)) ) ;; definition for method 11 of type gun-dummy diff --git a/test/decompiler/reference/jak2/levels/hiphog/whack_REF.gc b/test/decompiler/reference/jak2/levels/hiphog/whack_REF.gc index fd71b12671..7cbcdeb516 100644 --- a/test/decompiler/reference/jak2/levels/hiphog/whack_REF.gc +++ b/test/decompiler/reference/jak2/levels/hiphog/whack_REF.gc @@ -1792,13 +1792,13 @@ ) ;; definition for method 7 of type whack-a-metal -(defmethod relocate ((this whack-a-metal) (arg0 int)) +(defmethod relocate ((this whack-a-metal) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this score-part v1-0)) - (&+! (-> this score-part v1-0) arg0) + (&+! (-> this score-part v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 29 of type whack-a-metal diff --git a/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc b/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc index e1f69109e4..f2a57d03e2 100644 --- a/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc @@ -384,13 +384,13 @@ This commonly includes things such as: ) ;; definition for method 7 of type metalhead-spawner -(defmethod relocate ((this metalhead-spawner) (arg0 int)) +(defmethod relocate ((this metalhead-spawner) (offset int)) (dotimes (v1-0 19) (if (nonzero? (-> this path-tbl v1-0)) - (&+! (-> this path-tbl v1-0) arg0) + (&+! (-> this path-tbl v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type metalhead-spawner diff --git a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc index 58aa17526d..1049ad64a7 100644 --- a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc @@ -2153,11 +2153,11 @@ This commonly includes things such as: ;; definition for method 7 of type mtn-aval-rocks ;; WARN: Return type mismatch process-drawable vs mtn-aval-rocks. -(defmethod relocate ((this mtn-aval-rocks) (arg0 int)) +(defmethod relocate ((this mtn-aval-rocks) (offset int)) (if (nonzero? (-> this rock-data)) - (&+! (-> this rock-data) arg0) + (&+! (-> this rock-data) offset) ) - (the-as mtn-aval-rocks ((method-of-type process-drawable relocate) this arg0)) + (the-as mtn-aval-rocks ((method-of-type process-drawable relocate) this offset)) ) ;; definition of type mtn-aval-rocks-shadow diff --git a/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc b/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc index 384f79ca61..54d151ca40 100644 --- a/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc @@ -1902,11 +1902,11 @@ ) ;; definition for method 7 of type rhino -(defmethod relocate ((this rhino) (arg0 int)) +(defmethod relocate ((this rhino) (offset int)) (if (nonzero? (-> this path-intro)) - (&+! (-> this path-intro) arg0) + (&+! (-> this path-intro) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type rhino diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc index 8488c97cf7..d8295cb2f3 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc @@ -485,13 +485,13 @@ ;; definition for method 7 of type metalkor-legs ;; WARN: Return type mismatch process-focusable vs metalkor-legs. -(defmethod relocate ((this metalkor-legs) (arg0 int)) +(defmethod relocate ((this metalkor-legs) (offset int)) (dotimes (v1-0 6) (if (nonzero? (-> this joint-ik v1-0)) - (&+! (-> this joint-ik v1-0) arg0) + (&+! (-> this joint-ik v1-0) offset) ) ) - (the-as metalkor-legs ((method-of-type process-focusable relocate) this arg0)) + (the-as metalkor-legs ((method-of-type process-focusable relocate) this offset)) ) ;; definition for function metalkor-legs-handler @@ -1268,20 +1268,20 @@ ;; definition for method 7 of type metalkor-lowtorso ;; WARN: Return type mismatch process-focusable vs metalkor-lowtorso. -(defmethod relocate ((this metalkor-lowtorso) (arg0 int)) +(defmethod relocate ((this metalkor-lowtorso) (offset int)) (if (nonzero? (-> this tail)) - (&+! (-> this tail) arg0) + (&+! (-> this tail) offset) ) (if (nonzero? (-> this egg-toss-joint-1)) - (&+! (-> this egg-toss-joint-1) arg0) + (&+! (-> this egg-toss-joint-1) offset) ) (if (nonzero? (-> this egg-toss-joint-2)) - (&+! (-> this egg-toss-joint-2) arg0) + (&+! (-> this egg-toss-joint-2) offset) ) (if (nonzero? (-> this egg-toss-joint-3)) - (&+! (-> this egg-toss-joint-3) arg0) + (&+! (-> this egg-toss-joint-3) offset) ) - (the-as metalkor-lowtorso ((method-of-type process-focusable relocate) this arg0)) + (the-as metalkor-lowtorso ((method-of-type process-focusable relocate) this offset)) ) ;; failed to figure out what this is: @@ -1762,11 +1762,11 @@ This commonly includes things such as: ;; definition for method 7 of type metalkor-spinner ;; WARN: Return type mismatch process-drawable vs metalkor-spinner. -(defmethod relocate ((this metalkor-spinner) (arg0 int)) +(defmethod relocate ((this metalkor-spinner) (offset int)) (if (nonzero? (-> this chain)) - (&+! (-> this chain) arg0) + (&+! (-> this chain) offset) ) - (the-as metalkor-spinner ((method-of-type process-drawable relocate) this arg0)) + (the-as metalkor-spinner ((method-of-type process-drawable relocate) this offset)) ) ;; failed to figure out what this is: @@ -2435,15 +2435,15 @@ This commonly includes things such as: ;; definition for method 7 of type metalkor-bomb ;; WARN: Return type mismatch process-drawable vs metalkor-bomb. -(defmethod relocate ((this metalkor-bomb) (arg0 int)) +(defmethod relocate ((this metalkor-bomb) (offset int)) (dotimes (v1-0 (min 49 (-> *metalkor-bomb-probe-joints* length))) (when (nonzero? (-> this joint-mods v1-0)) (if (nonzero? (-> this joint-mods v1-0)) - (&+! (-> this joint-mods v1-0) arg0) + (&+! (-> this joint-mods v1-0) offset) ) ) ) - (the-as metalkor-bomb ((method-of-type process-drawable relocate) this arg0)) + (the-as metalkor-bomb ((method-of-type process-drawable relocate) this offset)) ) ;; definition for symbol *metalkor-bomb-collide-joints*, type (array int8) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc index bcf3bc1c38..4f565c6ed4 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc @@ -316,14 +316,14 @@ ;; definition for method 7 of type metalkor ;; WARN: Return type mismatch process-focusable vs metalkor. -(defmethod relocate ((this metalkor) (arg0 int)) +(defmethod relocate ((this metalkor) (offset int)) (if (nonzero? (-> this shot-anticipate)) - (&+! (-> this shot-anticipate) arg0) + (&+! (-> this shot-anticipate) offset) ) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (the-as metalkor ((method-of-type process-focusable relocate) this arg0)) + (the-as metalkor ((method-of-type process-focusable relocate) this offset)) ) ;; definition for method 20 of type metalkor @@ -2836,7 +2836,3 @@ (do-push-aways (-> self root)) ) ) - - - - diff --git a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc index dcbcce5f7e..1793acebef 100644 --- a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc @@ -1583,13 +1583,13 @@ ) ;; definition for method 7 of type mammoth -(defmethod relocate ((this mammoth) (arg0 int)) +(defmethod relocate ((this mammoth) (offset int)) (dotimes (v1-0 4) (if (nonzero? (-> this joint-ik v1-0)) - (&+! (-> this joint-ik v1-0) arg0) + (&+! (-> this joint-ik v1-0) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 114 of type mammoth diff --git a/test/decompiler/reference/jak2/levels/nest/nest-scenes_REF.gc b/test/decompiler/reference/jak2/levels/nest/nest-scenes_REF.gc index 56cc97ab24..9552d15764 100644 --- a/test/decompiler/reference/jak2/levels/nest/nest-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/nest-scenes_REF.gc @@ -181,13 +181,13 @@ ;; definition for method 7 of type canyon-lightning-thingy ;; WARN: Return type mismatch process-drawable vs canyon-lightning-thingy. -(defmethod relocate ((this canyon-lightning-thingy) (arg0 int)) +(defmethod relocate ((this canyon-lightning-thingy) (offset int)) (dotimes (index 5) (if (nonzero? (-> this lightning index)) - (&+! (-> this lightning index) arg0) + (&+! (-> this lightning index) offset) ) ) - (the-as canyon-lightning-thingy ((method-of-type process-drawable relocate) this arg0)) + (the-as canyon-lightning-thingy ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function canyon-lightning-thingy-init-by-other diff --git a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc index 0584b97c16..4b4983781a 100644 --- a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc @@ -1302,13 +1302,13 @@ ;; definition for method 7 of type squid-tentacle ;; WARN: Return type mismatch process-drawable vs squid-tentacle. -(defmethod relocate ((this squid-tentacle) (arg0 int)) +(defmethod relocate ((this squid-tentacle) (offset int)) (dotimes (v1-0 11) (if (nonzero? (-> this chain-joints v1-0 joint-mod)) - (&+! (-> this chain-joints v1-0 joint-mod) arg0) + (&+! (-> this chain-joints v1-0 joint-mod) offset) ) ) - (the-as squid-tentacle ((method-of-type process-drawable relocate) this arg0)) + (the-as squid-tentacle ((method-of-type process-drawable relocate) this offset)) ) ;; definition for function squid-tentacle-init-by-other @@ -1769,29 +1769,29 @@ ;; definition for method 7 of type squid ;; WARN: Return type mismatch process-drawable vs squid. -(defmethod relocate ((this squid) (arg0 int)) +(defmethod relocate ((this squid) (offset int)) (if (nonzero? (-> this thruster-part)) - (&+! (-> this thruster-part) arg0) + (&+! (-> this thruster-part) offset) ) (if (nonzero? (-> this first-path)) - (&+! (-> this first-path) arg0) + (&+! (-> this first-path) offset) ) (if (nonzero? (-> this second-path)) - (&+! (-> this second-path) arg0) + (&+! (-> this second-path) offset) ) (if (nonzero? (-> this third-path)) - (&+! (-> this third-path) arg0) + (&+! (-> this third-path) offset) ) (if (nonzero? (-> this gun-tilt-left-jm)) - (&+! (-> this gun-tilt-left-jm) arg0) + (&+! (-> this gun-tilt-left-jm) offset) ) (if (nonzero? (-> this gun-tilt-right-jm)) - (&+! (-> this gun-tilt-right-jm) arg0) + (&+! (-> this gun-tilt-right-jm) offset) ) (if (nonzero? (-> this tentacle-base-jm)) - (&+! (-> this tentacle-base-jm) arg0) + (&+! (-> this tentacle-base-jm) offset) ) - (the-as squid ((method-of-type process-drawable relocate) this arg0)) + (the-as squid ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type squid diff --git a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc index 9fbdbea1c2..15dac58b07 100644 --- a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc @@ -233,15 +233,15 @@ ;; definition for method 7 of type pal-electric-fan ;; WARN: Return type mismatch process-drawable vs pal-electric-fan. -(defmethod relocate ((this pal-electric-fan) (arg0 int)) +(defmethod relocate ((this pal-electric-fan) (offset int)) (dotimes (v1-0 3) (dotimes (a2-0 6) (if (nonzero? (-> (the-as pal-electric-fan (&+ this (* 112 v1-0))) poles 0 rings a2-0 lightning)) - (&+! (-> (the-as pal-electric-fan (&+ this (* 112 v1-0))) poles 0 rings a2-0 lightning) arg0) + (&+! (-> (the-as pal-electric-fan (&+ this (* 112 v1-0))) poles 0 rings a2-0 lightning) offset) ) ) ) - (the-as pal-electric-fan ((method-of-type process-drawable relocate) this arg0)) + (the-as pal-electric-fan ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type pal-electric-fan diff --git a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc index 5d7927aa33..e30bcbbf86 100644 --- a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc @@ -1464,11 +1464,11 @@ ) ;; definition for method 7 of type rapid-gunner -(defmethod relocate ((this rapid-gunner) (arg0 int)) +(defmethod relocate ((this rapid-gunner) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type rapid-gunner diff --git a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc index c16a908d13..bb785dfdce 100644 --- a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc @@ -431,7 +431,6 @@ ) ;; definition for method 3 of type ik-setup -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this ik-setup)) (when (not this) (set! this this) @@ -2324,16 +2323,16 @@ ) ;; definition for method 7 of type hosehead -(defmethod relocate ((this hosehead) (arg0 int)) +(defmethod relocate ((this hosehead) (offset int)) (if (nonzero? (-> this head-joint-mod)) - (&+! (-> this head-joint-mod) arg0) + (&+! (-> this head-joint-mod) offset) ) (dotimes (v1-4 4) (if (nonzero? (-> this joint-ik v1-4)) - (&+! (-> this joint-ik v1-4) arg0) + (&+! (-> this joint-ik v1-4) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 115 of type hosehead diff --git a/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc index bccbcad91e..46d54937d7 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc @@ -1067,17 +1067,17 @@ ;; definition for method 7 of type sew-gunturret ;; WARN: Return type mismatch enemy vs sew-gunturret. -(defmethod relocate ((this sew-gunturret) (arg0 int)) +(defmethod relocate ((this sew-gunturret) (offset int)) (if (nonzero? (-> this gun-tilt-jm)) - (&+! (-> this gun-tilt-jm) arg0) + (&+! (-> this gun-tilt-jm) offset) ) (if (nonzero? (-> this smoke-part)) - (&+! (-> this smoke-part) arg0) + (&+! (-> this smoke-part) offset) ) (if (nonzero? (-> this casing-part)) - (&+! (-> this casing-part) arg0) + (&+! (-> this casing-part) offset) ) - (the-as sew-gunturret ((method-of-type enemy relocate) this arg0)) + (the-as sew-gunturret ((method-of-type enemy relocate) this offset)) ) ;; definition for method 141 of type sew-gunturret diff --git a/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc index 6ff9f1bb7c..76f7ab19c0 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc @@ -353,11 +353,11 @@ For example for an elevator pre-compute the distance between the first and last ) ;; definition for method 7 of type sew-valve -(defmethod relocate ((this sew-valve) (arg0 int)) +(defmethod relocate ((this sew-valve) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type sew-valve diff --git a/test/decompiler/reference/jak2/levels/stadium/racebike_REF.gc b/test/decompiler/reference/jak2/levels/stadium/racebike_REF.gc index b42b135b11..d6ce49c4c0 100644 --- a/test/decompiler/reference/jak2/levels/stadium/racebike_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/racebike_REF.gc @@ -801,11 +801,11 @@ ) ;; definition for method 7 of type vehicle-race-bike -(defmethod relocate ((this vehicle-race-bike) (arg0 int)) +(defmethod relocate ((this vehicle-race-bike) (offset int)) (if (nonzero? (-> this steering-wheel)) - (&+! (-> this steering-wheel) arg0) + (&+! (-> this steering-wheel) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 86 of type vehicle-race-bike diff --git a/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc b/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc index 3decb30a6c..54408f571b 100644 --- a/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc @@ -276,11 +276,11 @@ ;; definition for method 7 of type strip-chain-crate-slave ;; WARN: Return type mismatch process-drawable vs strip-chain-crate-slave. -(defmethod relocate ((this strip-chain-crate-slave) (arg0 int)) +(defmethod relocate ((this strip-chain-crate-slave) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) - (the-as strip-chain-crate-slave ((method-of-type process-drawable relocate) this arg0)) + (the-as strip-chain-crate-slave ((method-of-type process-drawable relocate) this offset)) ) ;; definition of type strip-chain-crate diff --git a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc index dd6db2bc3a..7585467eaf 100644 --- a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc @@ -418,11 +418,11 @@ This commonly includes things such as: ) ;; definition for method 7 of type pitspikes -(defmethod relocate ((this pitspikes) (arg0 int)) +(defmethod relocate ((this pitspikes) (offset int)) (if (nonzero? (-> this spinner)) - (&+! (-> this spinner) arg0) + (&+! (-> this spinner) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type pitspikes @@ -634,17 +634,17 @@ This commonly includes things such as: ;; definition for method 7 of type grenade-point ;; WARN: Return type mismatch process-drawable vs grenade-point. -(defmethod relocate ((this grenade-point) (arg0 int)) +(defmethod relocate ((this grenade-point) (offset int)) (if (nonzero? (-> this part2)) - (&+! (-> this part2) arg0) + (&+! (-> this part2) offset) ) (if (nonzero? (-> this part3)) - (&+! (-> this part3) arg0) + (&+! (-> this part3) offset) ) (if (nonzero? (-> this part-lightning-hit)) - (&+! (-> this part-lightning-hit) arg0) + (&+! (-> this part-lightning-hit) offset) ) - (the-as grenade-point ((method-of-type process-drawable relocate) this arg0)) + (the-as grenade-point ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type grenade-point @@ -1709,11 +1709,11 @@ This commonly includes things such as: ;; definition for method 7 of type drill-plat ;; WARN: Return type mismatch process-drawable vs drill-plat. -(defmethod relocate ((this drill-plat) (arg0 int)) +(defmethod relocate ((this drill-plat) (offset int)) (if (nonzero? (-> this plat-sound)) - (&+! (-> this plat-sound) arg0) + (&+! (-> this plat-sound) offset) ) - (the-as drill-plat ((method-of-type process-drawable relocate) this arg0)) + (the-as drill-plat ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type drill-plat diff --git a/test/decompiler/reference/jak2/levels/title/title-obs_REF.gc b/test/decompiler/reference/jak2/levels/title/title-obs_REF.gc index 2ea5a61382..7dfb563094 100644 --- a/test/decompiler/reference/jak2/levels/title/title-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/title/title-obs_REF.gc @@ -56,13 +56,13 @@ ;; definition for method 7 of type title-control ;; WARN: Return type mismatch process vs title-control. -(defmethod relocate ((this title-control) (arg0 int)) +(defmethod relocate ((this title-control) (offset int)) (dotimes (v1-0 2) (if (nonzero? (-> this buffer v1-0)) - (&+! (-> this buffer v1-0) arg0) + (&+! (-> this buffer v1-0) offset) ) ) - (the-as title-control ((method-of-type process relocate) this arg0)) + (the-as title-control ((method-of-type process relocate) this offset)) ) ;; definition for method 10 of type title-control diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc index 4bdd979889..2bf6681574 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc @@ -1736,11 +1736,11 @@ This commonly includes things such as: ;; definition for method 7 of type tomb-plat-return ;; WARN: Return type mismatch process-drawable vs tomb-plat-return. -(defmethod relocate ((this tomb-plat-return) (arg0 int)) +(defmethod relocate ((this tomb-plat-return) (offset int)) (if (nonzero? (-> this intro-path)) - (&+! (-> this intro-path) arg0) + (&+! (-> this intro-path) offset) ) - (the-as tomb-plat-return ((method-of-type process-drawable relocate) this arg0)) + (the-as tomb-plat-return ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type tomb-plat-return @@ -2102,8 +2102,8 @@ This commonly includes things such as: ;; definition for method 7 of type tomb-sphinx ;; WARN: Return type mismatch process-drawable vs tomb-sphinx. -(defmethod relocate ((this tomb-sphinx) (arg0 int)) - (the-as tomb-sphinx ((method-of-type process-drawable relocate) this arg0)) +(defmethod relocate ((this tomb-sphinx) (offset int)) + (the-as tomb-sphinx ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type tomb-sphinx diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc index 6ded42750c..bfde7496e8 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc @@ -1125,11 +1125,11 @@ This commonly includes things such as: ;; definition for method 7 of type tomb-plat-simon ;; WARN: Return type mismatch process-drawable vs tomb-plat-simon. -(defmethod relocate ((this tomb-plat-simon) (arg0 int)) +(defmethod relocate ((this tomb-plat-simon) (offset int)) (if (nonzero? (-> this plat)) - (&+! (-> this plat) arg0) + (&+! (-> this plat) offset) ) - (the-as tomb-plat-simon ((method-of-type process-drawable relocate) this arg0)) + (the-as tomb-plat-simon ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type tomb-plat-simon @@ -2632,11 +2632,11 @@ This commonly includes things such as: ;; definition for method 7 of type tomb-water-trap ;; WARN: Return type mismatch process-drawable vs tomb-water-trap. -(defmethod relocate ((this tomb-water-trap) (arg0 int)) +(defmethod relocate ((this tomb-water-trap) (offset int)) (if (nonzero? (-> this l-index)) - (&+! (-> this l-index) arg0) + (&+! (-> this l-index) offset) ) - (the-as tomb-water-trap ((method-of-type process-drawable relocate) this arg0)) + (the-as tomb-water-trap ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type tomb-water-trap diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc index 541cfe144e..b4f0559046 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc @@ -1271,26 +1271,26 @@ This commonly includes things such as: ) ;; definition for method 7 of type widow-bomb -(defmethod relocate ((this widow-bomb) (arg0 int)) +(defmethod relocate ((this widow-bomb) (offset int)) (if (nonzero? (-> this explode-part)) - (&+! (-> this explode-part) arg0) + (&+! (-> this explode-part) offset) ) (if (nonzero? (-> this trail-part)) - (&+! (-> this trail-part) arg0) + (&+! (-> this trail-part) offset) ) (if (nonzero? (-> this warning-glow-part)) - (&+! (-> this warning-glow-part) arg0) + (&+! (-> this warning-glow-part) offset) ) (if (nonzero? (-> this warning-spark-part)) - (&+! (-> this warning-spark-part) arg0) + (&+! (-> this warning-spark-part) offset) ) (if (nonzero? (-> this skid-part)) - (&+! (-> this skid-part) arg0) + (&+! (-> this skid-part) offset) ) (if (nonzero? (-> this spin-jm)) - (&+! (-> this spin-jm) arg0) + (&+! (-> this spin-jm) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for function widow-bomb-reaction @@ -1679,11 +1679,11 @@ This commonly includes things such as: ) ;; definition for method 7 of type tomb-boss-pillar -(defmethod relocate ((this tomb-boss-pillar) (arg0 int)) +(defmethod relocate ((this tomb-boss-pillar) (offset int)) (if (nonzero? (-> this explode-part)) - (&+! (-> this explode-part) arg0) + (&+! (-> this explode-part) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; definition for method 11 of type tomb-boss-pillar diff --git a/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc index 1f7c79d3ff..8ff55dd3d9 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc @@ -133,46 +133,46 @@ ;; definition for method 7 of type widow ;; WARN: Return type mismatch process-drawable vs widow. -(defmethod relocate ((this widow) (arg0 int)) +(defmethod relocate ((this widow) (offset int)) (if (nonzero? (-> this left-cover-jm)) - (&+! (-> this left-cover-jm) arg0) + (&+! (-> this left-cover-jm) offset) ) (if (nonzero? (-> this right-cover-jm)) - (&+! (-> this right-cover-jm) arg0) + (&+! (-> this right-cover-jm) offset) ) (if (nonzero? (-> this left-drill-jm)) - (&+! (-> this left-drill-jm) arg0) + (&+! (-> this left-drill-jm) offset) ) (if (nonzero? (-> this right-drill-jm)) - (&+! (-> this right-drill-jm) arg0) + (&+! (-> this right-drill-jm) offset) ) (if (nonzero? (-> this drill-spark-part)) - (&+! (-> this drill-spark-part) arg0) + (&+! (-> this drill-spark-part) offset) ) (if (nonzero? (-> this drill-spark-part-alt)) - (&+! (-> this drill-spark-part-alt) arg0) + (&+! (-> this drill-spark-part-alt) offset) ) (if (nonzero? (-> this extract-stone-part)) - (&+! (-> this extract-stone-part) arg0) + (&+! (-> this extract-stone-part) offset) ) (if (nonzero? (-> this insert-stone-part)) - (&+! (-> this insert-stone-part) arg0) + (&+! (-> this insert-stone-part) offset) ) (if (nonzero? (-> this land-part)) - (&+! (-> this land-part) arg0) + (&+! (-> this land-part) offset) ) (if (nonzero? (-> this green-charge-part)) - (&+! (-> this green-charge-part) arg0) + (&+! (-> this green-charge-part) offset) ) (if (nonzero? (-> this green-fire-part)) - (&+! (-> this green-fire-part) arg0) + (&+! (-> this green-fire-part) offset) ) (dotimes (v1-44 5) (if (nonzero? (-> this lightning v1-44)) - (&+! (-> this lightning v1-44) arg0) + (&+! (-> this lightning v1-44) offset) ) ) - (the-as widow ((method-of-type process-drawable relocate) this arg0)) + (the-as widow ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type widow diff --git a/test/decompiler/reference/jak2/levels/under/centipede_REF.gc b/test/decompiler/reference/jak2/levels/under/centipede_REF.gc index fcf30b51f7..d5cd7cc118 100644 --- a/test/decompiler/reference/jak2/levels/under/centipede_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/centipede_REF.gc @@ -230,14 +230,14 @@ ;; definition for method 7 of type centipede ;; WARN: Return type mismatch nav-enemy vs centipede. -(defmethod relocate ((this centipede) (arg0 int)) +(defmethod relocate ((this centipede) (offset int)) (if (nonzero? (-> this bobbing)) - (&+! (-> this bobbing) arg0) + (&+! (-> this bobbing) offset) ) (if (nonzero? (-> this legs-sound)) - (&+! (-> this legs-sound) arg0) + (&+! (-> this legs-sound) offset) ) - (the-as centipede ((method-of-type nav-enemy relocate) this arg0)) + (the-as centipede ((method-of-type nav-enemy relocate) this offset)) ) ;; definition for method 10 of type centipede diff --git a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc index b574489b45..d001d170ca 100644 --- a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc @@ -1275,13 +1275,13 @@ ;; definition for method 7 of type jellyfish ;; WARN: Return type mismatch hover-enemy vs jellyfish. -(defmethod relocate ((this jellyfish) (arg0 int)) +(defmethod relocate ((this jellyfish) (offset int)) (dotimes (v1-0 5) (if (nonzero? (-> this tentacles v1-0)) - (&+! (-> this tentacles v1-0) arg0) + (&+! (-> this tentacles v1-0) offset) ) ) - (the-as jellyfish ((method-of-type hover-enemy relocate) this arg0)) + (the-as jellyfish ((method-of-type hover-enemy relocate) this offset)) ) ;; definition for method 10 of type jellyfish diff --git a/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc b/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc index 3779da91f5..02ca4f7ba2 100644 --- a/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc @@ -425,11 +425,11 @@ ;; definition for method 7 of type under-laser ;; WARN: Return type mismatch process-drawable vs under-laser. -(defmethod relocate ((this under-laser) (arg0 int)) +(defmethod relocate ((this under-laser) (offset int)) (if (nonzero? (-> this lightning)) - (&+! (-> this lightning) arg0) + (&+! (-> this lightning) offset) ) - (the-as under-laser ((method-of-type process-drawable relocate) this arg0)) + (the-as under-laser ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type under-laser diff --git a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc index 3a55d798e8..4444d20597 100644 --- a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc @@ -1531,17 +1531,17 @@ This commonly includes things such as: ;; definition for method 7 of type under-mine ;; WARN: Return type mismatch process-drawable vs under-mine. -(defmethod relocate ((this under-mine) (arg0 int)) +(defmethod relocate ((this under-mine) (offset int)) (if (nonzero? (-> this main-mod)) - (&+! (-> this main-mod) arg0) + (&+! (-> this main-mod) offset) ) (if (nonzero? (-> this head-mod)) - (&+! (-> this head-mod) arg0) + (&+! (-> this head-mod) offset) ) (if (nonzero? (-> this chain)) - (&+! (-> this chain) arg0) + (&+! (-> this chain) offset) ) - (the-as under-mine ((method-of-type process-drawable relocate) this arg0)) + (the-as under-mine ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 11 of type under-mine diff --git a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc index 2b38bbafc0..956d4a36a1 100644 --- a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc @@ -697,11 +697,11 @@ ;; definition for method 7 of type under-locking ;; WARN: Return type mismatch process-drawable vs under-locking. -(defmethod relocate ((this under-locking) (arg0 int)) +(defmethod relocate ((this under-locking) (offset int)) (if (nonzero? (-> this draining-part)) - (&+! (-> this draining-part) arg0) + (&+! (-> this draining-part) offset) ) - (the-as under-locking ((method-of-type process-drawable relocate) this arg0)) + (the-as under-locking ((method-of-type process-drawable relocate) this offset)) ) ;; definition for method 10 of type under-locking diff --git a/test/decompiler/reference/jak3/decompiler-macros.gc b/test/decompiler/reference/jak3/decompiler-macros.gc index bd2e5f3c6f..37d952f2d6 100644 --- a/test/decompiler/reference/jak3/decompiler-macros.gc +++ b/test/decompiler/reference/jak3/decompiler-macros.gc @@ -677,4 +677,104 @@ (define-extern ,name ,type) (set! ,name (the-as ,type (__pc-get-mips2c ,(symbol->string name)))) ) + ) + +(defmacro copy-and-set-field (original field-name field-value) + `(let ((temp-copy ,original)) + (set! (-> temp-copy ,field-name) ,field-value) + temp-copy + ) + ) + +(defmacro res-lump-data (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time -1000000000.0)) + "Helper macro to get data from a res-lump without interpolation." + `(the-as ,type ((method-of-type res-lump get-property-data) + ,lump + ,name + 'interp + ,time + (the-as pointer #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-data-exact (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time 0.0)) + "Helper macro to get start of data from a res-lump." + `(the-as ,type ((method-of-type res-lump get-property-data) + ,lump + ,name + 'exact + ,time + (the-as pointer #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-struct (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time -1000000000.0)) + `(the-as ,type ((method-of-type res-lump get-property-struct) + ,lump + ,name + 'interp + ,time + (the-as structure #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-struct-exact (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (time 0.0)) + `(the-as ,type ((method-of-type res-lump get-property-struct) + ,lump + ,name + 'exact + ,time + (the-as structure #f) + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-value (lump name type &key (tag-ptr (the-as (pointer res-tag) #f)) &key (default (the-as uint128 0)) &key (time -1000000000.0)) + "Helper macro to get a value from a res-lump with no interpolation." + `(the-as ,type ((method-of-type res-lump get-property-value) + ,lump + ,name + 'interp + ,time + ,default + ,tag-ptr + *res-static-buf* + ) + ) + ) + +(defmacro res-lump-float (lump name &key (tag-ptr (the-as (pointer res-tag) #f)) &key (default 0.0) &key (time -1000000000.0)) + "Helper macro to get a float from a res-lump with no interpolation." + `((method-of-type res-lump get-property-value-float) + ,lump + ,name + 'interp + ,time + ,default + ,tag-ptr + *res-static-buf* + ) + ) + +;; cause the current process to change state +(defmacro go (next-state &rest args) + `(with-pp + (go-hook pp ,next-state ,@args) + ) + ) + +(defmacro go-virtual (state-name &key (proc self) &rest args) + "Change the current process to the virtual state of the given process." + `(go (method-of-object ,proc ,state-name) ,@args) ) \ No newline at end of file diff --git a/test/decompiler/reference/jak3/engine/ambient/ambient-h_REF.gc b/test/decompiler/reference/jak3/engine/ambient/ambient-h_REF.gc new file mode 100644 index 0000000000..7633ad601a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ambient/ambient-h_REF.gc @@ -0,0 +1,3420 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type talker-speech-class +(deftype talker-speech-class (structure) + "Contains metadata about a voice line or hint text being played/displayed." + ((name string) + (channel gui-channel) + (flags talker-flags) + (speech uint16) + (text-duration uint16) + (delay uint16) + (pos uint16) + (neg uint16) + (text-message text-id) + (on-close pair) + (camera string) + ) + :pack-me + (:methods + (talker-speech-class-method-9 (_type_) symbol) + (play-communicator-speech! (_type_) none) + (talker-speech-class-method-11 (_type_) none) + (talker-speech-class-method-12 (_type_ int) none) + (talker-speech-class-method-13 (_type_ int) none) + ) + ) + +;; definition for method 3 of type talker-speech-class +(defmethod inspect ((this talker-speech-class)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'talker-speech-class) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tchannel: ~D~%" (-> this channel)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tspeech: ~D~%" (-> this speech)) + (format #t "~1Ttext-duration: ~D~%" (-> this text-duration)) + (format #t "~1Tdelay: ~D~%" (-> this delay)) + (format #t "~1Tpos: ~D~%" (-> this pos)) + (format #t "~1Tneg: ~D~%" (-> this neg)) + (format #t "~1Ttext-message: ~D~%" (-> this text-message)) + (format #t "~1Ton-close: ~A~%" (-> this on-close)) + (format #t "~1Tcamera: ~A~%" (-> this camera)) + (label cfg-4) + this + ) + +;; definition of type talker +(deftype talker (process) + ((trans vector :inline) + (message talker-speech-class) + (total-time time-frame) + (total-off-time time-frame) + (start-time time-frame) + (state-time time-frame) + (voicebox handle) + (voice-id sound-id) + (message-id sound-id) + (region region) + (interp float) + (save? symbol) + (grab? symbol) + ) + (:state-methods + idle + active + exit + ) + (:methods + (talker-method-17 (_type_) none) + ) + ) + +;; definition for method 3 of type talker +(defmethod inspect ((this talker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Ttrans: ~`vector`P~%" (-> this stack)) + (format #t "~2Tmessage: #~%" (-> this message)) + (format #t "~2Ttotal-time: ~D~%" (-> this total-time)) + (format #t "~2Ttotal-off-time: ~D~%" (-> this total-off-time)) + (format #t "~2Tstart-time: ~D~%" (-> this start-time)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tvoicebox: ~D~%" (-> this voicebox)) + (format #t "~2Tvoice-id: ~D~%" (-> this voice-id)) + (format #t "~2Tmessage-id: ~D~%" (-> this message-id)) + (format #t "~2Tregion: #~%" (-> this region)) + (format #t "~2Tinterp: ~f~%" (-> this interp)) + (format #t "~2Tsave?: ~A~%" (-> this save?)) + (format #t "~2Tgrab?: ~A~%" (-> this grab?)) + (label cfg-4) + this + ) + +;; definition for symbol *talker-speech*, type (inline-array talker-speech-class) +(define *talker-speech* (new 'static 'inline-array talker-speech-class 365 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "DSbop002" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop004" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop008" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x3 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop010" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x4 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop011" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop016" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x6 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "DSbop017" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds020" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x8 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds043" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x9 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds043m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #xa + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds046" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #xb + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds046m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #xc + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax101" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax102" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax103" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #xf + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax104" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x10 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax105" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x11 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax106" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x12 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax107" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax108" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x14 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax109" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x15 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0450) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax110" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax111" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x17 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0451) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax112" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf4) + :speech #x18 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "mess005" + :channel (gui-channel message) + :speech #x19 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0452) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv063" + :channel (gui-channel voicebox) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv068" + :channel (gui-channel voicebox) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv069" + :channel (gui-channel voicebox) + :speech #x1c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0147) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv070" + :channel (gui-channel voicebox) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv077" + :channel (gui-channel voicebox) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo001" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x1f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-013e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo002" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x20 + :text-duration (seconds 5) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo003" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x21 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo004" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x22 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "demo005" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x23 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds162" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0002" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0005" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0004" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009b" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0006" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009c" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0035" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009d" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp009e" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sksp0072" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds164" + :channel (gui-channel daxter) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds129" + :channel (gui-channel daxter) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "racehint" + :channel (gui-channel message) + :speech #x32 + :text-duration (seconds 4) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv179" + :channel (gui-channel alert) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv180" + :channel (gui-channel alert) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "cityv181" + :channel (gui-channel alert) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "str001" + :channel (gui-channel message) + :flags (talker-flags tf0 tf4) + :speech #x36 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-013a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "str002" + :channel (gui-channel message) + :speech #x37 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-013a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "note001" + :channel (gui-channel notice) + :speech #x38 + :text-duration (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x39 + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0155) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01e" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3a + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0156) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01j" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3b + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0158) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro01k" + :channel (gui-channel notice) + :flags (talker-flags tf5) + :speech #x3c + :text-duration (seconds 3.5) + :neg #x1 + :text-message (text-id text-0157) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "intro03" + :channel (gui-channel notice-low) + :speech #x3d + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-020a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x3e + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x3f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam007" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #x40 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "klev001" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x41 + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax118" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x42 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck135" + :channel (gui-channel pecker) + :flags (talker-flags tf0) + :speech #x43 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck114" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x44 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck115" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x45 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0408) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck129" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x46 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0409) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck122" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x47 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0450) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck119" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x48 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck124" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x49 + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-0451) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck141" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4a + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck141m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4b + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck131" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4c + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck131m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4d + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck126" + :channel (gui-channel pecker) + :flags (talker-flags tf0 tf4) + :speech #x4e + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "peck126m" + :channel (gui-channel message) + :flags (talker-flags tf4) + :speech #x4f + :text-duration (seconds 1) + :neg #x1 + :text-message (text-id text-040d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax126" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x50 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "gun-fire" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x51 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-012c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "klev002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x52 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x53 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "pregame1" + :channel (gui-channel message) + :speech #x54 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0465) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "leaper01" + :channel (gui-channel message) + :speech #x55 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0466) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "leaper02" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x56 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0467) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic01" + :channel (gui-channel message) + :speech #x57 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0468) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic02" + :channel (gui-channel message) + :speech #x58 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0469) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic03" + :channel (gui-channel message) + :speech #x59 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-046a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic04" + :channel (gui-channel message) + :speech #x5a + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-058d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic05" + :channel (gui-channel message) + :speech #x5b + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0571) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "vehic06" + :channel (gui-channel message) + :speech #x5c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0888) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x5d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x5e + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax133" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-046b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "mine001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x60 + :text-duration (seconds 3) + :neg #x1 + :text-message (text-id text-053d) + :on-close #f + :camera "camera-348" + ) + (new 'static 'talker-speech-class + :name "klev004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x61 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "gun001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x62 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-053e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam003" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x63 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax234" + :channel (gui-channel daxter) + :speech #x64 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "fac001" + :channel (gui-channel message) + :speech #x65 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0547) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam003" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x66 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x67 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam002" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x68 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "for001" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x69 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-06df) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf8) + :speech #x6a + :delay (seconds 8) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam006" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #x6b + :delay (seconds 5) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup001" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6c + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup002" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6d + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup003" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6e + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-056d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup004" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x6f + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0579) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup005" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x70 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup006" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x71 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0576) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup007" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x72 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup008" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x73 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0577) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup009" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x74 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup010" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x75 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057d) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup011" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x76 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0578) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup012" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x77 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup013" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x78 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-057f) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup014" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x79 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0580) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup015" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7a + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0581) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup016" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7b + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0582) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup017" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7c + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f2) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup018" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7d + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f3) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup019" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7e + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0614) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup020" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x7f + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f5) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup021" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x80 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0615) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup022" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x81 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0616) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup023" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf3 tf6) + :speech #x82 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0617) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup024" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x83 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0618) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup025" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x84 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0619) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup026" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x85 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-061a) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup099" + :channel (gui-channel alert) + :speech #x86 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-061b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup028" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x87 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-07ba) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup029" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x88 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0857) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup030" + :channel (gui-channel alert) + :flags (talker-flags tf1 tf6) + :speech #x89 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0858) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "powup031" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf1 tf6) + :speech #x8a + :text-duration (seconds 10) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-0892) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "hang001" + :channel (gui-channel message) + :speech #x8b + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-056e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn001" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf2) + :speech #x8c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "jak112" + :channel (gui-channel jak) + :flags (talker-flags tf0) + :speech #x8d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn008" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x8e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn136" + :channel (gui-channel voicebox) + :speech #x8f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn137" + :channel (gui-channel voicebox) + :speech #x90 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn138" + :channel (gui-channel voicebox) + :speech #x91 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn139" + :channel (gui-channel voicebox) + :speech #x92 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn140" + :channel (gui-channel voicebox) + :speech #x93 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn141" + :channel (gui-channel voicebox) + :speech #x94 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn142" + :channel (gui-channel voicebox) + :speech #x95 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn143" + :channel (gui-channel voicebox) + :speech #x96 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn144" + :channel (gui-channel voicebox) + :speech #x97 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn145" + :channel (gui-channel voicebox) + :speech #x98 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn146" + :channel (gui-channel voicebox) + :speech #x99 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn147" + :channel (gui-channel voicebox) + :speech #x9a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn148" + :channel (gui-channel voicebox) + :speech #x9b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax779" + :channel (gui-channel voicebox) + :speech #x9c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax780" + :channel (gui-channel voicebox) + :speech #x9d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes01" + :channel (gui-channel message) + :speech #x9e + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes02" + :channel (gui-channel message) + :speech #x9f + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040e) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "volmes03" + :channel (gui-channel message) + :speech #xa0 + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tplmes01" + :channel (gui-channel message) + :speech #xa1 + :text-duration (seconds 5) + :pos #x3 + :neg #x1 + :text-message (text-id text-040c) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xa2 + :delay (seconds 2) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sam005" + :channel (gui-channel voicebox) + :speech #xa3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "forest-turn-on-mach-res" + :channel (gui-channel voicebox) + :speech #xa4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam004" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xa5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds704" + :channel (gui-channel daxter) + :speech #xa6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds705" + :channel (gui-channel daxter) + :speech #xa7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds256" + :channel (gui-channel daxter) + :speech #xa8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ds257" + :channel (gui-channel daxter) + :speech #xa9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax123" + :channel (gui-channel daxter) + :speech #xaa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax586" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xab + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax585" + :channel (gui-channel daxter) + :speech #xac + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem003" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #xad + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax724" + :channel (gui-channel daxter) + :speech #xae + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax725" + :channel (gui-channel daxter) + :speech #xaf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax726" + :channel (gui-channel daxter) + :speech #xb0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax727" + :channel (gui-channel daxter) + :speech #xb1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax728" + :channel (gui-channel daxter) + :speech #xb2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax729" + :channel (gui-channel daxter) + :speech #xb3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax730" + :channel (gui-channel daxter) + :speech #xb4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax731" + :channel (gui-channel daxter) + :speech #xb5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #xb6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkjak1" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #xb7 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0600) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb10win" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #xb8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb21fail" + :channel (gui-channel voicebox) + :speech #xb9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb01w" + :channel (gui-channel alert) + :speech #xba + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb01f" + :channel (gui-channel alert) + :speech #xbb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb02w" + :channel (gui-channel alert) + :speech #xbc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb02f" + :channel (gui-channel alert) + :speech #xbd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb03w" + :channel (gui-channel alert) + :speech #xbe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb03f" + :channel (gui-channel alert) + :speech #xbf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb04w" + :channel (gui-channel alert) + :speech #xc0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb04f" + :channel (gui-channel alert) + :speech #xc1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb05w" + :channel (gui-channel alert) + :speech #xc2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb05f" + :channel (gui-channel alert) + :speech #xc3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb06w" + :channel (gui-channel alert) + :speech #xc4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb06f" + :channel (gui-channel alert) + :speech #xc5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb07w" + :channel (gui-channel alert) + :speech #xc6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb07f" + :channel (gui-channel alert) + :speech #xc7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb08w" + :channel (gui-channel alert) + :speech #xc8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb08f" + :channel (gui-channel alert) + :speech #xc9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb09w" + :channel (gui-channel alert) + :speech #xca + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb09f" + :channel (gui-channel alert) + :speech #xcb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb10w" + :channel (gui-channel alert) + :speech #xcc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb10f" + :channel (gui-channel alert) + :speech #xcd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb11w" + :channel (gui-channel alert) + :speech #xce + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb11f" + :channel (gui-channel alert) + :speech #xcf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb12w" + :channel (gui-channel alert) + :speech #xd0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb12f" + :channel (gui-channel alert) + :speech #xd1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb13w" + :channel (gui-channel alert) + :speech #xd2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb13f" + :channel (gui-channel alert) + :speech #xd3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb14w" + :channel (gui-channel alert) + :speech #xd4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb14f" + :channel (gui-channel alert) + :speech #xd5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb15w" + :channel (gui-channel alert) + :speech #xd6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb15f" + :channel (gui-channel alert) + :speech #xd7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb16w" + :channel (gui-channel alert) + :speech #xd8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb16f" + :channel (gui-channel alert) + :speech #xd9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb17w" + :channel (gui-channel alert) + :speech #xda + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb17f" + :channel (gui-channel alert) + :speech #xdb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb18w" + :channel (gui-channel alert) + :speech #xdc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb18f" + :channel (gui-channel alert) + :speech #xdd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb19w" + :channel (gui-channel alert) + :speech #xde + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb19f" + :channel (gui-channel alert) + :speech #xdf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb20w" + :channel (gui-channel alert) + :speech #xe0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb20f" + :channel (gui-channel alert) + :speech #xe1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb21w" + :channel (gui-channel alert) + :speech #xe2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb21f" + :channel (gui-channel alert) + :speech #xe3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb22w" + :channel (gui-channel alert) + :speech #xe4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb22f" + :channel (gui-channel alert) + :speech #xe5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb23w" + :channel (gui-channel alert) + :speech #xe6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "o-bb23f" + :channel (gui-channel alert) + :speech #xe7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "light001" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf6) + :speech #xe8 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f6) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "light002" + :channel (gui-channel alert) + :flags (talker-flags tf0 tf6) + :speech #xe9 + :text-duration (seconds 5) + :delay (seconds 1) + :neg #x1 + :text-message (text-id text-05f7) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "keir003" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #xea + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0) + :speech #xeb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb01w" + :channel (gui-channel alert) + :speech #xec + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb01f" + :channel (gui-channel alert) + :speech #xed + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb02w" + :channel (gui-channel alert) + :speech #xee + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb02f" + :channel (gui-channel alert) + :speech #xef + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb03w" + :channel (gui-channel alert) + :speech #xf0 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb03f" + :channel (gui-channel alert) + :speech #xf1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb04w" + :channel (gui-channel alert) + :speech #xf2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb04f" + :channel (gui-channel alert) + :speech #xf3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb05w" + :channel (gui-channel alert) + :speech #xf4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb05f" + :channel (gui-channel alert) + :speech #xf5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb06w" + :channel (gui-channel alert) + :speech #xf6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb06f" + :channel (gui-channel alert) + :speech #xf7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb07w" + :channel (gui-channel alert) + :speech #xf8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb07f" + :channel (gui-channel alert) + :speech #xf9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb08w" + :channel (gui-channel alert) + :speech #xfa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb08f" + :channel (gui-channel alert) + :speech #xfb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb09w" + :channel (gui-channel alert) + :speech #xfc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb09f" + :channel (gui-channel alert) + :speech #xfd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb10w" + :channel (gui-channel alert) + :speech #xfe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb10f" + :channel (gui-channel alert) + :speech #xff + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb11w" + :channel (gui-channel alert) + :speech #x100 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb11f" + :channel (gui-channel alert) + :speech #x101 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb12w" + :channel (gui-channel alert) + :speech #x102 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb12f" + :channel (gui-channel alert) + :speech #x103 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb13w" + :channel (gui-channel alert) + :speech #x104 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb13f" + :channel (gui-channel alert) + :speech #x105 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb14w" + :channel (gui-channel alert) + :speech #x106 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb14f" + :channel (gui-channel alert) + :speech #x107 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb15w" + :channel (gui-channel alert) + :speech #x108 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb15f" + :channel (gui-channel alert) + :speech #x109 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb16w" + :channel (gui-channel alert) + :speech #x10a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb16f" + :channel (gui-channel alert) + :speech #x10b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb17w" + :channel (gui-channel alert) + :speech #x10c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb17f" + :channel (gui-channel alert) + :speech #x10d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb18w" + :channel (gui-channel alert) + :speech #x10e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb18f" + :channel (gui-channel alert) + :speech #x10f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb19w" + :channel (gui-channel alert) + :speech #x110 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb19f" + :channel (gui-channel alert) + :speech #x111 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb20w" + :channel (gui-channel alert) + :speech #x112 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb20f" + :channel (gui-channel alert) + :speech #x113 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb21w" + :channel (gui-channel alert) + :speech #x114 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb21f" + :channel (gui-channel alert) + :speech #x115 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb22w" + :channel (gui-channel alert) + :speech #x116 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb22f" + :channel (gui-channel alert) + :speech #x117 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb23w" + :channel (gui-channel alert) + :speech #x118 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb23f" + :channel (gui-channel alert) + :speech #x119 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb24w" + :channel (gui-channel alert) + :speech #x11a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb24f" + :channel (gui-channel alert) + :speech #x11b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb25w" + :channel (gui-channel alert) + :speech #x11c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb25f" + :channel (gui-channel alert) + :speech #x11d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb26w" + :channel (gui-channel alert) + :speech #x11e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "t-bb26f" + :channel (gui-channel alert) + :speech #x11f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb17win" + :channel (gui-channel alert) + :speech #x120 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb18fail" + :channel (gui-channel alert) + :speech #x121 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb13win" + :channel (gui-channel alert) + :speech #x122 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "bb03fail" + :channel (gui-channel alert) + :speech #x123 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb01w" + :channel (gui-channel alert) + :speech #x124 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb01f" + :channel (gui-channel alert) + :speech #x125 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb02w" + :channel (gui-channel alert) + :speech #x126 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb02f" + :channel (gui-channel alert) + :speech #x127 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb03w" + :channel (gui-channel alert) + :speech #x128 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb03f" + :channel (gui-channel alert) + :speech #x129 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb04w" + :channel (gui-channel alert) + :speech #x12a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb04f" + :channel (gui-channel alert) + :speech #x12b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb05w" + :channel (gui-channel alert) + :speech #x12c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb05f" + :channel (gui-channel alert) + :speech #x12d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb06w" + :channel (gui-channel alert) + :speech #x12e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb06f" + :channel (gui-channel alert) + :speech #x12f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb07w" + :channel (gui-channel alert) + :speech #x130 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb07f" + :channel (gui-channel alert) + :speech #x131 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb08w" + :channel (gui-channel alert) + :speech #x132 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb08f" + :channel (gui-channel alert) + :speech #x133 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb09w" + :channel (gui-channel alert) + :speech #x134 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb09f" + :channel (gui-channel alert) + :speech #x135 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb10w" + :channel (gui-channel alert) + :speech #x136 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb10f" + :channel (gui-channel alert) + :speech #x137 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb11w" + :channel (gui-channel alert) + :speech #x138 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb11f" + :channel (gui-channel alert) + :speech #x139 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb12w" + :channel (gui-channel alert) + :speech #x13a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb12f" + :channel (gui-channel alert) + :speech #x13b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb13w" + :channel (gui-channel alert) + :speech #x13c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "k-bb13f" + :channel (gui-channel alert) + :speech #x13d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn123" + :channel (gui-channel rider) + :speech #x13e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn124" + :channel (gui-channel voicebox) + :speech #x13f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn131" + :channel (gui-channel rider) + :speech #x140 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn128" + :channel (gui-channel voicebox) + :speech #x141 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn199" + :channel (gui-channel rider) + :speech #x142 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "torn200" + :channel (gui-channel rider) + :speech #x143 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "guards125a" + :channel (gui-channel rider) + :speech #x144 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor062" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x145 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax137" + :channel (gui-channel daxter) + :speech #x146 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax141" + :channel (gui-channel daxter) + :speech #x147 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax142" + :channel (gui-channel daxter) + :speech #x148 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax143" + :channel (gui-channel daxter) + :speech #x149 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax675" + :channel (gui-channel daxter) + :speech #x14a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax676" + :channel (gui-channel daxter) + :speech #x14b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax678" + :channel (gui-channel daxter) + :speech #x14c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax680" + :channel (gui-channel daxter) + :speech #x14d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "tor033" + :channel (gui-channel voicebox) + :speech #x14e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash119" + :channel (gui-channel voicebox) + :speech #x14f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash132" + :channel (gui-channel voicebox) + :flags (talker-flags tf3) + :speech #x150 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash119a" + :channel (gui-channel voicebox) + :speech #x151 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash101" + :channel (gui-channel ashelin) + :speech #x152 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "ash109" + :channel (gui-channel ashelin) + :speech #x153 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam102" + :channel (gui-channel rider) + :speech #x154 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam116" + :channel (gui-channel rider) + :speech #x155 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam117" + :channel (gui-channel rider) + :speech #x156 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam105" + :channel (gui-channel rider) + :speech #x157 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam109" + :channel (gui-channel rider) + :speech #x158 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam115" + :channel (gui-channel rider) + :speech #x159 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam121" + :channel (gui-channel rider) + :speech #x15a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam129" + :channel (gui-channel rider) + :speech #x15b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-pickup" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-077b) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-place" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15d + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0807) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "teach-shield" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x15e + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0864) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "formess1" + :channel (gui-channel message) + :speech #x15f + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-05ff) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkp001" + :channel (gui-channel message) + :speech #x160 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-05e7) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "darkp002" + :channel (gui-channel message) + :speech #x161 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07b4) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "redhint1" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x162 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07c3) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "redhint2" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x163 + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-07c4) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax619" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x164 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax613" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x165 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax615" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x166 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax624" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x167 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax623" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x168 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax622" + :channel (gui-channel daxter) + :flags (talker-flags tf0 tf3) + :speech #x169 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "hellcat-fire" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x16a + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0862) + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "seem005" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3 tf8) + :speech #x16b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "yellow3hint" + :channel (gui-channel message) + :flags (talker-flags tf0) + :speech #x16c + :text-duration (seconds 5) + :neg #x1 + :text-message (text-id text-0886) + :on-close #f + :camera #f + ) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc new file mode 100644 index 0000000000..59d5bd2068 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc @@ -0,0 +1,357 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type pilot-edge-grab-info +(deftype pilot-edge-grab-info (structure) + "Info for edge grabs on zoomers." + ((local-pos vector :inline) + (local-dir vector :inline) + (handle handle) + ) + ) + +;; definition for method 3 of type pilot-edge-grab-info +(defmethod inspect ((this pilot-edge-grab-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'pilot-edge-grab-info) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tlocal-dir: #~%" (-> this local-dir)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (label cfg-4) + this + ) + +;; definition of type edge-grab-info +(deftype edge-grab-info (structure) + ((world-vertex vector 8 :inline) + (local-vertex vector 8 :inline) + (status uint64) + (actor-cshape-prim-offset int32) + (actor-handle handle) + (hanging-matrix matrix :inline) + (edge-vertex vector 2 :inline :overlay-at (-> world-vertex 0)) + (center-hold vector :inline :overlay-at (-> world-vertex 2)) + (tri-vertex vector 3 :inline :overlay-at (-> world-vertex 3)) + (adjacent-edge-left-vertex vector :inline :overlay-at (-> world-vertex 6)) + (adjacent-edge-right-vertex vector :inline :overlay-at (-> world-vertex 7)) + (left-hand-hold vector :inline) + (right-hand-hold vector :inline) + (center-hold-old vector :inline) + (edge-tri-pat pat-surface) + (found-edge? symbol) + (pilot-edge-grab? symbol) + (pilot-edge-grab pilot-edge-grab-info :inline) + (pilot-start-grab-pos vector :inline) + (pilot-grab-interp float) + ) + (:methods + (edge-grab-info-method-9 () none) + (edge-grab-info-method-10 () none) + ) + ) + +;; definition for method 3 of type edge-grab-info +(defmethod inspect ((this edge-grab-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'edge-grab-info) + (format #t "~1Tworld-vertex[8] @ #x~X~%" (-> this world-vertex)) + (format #t "~1Tlocal-vertex[8] @ #x~X~%" (-> this local-vertex)) + (format #t "~1Tstatus: ~D~%" (-> this status)) + (format #t "~1Tactor-cshape-prim-offset: ~D~%" (-> this actor-cshape-prim-offset)) + (format #t "~1Tactor-handle: ~D~%" (-> this actor-handle)) + (format #t "~1Thanging-matrix: #~%" (-> this hanging-matrix)) + (format #t "~1Tedge-vertex[2] @ #x~X~%" (-> this world-vertex)) + (format #t "~1Tcenter-hold: ~`vector`P~%" (-> this center-hold)) + (format #t "~1Ttri-vertex[3] @ #x~X~%" (-> this tri-vertex)) + (format #t "~1Tadjacent-edge-left-vertex: #~%" (-> this adjacent-edge-left-vertex)) + (format #t "~1Tadjacent-edge-right-vertex: #~%" (-> this adjacent-edge-right-vertex)) + (format #t "~1Tleft-hand-hold: #~%" (-> this left-hand-hold)) + (format #t "~1Tright-hand-hold: #~%" (-> this right-hand-hold)) + (format #t "~1Tcenter-hold-old: ~`vector`P~%" (-> this center-hold-old)) + (format #t "~1Tedge-tri-pat: ~D~%" (-> this edge-tri-pat)) + (format #t "~1Tfound-edge?: ~A~%" (-> this found-edge?)) + (format #t "~1Tpilot-edge-grab?: ~A~%" (-> this pilot-edge-grab?)) + (format #t "~1Tpilot-edge-grab: #~%" (-> this pilot-edge-grab)) + (format #t "~1Tpilot-start-grab-pos: #~%" (-> this pilot-start-grab-pos)) + (format #t "~1Tpilot-grab-interp: ~f~%" (-> this pilot-grab-interp)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-tri +(deftype collide-edge-tri (structure) + "A triangle involved in edge grab collision." + ((ctri collide-cache-tri) + (normal vector :inline) + ) + ) + +;; definition for method 3 of type collide-edge-tri +(defmethod inspect ((this collide-edge-tri)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-tri) + (format #t "~1Tctri: ~A~%" (-> this ctri)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-edge +(deftype collide-edge-edge (structure) + ((ignore symbol) + (etri collide-edge-tri) + (vertex-ptr (inline-array vector) 2) + (outward vector :inline) + (edge-vec-norm vector :inline) + ) + (:methods + (collide-edge-edge-method-9 () none) + ) + ) + +;; definition for method 3 of type collide-edge-edge +(defmethod inspect ((this collide-edge-edge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-edge) + (format #t "~1Tignore: ~A~%" (-> this ignore)) + (format #t "~1Tetri: #~%" (-> this etri)) + (format #t "~1Tvertex-ptr[2] @ #x~X~%" (-> this vertex-ptr)) + (format #t "~1Toutward: #~%" (-> this outward)) + (format #t "~1Tedge-vec-norm: #~%" (-> this edge-vec-norm)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-hold-item +(deftype collide-edge-hold-item (structure) + ((next collide-edge-hold-item) + (rating float) + (split int8) + (edge collide-edge-edge) + (center-pt vector :inline) + (outward-pt vector :inline) + ) + ) + +;; definition for method 3 of type collide-edge-hold-item +(defmethod inspect ((this collide-edge-hold-item)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-hold-item) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Trating: ~f~%" (-> this rating)) + (format #t "~1Tsplit: ~D~%" (-> this split)) + (format #t "~1Tedge: #~%" (-> this edge)) + (format #t "~1Tcenter-pt: #~%" (-> this center-pt)) + (format #t "~1Toutward-pt: #~%" (-> this outward-pt)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-hold-list +(deftype collide-edge-hold-list (structure) + ((num-allocs uint32) + (num-attempts uint32) + (head collide-edge-hold-item) + (items collide-edge-hold-item 32 :inline) + (attempts qword 32 :inline) + ) + (:methods + (collide-edge-hold-list-method-9 () none) + (collide-edge-hold-list-method-10 () none) + ) + ) + +;; definition for method 3 of type collide-edge-hold-list +(defmethod inspect ((this collide-edge-hold-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-hold-list) + (format #t "~1Tnum-allocs: ~D~%" (-> this num-allocs)) + (format #t "~1Tnum-attempts: ~D~%" (-> this num-attempts)) + (format #t "~1Thead: #~%" (-> this head)) + (format #t "~1Titems[32] @ #x~X~%" (-> this items)) + (format #t "~1Tattempts[32] @ #x~X~%" (-> this attempts)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-spec +(deftype collide-edge-spec (structure) + ((split-dists float 2) + (outward-offset vector :inline) + (flags collide-edge-spec-flags) + (ignore-pat pat-surface) + (max-dist-sqrd-to-outward-pt float) + (max-dir-cosa-delta float) + (max-dir-cosa-player float) + (touching-segment symbol) + (local-cache-fill-box bounding-box :inline) + (local-within-reach-box bounding-box :inline) + (local-player-spheres sphere 12 :inline :offset 128) + (local-player-hanging-spheres sphere 6 :inline :overlay-at (-> local-player-spheres 0)) + (local-player-leap-up-spheres sphere 6 :inline :overlay-at (-> local-player-spheres 6)) + ) + ) + +;; definition for method 3 of type collide-edge-spec +(defmethod inspect ((this collide-edge-spec)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-spec) + (format #t "~1Tsplit-dists[2] @ #x~X~%" (-> this split-dists)) + (format #t "~1Toutward-offset: #~%" (-> this outward-offset)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tignore-pat: ~D~%" (-> this ignore-pat)) + (format #t "~1Tmax-dist-sqrd-to-outward-pt: ~f~%" (-> this max-dist-sqrd-to-outward-pt)) + (format #t "~1Tmax-dir-cosa-delta: ~f~%" (-> this max-dir-cosa-delta)) + (format #t "~1Tmax-dir-cosa-player: ~f~%" (-> this max-dir-cosa-player)) + (format #t "~1Ttouching-segment: #x~X~%" (-> this touching-segment)) + (format #t "~1Tlocal-cache-fill-box: #~%" (-> this local-cache-fill-box)) + (format #t "~1Tlocal-within-reach-box: #~%" (-> this local-within-reach-box)) + (format #t "~1Tlocal-player-spheres[12] @ #x~X~%" (-> this local-player-spheres)) + (format #t "~1Tlocal-player-hanging-spheres[6] @ #x~X~%" (-> this local-player-spheres)) + (format #t "~1Tlocal-player-leap-up-spheres[6] @ #x~X~%" (-> this local-player-leap-up-spheres)) + (label cfg-4) + this + ) + +;; definition of type collide-edge-work +(deftype collide-edge-work (structure) + ((ccache collide-cache) + (cshape collide-shape) + (num-verts uint32) + (num-edges uint32) + (num-tris uint32) + (cache-fill-box bounding-box :inline) + (within-reach-box bounding-box :inline) + (within-reach-box4w bounding-box4w :inline) + (search-pt vector :inline) + (search-dir-vec vector :inline) + (world-player-spheres sphere 12 :inline) + (world-player-hanging-spheres sphere 6 :inline :overlay-at (-> world-player-spheres 0)) + (world-player-leap-up-spheres sphere 6 :inline :overlay-at (-> world-player-spheres 6)) + (spec collide-edge-spec :inline) + (process (pointer process-drawable)) + (verts vector 64 :inline) + (edges collide-edge-edge 96 :inline) + (tris collide-edge-tri 48 :inline) + (hold-list collide-edge-hold-list :inline) + ) + (:methods + (collide-edge-work-method-9 () none) + (collide-edge-work-method-10 () none) + (collide-edge-work-method-11 () none) + (collide-edge-work-method-12 () none) + (collide-edge-work-method-13 () none) + (collide-edge-work-method-14 () none) + (collide-edge-work-method-15 () none) + (collide-edge-work-method-16 () none) + (collide-edge-work-method-17 () none) + (collide-edge-work-method-18 () none) + (collide-edge-work-method-19 () none) + (collide-edge-work-method-20 () none) + ) + ) + +;; definition for method 3 of type collide-edge-work +(defmethod inspect ((this collide-edge-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-edge-work) + (format #t "~1Tccache: ~A~%" (-> this ccache)) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (format #t "~1Tnum-verts: ~D~%" (-> this num-verts)) + (format #t "~1Tnum-edges: ~D~%" (-> this num-edges)) + (format #t "~1Tnum-tris: ~D~%" (-> this num-tris)) + (format #t "~1Tcache-fill-box: #~%" (-> this cache-fill-box)) + (format #t "~1Twithin-reach-box: #~%" (-> this within-reach-box)) + (format #t "~1Twithin-reach-box4w: #~%" (-> this within-reach-box4w)) + (format #t "~1Tsearch-pt: #~%" (-> this search-pt)) + (format #t "~1Tsearch-dir-vec: #~%" (-> this search-dir-vec)) + (format #t "~1Tworld-player-spheres[12] @ #x~X~%" (-> this world-player-spheres)) + (format #t "~1Tworld-player-hanging-spheres[6] @ #x~X~%" (-> this world-player-spheres)) + (format #t "~1Tworld-player-leap-up-spheres[6] @ #x~X~%" (-> this world-player-leap-up-spheres)) + (format #t "~1Tspec: #~%" (-> this spec)) + (format #t "~1Tprocess: #x~X~%" (-> this process)) + (format #t "~1Tverts[64] @ #x~X~%" (-> this verts)) + (format #t "~1Tedges[96] @ #x~X~%" (-> this edges)) + (format #t "~1Ttris[48] @ #x~X~%" (-> this tris)) + (format #t "~1Thold-list: #~%" (-> this hold-list)) + (label cfg-4) + this + ) + +;; definition for symbol *collide-edge-spec*, type collide-edge-spec +(define *collide-edge-spec* + (new 'static 'collide-edge-spec + :split-dists (new 'static 'array float 2 1024.0 1433.6) + :outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0) + :flags (collide-edge-spec-flags send-event) + :ignore-pat (new 'static 'pat-surface :noentity #x1 :noedge #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + :max-dist-sqrd-to-outward-pt 37748736.0 + :max-dir-cosa-delta 0.6 + :touching-segment #f + :local-cache-fill-box (new 'static 'bounding-box + :min (new 'static 'vector :x -8192.0 :y -11059.2 :z -8192.0 :w 1.0) + :max (new 'static 'vector :x 8192.0 :y 24576.0 :z 8192.0 :w 1.0) + ) + :local-within-reach-box (new 'static 'bounding-box + :min (new 'static 'vector :x -6144.0 :y 5324.8 :z -6144.0 :w 1.0) + :max (new 'static 'vector :x 6144.0 :y 11059.2 :z 6144.0 :w 1.0) + ) + :local-player-spheres (new 'static 'inline-array sphere 12 + (new 'static 'sphere :x 1720.32 :y -819.2 :r 1433.6) + (new 'static 'sphere :x 2293.76 :y -3276.8 :r 1884.16) + (new 'static 'sphere :x 1966.08 :y -6144.0 :r 1556.48) + (new 'static 'sphere :x 1966.08 :y -8601.6 :r 1556.48) + (new 'static 'sphere :x 1761.28 :y -11059.2 :r 1351.68) + (new 'static 'sphere :x 1679.36 :y -13312.0 :r 1269.76) + (new 'static 'sphere :x -737.28 :y 4096.0 :r 3072.0) + (new 'static 'sphere :x -737.28 :y 6553.6 :r 3072.0) + (new 'static 'sphere :x -737.28 :y 9420.8 :r 3072.0) + (new 'static 'sphere :x 1720.32 :y 3686.4 :r 2949.12) + (new 'static 'sphere :x 1720.32 :y 5734.4 :r 2949.12) + (new 'static 'sphere :x 1720.32 :y 8601.6 :r 2949.12) + ) + ) + ) + +;; failed to figure out what this is: +(kmemopen global "collide-edge-work") + +;; definition for symbol *collide-edge-work*, type collide-edge-work +(define *collide-edge-work* (new 'global 'collide-edge-work)) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer *collide-edge-spec*) 320) + +;; definition (perm) for symbol *edge-grab-info*, type edge-grab-info +(define-perm *edge-grab-info* edge-grab-info (new 'global 'edge-grab-info)) + +;; failed to figure out what this is: +(kmemclose) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-func-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-func-h_REF.gc new file mode 100644 index 0000000000..8e4b1f21d4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-func-h_REF.gc @@ -0,0 +1,9 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc new file mode 100644 index 0000000000..b88c763618 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc @@ -0,0 +1,198 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type collide-tri-result +(deftype collide-tri-result (structure) + "A triangle result of a collision." + ((vertex vector 3 :inline) + (intersect vector :inline) + (normal vector :inline) + (pat pat-surface) + (collide-ptr basic) + ) + ) + +;; definition for method 3 of type collide-tri-result +(defmethod inspect ((this collide-tri-result)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-tri-result) + (format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex)) + (format #t "~1Tintersect: ~`vector`P~%" (-> this intersect)) + (format #t "~1Tnormal: ~`vector`P~%" (-> this normal)) + (format #t "~1Tpat: ~D~%" (-> this pat)) + (format #t "~1Tcollide-ptr: ~A~%" (-> this collide-ptr)) + (label cfg-4) + this + ) + +;; definition of type collide-mesh-tri +(deftype collide-mesh-tri (structure) + "A triangle for foreground collision meshes." + ((vertex-index uint8 3) + (unused uint8) + (pat pat-surface) + ) + :pack-me + ) + +;; definition for method 3 of type collide-mesh-tri +(defmethod inspect ((this collide-mesh-tri)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-mesh-tri) + (format #t "~1Tvertex-index[3] @ #x~X~%" (-> this vertex-index)) + (format #t "~1Tunused: ~D~%" (-> this unused)) + (format #t "~1Tpat: ~D~%" (-> this pat)) + (label cfg-4) + this + ) + +;; definition of type collide-mesh +(deftype collide-mesh (basic) + "A collision mesh for foreground objects, +bound to the joint specified by `joint-id`." + ((joint-id int32) + (num-tris uint32) + (num-verts uint32) + (vertex-data (inline-array vector)) + (tris collide-mesh-tri 1 :inline :offset 32) + ) + (:methods + (collide-mesh-method-9 () none) + (collide-mesh-method-10 () none) + (collide-mesh-method-11 () none) + (collide-mesh-method-12 () none) + (collide-mesh-method-13 () none) + (collide-mesh-method-14 () none) + (collide-mesh-method-15 () none) + ) + ) + +;; definition for method 3 of type collide-mesh +(defmethod inspect ((this collide-mesh)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tjoint-id: ~D~%" (-> this joint-id)) + (format #t "~1Tnum-tris: ~D~%" (-> this num-tris)) + (format #t "~1Tnum-verts: ~D~%" (-> this num-verts)) + (format #t "~1Tvertex-data: #x~X~%" (-> this vertex-data)) + (format #t "~1Ttris[1] @ #x~X~%" (-> this tris)) + (label cfg-4) + this + ) + +;; definition of type collide-mesh-cache-tri +(deftype collide-mesh-cache-tri (structure) + "A triangle stored in the foreground mesh collide cache." + ((vertex vector 3 :inline) + (normal vector :inline) + (bbox4w bounding-box4w :inline) + (pat pat-surface :overlay-at (-> normal data 3)) + ) + ) + +;; definition for method 3 of type collide-mesh-cache-tri +(defmethod inspect ((this collide-mesh-cache-tri)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-mesh-cache-tri) + (format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex)) + (format #t "~1Tnormal: ~`vector`P~%" (-> this normal)) + (format #t "~1Tbbox4w: #~%" (-> this bbox4w)) + (format #t "~1Tpat: ~D~%" (-> this normal w)) + (label cfg-4) + this + ) + +;; definition of type collide-mesh-cache-entry +(deftype collide-mesh-cache-entry (structure) + "A foreground mesh collide cache entry." + ((mat matrix :inline) + (tris collide-mesh-cache-tri :dynamic) + ) + ) + +;; definition for method 3 of type collide-mesh-cache-entry +(defmethod inspect ((this collide-mesh-cache-entry)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-mesh-cache-entry) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Ttris[0] @ #x~X~%" (-> this tris)) + (label cfg-4) + this + ) + +;; definition of type collide-mesh-cache +(deftype collide-mesh-cache (basic) + "A collide cache for foreground meshes." + ((used-size uint32) + (max-size uint32) + (id uint32) + (data uint8 48000) + ) + (:methods + (collide-mesh-cache-method-9 () none) + (is-id? (_type_ int) symbol) + (next-id! (_type_) uint) + (collide-mesh-cache-method-12 () none) + ) + ) + +;; definition for method 3 of type collide-mesh-cache +(defmethod inspect ((this collide-mesh-cache)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tused-size: ~D~%" (-> this used-size)) + (format #t "~1Tmax-size: ~D~%" (-> this max-size)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tdata[48000] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for method 11 of type collide-mesh-cache +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for method 10 of type collide-mesh-cache +(defmethod is-id? ((this collide-mesh-cache) (id int)) + "Does this cache have the given ID?" + (= (-> this id) id) + ) + +;; failed to figure out what this is: +(kmemopen global "collide-mesh-cache") + +;; definition (perm) for symbol *collide-mesh-cache*, type collide-mesh-cache +(define-perm *collide-mesh-cache* collide-mesh-cache (new 'global 'collide-mesh-cache)) + +;; failed to figure out what this is: +(set! (-> *collide-mesh-cache* id) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *collide-mesh-cache* used-size) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *collide-mesh-cache* max-size) (the-as uint #xbb80)) + +;; failed to figure out what this is: +(kmemclose) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc new file mode 100644 index 0000000000..2b473ab357 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc @@ -0,0 +1,1691 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type collide-rider +(deftype collide-rider (structure) + "Something that rides a moving object." + ((rider-handle handle) + (sticky-prim collide-shape-prim) + (prim-ry float) + (rider-local-pos vector :inline) + ) + ) + +;; definition for method 3 of type collide-rider +(defmethod inspect ((this collide-rider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-rider) + (format #t "~1Trider-handle: ~D~%" (-> this rider-handle)) + (format #t "~1Tsticky-prim: ~A~%" (-> this sticky-prim)) + (format #t "~1Tprim-ry: ~f~%" (-> this prim-ry)) + (format #t "~1Trider-local-pos: #~%" (-> this rider-local-pos)) + (label cfg-4) + this + ) + +;; definition of type collide-rider-pool +(deftype collide-rider-pool (basic) + "A pool containing all the riders of an object." + ((alloc-count int32) + (riders collide-rider 20 :inline) + ) + (:methods + (collide-rider-pool-method-9 () none) + (prepare (_type_) none) + ) + ) + +;; definition for method 3 of type collide-rider-pool +(defmethod inspect ((this collide-rider-pool)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Talloc-count: ~D~%" (-> this alloc-count)) + (format #t "~1Triders[20] @ #x~X~%" (-> this riders)) + (label cfg-4) + this + ) + +;; definition for method 10 of type collide-rider-pool +;; WARN: Return type mismatch int vs none. +(defmethod prepare ((this collide-rider-pool)) + "Gets this pool ready to be used to allow allocations. This should be called once at the start of every frame." + (set! (-> this alloc-count) 0) + 0 + (none) + ) + +;; definition of type pull-rider-info +(deftype pull-rider-info (structure) + ((rider collide-rider) + (rider-cshape collide-shape-moving) + (rider-delta-ry float) + (rider-dest vector :inline) + ) + ) + +;; definition for method 3 of type pull-rider-info +(defmethod inspect ((this pull-rider-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'pull-rider-info) + (format #t "~1Trider: #~%" (-> this rider)) + (format #t "~1Trider-cshape: ~A~%" (-> this rider-cshape)) + (format #t "~1Trider-delta-ry: ~f~%" (-> this rider-delta-ry)) + (format #t "~1Trider-dest: #~%" (-> this rider-dest)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(kmemopen global "collide-lists") + +;; definition for symbol *collide-hit-by-player-list*, type engine +(define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 640 connection)) + +;; definition for symbol *collide-hit-by-others-list*, type engine +(define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 768 connection)) + +;; definition for symbol *collide-player-list*, type engine +(define *collide-player-list* (new 'global 'engine 'collide-player-list 32 connection)) + +;; failed to figure out what this is: +(kmemclose) + +;; definition of type overlaps-others-params +(deftype overlaps-others-params (structure) + ((options overlaps-others-options) + (collide-with-filter collide-spec) + (tlist touching-list) + (filtered-root-collide-with collide-spec) + (filtered-child-collide-with collide-spec) + (filtered-other-collide-as collide-spec) + ) + ) + +;; definition for method 3 of type overlaps-others-params +(defmethod inspect ((this overlaps-others-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'overlaps-others-params) + (format #t "~1Toptions: ~D~%" (-> this options)) + (format #t "~1Tcollide-with-filter: ~D~%" (-> this collide-with-filter)) + (format #t "~1Ttlist: ~A~%" (-> this tlist)) + (format #t "~1Tfiltered-root-collide-with: ~D~%" (-> this filtered-root-collide-with)) + (format #t "~1Tfiltered-child-collide-with: ~D~%" (-> this filtered-child-collide-with)) + (format #t "~1Tfiltered-other-collide-as: ~D~%" (-> this filtered-other-collide-as)) + (label cfg-4) + this + ) + +;; definition of type move-above-ground-params +(deftype move-above-ground-params (structure) + ((gnd-collide-with collide-spec) + (popup float) + (dont-move-if-overlaps? symbol) + (hover-if-no-ground? symbol) + (overlaps-params overlaps-others-params :inline) + (new-pos vector :inline) + (old-gspot-pos vector :inline) + (old-gspot-normal vector :inline) + (pat pat-surface) + (on-ground? symbol) + (do-move? symbol) + ) + ) + +;; definition for method 3 of type move-above-ground-params +(defmethod inspect ((this move-above-ground-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'move-above-ground-params) + (format #t "~1Tgnd-collide-with: ~D~%" (-> this gnd-collide-with)) + (format #t "~1Tpopup: ~f~%" (-> this popup)) + (format #t "~1Tdont-move-if-overlaps?: ~A~%" (-> this dont-move-if-overlaps?)) + (format #t "~1Thover-if-no-ground?: ~A~%" (-> this hover-if-no-ground?)) + (format #t "~1Toverlaps-params: #~%" (-> this overlaps-params)) + (format #t "~1Tnew-pos: #~%" (-> this new-pos)) + (format #t "~1Told-gspot-pos: #~%" (-> this old-gspot-pos)) + (format #t "~1Told-gspot-normal: #~%" (-> this old-gspot-normal)) + (format #t "~1Tpat: ~D~%" (-> this pat)) + (format #t "~1Ton-ground?: ~A~%" (-> this on-ground?)) + (format #t "~1Tdo-move?: ~A~%" (-> this do-move?)) + (label cfg-4) + this + ) + +;; definition of type collide-prim-core +(deftype collide-prim-core (structure) + "Collide primitives use this to store their world sphere and their collision flags." + ((world-sphere vector :inline) + (collide-as collide-spec) + (collide-with collide-spec) + (action collide-action) + (prim-type int8) + (unused1 uint8 3) + (quad uint128 2 :overlay-at (-> world-sphere data 0)) + ) + ) + +;; definition for method 3 of type collide-prim-core +(defmethod inspect ((this collide-prim-core)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-prim-core) + (format #t "~1Tworld-sphere: ~`vector`P~%" (-> this world-sphere)) + (format #t "~1Tcollide-as: ~D~%" (-> this collide-as)) + (format #t "~1Tcollide-with: ~D~%" (-> this collide-with)) + (format #t "~1Taction: ~D~%" (-> this action)) + (format #t "~1Tprim-type: ~D~%" (-> this prim-type)) + (format #t "~1Tunused1[3] @ #x~X~%" (-> this unused1)) + (format #t "~1Tquad[2] @ #x~X~%" (-> this world-sphere)) + (label cfg-4) + this + ) + +;; definition of type collide-shape-prim +(deftype collide-shape-prim (basic) + "Base class for collide primitives." + ((cshape collide-shape) + (prim-id uint32) + (transform-index int8) + (unused2 int8 3) + (prim-core collide-prim-core :inline :offset 16) + (local-sphere vector :inline :offset 48) + (specific uint8 16 :offset 64) + (world-sphere vector :inline :overlay-at (-> prim-core quad 0)) + (collide-as collide-spec :overlay-at (-> prim-core quad 1)) + (collide-with collide-spec :offset 36) + (action collide-action :offset 40) + (prim-type int8 :offset 44) + (radius meters :overlay-at (-> local-sphere w)) + ) + (:methods + (new (symbol type collide-shape uint int) _type_) + (collide-shape-prim-method-9 () none) + (collide-shape-prim-method-10 () none) + (collide-shape-prim-method-11 () none) + (collide-shape-prim-method-12 () none) + (collide-shape-prim-method-13 () none) + (collide-shape-prim-method-14 () none) + (collide-shape-prim-method-15 () none) + (collide-shape-prim-method-16 () none) + (collide-shape-prim-method-17 () none) + (collide-shape-prim-method-18 () none) + (collide-shape-prim-method-19 () none) + ) + ) + +;; definition for method 3 of type collide-shape-prim +(defmethod inspect ((this collide-shape-prim)) + (when (not this) + (set! this this) + (goto cfg-166) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (format #t "~1Tprim-id: #x~X~%" (-> this prim-id)) + (format #t "~1Ttransform-index: ~D~%" (-> this transform-index)) + (format #t "~1Tunused2[3] @ #x~X~%" (-> this unused2)) + (format #t "~1Tprim-core: #~%" (-> this prim-core)) + (format #t "~1Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) + (format #t "~1Tspecific[16] @ #x~X~%" (-> this specific)) + (format #t "~1Tworld-sphere: ~`vector`P~%" (-> this prim-core)) + (format #t "~1Tcollide-as: #x~X : (collide-spec " (-> this prim-core collide-as)) + (let ((s5-0 (-> this prim-core collide-as))) + (if (= (logand (collide-spec special-obstacle) s5-0) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-0) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-0 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-0 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-0) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-0) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-0) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-0 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-0 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-0 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-0 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-0 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-0) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-0) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-0) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-0 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-0) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-0 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-0) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-0) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-0 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-0 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-0 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-0) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-0) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-0) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-0 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-0) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-0 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-0 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-0) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-0 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Tcollide-with: #x~X : (collide-spec " (-> this prim-core collide-with)) + (let ((s5-1 (-> this prim-core collide-with))) + (if (= (logand (collide-spec special-obstacle) s5-1) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-1) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-1 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-1 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-1) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-1) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-1) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-1 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-1 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-1 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-1 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-1 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-1) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-1) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-1) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-1 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-1) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-1 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-1) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-1) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-1 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-1 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-1 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-1) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-1) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-1) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-1 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-1) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-1 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-1 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-1) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-1 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Taction: #x~X : (collide-action " (-> this prim-core action)) + (let ((s5-2 (-> this prim-core action))) + (if (= (logand s5-2 (collide-action deadly)) (collide-action deadly)) + (format #t "deadly ") + ) + (if (= (logand s5-2 (collide-action rideable)) (collide-action rideable)) + (format #t "rideable ") + ) + (if (= (logand s5-2 (collide-action can-ride)) (collide-action can-ride)) + (format #t "can-ride ") + ) + (if (= (logand s5-2 (collide-action persistent-attack)) (collide-action persistent-attack)) + (format #t "persistent-attack ") + ) + (if (= (logand (collide-action nav-sphere) s5-2) (collide-action nav-sphere)) + (format #t "nav-sphere ") + ) + (if (= (logand s5-2 (collide-action block-turn-around)) (collide-action block-turn-around)) + (format #t "block-turn-around ") + ) + (if (= (logand s5-2 (collide-action pull-rider-can-collide)) (collide-action pull-rider-can-collide)) + (format #t "pull-rider-can-collide ") + ) + (if (= (logand s5-2 (collide-action no-standon)) (collide-action no-standon)) + (format #t "no-standon ") + ) + (if (= (logand s5-2 (collide-action dont-push-away)) (collide-action dont-push-away)) + (format #t "dont-push-away ") + ) + (if (= (logand s5-2 (collide-action check-stuck)) (collide-action check-stuck)) + (format #t "check-stuck ") + ) + (if (= (logand s5-2 (collide-action no-smack)) (collide-action no-smack)) + (format #t "no-smack ") + ) + (if (= (logand s5-2 (collide-action semi-solid)) (collide-action semi-solid)) + (format #t "semi-solid ") + ) + (if (= (logand s5-2 (collide-action edge-grabbed)) (collide-action edge-grabbed)) + (format #t "edge-grabbed ") + ) + (if (= (logand s5-2 (collide-action stuck-wall-escape)) (collide-action stuck-wall-escape)) + (format #t "stuck-wall-escape ") + ) + (if (= (logand s5-2 (collide-action check-edge)) (collide-action check-edge)) + (format #t "check-edge ") + ) + (if (= (logand s5-2 (collide-action no-normal-reset)) (collide-action no-normal-reset)) + (format #t "no-normal-reset ") + ) + (if (= (logand s5-2 (collide-action solid)) (collide-action solid)) + (format #t "solid ") + ) + ) + (format #t ")~%") + (format #t "~1Tprim-type: ~D~%" (-> this prim-core prim-type)) + (format #t "~1Tradius: (meters ~m)~%" (-> this local-sphere w)) + (label cfg-166) + this + ) + +;; definition of type collide-shape-prim-sphere +(deftype collide-shape-prim-sphere (collide-shape-prim) + "A sphere primitive for collide shapes." + ((pat pat-surface :overlay-at (-> specific 0)) + (nav-radius float :overlay-at (-> specific 4)) + ) + (:methods + (new (symbol type collide-shape uint) _type_) + ) + ) + +;; definition for method 3 of type collide-shape-prim-sphere +(defmethod inspect ((this collide-shape-prim-sphere)) + (when (not this) + (set! this this) + (goto cfg-166) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (format #t "~1Tprim-id: #x~X~%" (-> this prim-id)) + (format #t "~1Ttransform-index: ~D~%" (-> this transform-index)) + (format #t "~1Tunused2[3] @ #x~X~%" (-> this unused2)) + (format #t "~1Tprim-core: #~%" (-> this prim-core)) + (format #t "~1Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) + (format #t "~1Tspecific[16] @ #x~X~%" (&-> this pat)) + (format #t "~1Tworld-sphere: ~`vector`P~%" (-> this prim-core)) + (format #t "~1Tcollide-as: #x~X : (collide-spec " (-> this prim-core collide-as)) + (let ((s5-0 (-> this prim-core collide-as))) + (if (= (logand (collide-spec special-obstacle) s5-0) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-0) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-0 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-0 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-0) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-0) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-0) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-0 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-0 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-0 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-0 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-0 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-0) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-0) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-0) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-0 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-0) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-0 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-0) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-0) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-0 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-0 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-0 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-0) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-0) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-0) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-0 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-0) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-0 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-0 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-0) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-0 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Tcollide-with: #x~X : (collide-spec " (-> this prim-core collide-with)) + (let ((s5-1 (-> this prim-core collide-with))) + (if (= (logand (collide-spec special-obstacle) s5-1) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-1) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-1 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-1 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-1) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-1) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-1) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-1 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-1 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-1 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-1 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-1 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-1) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-1) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-1) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-1 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-1) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-1 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-1) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-1) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-1 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-1 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-1 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-1) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-1) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-1) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-1 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-1) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-1 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-1 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-1) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-1 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Taction: #x~X : (collide-action " (-> this prim-core action)) + (let ((s5-2 (-> this prim-core action))) + (if (= (logand s5-2 (collide-action deadly)) (collide-action deadly)) + (format #t "deadly ") + ) + (if (= (logand s5-2 (collide-action rideable)) (collide-action rideable)) + (format #t "rideable ") + ) + (if (= (logand s5-2 (collide-action can-ride)) (collide-action can-ride)) + (format #t "can-ride ") + ) + (if (= (logand s5-2 (collide-action persistent-attack)) (collide-action persistent-attack)) + (format #t "persistent-attack ") + ) + (if (= (logand (collide-action nav-sphere) s5-2) (collide-action nav-sphere)) + (format #t "nav-sphere ") + ) + (if (= (logand s5-2 (collide-action block-turn-around)) (collide-action block-turn-around)) + (format #t "block-turn-around ") + ) + (if (= (logand s5-2 (collide-action pull-rider-can-collide)) (collide-action pull-rider-can-collide)) + (format #t "pull-rider-can-collide ") + ) + (if (= (logand s5-2 (collide-action no-standon)) (collide-action no-standon)) + (format #t "no-standon ") + ) + (if (= (logand s5-2 (collide-action dont-push-away)) (collide-action dont-push-away)) + (format #t "dont-push-away ") + ) + (if (= (logand s5-2 (collide-action check-stuck)) (collide-action check-stuck)) + (format #t "check-stuck ") + ) + (if (= (logand s5-2 (collide-action no-smack)) (collide-action no-smack)) + (format #t "no-smack ") + ) + (if (= (logand s5-2 (collide-action semi-solid)) (collide-action semi-solid)) + (format #t "semi-solid ") + ) + (if (= (logand s5-2 (collide-action edge-grabbed)) (collide-action edge-grabbed)) + (format #t "edge-grabbed ") + ) + (if (= (logand s5-2 (collide-action stuck-wall-escape)) (collide-action stuck-wall-escape)) + (format #t "stuck-wall-escape ") + ) + (if (= (logand s5-2 (collide-action check-edge)) (collide-action check-edge)) + (format #t "check-edge ") + ) + (if (= (logand s5-2 (collide-action no-normal-reset)) (collide-action no-normal-reset)) + (format #t "no-normal-reset ") + ) + (if (= (logand s5-2 (collide-action solid)) (collide-action solid)) + (format #t "solid ") + ) + ) + (format #t ")~%") + (format #t "~1Tprim-type: ~D~%" (-> this prim-core prim-type)) + (format #t "~1Tradius: (meters ~m)~%" (-> this local-sphere w)) + (format #t "~1Tpat: ~D~%" (-> this pat)) + (format #t "~1Tnav-radius: ~f~%" (-> this nav-radius)) + (label cfg-166) + this + ) + +;; definition of type collide-shape-prim-mesh +(deftype collide-shape-prim-mesh (collide-shape-prim) + "A mesh primitive for collide shapes." + ((mesh collide-mesh :overlay-at (-> specific 0)) + (mesh-id int32 :overlay-at (-> specific 4)) + (mesh-cache-id uint32 :overlay-at (-> specific 8)) + (mesh-cache-entry collide-mesh-cache-entry :overlay-at (-> specific 12)) + ) + (:methods + (new (symbol type collide-shape uint uint) _type_) + ) + ) + +;; definition for method 3 of type collide-shape-prim-mesh +(defmethod inspect ((this collide-shape-prim-mesh)) + (when (not this) + (set! this this) + (goto cfg-166) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (format #t "~1Tprim-id: #x~X~%" (-> this prim-id)) + (format #t "~1Ttransform-index: ~D~%" (-> this transform-index)) + (format #t "~1Tunused2[3] @ #x~X~%" (-> this unused2)) + (format #t "~1Tprim-core: #~%" (-> this prim-core)) + (format #t "~1Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) + (format #t "~1Tspecific[16] @ #x~X~%" (&-> this mesh)) + (format #t "~1Tworld-sphere: ~`vector`P~%" (-> this prim-core)) + (format #t "~1Tcollide-as: #x~X : (collide-spec " (-> this prim-core collide-as)) + (let ((s5-0 (-> this prim-core collide-as))) + (if (= (logand (collide-spec special-obstacle) s5-0) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-0) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-0 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-0 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-0) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-0) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-0) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-0 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-0 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-0 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-0 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-0 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-0) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-0) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-0) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-0 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-0) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-0 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-0) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-0) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-0 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-0 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-0 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-0) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-0) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-0) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-0 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-0) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-0 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-0 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-0) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-0 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Tcollide-with: #x~X : (collide-spec " (-> this prim-core collide-with)) + (let ((s5-1 (-> this prim-core collide-with))) + (if (= (logand (collide-spec special-obstacle) s5-1) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-1) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-1 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-1 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-1) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-1) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-1) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-1 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-1 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-1 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-1 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-1 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-1) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-1) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-1) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-1 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-1) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-1 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-1) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-1) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-1 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-1 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-1 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-1) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-1) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-1) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-1 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-1) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-1 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-1 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-1) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-1 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Taction: #x~X : (collide-action " (-> this prim-core action)) + (let ((s5-2 (-> this prim-core action))) + (if (= (logand s5-2 (collide-action deadly)) (collide-action deadly)) + (format #t "deadly ") + ) + (if (= (logand s5-2 (collide-action rideable)) (collide-action rideable)) + (format #t "rideable ") + ) + (if (= (logand s5-2 (collide-action can-ride)) (collide-action can-ride)) + (format #t "can-ride ") + ) + (if (= (logand s5-2 (collide-action persistent-attack)) (collide-action persistent-attack)) + (format #t "persistent-attack ") + ) + (if (= (logand (collide-action nav-sphere) s5-2) (collide-action nav-sphere)) + (format #t "nav-sphere ") + ) + (if (= (logand s5-2 (collide-action block-turn-around)) (collide-action block-turn-around)) + (format #t "block-turn-around ") + ) + (if (= (logand s5-2 (collide-action pull-rider-can-collide)) (collide-action pull-rider-can-collide)) + (format #t "pull-rider-can-collide ") + ) + (if (= (logand s5-2 (collide-action no-standon)) (collide-action no-standon)) + (format #t "no-standon ") + ) + (if (= (logand s5-2 (collide-action dont-push-away)) (collide-action dont-push-away)) + (format #t "dont-push-away ") + ) + (if (= (logand s5-2 (collide-action check-stuck)) (collide-action check-stuck)) + (format #t "check-stuck ") + ) + (if (= (logand s5-2 (collide-action no-smack)) (collide-action no-smack)) + (format #t "no-smack ") + ) + (if (= (logand s5-2 (collide-action semi-solid)) (collide-action semi-solid)) + (format #t "semi-solid ") + ) + (if (= (logand s5-2 (collide-action edge-grabbed)) (collide-action edge-grabbed)) + (format #t "edge-grabbed ") + ) + (if (= (logand s5-2 (collide-action stuck-wall-escape)) (collide-action stuck-wall-escape)) + (format #t "stuck-wall-escape ") + ) + (if (= (logand s5-2 (collide-action check-edge)) (collide-action check-edge)) + (format #t "check-edge ") + ) + (if (= (logand s5-2 (collide-action no-normal-reset)) (collide-action no-normal-reset)) + (format #t "no-normal-reset ") + ) + (if (= (logand s5-2 (collide-action solid)) (collide-action solid)) + (format #t "solid ") + ) + ) + (format #t ")~%") + (format #t "~1Tprim-type: ~D~%" (-> this prim-core prim-type)) + (format #t "~1Tradius: (meters ~m)~%" (-> this local-sphere w)) + (format #t "~1Tmesh: ~A~%" (-> this mesh)) + (format #t "~1Tmesh-id: ~D~%" (-> this mesh-id)) + (format #t "~1Tmesh-cache-id: ~D~%" (-> this mesh-cache-id)) + (format #t "~1Tmesh-cache-entry: #~%" (-> this mesh-cache-entry)) + (label cfg-166) + this + ) + +;; definition of type collide-shape-prim-group +(deftype collide-shape-prim-group (collide-shape-prim) + "A group of collide primitives." + ((num-children uint8 :overlay-at (-> specific 0)) + (num-alloc-children uint8 :overlay-at (-> specific 1)) + (child (inline-array collide-shape-prim) :overlay-at (-> specific 4)) + ) + (:methods + (new (symbol type collide-shape uint int) _type_) + ) + ) + +;; definition for method 3 of type collide-shape-prim-group +(defmethod inspect ((this collide-shape-prim-group)) + (when (not this) + (set! this this) + (goto cfg-166) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (format #t "~1Tprim-id: #x~X~%" (-> this prim-id)) + (format #t "~1Ttransform-index: ~D~%" (-> this transform-index)) + (format #t "~1Tunused2[3] @ #x~X~%" (-> this unused2)) + (format #t "~1Tprim-core: #~%" (-> this prim-core)) + (format #t "~1Tlocal-sphere: ~`vector`P~%" (-> this local-sphere)) + (format #t "~1Tspecific[16] @ #x~X~%" (&-> this num-children)) + (format #t "~1Tworld-sphere: ~`vector`P~%" (-> this prim-core)) + (format #t "~1Tcollide-as: #x~X : (collide-spec " (-> this prim-core collide-as)) + (let ((s5-0 (-> this prim-core collide-as))) + (if (= (logand (collide-spec special-obstacle) s5-0) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-0) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-0 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-0 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-0) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-0) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-0) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-0 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-0 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-0 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-0 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-0 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-0) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-0) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-0) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-0 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-0) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-0 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-0) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-0) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-0 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-0 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-0 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-0) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-0) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-0) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-0 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-0) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-0 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-0 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-0) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-0 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Tcollide-with: #x~X : (collide-spec " (-> this prim-core collide-with)) + (let ((s5-1 (-> this prim-core collide-with))) + (if (= (logand (collide-spec special-obstacle) s5-1) (collide-spec special-obstacle)) + (format #t "special-obstacle ") + ) + (if (= (logand (collide-spec bot-targetable) s5-1) (collide-spec bot-targetable)) + (format #t "bot-targetable ") + ) + (if (= (logand s5-1 (collide-spec collectable)) (collide-spec collectable)) + (format #t "collectable ") + ) + (if (= (logand s5-1 (collide-spec projectile)) (collide-spec projectile)) + (format #t "projectile ") + ) + (if (= (logand (collide-spec mech-punch) s5-1) (collide-spec mech-punch)) + (format #t "mech-punch ") + ) + (if (= (logand (collide-spec vehicle-mesh-probeable) s5-1) (collide-spec vehicle-mesh-probeable)) + (format #t "vehicle-mesh-probeable ") + ) + (if (= (logand (collide-spec obstacle-for-jak) s5-1) (collide-spec obstacle-for-jak)) + (format #t "obstacle-for-jak ") + ) + (if (= (logand s5-1 (collide-spec bot)) (collide-spec bot)) + (format #t "bot ") + ) + (if (= (logand s5-1 (collide-spec blocking-plane)) (collide-spec blocking-plane)) + (format #t "blocking-plane ") + ) + (if (= (logand s5-1 (collide-spec enemy)) (collide-spec enemy)) + (format #t "enemy ") + ) + (if (= (logand s5-1 (collide-spec hit-by-player-list)) (collide-spec hit-by-player-list)) + (format #t "hit-by-player-list ") + ) + (if (= (logand s5-1 (collide-spec obstacle)) (collide-spec obstacle)) + (format #t "obstacle ") + ) + (if (= (logand (collide-spec vehicle-mesh-no-block-use) s5-1) (collide-spec vehicle-mesh-no-block-use)) + (format #t "vehicle-mesh-no-block-use ") + ) + (if (= (logand (collide-spec jak-vehicle) s5-1) (collide-spec jak-vehicle)) + (format #t "jak-vehicle ") + ) + (if (= (logand (collide-spec vehicle-mesh) s5-1) (collide-spec vehicle-mesh)) + (format #t "vehicle-mesh ") + ) + (if (= (logand s5-1 (collide-spec water)) (collide-spec water)) + (format #t "water ") + ) + (if (= (logand (collide-spec notice-blue-eco-powerup) s5-1) (collide-spec notice-blue-eco-powerup)) + (format #t "notice-blue-eco-powerup ") + ) + (if (= (logand s5-1 (collide-spec civilian)) (collide-spec civilian)) + (format #t "civilian ") + ) + (if (= (logand (collide-spec vehicle-sphere-no-probe) s5-1) (shl #x8000 16)) + (format #t "vehicle-sphere-no-probe ") + ) + (if (= (logand (collide-spec shield) s5-1) (collide-spec shield)) + (format #t "shield ") + ) + (if (= (logand s5-1 (collide-spec player-list)) (collide-spec player-list)) + (format #t "player-list ") + ) + (if (= (logand s5-1 (collide-spec backgnd)) (collide-spec backgnd)) + (format #t "backgnd ") + ) + (if (= (logand s5-1 (collide-spec jak)) (collide-spec jak)) + (format #t "jak ") + ) + (if (= (logand (collide-spec impenetrable-obj) s5-1) (collide-spec impenetrable-obj)) + (format #t "impenetrable-obj ") + ) + (if (= (logand (collide-spec pusher) s5-1) (collide-spec pusher)) + (format #t "pusher ") + ) + (if (= (logand (collide-spec los-blocker) s5-1) (collide-spec los-blocker)) + (format #t "los-blocker ") + ) + (if (= (logand s5-1 (collide-spec jak-vulnerable)) (collide-spec jak-vulnerable)) + (format #t "jak-vulnerable ") + ) + (if (= (logand (collide-spec camera-blocker) s5-1) (collide-spec camera-blocker)) + (format #t "camera-blocker ") + ) + (if (= (logand s5-1 (collide-spec hit-by-others-list)) (collide-spec hit-by-others-list)) + (format #t "hit-by-others-list ") + ) + (if (= (logand s5-1 (collide-spec crate)) (collide-spec crate)) + (format #t "crate ") + ) + (if (= (logand (collide-spec tobot) s5-1) (collide-spec tobot)) + (format #t "tobot ") + ) + (if (= (logand s5-1 (collide-spec vehicle-sphere)) (collide-spec vehicle-sphere)) + (format #t "vehicle-sphere ") + ) + ) + (format #t ")~%") + (format #t "~1Taction: #x~X : (collide-action " (-> this prim-core action)) + (let ((s5-2 (-> this prim-core action))) + (if (= (logand s5-2 (collide-action deadly)) (collide-action deadly)) + (format #t "deadly ") + ) + (if (= (logand s5-2 (collide-action rideable)) (collide-action rideable)) + (format #t "rideable ") + ) + (if (= (logand s5-2 (collide-action can-ride)) (collide-action can-ride)) + (format #t "can-ride ") + ) + (if (= (logand s5-2 (collide-action persistent-attack)) (collide-action persistent-attack)) + (format #t "persistent-attack ") + ) + (if (= (logand (collide-action nav-sphere) s5-2) (collide-action nav-sphere)) + (format #t "nav-sphere ") + ) + (if (= (logand s5-2 (collide-action block-turn-around)) (collide-action block-turn-around)) + (format #t "block-turn-around ") + ) + (if (= (logand s5-2 (collide-action pull-rider-can-collide)) (collide-action pull-rider-can-collide)) + (format #t "pull-rider-can-collide ") + ) + (if (= (logand s5-2 (collide-action no-standon)) (collide-action no-standon)) + (format #t "no-standon ") + ) + (if (= (logand s5-2 (collide-action dont-push-away)) (collide-action dont-push-away)) + (format #t "dont-push-away ") + ) + (if (= (logand s5-2 (collide-action check-stuck)) (collide-action check-stuck)) + (format #t "check-stuck ") + ) + (if (= (logand s5-2 (collide-action no-smack)) (collide-action no-smack)) + (format #t "no-smack ") + ) + (if (= (logand s5-2 (collide-action semi-solid)) (collide-action semi-solid)) + (format #t "semi-solid ") + ) + (if (= (logand s5-2 (collide-action edge-grabbed)) (collide-action edge-grabbed)) + (format #t "edge-grabbed ") + ) + (if (= (logand s5-2 (collide-action stuck-wall-escape)) (collide-action stuck-wall-escape)) + (format #t "stuck-wall-escape ") + ) + (if (= (logand s5-2 (collide-action check-edge)) (collide-action check-edge)) + (format #t "check-edge ") + ) + (if (= (logand s5-2 (collide-action no-normal-reset)) (collide-action no-normal-reset)) + (format #t "no-normal-reset ") + ) + (if (= (logand s5-2 (collide-action solid)) (collide-action solid)) + (format #t "solid ") + ) + ) + (format #t ")~%") + (format #t "~1Tprim-type: ~D~%" (-> this prim-core prim-type)) + (format #t "~1Tradius: (meters ~m)~%" (-> this local-sphere w)) + (format #t "~1Tnum-children: ~D~%" (-> this num-children)) + (format #t "~1Tnum-alloc-children: ~D~%" (-> this num-alloc-children)) + (format #t "~1Tchild: #x~X~%" (-> this child)) + (label cfg-166) + this + ) + +;; definition of type collide-shape +(deftype collide-shape (trsqv) + "The parent of all of an object's collide primitives. +Most [[process-drawable]]s have a [[collide-shape]] that represents their root transform." + ((actor-hash-index int16 :offset 12) + (process process-drawable) + (max-iteration-count uint8) + (nav-flags uint8) + (total-prims uint8) + (num-riders uint8) + (event-self symbol :offset 152) + (event-other symbol) + (root-prim collide-shape-prim) + (riders (inline-array collide-rider)) + (penetrate-using penetrate) + (penetrated-by penetrate) + (event-priority uint8 :offset 192) + (rider-max-momentum float) + ) + (:methods + (new (symbol type process-drawable collide-list-enum) _type_) + (collide-shape-method-28 () none) + (collide-shape-method-29 () none) + (collide-shape-method-30 () none) + (collide-shape-method-31 () none) + (collide-shape-method-32 () none) + (collide-shape-method-33 () none) + (collide-shape-method-34 () none) + (collide-shape-method-35 () none) + (collide-shape-method-36 () none) + (collide-shape-method-37 () none) + (collide-shape-method-38 () none) + (collide-shape-method-39 () none) + (collide-shape-method-40 () none) + (collide-shape-method-41 () none) + (collide-shape-method-42 () none) + (collide-shape-method-43 () none) + (collide-shape-method-44 () none) + (collide-shape-method-45 () none) + (collide-shape-method-46 () none) + (collide-shape-method-47 () none) + (collide-shape-method-48 () none) + (collide-shape-method-49 () none) + (collide-shape-method-50 () none) + (collide-shape-method-51 () none) + (collide-shape-method-52 () none) + (collide-shape-method-53 () none) + (collide-shape-method-54 () none) + ) + ) + +;; definition for method 3 of type collide-shape +(defmethod inspect ((this collide-shape)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~1Trot: ~`vector`P~%" (-> this rot)) + (format #t "~1Tscale: ~`vector`P~%" (-> this scale)) + (format #t "~1Tquat: #~%" (-> this rot)) + (format #t "~1Tpause-adjust-distance: (meters ~m)~%" (-> this pause-adjust-distance)) + (format #t "~1Tnav-radius: (meters ~m)~%" (-> this nav-radius)) + (format #t "~1Ttransv: ~`vector`P~%" (-> this transv)) + (format #t "~1Trotv: ~`vector`P~%" (-> this rotv)) + (format #t "~1Tscalev: ~`vector`P~%" (-> this scalev)) + (format #t "~1Tdir-targ: #~%" (-> this dir-targ)) + (format #t "~1Tangle-change-time: ~D~%" (-> this angle-change-time)) + (format #t "~1Told-y-angle-diff: ~f~%" (-> this old-y-angle-diff)) + (format #t "~1Tactor-hash-index: ~D~%" (-> this actor-hash-index)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tmax-iteration-count: ~D~%" (-> this max-iteration-count)) + (format #t "~1Tnav-flags: ~D~%" (-> this nav-flags)) + (format #t "~1Ttotal-prims: ~D~%" (-> this total-prims)) + (format #t "~1Tnum-riders: ~D~%" (-> this num-riders)) + (format #t "~1Tevent-self: ~A~%" (-> this event-self)) + (format #t "~1Tevent-other: ~A~%" (-> this event-other)) + (format #t "~1Troot-prim: ~A~%" (-> this root-prim)) + (format #t "~1Triders: #x~X~%" (-> this riders)) + (format #t "~1Tpenetrate-using: #x~X : (penetrate " (-> this penetrate-using)) + (penetrate->string (-> this penetrate-using)) + (format #t ")~%") + (format #t "~1Tpenetrated-by: #x~X : (penetrate " (-> this penetrated-by)) + (penetrate->string (-> this penetrated-by)) + (format #t ")~%") + (format #t "~1Tevent-priority: ~D~%" (-> this event-priority)) + (format #t "~1Trider-max-momentum: ~f~%" (-> this rider-max-momentum)) + (label cfg-4) + this + ) + +;; definition of type collide-shape-moving +(deftype collide-shape-moving (collide-shape) + "A [[collide-shape]] for moving objects." + ((rider-time time-frame) + (rider-last-move vector :inline) + (trans-old vector :inline) + (poly-pat pat-surface :offset 272) + (cur-pat pat-surface) + (ground-pat pat-surface) + (status collide-status) + (reaction (function control-info collide-query vector vector collide-status) :offset 316) + (no-reaction (function collide-shape-moving collide-query vector vector object)) + (local-normal vector :inline) + (surface-normal vector :inline) + (poly-normal vector :inline) + (ground-poly-normal vector :inline) + (gspot-pos vector :inline) + (gspot-normal vector :inline) + (ground-touch-point vector :inline) + (ground-impact-vel meters) + (surface-angle float) + (poly-angle float) + (touch-angle float) + (coverage float) + (dynam dynamics) + (surf surface) + ) + (:methods + (new (symbol type process-drawable collide-list-enum) _type_) + (collide-shape-moving-method-55 () none) + (collide-shape-moving-method-56 () none) + (collide-shape-moving-method-57 () none) + (collide-shape-moving-method-58 () none) + (collide-shape-moving-method-59 () none) + (collide-shape-moving-method-60 () none) + (collide-shape-moving-method-61 () none) + (collide-shape-moving-method-62 () none) + (collide-shape-moving-method-63 () none) + (collide-shape-moving-method-64 () none) + (collide-shape-moving-method-65 () none) + (collide-shape-moving-method-66 () none) + (collide-shape-moving-method-67 () none) + ) + ) + +;; definition for method 3 of type collide-shape-moving +(defmethod inspect ((this collide-shape-moving)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~1Trot: ~`vector`P~%" (-> this rot)) + (format #t "~1Tscale: ~`vector`P~%" (-> this scale)) + (format #t "~1Tquat: #~%" (-> this rot)) + (format #t "~1Tpause-adjust-distance: (meters ~m)~%" (-> this pause-adjust-distance)) + (format #t "~1Tnav-radius: (meters ~m)~%" (-> this nav-radius)) + (format #t "~1Ttransv: ~`vector`P~%" (-> this transv)) + (format #t "~1Trotv: ~`vector`P~%" (-> this rotv)) + (format #t "~1Tscalev: ~`vector`P~%" (-> this scalev)) + (format #t "~1Tdir-targ: #~%" (-> this dir-targ)) + (format #t "~1Tangle-change-time: ~D~%" (-> this angle-change-time)) + (format #t "~1Told-y-angle-diff: ~f~%" (-> this old-y-angle-diff)) + (format #t "~1Tactor-hash-index: ~D~%" (-> this actor-hash-index)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tmax-iteration-count: ~D~%" (-> this max-iteration-count)) + (format #t "~1Tnav-flags: ~D~%" (-> this nav-flags)) + (format #t "~1Ttotal-prims: ~D~%" (-> this total-prims)) + (format #t "~1Tnum-riders: ~D~%" (-> this num-riders)) + (format #t "~1Tevent-self: ~A~%" (-> this event-self)) + (format #t "~1Tevent-other: ~A~%" (-> this event-other)) + (format #t "~1Troot-prim: ~A~%" (-> this root-prim)) + (format #t "~1Triders: #x~X~%" (-> this riders)) + (format #t "~1Tpenetrate-using: #x~X : (penetrate " (-> this penetrate-using)) + (penetrate->string (-> this penetrate-using)) + (format #t ")~%") + (format #t "~1Tpenetrated-by: #x~X : (penetrate " (-> this penetrated-by)) + (penetrate->string (-> this penetrated-by)) + (format #t ")~%") + (format #t "~1Tevent-priority: ~D~%" (-> this event-priority)) + (format #t "~1Trider-max-momentum: ~f~%" (-> this rider-max-momentum)) + (format #t "~1Trider-time: ~D~%" (-> this rider-time)) + (format #t "~1Trider-last-move: ~`vector`P~%" (-> this rider-last-move)) + (format #t "~1Ttrans-old: ~`vector`P~%" (-> this trans-old)) + (format #t "~1Tpoly-pat: #x~X~%" (-> this poly-pat)) + (format #t "~1Tcur-pat: #x~X~%" (-> this cur-pat)) + (format #t "~1Tground-pat: #x~X~%" (-> this ground-pat)) + (format #t "~1Tstatus: ~D~%" (-> this status)) + (format #t "~1Treaction: ~A~%" (-> this reaction)) + (format #t "~1Tno-reaction: ~A~%" (-> this no-reaction)) + (format #t "~1Tlocal-normal: ~`vector`P~%" (-> this local-normal)) + (format #t "~1Tsurface-normal: ~`vector`P~%" (-> this surface-normal)) + (format #t "~1Tpoly-normal: ~`vector`P~%" (-> this poly-normal)) + (format #t "~1Tground-poly-normal: ~`vector`P~%" (-> this ground-poly-normal)) + (format #t "~1Tgspot-pos: ~`vector`P~%" (-> this gspot-pos)) + (format #t "~1Tgspot-normal: ~`vector`P~%" (-> this gspot-normal)) + (format #t "~1Tground-touch-point: ~`vector`P~%" (-> this ground-touch-point)) + (format #t "~1Tground-impact-vel: (meters ~m)~%" (-> this ground-impact-vel)) + (format #t "~1Tsurface-angle: ~f~%" (-> this surface-angle)) + (format #t "~1Tpoly-angle: ~f~%" (-> this poly-angle)) + (format #t "~1Ttouch-angle: ~f~%" (-> this touch-angle)) + (format #t "~1Tcoverage: ~f~%" (-> this coverage)) + (format #t "~1Tdynam: ~A~%" (-> this dynam)) + (format #t "~1Tsurf: ~A~%" (-> this surf)) + (label cfg-4) + this + ) + +;; definition for method 0 of type collide-shape-prim +(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int)) + (let ((v0-0 (object-new allocation type-to-make arg2))) + (set! (-> v0-0 cshape) arg0) + (set! (-> v0-0 prim-id) arg1) + (set! (-> v0-0 prim-core action) (collide-action)) + (set! (-> v0-0 prim-core collide-as) (collide-spec)) + (set! (-> v0-0 prim-core collide-with) (collide-spec)) + (set! (-> v0-0 transform-index) -2) + (set! (-> v0-0 prim-core prim-type) -2) + v0-0 + ) + ) + +;; definition for method 0 of type collide-shape-prim-sphere +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere. +(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg1 80))) + (set! (-> (the-as collide-shape-prim-sphere v0-0) pat) + (new 'static 'pat-surface :mode (pat-mode obstacle) :material (pat-material stone)) + ) + (set! (-> (the-as collide-shape-prim-sphere v0-0) prim-core prim-type) -1) + (the-as collide-shape-prim-sphere v0-0) + ) + ) + +;; definition for method 0 of type collide-shape-prim-mesh +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh. +(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 uint)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg2 80))) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh) #f) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-id) (the-as int arg1)) + (set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-cache-id) (the-as uint 0)) + (set! (-> (the-as collide-shape-prim-mesh v0-0) prim-core prim-type) 1) + (the-as collide-shape-prim-mesh v0-0) + ) + ) + +;; definition for method 0 of type collide-shape-prim-group +;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-group. +(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int)) + (let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 (the-as uint arg2) 80))) + (set! (-> (the-as collide-shape-prim-group v0-0) num-children) arg1) + (set! (-> (the-as collide-shape-prim-group v0-0) num-alloc-children) arg1) + (set! (-> (the-as collide-shape-prim-group v0-0) prim-core prim-type) 0) + (set! (-> (the-as collide-shape-prim-group v0-0) child) + (the-as (inline-array collide-shape-prim) (&+ (the-as collide-shape-prim-group v0-0) 80)) + ) + (the-as collide-shape-prim-group v0-0) + ) + ) + +;; definition for method 4 of type collide-shape-prim-group +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this collide-shape-prim-group)) + (the-as int (-> this num-children)) + ) + +;; definition for method 0 of type collide-shape +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for method 0 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch collide-shape vs collide-shape-moving. +(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum)) + (let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1))) + (set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0) + (set! (-> (the-as collide-shape-moving v0-0) gspot-normal quad) (-> *y-vector* quad)) + (set! (-> (the-as collide-shape-moving v0-0) surf) *standard-ground-surface*) + (the-as collide-shape-moving v0-0) + ) + ) + +;; definition for symbol *collide-shape-prim-backgnd*, type collide-shape-prim-mesh +(define *collide-shape-prim-backgnd* (new 'static 'collide-shape-prim-mesh + :cshape #f + :prim-core (new 'static 'collide-prim-core + :world-sphere (new 'static 'vector :w 204800000.0) + :collide-as (collide-spec backgnd) + :action (collide-action solid) + :prim-type 2 + ) + :local-sphere (new 'static 'vector :w 204800000.0) + :mesh #f + ) + ) + +;; definition for symbol *collide-shape-prim-water*, type collide-shape-prim-mesh +(define *collide-shape-prim-water* (new 'static 'collide-shape-prim-mesh + :cshape #f + :prim-core (new 'static 'collide-prim-core + :world-sphere (new 'static 'vector :w 204800000.0) + :collide-as (collide-spec water) + :action (collide-action solid) + :prim-type 2 + ) + :local-sphere (new 'static 'vector :w 204800000.0) + :mesh #f + ) + ) + +;; definition (perm) for symbol *collide-rider-pool*, type collide-rider-pool +(define-perm *collide-rider-pool* collide-rider-pool (new 'global 'collide-rider-pool)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc new file mode 100644 index 0000000000..d6f11ee04f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc @@ -0,0 +1,237 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type touching-prim +(deftype touching-prim (structure) + "A collide primitive that's touching another. +Potentially also stores the triangle that is involved." + ((cprim collide-shape-prim) + (has-tri? symbol) + (tri collide-tri-result :inline) + ) + ) + +;; definition for method 3 of type touching-prim +(defmethod inspect ((this touching-prim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'touching-prim) + (format #t "~1Tcprim: ~A~%" (-> this cprim)) + (format #t "~1Thas-tri?: ~A~%" (-> this has-tri?)) + (format #t "~1Ttri: #~%" (-> this tri)) + (label cfg-4) + this + ) + +;; definition of type touching-prims-entry +(deftype touching-prims-entry (structure) + "A record of two primitives touching." + ((next touching-prims-entry) + (prev touching-prims-entry) + (allocated? symbol) + (u float) + (prim1 touching-prim :inline) + (prim2 touching-prim :inline) + ) + (:methods + (touching-prims-entry-method-9 () none) + (touching-prims-entry-method-10 () none) + (touching-prims-entry-method-11 () none) + (touching-prims-entry-method-12 () none) + ) + ) + +;; definition for method 3 of type touching-prims-entry +(defmethod inspect ((this touching-prims-entry)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'touching-prims-entry) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (format #t "~1Tallocated?: ~A~%" (-> this allocated?)) + (format #t "~1Tu: ~f~%" (-> this u)) + (format #t "~1Tprim1: #~%" (-> this prim1)) + (format #t "~1Tprim2: #~%" (-> this prim2)) + (label cfg-4) + this + ) + +;; definition of type touching-prims-entry-pool +(deftype touching-prims-entry-pool (structure) + "A pool of up to 64 touching prim records." + ((head touching-prims-entry) + (nodes touching-prims-entry 64 :inline) + ) + (:methods + (new (symbol type) _type_) + (touching-prims-entry-pool-method-9 () none) + (touching-prims-entry-pool-method-10 () none) + (init-list! (_type_) none) + (touching-prims-entry-pool-method-12 () none) + ) + ) + +;; definition for method 3 of type touching-prims-entry-pool +(defmethod inspect ((this touching-prims-entry-pool)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'touching-prims-entry-pool) + (format #t "~1Thead: #~%" (-> this head)) + (format #t "~1Tnodes[64] @ #x~X~%" (-> this nodes)) + (label cfg-4) + this + ) + +;; definition for method 11 of type touching-prims-entry-pool +;; WARN: Return type mismatch int vs none. +(defmethod init-list! ((this touching-prims-entry-pool)) + (let ((prev (the-as touching-prims-entry #f))) + (let ((current (the-as touching-prims-entry (-> this nodes)))) + (set! (-> this head) current) + (countdown (a0-1 64) + (set! (-> current prev) prev) + (let ((next (&+ current 240))) + (set! (-> current next) (the-as touching-prims-entry next)) + (set! (-> current allocated?) #f) + (set! prev current) + (set! current (the-as touching-prims-entry next)) + ) + ) + ) + (set! (-> prev next) #f) + ) + 0 + (none) + ) + +;; definition for method 0 of type touching-prims-entry-pool +;; WARN: Return type mismatch structure vs touching-prims-entry-pool. +(defmethod new touching-prims-entry-pool ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((gp-0 (t9-0 allocation v1-1))) + ((method-of-type touching-prims-entry-pool init-list!) (the-as touching-prims-entry-pool gp-0)) + (the-as touching-prims-entry-pool gp-0) + ) + ) + ) + +;; definition of type touching-shapes-entry +(deftype touching-shapes-entry (structure) + "A record of two collide shapes touching, +storing a record of the primitives involved." + ((cshape1 collide-shape) + (cshape2 collide-shape) + (resolve-u int8) + (head touching-prims-entry) + (handle1 handle) + (handle2 handle) + ) + :pack-me + (:methods + (get-head (_type_) touching-prims-entry) + (get-next (_type_ touching-shapes-entry) touching-prims-entry) + (touching-shapes-entry-method-11 () none) + (touching-shapes-entry-method-12 () none) + (touching-shapes-entry-method-13 () none) + (touching-shapes-entry-method-14 () none) + ) + ) + +;; definition for method 3 of type touching-shapes-entry +(defmethod inspect ((this touching-shapes-entry)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'touching-shapes-entry) + (format #t "~1Tcshape1: ~A~%" (-> this cshape1)) + (format #t "~1Tcshape2: ~A~%" (-> this cshape2)) + (format #t "~1Tresolve-u: ~D~%" (-> this resolve-u)) + (format #t "~1Thead: #~%" (-> this head)) + (format #t "~1Thandle1: ~D~%" (-> this handle1)) + (format #t "~1Thandle2: ~D~%" (-> this handle2)) + (label cfg-4) + this + ) + +;; definition of type touching-list +(deftype touching-list (structure) + "Contains a record of touching collide shape pairs." + ((num-touching-shapes int32) + (resolve-u int8) + (touching-shapes touching-shapes-entry 32 :inline) + ) + (:methods + (new (symbol type) _type_) + (touching-list-method-9 () none) + (touching-list-method-10 () none) + (touching-list-method-11 () none) + (touching-list-method-12 () none) + (touching-list-method-13 () none) + ) + ) + +;; definition for method 3 of type touching-list +(defmethod inspect ((this touching-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'touching-list) + (format #t "~1Tnum-touching-shapes: ~D~%" (-> this num-touching-shapes)) + (format #t "~1Tresolve-u: ~D~%" (-> this resolve-u)) + (format #t "~1Ttouching-shapes[32] @ #x~X~%" (-> this touching-shapes)) + (label cfg-4) + this + ) + +;; definition for method 0 of type touching-list +;; WARN: Return type mismatch structure vs touching-list. +(defmethod new touching-list ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as touching-list v0-0) num-touching-shapes) 0) + (set! (-> (the-as touching-list v0-0) resolve-u) 0) + (the-as touching-list v0-0) + ) + ) + ) + +;; definition for method 9 of type touching-shapes-entry +(defmethod get-head ((this touching-shapes-entry)) + (-> this head) + ) + +;; definition for method 10 of type touching-shapes-entry +;; WARN: Return type mismatch collide-shape vs touching-prims-entry. +(defmethod get-next ((this touching-shapes-entry) (arg0 touching-shapes-entry)) + (the-as touching-prims-entry (-> arg0 cshape1)) + ) + +;; failed to figure out what this is: +(kmemopen global "collide-touching-lists") + +;; definition (perm) for symbol *touching-prims-entry-pool*, type touching-prims-entry-pool +(define-perm *touching-prims-entry-pool* touching-prims-entry-pool (new 'global 'touching-prims-entry-pool)) + +;; definition (perm) for symbol *touching-list*, type touching-list +(define-perm *touching-list* touching-list (new 'global 'touching-list)) + +;; failed to figure out what this is: +(kmemclose) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/pat-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/pat-h_REF.gc new file mode 100644 index 0000000000..be8da949ca --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/pat-h_REF.gc @@ -0,0 +1,319 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type pat-surface +(deftype pat-surface (uint32) + ((skip uint8 :offset 0 :size 7) + (mode pat-mode :offset 7 :size 3) + (material pat-material :offset 10 :size 6) + (camera uint8 :offset 16 :size 1) + (event pat-event :offset 18 :size 6) + (skip2 uint8 :offset 24 :size 5) + (noentity uint8 :offset 0 :size 1) + (nocamera uint8 :offset 1 :size 1) + (noedge uint8 :offset 2 :size 1) + (nogrind uint8 :offset 3 :size 1) + (nojak uint8 :offset 4 :size 1) + (noboard uint8 :offset 5 :size 1) + (nopilot uint8 :offset 6 :size 1) + (probe uint8 :offset 24 :size 1) + (nomech uint8 :offset 25 :size 1) + (noproj uint8 :offset 26 :size 1) + (noendlessfall uint8 :offset 27 :size 1) + (noprobe uint8 :offset 28 :size 1) + (nolineofsight uint8 :offset 16 :size 1) + (board uint8 :offset 4 :size 1) + ) + ) + +;; definition for method 3 of type pat-surface +(defmethod inspect ((this pat-surface)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'pat-surface) + (format #t "~1Tskip: ~D~%" (-> this skip)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tmaterial: ~D~%" (-> this material)) + (format #t "~1Tcamera: ~D~%" (-> this camera)) + (format #t "~1Tevent: ~D~%" (-> this event)) + (format #t "~1Tskip2: ~D~%" (-> this skip2)) + (format #t "~1Tnoentity: ~D~%" (-> this noentity)) + (format #t "~1Tnocamera: ~D~%" (-> this nocamera)) + (format #t "~1Tnoedge: ~D~%" (-> this noedge)) + (format #t "~1Tnogrind: ~D~%" (-> this nogrind)) + (format #t "~1Tnojak: ~D~%" (-> this nojak)) + (format #t "~1Tnoboard: ~D~%" (-> this noboard)) + (format #t "~1Tnopilot: ~D~%" (-> this nopilot)) + (format #t "~1Tprobe: ~D~%" (-> this probe)) + (format #t "~1Tnomech: ~D~%" (-> this nomech)) + (format #t "~1Tnoproj: ~D~%" (-> this noproj)) + (format #t "~1Tnoendlessfall: ~D~%" (-> this noendlessfall)) + (format #t "~1Tnoprobe: ~D~%" (-> this noprobe)) + (format #t "~1Tnolineofsight: ~D~%" (-> this camera)) + (format #t "~1Tboard: ~D~%" (-> this nojak)) + (label cfg-4) + this + ) + +;; definition (debug) for function pat-material->string +(defun-debug pat-material->string ((arg0 pat-surface)) + (case (-> arg0 material) + (((pat-material deepsnow)) + "deepsnow" + ) + (((pat-material neutral)) + "neutral" + ) + (((pat-material carpet)) + "carpet" + ) + (((pat-material shmetal)) + "shmetal" + ) + (((pat-material grmetal)) + "grmetal" + ) + (((pat-material lava)) + "lava" + ) + (((pat-material crmetal)) + "crmetal" + ) + (((pat-material pcmetal)) + "pcmetal" + ) + (((pat-material grass)) + "grass" + ) + (((pat-material snow)) + "snow" + ) + (((pat-material swamp)) + "swamp" + ) + (((pat-material stone)) + "stone" + ) + (((pat-material hotcoals)) + "hotcoals" + ) + (((pat-material unknown)) + "unknown" + ) + (((pat-material dirt)) + "dirt" + ) + (((pat-material dmaker)) + "dmaker" + ) + (((pat-material tube)) + "tube" + ) + (((pat-material forest)) + "forest" + ) + (((pat-material stopproj)) + "stopproj" + ) + (((pat-material mhshroom)) + "mhshroom" + ) + (((pat-material mhswamp)) + "mhswamp" + ) + (((pat-material tar)) + "tar" + ) + (((pat-material straw)) + "straw" + ) + (((pat-material wood)) + "wood" + ) + (((pat-material quicksand)) + "quicksand" + ) + (((pat-material squish)) + "squish" + ) + (((pat-material ice)) + "ice" + ) + (((pat-material rotate)) + "rotate" + ) + (((pat-material crwood)) + "crwood" + ) + (((pat-material waterbottom)) + "waterbottom" + ) + (((pat-material hdwood)) + "hdwood" + ) + (((pat-material sand)) + "sand" + ) + (((pat-material gravel)) + "gravel" + ) + (((pat-material metal)) + "metal" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition (debug) for function pat-mode->string +(defun-debug pat-mode->string ((arg0 pat-surface)) + (case (-> arg0 mode) + (((pat-mode wall)) + "wall" + ) + (((pat-mode halfpipe)) + "halfpipe" + ) + (((pat-mode obstacle)) + "obstacle" + ) + (((pat-mode ground)) + "ground" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition (debug) for function pat-event->string +(defun-debug pat-event->string ((arg0 pat-surface)) + (case (-> arg0 event) + (((pat-event burn)) + "burn" + ) + (((pat-event deadly)) + "deadly" + ) + (((pat-event waterfloor)) + "waterfloor" + ) + (((pat-event slippery)) + "slippery" + ) + (((pat-event melt)) + "melt" + ) + (((pat-event endlessfall)) + "endlessfall" + ) + (((pat-event burnup)) + "burnup" + ) + (((pat-event hide)) + "hide" + ) + (((pat-event deadlyup)) + "deadlyup" + ) + (((pat-event fry)) + "fry" + ) + (((pat-event slime)) + "slime" + ) + (((pat-event drag)) + "drag" + ) + (((pat-event shockup)) + "shockup" + ) + (((pat-event slide)) + "slide" + ) + (((pat-event hang)) + "hang" + ) + (((pat-event lipramp)) + "lipramp" + ) + (((pat-event rail)) + "rail" + ) + (((pat-event none)) + "none" + ) + (((pat-event lip)) + "lip" + ) + (((pat-event shock)) + "shock" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition of type pat-mode-info +(deftype pat-mode-info (structure) + ((name string) + (wall-angle float) + (color rgba) + (hilite-color rgba) + ) + ) + +;; definition for method 3 of type pat-mode-info +(defmethod inspect ((this pat-mode-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'pat-mode-info) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Twall-angle: ~f~%" (-> this wall-angle)) + (format #t "~1Tcolor: ~D~%" (-> this color)) + (format #t "~1Thilite-color: ~D~%" (-> this hilite-color)) + (label cfg-4) + this + ) + +;; definition for symbol *pat-mode-info*, type (inline-array pat-mode-info) +(define *pat-mode-info* (new 'static 'inline-array pat-mode-info 4 + (new 'static 'pat-mode-info + :name "ground" + :wall-angle 0.2 + :color (new 'static 'rgba :r #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "wall" + :wall-angle 2.0 + :color (new 'static 'rgba :b #x7f :a #x40) + :hilite-color (new 'static 'rgba :b #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "obstacle" + :wall-angle 0.82 + :color (new 'static 'rgba :r #x7f :b #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :b #xff :a #x80) + ) + (new 'static 'pat-mode-info + :name "halfpipe" + :wall-angle -2.0 + :color (new 'static 'rgba :r #x7f :g #x7f :a #x40) + :hilite-color (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/data/art-h_REF.gc b/test/decompiler/reference/jak3/engine/data/art-h_REF.gc index d377e60a18..f1a3b38ca3 100644 --- a/test/decompiler/reference/jak3/engine/data/art-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/data/art-h_REF.gc @@ -378,7 +378,7 @@ actor, like the mesh, animations, shadow mesh, skeleton, etc." ) ;; definition for method 7 of type art-cloth-geo -(defmethod relocate ((this art-cloth-geo) (arg0 int)) +(defmethod relocate ((this art-cloth-geo) (offset int)) this ) @@ -779,7 +779,3 @@ Each process-drawable has a draw-control." ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/engine/engines_REF.gc b/test/decompiler/reference/jak3/engine/engine/engines_REF.gc new file mode 100644 index 0000000000..7e33884b42 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/engine/engines_REF.gc @@ -0,0 +1,99 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(kmemopen global "engines") + +;; definition for symbol *background-draw-engine*, type engine +(define *background-draw-engine* (new 'global 'engine 'draw 10 connection)) + +;; definition for symbol *matrix-engine*, type (array handle) +(define *matrix-engine* (new 'global 'boxed-array handle 384)) + +;; failed to figure out what this is: +(set! (-> *matrix-engine* length) 0) + +;; definition for symbol *cloth-engine*, type (array handle) +(define *cloth-engine* (new 'global 'boxed-array handle 32)) + +;; failed to figure out what this is: +(set! (-> *cloth-engine* length) 0) + +;; definition for symbol *part-engine*, type engine +(define *part-engine* (new 'global 'engine 'sparticle-launcher 256 connection)) + +;; definition of type particle-local-space-info +(deftype particle-local-space-info (connection) + ((params basic 3 :overlay-at param1) + (mat-prev matrix :inline) + (mat-new matrix :inline) + (hand handle) + (flags part-local-space-flags) + (pad uint32 1) + ) + ) + +;; definition for method 3 of type particle-local-space-info +(defmethod inspect ((this particle-local-space-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'particle-local-space-info) + (format #t "~1Tnext0: ~`connectable`P~%" (-> this next0)) + (format #t "~1Tprev0: ~`connectable`P~%" (-> this prev0)) + (format #t "~1Tnext1: ~`connectable`P~%" (-> this next1)) + (format #t "~1Tprev1: ~`connectable`P~%" (-> this prev1)) + (format #t "~1Tparam0: ~A~%" (-> this param0)) + (format #t "~1Tparam1: ~A~%" (-> this param1)) + (format #t "~1Tparam2: ~A~%" (-> this param2)) + (format #t "~1Tparam3: ~A~%" (-> this param3)) + (format #t "~1Tquad[2] @ #x~X~%" (&-> this next0)) + (format #t "~1Tparams[3] @ #x~X~%" (-> this params)) + (format #t "~1Tmat-prev: #~%" (-> this mat-prev)) + (format #t "~1Tmat-new: #~%" (-> this mat-new)) + (format #t "~1Thand: ~D~%" (-> this hand)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tpad[1] @ #x~X~%" (-> this pad)) + (label cfg-4) + this + ) + +;; definition for symbol *cam-post-hook-engine*, type engine +(define *cam-post-hook-engine* (new 'global 'engine 'cam-post-hook-engine 4 connection)) + +;; definition for symbol *part-local-space-engine*, type engine +(define *part-local-space-engine* + (new 'global 'engine 'particle-local-space-info 15 particle-local-space-info) + ) + +;; definition for symbol *camera-engine*, type engine +(define *camera-engine* (new 'global 'engine 'camera-eng 128 connection)) + +;; this part is debug only +(when *debug-segment* +;; definition for symbol *debug-engine*, type engine +(define *debug-engine* (new 'debug 'engine 'debug 64 connection)) + +) +;; definition for symbol *pad-engine*, type engine +(define *pad-engine* (new 'global 'engine 'pad 4 connection)) + +;; definition for symbol *lightning-engine*, type engine +(define *lightning-engine* (new 'global 'engine 'lightning-control 64 connection)) + +;; definition for symbol *hud-engine*, type engine +(define *hud-engine* (new 'global 'engine 'hud 16 connection)) + +;; definition for symbol *prim-engine*, type engine +(define *prim-engine* (new 'global 'engine 'prim-strip 128 connection)) + +;; definition for symbol *task-manager-engine*, type engine +(define *task-manager-engine* (new 'global 'engine 'task-manager 16 connection)) + +;; failed to figure out what this is: +(kmemclose) + + + + diff --git a/test/decompiler/reference/jak3/engine/entity/res-h_REF.gc b/test/decompiler/reference/jak3/engine/entity/res-h_REF.gc new file mode 100644 index 0000000000..7f36c3d5a6 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/res-h_REF.gc @@ -0,0 +1,74 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type res-tag +(deftype res-tag (uint128) + "Metadata about a property in a [[res-lump]], such as name, element type and element count." + ((name symbol :offset 0 :size 32) + (key-frame float :offset 32 :size 32) + (elt-type type :offset 64 :size 32) + (data-offset uint16 :offset 96 :size 16) + (elt-count uint32 :offset 112 :size 15) + (inlined? uint8 :offset 127 :size 1) + ) + ) + +;; definition of type res-lump +(deftype res-lump (basic) + "A collection of [[res-tag]]s and their data." + ((length int32) + (allocated-length int16) + (flags res-lump-flags) + (data-base pointer) + (data-top pointer) + (data-size int32) + (extra entity-links) + (tag (pointer res-tag)) + ) + (:methods + (new (symbol type int int) _type_) + (get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer) + (get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure) + (get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128) + (get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float) + (get-tag-index-data (_type_ int) pointer) + (get-tag-data (_type_ res-tag) pointer) + (allocate-data-memory-for-tag! (_type_ res-tag) res-tag) + (sort! (_type_) _type_) + (add-data! (_type_ res-tag pointer) res-lump) + (add-32bit-data! (_type_ res-tag object) res-lump) + (lookup-tag-idx (_type_ symbol symbol float) res-tag-pair :no-virtual) + (make-property-data (_type_ float res-tag-pair pointer) pointer) + (get-curve-data! (_type_ curve symbol symbol float) symbol) + ) + ) + +;; definition for method 3 of type res-lump +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this res-lump)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tdata-base: #x~X~%" (-> this data-base)) + (format #t "~1Tdata-top: #x~X~%" (-> this data-top)) + (format #t "~1Tdata-size: ~D~%" (-> this data-size)) + (format #t "~1Textra: ~A~%" (-> this extra)) + (format #t "~1Ttag: #x~X~%" (-> this tag)) + (label cfg-4) + this + ) + +;; definition for symbol *res-key-string*, type string +(define *res-key-string* (new 'global 'string 64 (the-as string #f))) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/entity/res_REF.gc b/test/decompiler/reference/jak3/engine/entity/res_REF.gc new file mode 100644 index 0000000000..56c8fde493 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/res_REF.gc @@ -0,0 +1,905 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 2 of type res-tag +(defmethod print ((this res-tag)) + (if (zero? (-> this inlined?)) + (format + #t + "#" + (-> this name) + (-> this key-frame) + (-> this elt-type) + (-> this elt-count) + ) + (format + #t + "#" + (-> this name) + (-> this key-frame) + (-> this elt-type) + (-> this elt-count) + ) + ) + this + ) + +;; definition for method 4 of type res-tag +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this res-tag)) + (the-as int (if (zero? (-> this inlined?)) + (* (-> this elt-count) 4) + (* (-> this elt-count) (-> this elt-type size)) + ) + ) + ) + +;; definition for method 13 of type res-lump +;; INFO: Used lq/sq +(defmethod get-tag-index-data ((this res-lump) (arg0 int)) + "Get the data address of the n'th tag." + (&+ (-> this data-base) (-> this tag arg0 data-offset)) + ) + +;; definition for method 14 of type res-lump +(defmethod get-tag-data ((this res-lump) (arg0 res-tag)) + "Get the data address of the specified tag." + (&+ (-> this data-base) (-> arg0 data-offset)) + ) + +;; definition for method 0 of type res-lump +(defmethod new res-lump ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* (+ arg0 -1) 16) arg1))))) + (set! (-> v0-0 allocated-length) arg0) + (set! (-> v0-0 data-size) arg1) + (set! (-> v0-0 length) 0) + (set! (-> v0-0 data-base) (&-> (-> v0-0 tag) arg0)) + (set! (-> v0-0 data-top) (&-> (-> v0-0 tag) arg0)) + v0-0 + ) + ) + +;; definition for method 4 of type res-lump +(defmethod length ((this res-lump)) + (-> this length) + ) + +;; definition for method 5 of type res-lump +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this res-lump)) + (the-as int (+ (-> this type psize) (* (-> this allocated-length) 16) (-> this data-size))) + ) + +;; definition for method 3 of type res-lump +;; INFO: this function exists in multiple non-identical object files +;; INFO: Used lq/sq +(defmethod inspect ((this res-lump)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Textra: ~A~%" (-> this extra)) + (format #t "~Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tflags: #x~X~%" (-> this flags)) + (format #t "~Tdata-base: #x~X~%" (-> this data-base)) + (format #t "~Tdata-top: #x~X~%" (-> this data-top)) + (format #t "~Tdata-size: #x~X~%" (-> this data-size)) + (format #t "~Ttag[~D]: @ #x~X~%" (-> this allocated-length) (-> this tag)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] " s5-0) + (print (-> this tag s5-0)) + (let ((t9-11 format) + (a0-13 #t) + (a1-10 " @ #x~X") + (a3-2 this) + (a2-10 s5-0) + ) + (t9-11 a0-13 a1-10 (&+ (-> a3-2 data-base) (-> a3-2 tag a2-10 data-offset))) + ) + (cond + ((zero? (-> this tag s5-0 inlined?)) + (let ((t9-12 format) + (a0-15 #t) + (a1-11 " = ~A~%") + (a3-4 this) + (a2-18 s5-0) + ) + (t9-12 a0-15 a1-11 (-> (the-as (pointer uint32) (&+ (-> a3-4 data-base) (-> a3-4 tag a2-18 data-offset))))) + ) + ) + (else + (format #t "~%") + ) + ) + ) + this + ) + +;; definition for method 19 of type res-lump +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs res-tag-pair. +(defmethod lookup-tag-idx ((this res-lump) (arg0 symbol) (arg1 symbol) (arg2 float)) + "Look up the index of the tag containing with the given name and timestamp. + Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits. + Depending on the mode, they may be the same, or they may be two tags that you should interpolate + between, if the exact time was not found. + + @param name-sym should be the name of the thing you want. + @param time is for the timestamp you want. + If mode = 'base, then both the indices are the same and the timestamp is ignored. + If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found). + If mode = 'exact, then it requires an exact timestamp match and both indices are the same. + If things go wrong, returns a negative number." + (local-vars (t0-1 int)) + (if (or (not this) (zero? this) (<= (-> this length) 0)) + (return (new 'static 'res-tag-pair :lo #xffffffff :hi #xffffffff)) + ) + (if (zero? (-> this flags)) + (sort! this) + ) + (let ((v1-8 -1) + (a0-2 -1) + ) + (let ((a1-1 -1) + (a2-1 (the-as object arg0)) + ) + (let ((a3-2 (+ (-> this length) -1)) + (t0-0 0) + ) + (while (>= a3-2 t0-0) + (let* ((t1-2 (+ t0-0 (/ (- a3-2 t0-0) 2))) + (t2-5 (- (the-as int a2-1) (the-as uint (the-as int (-> this tag t1-2 name))))) + ) + (cond + ((zero? t2-5) + (set! t0-1 t1-2) + (goto cfg-19) + ) + ((< t2-5 0) + (set! a3-2 (+ t1-2 -1)) + ) + (else + (set! t0-0 (+ t1-2 1)) + ) + ) + ) + ) + ) + (set! t0-1 -1) + (label cfg-19) + (if (< t0-1 0) + (return (the-as res-tag-pair t0-1)) + ) + (while (and (> t0-1 0) (= (the-as symbol a2-1) (-> this tag (+ t0-1 -1) name))) + (+! t0-1 -1) + ) + (when (= arg1 'base) + (set! a0-2 t0-1) + (set! v1-8 t0-1) + (goto cfg-60) + ) + (let ((a3-14 t0-1) + (t0-4 (&-> (-> this tag) t0-1)) + ) + (while (not (or (>= a3-14 (-> this length)) (< (the-as int a2-1) (the-as int (-> t0-4 0 name))))) + (cond + ((!= arg0 (-> t0-4 0 name)) + ) + ((= (-> t0-4 0 key-frame) arg2) + (set! a0-2 a3-14) + (set! v1-8 a3-14) + (goto cfg-60) + ) + ((and (>= arg2 (-> t0-4 0 key-frame)) (!= arg1 'exact)) + (set! a0-2 a3-14) + (set! v1-8 a3-14) + (if (= (-> t0-4 0 key-frame) -1000000000.0) + (set! a1-1 a3-14) + ) + ) + ((< arg2 (-> t0-4 0 key-frame)) + (if (and (!= a0-2 a1-1) (= arg1 'interp)) + (set! v1-8 a3-14) + ) + (goto cfg-60) + ) + ) + (+! a3-14 1) + (set! t0-4 (&-> t0-4 1)) + ) + ) + ) + (label cfg-60) + (the-as res-tag-pair (logior (logand (the-as uint #xffffffff) a0-2) (shl v1-8 32))) + ) + ) + +;; definition for method 20 of type res-lump +;; INFO: Used lq/sq +(defmethod make-property-data ((this res-lump) (arg1 float) (tag-pair res-tag-pair) (arg3 pointer)) + "Returns (a pointer to) the value data of a property with the tag-pair. + If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time + with the result written into buf. buf must have enough space to copy all of the data. + Otherwise, simply returns an address to the resource binary." + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (let* ((t0-2 (-> this tag (-> tag-pair lo))) + (t1-2 (-> this tag (-> tag-pair hi))) + (v1-6 (-> t0-2 elt-count)) + ) + (cond + ((zero? (-> t0-2 inlined?)) + (&+ (-> this data-base) (-> t0-2 data-offset)) + ) + ((or (not arg3) + (= (-> tag-pair lo) (-> tag-pair hi)) + (!= v1-6 (-> t1-2 elt-count)) + (!= (-> t0-2 elt-type) (-> t1-2 elt-type)) + ) + (let ((a0-4 t0-2)) + (&+ (-> this data-base) (-> a0-4 data-offset)) + ) + ) + (else + (let* ((f0-2 (/ (- arg1 (-> t0-2 key-frame)) (- (-> t1-2 key-frame) (-> t0-2 key-frame)))) + (a1-4 this) + (a2-7 t0-2) + (a1-6 (&+ (-> a1-4 data-base) (-> a2-7 data-offset))) + (a2-13 (&+ (-> this data-base) (-> t1-2 data-offset))) + ) + (case (-> t0-2 elt-type symbol) + (('float) + (dotimes (a0-8 (the-as int v1-6)) + (set! (-> (the-as (pointer float) (&+ arg3 (* a0-8 4)))) + (+ (* (-> (the-as (pointer float) (&+ a1-6 (* a0-8 4)))) (- 1.0 f0-2)) + (* (-> (the-as (pointer float) (&+ a2-13 (* a0-8 4)))) f0-2) + ) + ) + ) + arg3 + ) + (('integer 'sinteger 'uinteger 'int64 'uint64) + (let ((a0-10 (the int (* 4096.0 f0-2)))) + (dotimes (t0-10 (the-as int v1-6)) + (set! (-> (the-as (pointer int64) (&+ arg3 (* t0-10 8)))) + (sar + (+ (* (the-as int (-> (the-as (pointer uint64) (&+ a1-6 (* t0-10 8))))) (- 4096 a0-10)) + (* (the-as int (-> (the-as (pointer uint64) (&+ a2-13 (* t0-10 8))))) a0-10) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int8) + (let ((a0-12 (the int (* 4096.0 f0-2)))) + (dotimes (t0-11 (the-as int v1-6)) + (set! (-> (the-as (pointer int8) (&+ arg3 t0-11))) + (sar + (+ (* (-> (the-as (pointer int8) (&+ a1-6 t0-11))) (- 4096 a0-12)) + (* (-> (the-as (pointer int8) (&+ a2-13 t0-11))) a0-12) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint8) + (let ((a0-14 (the int (* 4096.0 f0-2)))) + (dotimes (t0-12 (the-as int v1-6)) + (set! (-> (the-as (pointer uint8) (&+ arg3 t0-12))) + (shr + (+ (* (-> (the-as (pointer uint8) (&+ a1-6 t0-12))) (the-as uint (- 4096 a0-14))) + (* (-> (the-as (pointer uint8) (&+ a2-13 t0-12))) (the-as uint a0-14)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int16) + (let ((a0-16 (the int (* 4096.0 f0-2)))) + (dotimes (t0-13 (the-as int v1-6)) + (set! (-> (the-as (pointer int16) (&+ arg3 (* t0-13 2)))) + (sar + (+ (* (-> (the-as (pointer int16) (&+ a1-6 (* t0-13 2)))) (- 4096 a0-16)) + (* (-> (the-as (pointer int16) (&+ a2-13 (* t0-13 2)))) a0-16) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint16) + (let ((a0-18 (the int (* 4096.0 f0-2)))) + (dotimes (t0-14 (the-as int v1-6)) + (set! (-> (the-as (pointer uint16) (&+ arg3 (* t0-14 2)))) + (shr + (+ (* (-> (the-as (pointer uint16) (&+ a1-6 (* t0-14 2)))) (the-as uint (- 4096 a0-18))) + (* (-> (the-as (pointer uint16) (&+ a2-13 (* t0-14 2)))) (the-as uint a0-18)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('int32) + (let ((a0-20 (the int (* 4096.0 f0-2)))) + (dotimes (t0-15 (the-as int v1-6)) + (set! (-> (the-as (pointer int32) (&+ arg3 (* t0-15 4)))) + (sar + (+ (* (-> (the-as (pointer int32) (&+ a1-6 (* t0-15 4)))) (- 4096 a0-20)) + (* (-> (the-as (pointer int32) (&+ a2-13 (* t0-15 4)))) a0-20) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('uint32) + (let ((a0-22 (the int (* 4096.0 f0-2)))) + (dotimes (t0-16 (the-as int v1-6)) + (set! (-> (the-as (pointer uint32) (&+ arg3 (* t0-16 4)))) + (shr + (+ (* (-> (the-as (pointer uint32) (&+ a1-6 (* t0-16 4)))) (the-as uint (- 4096 a0-22))) + (* (-> (the-as (pointer uint32) (&+ a2-13 (* t0-16 4)))) (the-as uint a0-22)) + ) + 12 + ) + ) + ) + ) + arg3 + ) + (('vector) + (let ((a0-23 f0-2)) + (.mov vf3 a0-23) + ) + (let ((a0-25 (- 1.0 f0-2))) + (.mov vf4 a0-25) + ) + (dotimes (a0-26 (the-as int v1-6)) + (let ((t0-18 (+ (* a0-26 16) (the-as int a1-6)))) + (.lvf vf1 (&-> (the-as (pointer int128) t0-18))) + ) + (let ((t0-20 (+ (* a0-26 16) (the-as int a2-13)))) + (.lvf vf2 (&-> (the-as (pointer int128) t0-20))) + ) + (.mul.x.vf vf1 vf1 vf4) + (.mul.x.vf vf2 vf2 vf3) + (.add.vf vf1 vf1 vf2) + (.svf (&-> (the-as (pointer uint128) (+ (* a0-26 16) (the-as int arg3))) 0) vf1) + ) + arg3 + ) + (else + (let ((a0-27 t0-2)) + (&+ (-> this data-base) (-> a0-27 data-offset)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 9 of type res-lump +;; INFO: Used lq/sq +(defmethod get-property-data ((this res-lump) + (name symbol) + (mode symbol) + (time float) + (arg3 pointer) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns an address to a given property's data at a specific time stamp, or default on error. + @param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f + @param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode." + (let ((s3-0 (lookup-tag-idx this name mode time))) + (cond + ((< (the-as int s3-0) 0) + (empty) + ) + (else + (set! arg3 (make-property-data this time s3-0 arg5)) + (if arg4 + (set! (-> arg4 0) (-> this tag (-> s3-0 lo))) + ) + ) + ) + ) + arg3 + ) + +;; definition for method 10 of type res-lump +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs structure. +(defmethod get-property-struct ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 structure) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns a given struct property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int s3-0) 0) + (empty) + ) + (else + (set! arg3 (the-as structure (make-property-data this arg2 s3-0 arg5))) + (let ((v1-4 (-> this tag (-> s3-0 lo)))) + (if arg4 + (set! (-> arg4 0) v1-4) + ) + (if (zero? (-> v1-4 inlined?)) + (set! arg3 (the-as structure (-> (the-as (pointer uint32) arg3)))) + (empty) + ) + ) + ) + ) + ) + (the-as structure arg3) + ) + +;; definition for method 11 of type res-lump +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs uint128. +(defmethod get-property-value ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 uint128) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + "Returns a given value property's value at a specific time stamp, or default on error. + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." + (let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int a2-1) 0) + (empty) + ) + (else + (let* ((a0-2 (-> a2-1 lo)) + (s1-0 (-> this tag a0-2)) + (s0-0 (-> s1-0 elt-type)) + (gp-1 (make-property-data this arg2 a2-1 arg5)) + ) + (if arg4 + (set! (-> arg4 0) s1-0) + ) + (cond + ((type-type? (the-as type s0-0) uinteger) + (case (-> s1-0 elt-type size) + ((1) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint8) gp-1)))) + ) + ((2) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint16) gp-1)))) + ) + ((4) + (set! arg3 (the-as uint128 (-> (the-as (pointer uint32) gp-1)))) + ) + ((16) + (set! arg3 (-> (the-as (pointer uint128) gp-1))) + ) + (else + (set! arg3 (the-as uint128 (-> (the-as (pointer uint64) gp-1)))) + ) + ) + ) + ((type-type? (the-as type s0-0) integer) + (case (-> s1-0 elt-type size) + ((1) + (set! arg3 (the-as uint128 (-> (the-as (pointer int8) gp-1)))) + ) + ((2) + (set! arg3 (the-as uint128 (-> (the-as (pointer int16) gp-1)))) + ) + ((4) + (set! arg3 (the-as uint128 (-> (the-as (pointer int32) gp-1)))) + ) + ((16) + (set! arg3 (-> (the-as (pointer uint128) gp-1))) + ) + (else + (set! arg3 (the-as uint128 (-> (the-as (pointer uint64) gp-1)))) + ) + ) + ) + ((type-type? (the-as type s0-0) float) + (set! arg3 (the-as uint128 (the int (-> (the-as (pointer float) gp-1))))) + ) + (else + (empty) + ) + ) + ) + ) + ) + ) + (the-as uint128 arg3) + ) + +;; definition for method 12 of type res-lump +;; INFO: Used lq/sq +(defmethod get-property-value-float ((this res-lump) + (arg0 symbol) + (arg1 symbol) + (arg2 float) + (arg3 float) + (arg4 (pointer res-tag)) + (arg5 pointer) + ) + (local-vars (v1-8 uint) (v1-11 int)) + (let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2))) + (cond + ((< (the-as int a2-1) 0) + (empty) + ) + (else + (let* ((a0-2 (-> a2-1 lo)) + (s1-0 (-> this tag a0-2)) + (s0-0 (-> s1-0 elt-type)) + (gp-1 (make-property-data this arg2 a2-1 arg5)) + ) + (if arg4 + (set! (-> arg4 0) s1-0) + ) + (cond + ((type-type? (the-as type s0-0) float) + (set! arg3 (-> (the-as (pointer float) gp-1))) + ) + ((type-type? (the-as type s0-0) uinteger) + (case (-> s1-0 elt-type size) + ((1) + (set! v1-8 (-> (the-as (pointer uint8) gp-1))) + ) + ((2) + (set! v1-8 (-> (the-as (pointer uint16) gp-1))) + ) + ((4) + (set! v1-8 (-> (the-as (pointer uint32) gp-1))) + ) + ((16) + (set! v1-8 (the-as uint (-> (the-as (pointer uint128) gp-1)))) + ) + (else + (set! v1-8 (-> (the-as (pointer uint64) gp-1))) + ) + ) + (set! arg3 (the float v1-8)) + ) + ((type-type? (the-as type s0-0) integer) + (case (-> s1-0 elt-type size) + ((1) + (set! v1-11 (-> (the-as (pointer int8) gp-1))) + ) + ((2) + (set! v1-11 (-> (the-as (pointer int16) gp-1))) + ) + ((4) + (set! v1-11 (-> (the-as (pointer int32) gp-1))) + ) + ((16) + (set! v1-11 (the-as int (-> (the-as (pointer uint128) gp-1)))) + ) + (else + (set! v1-11 (the-as int (-> (the-as (pointer uint64) gp-1)))) + ) + ) + (set! arg3 (the float v1-11)) + ) + (else + (empty) + ) + ) + ) + ) + ) + ) + arg3 + ) + +;; definition for method 16 of type res-lump +;; INFO: Used lq/sq +(defmethod sort! ((this res-lump)) + "Sort all tags based on name, then key-frame." + (let ((v1-0 -1)) + (while (nonzero? v1-0) + (set! v1-0 0) + (let ((a1-0 0) + (a2-1 (+ (-> this length) -2)) + ) + (while (>= a2-1 a1-0) + (let* ((a3-2 (-> this tag a1-0)) + (t0-3 (-> this tag (+ a1-0 1))) + (t1-3 (-> a3-2 name)) + (t2-1 (-> t0-3 name)) + ) + (when (or (< (the-as int t2-1) (the-as int t1-3)) (and (= t1-3 t2-1) (< (-> t0-3 key-frame) (-> a3-2 key-frame)))) + (+! v1-0 1) + (set! (-> this tag a1-0) t0-3) + (set! (-> this tag (+ a1-0 1)) a3-2) + ) + ) + (+! a1-0 1) + ) + ) + ) + ) + (set! (-> this flags) (res-lump-flags sorted)) + this + ) + +;; definition for method 15 of type res-lump +;; INFO: Used lq/sq +(defmethod allocate-data-memory-for-tag! ((this res-lump) (arg0 res-tag)) + "Find space for the data described by arg0 in this. + Returns a tag with data-offset set correctly for this res-lump. + If the lump already contains memory for the given tag, and it is big enough, + it will be reused. Alignment will be at least 8 bytes. + If the input tag has elt-count = 0, it will return a tag for elt-count = 1." + (local-vars (resource-mem pointer)) + (let* ((tag-pair (lookup-tag-idx this (-> arg0 name) 'exact (-> arg0 key-frame))) + (existing-tag (-> this tag (-> tag-pair lo))) + ) + 0 + (if (and (>= (the-as int tag-pair) 0) (!= (-> arg0 key-frame) (-> arg0 key-frame))) + (set! tag-pair (new 'static 'res-tag-pair :lo #xffffffff :hi #xffffffff)) + ) + (if (zero? (-> arg0 elt-count)) + (set! arg0 (copy-and-set-field arg0 elt-count 1)) + ) + (let ((data-size (length arg0))) + (cond + ((and (>= (the-as int tag-pair) 0) (>= (length existing-tag) data-size)) + (set! resource-mem (&+ (-> this data-base) (-> existing-tag data-offset))) + (when (logtest? (the-as int resource-mem) 7) + (set! resource-mem (logand -16 (&+ (-> this data-top) 15))) + (set! (-> this data-top) (&+ resource-mem data-size)) + ) + ) + (else + (set! resource-mem (logand -16 (&+ (-> this data-top) 15))) + (set! (-> this data-top) (&+ resource-mem data-size)) + ) + ) + (let* ((a0-22 arg0) + (s4-1 (copy-and-set-field a0-22 data-offset (&- resource-mem (the-as uint (-> this data-base))))) + ) + (when (>= (the-as int (&+ resource-mem data-size)) (the-as int (&+ (-> this data-base) (-> this data-size)))) + (format + 0 + "ERROR: attempting to a new tag ~`res-tag`P data of #x~X bytes to ~A, but data memory is full.~%" + s4-1 + data-size + this + ) + (return (the-as res-tag #f)) + ) + (cond + ((< (the-as int tag-pair) 0) + (cond + ((>= (-> this length) (-> this allocated-length)) + (format 0 "ERROR: attempting to a new tag ~`res-tag`P to ~A, but tag memory is full.~%" s4-1 this) + (return (the-as res-tag #f)) + ) + (else + (set! (-> this tag (-> this length)) s4-1) + (+! (-> this length) 1) + (sort! this) + ) + ) + ) + (else + (set! (-> this tag (-> tag-pair lo)) s4-1) + ) + ) + s4-1 + ) + ) + ) + ) + +;; definition for method 17 of type res-lump +(defmethod add-data! ((this res-lump) (tag res-tag) (arg2 pointer)) + "Given a tag and a pointer to its data, copy it to this res-lump. + This doesn't seem to do the right thing if the given tag is a non-inline tag + with > 1 element." + (let ((a0-2 (allocate-data-memory-for-tag! this tag))) + (when a0-2 + (let* ((v1-2 this) + (a1-1 a0-2) + (s4-0 (&+ (-> v1-2 data-base) (-> a1-1 data-offset))) + ) + (cond + ((zero? (-> a0-2 inlined?)) + (length a0-2) + (set! (-> (the-as (pointer pointer) s4-0) 0) arg2) + ) + (else + (let ((a2-1 (length a0-2))) + (mem-copy! s4-0 arg2 a2-1) + ) + ) + ) + ) + ) + ) + this + ) + +;; definition for method 18 of type res-lump +(defmethod add-32bit-data! ((this res-lump) (arg0 res-tag) (arg1 object)) + "Add a single 32-bit value using [[add-data!]]." + (local-vars (sv-16 object)) + (set! sv-16 arg1) + (let* ((v1-0 arg0) + (a1-4 (copy-and-set-field v1-0 inlined? 1)) + ) + (add-data! this a1-4 (& sv-16)) + ) + ) + +;; definition for method 21 of type res-lump +;; INFO: Used lq/sq +(defmethod get-curve-data! ((this res-lump) (arg0 curve) (arg1 symbol) (arg2 symbol) (arg3 float)) + "Read curve data and write it to curve-target. Return #t if both + control points and knots data was succesfully read, #f otherwise." + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((s5-0 #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((a0-2 (get-property-data this arg1 'exact arg3 (the-as pointer #f) (& sv-16) *res-static-buf*))) + (when a0-2 + (set! (-> arg0 cverts) (the-as (inline-array vector) a0-2)) + (set! (-> arg0 num-cverts) (the-as int (-> sv-16 elt-count))) + (when (< 256 (-> arg0 num-cverts)) + (format + 0 + "ERROR: curve has ~D control points--only ~D are allowed. Increase MAX-CURVE-CONTROL-POINTS or shorten the curve.~%" + (-> arg0 num-cverts) + 256 + ) + (set! (-> arg0 num-cverts) 256) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((a0-6 (get-property-data this arg2 'exact arg3 (the-as pointer #f) (& sv-32) *res-static-buf*))) + (when a0-6 + (set! (-> arg0 knots) (the-as (pointer float) a0-6)) + (set! (-> arg0 num-knots) (the-as int (-> sv-32 elt-count))) + (set! s5-0 #t) + ) + ) + ) + ) + s5-0 + ) + ) + +;; definition for method 8 of type res-lump +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs res-lump. +(defmethod mem-usage ((this res-lump) (usage memory-usage-block) (flags int)) + (local-vars (sv-16 int)) + (let ((s3-0 49) + (s2-0 "res") + ) + (cond + ((logtest? flags 256) + (set! s3-0 45) + (set! s2-0 "camera") + ) + ((logtest? flags 64) + (set! s3-0 44) + (set! s2-0 "entity") + ) + ((logtest? flags 512) + (set! s3-0 77) + (set! s2-0 "art-joint-geo") + ) + ) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let ((v1-19 (asize-of this))) + (+! (-> usage data s3-0 used) v1-19) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-19 15))) + ) + (dotimes (s1-0 (-> this length)) + (when (zero? (-> this tag s1-0 inlined?)) + (let* ((a1-4 this) + (a0-15 s1-0) + (s0-0 (the-as object (-> (the-as (pointer int32) (&+ (-> a1-4 data-base) (-> a1-4 tag a0-15 data-offset)))))) + ) + (when (not (part-group-pointer? (the-as pointer s0-0))) + (let ((v1-34 (rtype-of (the-as int s0-0)))) + (cond + ((or (= v1-34 symbol) (or (= v1-34 type) (= v1-34 pair))) + ) + ((= v1-34 string) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let ((v1-48 ((method-of-type (rtype-of (the-as int s0-0)) asize-of) (the-as int s0-0)))) + (+! (-> usage data s3-0 used) v1-48) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-48 15))) + ) + ) + ((or (= v1-34 nav-mesh) (= v1-34 collide-mesh)) + (let ((a0-48 (the-as (array object) s0-0))) + ((method-of-type (rtype-of a0-48) mem-usage) a0-48 usage flags) + ) + ) + ((= v1-34 array) + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let* ((a0-53 (the-as (array object) s0-0)) + (v1-68 ((method-of-type (rtype-of a0-53) asize-of) a0-53)) + ) + (+! (-> usage data s3-0 used) v1-68) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-68 15))) + ) + (set! sv-16 0) + (while (< sv-16 (-> (the-as array s0-0) length)) + (let ((a0-63 (-> (the-as (array object) s0-0) sv-16))) + ((method-of-type (rtype-of a0-63) mem-usage) a0-63 usage flags) + ) + (set! sv-16 (+ sv-16 1)) + ) + ) + (else + (set! (-> usage length) (max (-> usage length) (+ s3-0 1))) + (set! (-> usage data s3-0 name) s2-0) + (+! (-> usage data s3-0 count) 1) + (let* ((a0-68 (the-as int s0-0)) + (v1-96 ((method-of-type (rtype-of a0-68) asize-of) a0-68)) + ) + (+! (-> usage data s3-0 used) v1-96) + (+! (-> usage data s3-0 total) (logand -16 (+ v1-96 15))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as res-lump 0) + ) + +;; definition for symbol *res-static-buf*, type pointer +(define *res-static-buf* (malloc 'global 128)) diff --git a/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc b/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc new file mode 100644 index 0000000000..eb599e2c97 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc @@ -0,0 +1,1187 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fact-bank +(deftype fact-bank (basic) + ((eco-level-max float) + (eco-single-inc float) + (eco-full-inc float) + (eco-single-timeout seconds) + (eco-full-timeout seconds) + (dummy seconds) + (health-max-default float) + (health-max-max float) + (health-small-inc float) + (health-single-inc float) + (health-default-inc float) + (health-darkjak-inc float) + (health-darkjak-min float) + (health-darkjak-error float) + (eco-pill-green-max-default float) + (eco-pill-dark-max-default float) + (eco-pill-light-max-default float) + (eco-green-max-default float) + (default-eco-pill-green-inc float) + (default-eco-pill-dark-inc float) + (default-eco-pill-light-inc float) + (buzzer-max-default float) + (buzzer-single-inc float) + (suck-bounce-dist meters) + (suck-suck-dist meters) + (ammo-yellow-max float) + (ammo-red-max float) + (ammo-blue-max float) + (ammo-dark-max float) + (ammo-yellow-start float) + (ammo-red-start float) + (ammo-blue-start float) + (ammo-dark-start float) + (shield-max float) + (shield-use-speed float) + (shield-time-min seconds) + (trick-point-max float) + (super-skill-inc float) + (lightjak-regen-inc float) + (lightjak-swoop-inc float) + (lightjak-freeze-inc float) + (lightjak-freeze-min float) + (lightjak-freeze-duration seconds) + (lightjak-shield-inc float) + (lightjak-shield-hit-inc float) + (darkjak-spin-inc float) + (darkjak-punch-inc float) + (darkjak-flop-inc float) + (darkjak-uppercut-inc float) + (darkjak-bomb0-inc float) + (darkjak-bomb1-inc float) + (darkjak-smack-inc float) + (darkjak-bomb-min float) + (darkjak-button-invis-inc float) + ) + ) + +;; definition for method 3 of type fact-bank +(defmethod inspect ((this fact-bank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Teco-level-max: ~f~%" (-> this eco-level-max)) + (format #t "~1Teco-single-inc: ~f~%" (-> this eco-single-inc)) + (format #t "~1Teco-full-inc: ~f~%" (-> this eco-full-inc)) + (format #t "~1Teco-single-timeout: (seconds ~e)~%" (-> this eco-single-timeout)) + (format #t "~1Teco-full-timeout: (seconds ~e)~%" (-> this eco-full-timeout)) + (format #t "~1Tdummy: (seconds ~e)~%" (-> this dummy)) + (format #t "~1Thealth-max-default: ~f~%" (-> this health-max-default)) + (format #t "~1Thealth-max-max: ~f~%" (-> this health-max-max)) + (format #t "~1Thealth-small-inc: ~f~%" (-> this health-small-inc)) + (format #t "~1Thealth-single-inc: ~f~%" (-> this health-single-inc)) + (format #t "~1Thealth-default-inc: ~f~%" (-> this health-default-inc)) + (format #t "~1Thealth-darkjak-inc: ~f~%" (-> this health-darkjak-inc)) + (format #t "~1Thealth-darkjak-min: ~f~%" (-> this health-darkjak-min)) + (format #t "~1Thealth-darkjak-error: ~f~%" (-> this health-darkjak-error)) + (format #t "~1Teco-pill-green-max-default: ~f~%" (-> this eco-pill-green-max-default)) + (format #t "~1Teco-pill-dark-max-default: ~f~%" (-> this eco-pill-dark-max-default)) + (format #t "~1Teco-pill-light-max-default: ~f~%" (-> this eco-pill-light-max-default)) + (format #t "~1Teco-green-max-default: ~f~%" (-> this eco-green-max-default)) + (format #t "~1Tdefault-eco-pill-green-inc: ~f~%" (-> this default-eco-pill-green-inc)) + (format #t "~1Tdefault-eco-pill-dark-inc: ~f~%" (-> this default-eco-pill-dark-inc)) + (format #t "~1Tdefault-eco-pill-light-inc: ~f~%" (-> this default-eco-pill-light-inc)) + (format #t "~1Tbuzzer-max-default: ~f~%" (-> this buzzer-max-default)) + (format #t "~1Tbuzzer-single-inc: ~f~%" (-> this buzzer-single-inc)) + (format #t "~1Tsuck-bounce-dist: (meters ~m)~%" (-> this suck-bounce-dist)) + (format #t "~1Tsuck-suck-dist: (meters ~m)~%" (-> this suck-suck-dist)) + (format #t "~1Tammo-yellow-max: ~f~%" (-> this ammo-yellow-max)) + (format #t "~1Tammo-red-max: ~f~%" (-> this ammo-red-max)) + (format #t "~1Tammo-blue-max: ~f~%" (-> this ammo-blue-max)) + (format #t "~1Tammo-dark-max: ~f~%" (-> this ammo-dark-max)) + (format #t "~1Tammo-yellow-start: ~f~%" (-> this ammo-yellow-start)) + (format #t "~1Tammo-red-start: ~f~%" (-> this ammo-red-start)) + (format #t "~1Tammo-blue-start: ~f~%" (-> this ammo-blue-start)) + (format #t "~1Tammo-dark-start: ~f~%" (-> this ammo-dark-start)) + (format #t "~1Tshield-max: ~f~%" (-> this shield-max)) + (format #t "~1Tshield-use-speed: ~f~%" (-> this shield-use-speed)) + (format #t "~1Tshield-time-min: (seconds ~e)~%" (-> this shield-time-min)) + (format #t "~1Ttrick-point-max: ~f~%" (-> this trick-point-max)) + (format #t "~1Tsuper-skill-inc: ~f~%" (-> this super-skill-inc)) + (format #t "~1Tlightjak-regen-inc: ~f~%" (-> this lightjak-regen-inc)) + (format #t "~1Tlightjak-swoop-inc: ~f~%" (-> this lightjak-swoop-inc)) + (format #t "~1Tlightjak-freeze-inc: ~f~%" (-> this lightjak-freeze-inc)) + (format #t "~1Tlightjak-freeze-min: ~f~%" (-> this lightjak-freeze-min)) + (format #t "~1Tlightjak-freeze-duration: (seconds ~e)~%" (-> this lightjak-freeze-duration)) + (format #t "~1Tlightjak-shield-inc: ~f~%" (-> this lightjak-shield-inc)) + (format #t "~1Tlightjak-shield-hit-inc: ~f~%" (-> this lightjak-shield-hit-inc)) + (format #t "~1Tdarkjak-spin-inc: ~f~%" (-> this darkjak-spin-inc)) + (format #t "~1Tdarkjak-punch-inc: ~f~%" (-> this darkjak-punch-inc)) + (format #t "~1Tdarkjak-flop-inc: ~f~%" (-> this darkjak-flop-inc)) + (format #t "~1Tdarkjak-uppercut-inc: ~f~%" (-> this darkjak-uppercut-inc)) + (format #t "~1Tdarkjak-bomb0-inc: ~f~%" (-> this darkjak-bomb0-inc)) + (format #t "~1Tdarkjak-bomb1-inc: ~f~%" (-> this darkjak-bomb1-inc)) + (format #t "~1Tdarkjak-smack-inc: ~f~%" (-> this darkjak-smack-inc)) + (format #t "~1Tdarkjak-bomb-min: ~f~%" (-> this darkjak-bomb-min)) + (format #t "~1Tdarkjak-button-invis-inc: ~f~%" (-> this darkjak-button-invis-inc)) + (label cfg-4) + this + ) + +;; definition for symbol *FACT-bank*, type fact-bank +(define *FACT-bank* (new 'static 'fact-bank + :eco-level-max 2.0 + :eco-single-inc 1.0 + :eco-full-inc 5.0 + :eco-single-timeout (seconds 5) + :eco-full-timeout (seconds 20) + :dummy (seconds 15) + :health-max-default 8.0 + :health-max-max 16.0 + :health-small-inc 1.0 + :health-single-inc 1.0 + :health-default-inc 2.0 + :health-darkjak-inc 0.1 + :health-darkjak-min 1.05 + :health-darkjak-error 0.05 + :eco-pill-green-max-default 50.0 + :eco-pill-dark-max-default 100.0 + :eco-pill-light-max-default 100.0 + :eco-green-max-default 100.0 + :buzzer-max-default 7.0 + :buzzer-single-inc 1.0 + :suck-bounce-dist (meters 18) + :suck-suck-dist (meters 7.5) + :ammo-yellow-max 100.0 + :ammo-red-max 50.0 + :ammo-blue-max 100.0 + :ammo-dark-max 5.0 + :ammo-yellow-start 100.0 + :ammo-red-start 20.0 + :ammo-blue-start 100.0 + :ammo-dark-start 5.0 + :shield-max 100.0 + :shield-use-speed 10.0 + :shield-time-min (seconds 1.5) + :trick-point-max 999999.0 + :super-skill-inc 3.0 + :lightjak-swoop-inc 1.0 + :lightjak-freeze-inc 50.0 + :lightjak-freeze-min 2.0 + :lightjak-freeze-duration (seconds 15) + :lightjak-shield-inc 3.0 + :lightjak-shield-hit-inc 2.0 + :darkjak-spin-inc 4.0 + :darkjak-punch-inc 4.0 + :darkjak-flop-inc 6.0 + :darkjak-uppercut-inc 6.0 + :darkjak-bomb0-inc 100.0 + :darkjak-bomb1-inc 100.0 + :darkjak-smack-inc 15.0 + :darkjak-bomb-min 50.0 + :darkjak-button-invis-inc 20.0 + ) + ) + +;; definition (debug) for function pickup-type->string +(defun-debug pickup-type->string ((arg0 pickup-type)) + (case arg0 + (((pickup-type eco-pill-dark)) + "eco-pill-dark" + ) + (((pickup-type ammo-dark-light-random)) + "ammo-dark-light-random" + ) + (((pickup-type ammo-random)) + "ammo-random" + ) + (((pickup-type eco-blue)) + "eco-blue" + ) + (((pickup-type gun-yellow-1)) + "gun-yellow-1" + ) + (((pickup-type pass-red)) + "pass-red" + ) + (((pickup-type eco-pill-green)) + "eco-pill-green" + ) + (((pickup-type eco-red)) + "eco-red" + ) + (((pickup-type dark-eco-crystal)) + "dark-eco-crystal" + ) + (((pickup-type skill)) + "skill" + ) + (((pickup-type karma)) + "karma" + ) + (((pickup-type eco-dark)) + "eco-dark" + ) + (((pickup-type gun-red-3)) + "gun-red-3" + ) + (((pickup-type gun-dark-1)) + "gun-dark-1" + ) + (((pickup-type gun-yellow-3)) + "gun-yellow-3" + ) + (((pickup-type gem)) + "gem" + ) + (((pickup-type eco-green)) + "eco-green" + ) + (((pickup-type darkjak)) + "darkjak" + ) + (((pickup-type ammo-yellow)) + "ammo-yellow" + ) + (((pickup-type gun-blue-1)) + "gun-blue-1" + ) + (((pickup-type pass-blue)) + "pass-blue" + ) + (((pickup-type ammo-light-random)) + "ammo-light-random" + ) + (((pickup-type gun-dark-2)) + "gun-dark-2" + ) + (((pickup-type ammo-red)) + "ammo-red" + ) + (((pickup-type lightjak)) + "lightjak" + ) + (((pickup-type fuel-cell)) + "fuel-cell" + ) + (((pickup-type gun-blue-2)) + "gun-blue-2" + ) + (((pickup-type buzzer)) + "buzzer" + ) + (((pickup-type gun-dark-3)) + "gun-dark-3" + ) + (((pickup-type gun-red-1)) + "gun-red-1" + ) + (((pickup-type gun-blue-3)) + "gun-blue-3" + ) + (((pickup-type shield)) + "shield" + ) + (((pickup-type eco-pill-random)) + "eco-pill-random" + ) + (((pickup-type health-max)) + "health-max" + ) + (((pickup-type light-eco-crystal)) + "light-eco-crystal" + ) + (((pickup-type board)) + "board" + ) + (((pickup-type none)) + "none" + ) + (((pickup-type pass-green)) + "pass-green" + ) + (((pickup-type light-random)) + "light-random" + ) + (((pickup-type gun-yellow-2)) + "gun-yellow-2" + ) + (((pickup-type pass-slumb-genb)) + "pass-slumb-genb" + ) + (((pickup-type money)) + "money" + ) + (((pickup-type eco-yellow)) + "eco-yellow" + ) + (((pickup-type ammo-dark)) + "ammo-dark" + ) + (((pickup-type trick-judge)) + "trick-judge" + ) + (((pickup-type eco-pill-light)) + "eco-pill-light" + ) + (((pickup-type trick-point)) + "trick-point" + ) + (((pickup-type ammo-blue)) + "ammo-blue" + ) + (((pickup-type pass-yellow)) + "pass-yellow" + ) + (((pickup-type gun-red-2)) + "gun-red-2" + ) + (((pickup-type health)) + "health" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition of type fact-info +(deftype fact-info (basic) + ((process process) + (pickup-type pickup-type) + (pickup-amount float) + (pickup-spawn-amount float) + (options actor-option) + (fade-time time-frame) + ) + (:methods + (new (symbol type process pickup-type float) _type_) + (fact-info-method-9 () none) + (reset! (_type_ symbol) none) + (pickup-collectable! (_type_ pickup-type float handle) float) + ) + ) + +;; definition for method 3 of type fact-info +(defmethod inspect ((this fact-info)) + (when (not this) + (set! this this) + (goto cfg-62) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tpickup-type: #x~X : ~S~%" (-> this pickup-type) (pickup-type->string (-> this pickup-type))) + (format #t "~1Tpickup-amount: ~f~%" (-> this pickup-amount)) + (format #t "~1Tpickup-spawn-amount: ~f~%" (-> this pickup-spawn-amount)) + (format #t "~1Toptions: #x~X : (actor-option " (-> this options)) + (let ((s5-1 (-> this options))) + (if (= (logand s5-1 (actor-option respawn-delay)) (actor-option respawn-delay)) + (format #t "respawn-delay ") + ) + (if (= (logand s5-1 (actor-option draw-blocker)) (actor-option draw-blocker)) + (format #t "draw-blocker ") + ) + (if (= (logand (actor-option user20) s5-1) (actor-option user20)) + (format #t "user20 ") + ) + (if (= (logand (actor-option no-amb-sound) s5-1) (actor-option no-amb-sound)) + (format #t "no-amb-sound ") + ) + (if (= (logand s5-1 (actor-option auto-pickup)) (actor-option auto-pickup)) + (format #t "auto-pickup ") + ) + (if (= (logand (actor-option no-track) s5-1) (actor-option no-track)) + (format #t "no-track ") + ) + (if (= (logand s5-1 (actor-option no-shadow)) (actor-option no-shadow)) + (format #t "no-shadow ") + ) + (if (= (logand s5-1 (actor-option loop)) (actor-option loop)) + (format #t "loop ") + ) + (if (= (logand s5-1 (actor-option fuel-cell-no-jump)) (actor-option fuel-cell-no-jump)) + (format #t "fuel-cell-no-jump ") + ) + (if (= (logand (actor-option fall) s5-1) (actor-option fall)) + (format #t "fall ") + ) + (if (= (logand (actor-option user18) s5-1) (actor-option user18)) + (format #t "user18 ") + ) + (if (= (logand s5-1 (actor-option big-collision)) (actor-option big-collision)) + (format #t "big-collision ") + ) + (if (= (logand s5-1 (actor-option no-reaction)) (actor-option no-reaction)) + (format #t "no-reaction ") + ) + (if (= (logand s5-1 (actor-option suck-in)) (actor-option suck-in)) + (format #t "suck-in ") + ) + (if (= (logand s5-1 (actor-option racer-only)) (actor-option racer-only)) + (format #t "racer-only ") + ) + (if (= (logand s5-1 (actor-option blocked)) (actor-option blocked)) + (format #t "blocked ") + ) + (if (= (logand (actor-option no-distance-check-fadeout) s5-1) (actor-option no-distance-check-fadeout)) + (format #t "no-distance-check-fadeout ") + ) + (if (= (logand (actor-option cond-hide) s5-1) (actor-option cond-hide)) + (format #t "cond-hide ") + ) + (if (= (logand (actor-option dont-override-fact) s5-1) (actor-option dont-override-fact)) + (format #t "dont-override-fact ") + ) + (if (= (logand (actor-option user17) s5-1) (actor-option user17)) + (format #t "user17 ") + ) + (if (= (logand s5-1 (actor-option wait-for-cue)) (actor-option wait-for-cue)) + (format #t "wait-for-cue ") + ) + (if (= (logand s5-1 (actor-option reflect)) (actor-option reflect)) + (format #t "reflect ") + ) + (if (= (logand (actor-option user19) s5-1) (actor-option user19)) + (format #t "user19 ") + ) + (if (= (logand (actor-option cond-respawn) s5-1) (actor-option cond-respawn)) + (format #t "cond-respawn ") + ) + (if (= (logand s5-1 (actor-option wait-for-task-complete)) (actor-option wait-for-task-complete)) + (format #t "wait-for-task-complete ") + ) + (if (= (logand s5-1 (actor-option fade-out)) (actor-option fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (actor-option cond-low-ammo) s5-1) (actor-option cond-low-ammo)) + (format #t "cond-low-ammo ") + ) + (if (= (logand (actor-option mirror) s5-1) (actor-option mirror)) + (format #t "mirror ") + ) + (if (= (logand s5-1 (actor-option spawns-fuel-cell)) (actor-option spawns-fuel-cell)) + (format #t "spawns-fuel-cell ") + ) + ) + (format #t ")~%") + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (label cfg-62) + this + ) + +;; definition of type fact-info-target +(deftype fact-info-target (fact-info) + ((eco-type int32) + (eco-level float) + (eco-pickup-time time-frame) + (eco-timeout seconds) + (eco-source handle) + (eco-source-time time-frame) + (health float) + (health-max float) + (health-pickup-time time-frame) + (buzzer float) + (buzzer-max float) + (eco-pill-green float) + (eco-pill-green-max float) + (eco-pill-green-pickup-time time-frame) + (eco-pill-dark-pickup-time time-frame) + (eco-pill-light-pickup-time time-frame) + (money-pickup-time time-frame) + (buzzer-pickup-time time-frame) + (task-pickup-time time-frame) + (stop-time-timeout time-frame) + (darkjak-start-time time-frame) + (darkjak-effect-time time-frame) + (lightjak-start-time time-frame) + (lightjak-effect-time time-frame) + (ammo-pickup-time time-frame) + (shield-pickup-time time-frame) + (shield-start-time time-frame) + (shield-use-time time-frame) + (shield-level float) + (shield-attack-id uint32) + (trick-point float) + (trick-point-pickup-time time-frame) + (trick-point-start-time time-frame) + (trick-point-duration time-frame) + (gem-pickup-time time-frame) + (skill-pickup-time time-frame) + (karma-pickup-time time-frame) + (eco-green float) + (eco-green-max float) + (eco-green-pickup-time time-frame) + ) + (:methods + (new (symbol type process-drawable pickup-type float) _type_) + (get-gun-ammo (_type_) float) + ) + ) + +;; definition for method 3 of type fact-info-target +(defmethod inspect ((this fact-info-target)) + (when (not this) + (set! this this) + (goto cfg-62) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tpickup-type: #x~X : ~S~%" (-> this pickup-type) (pickup-type->string (-> this pickup-type))) + (format #t "~1Tpickup-amount: ~f~%" (-> this pickup-amount)) + (format #t "~1Tpickup-spawn-amount: ~f~%" (-> this pickup-spawn-amount)) + (format #t "~1Toptions: #x~X : (actor-option " (-> this options)) + (let ((s5-1 (-> this options))) + (if (= (logand s5-1 (actor-option respawn-delay)) (actor-option respawn-delay)) + (format #t "respawn-delay ") + ) + (if (= (logand s5-1 (actor-option draw-blocker)) (actor-option draw-blocker)) + (format #t "draw-blocker ") + ) + (if (= (logand (actor-option user20) s5-1) (actor-option user20)) + (format #t "user20 ") + ) + (if (= (logand (actor-option no-amb-sound) s5-1) (actor-option no-amb-sound)) + (format #t "no-amb-sound ") + ) + (if (= (logand s5-1 (actor-option auto-pickup)) (actor-option auto-pickup)) + (format #t "auto-pickup ") + ) + (if (= (logand (actor-option no-track) s5-1) (actor-option no-track)) + (format #t "no-track ") + ) + (if (= (logand s5-1 (actor-option no-shadow)) (actor-option no-shadow)) + (format #t "no-shadow ") + ) + (if (= (logand s5-1 (actor-option loop)) (actor-option loop)) + (format #t "loop ") + ) + (if (= (logand s5-1 (actor-option fuel-cell-no-jump)) (actor-option fuel-cell-no-jump)) + (format #t "fuel-cell-no-jump ") + ) + (if (= (logand (actor-option fall) s5-1) (actor-option fall)) + (format #t "fall ") + ) + (if (= (logand (actor-option user18) s5-1) (actor-option user18)) + (format #t "user18 ") + ) + (if (= (logand s5-1 (actor-option big-collision)) (actor-option big-collision)) + (format #t "big-collision ") + ) + (if (= (logand s5-1 (actor-option no-reaction)) (actor-option no-reaction)) + (format #t "no-reaction ") + ) + (if (= (logand s5-1 (actor-option suck-in)) (actor-option suck-in)) + (format #t "suck-in ") + ) + (if (= (logand s5-1 (actor-option racer-only)) (actor-option racer-only)) + (format #t "racer-only ") + ) + (if (= (logand s5-1 (actor-option blocked)) (actor-option blocked)) + (format #t "blocked ") + ) + (if (= (logand (actor-option no-distance-check-fadeout) s5-1) (actor-option no-distance-check-fadeout)) + (format #t "no-distance-check-fadeout ") + ) + (if (= (logand (actor-option cond-hide) s5-1) (actor-option cond-hide)) + (format #t "cond-hide ") + ) + (if (= (logand (actor-option dont-override-fact) s5-1) (actor-option dont-override-fact)) + (format #t "dont-override-fact ") + ) + (if (= (logand (actor-option user17) s5-1) (actor-option user17)) + (format #t "user17 ") + ) + (if (= (logand s5-1 (actor-option wait-for-cue)) (actor-option wait-for-cue)) + (format #t "wait-for-cue ") + ) + (if (= (logand s5-1 (actor-option reflect)) (actor-option reflect)) + (format #t "reflect ") + ) + (if (= (logand (actor-option user19) s5-1) (actor-option user19)) + (format #t "user19 ") + ) + (if (= (logand (actor-option cond-respawn) s5-1) (actor-option cond-respawn)) + (format #t "cond-respawn ") + ) + (if (= (logand s5-1 (actor-option wait-for-task-complete)) (actor-option wait-for-task-complete)) + (format #t "wait-for-task-complete ") + ) + (if (= (logand s5-1 (actor-option fade-out)) (actor-option fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (actor-option cond-low-ammo) s5-1) (actor-option cond-low-ammo)) + (format #t "cond-low-ammo ") + ) + (if (= (logand (actor-option mirror) s5-1) (actor-option mirror)) + (format #t "mirror ") + ) + (if (= (logand s5-1 (actor-option spawns-fuel-cell)) (actor-option spawns-fuel-cell)) + (format #t "spawns-fuel-cell ") + ) + ) + (format #t ")~%") + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (format #t "~1Teco-type: ~D~%" (-> this eco-type)) + (format #t "~1Teco-level: ~f~%" (-> this eco-level)) + (format #t "~1Teco-pickup-time: ~D~%" (-> this eco-pickup-time)) + (format #t "~1Teco-timeout: (seconds ~e)~%" (-> this eco-timeout)) + (format #t "~1Teco-source: ~D~%" (-> this eco-source)) + (format #t "~1Teco-source-time: ~D~%" (-> this eco-source-time)) + (format #t "~1Thealth: ~f~%" (-> this health)) + (format #t "~1Thealth-max: ~f~%" (-> this health-max)) + (format #t "~1Thealth-pickup-time: ~D~%" (-> this health-pickup-time)) + (format #t "~1Tbuzzer: ~f~%" (-> this buzzer)) + (format #t "~1Tbuzzer-max: ~f~%" (-> this buzzer-max)) + (format #t "~1Teco-pill-green: ~f~%" (-> this eco-pill-green)) + (format #t "~1Teco-pill-green-max: ~f~%" (-> this eco-pill-green-max)) + (format #t "~1Teco-pill-green-pickup-time: ~D~%" (-> this eco-pill-green-pickup-time)) + (format #t "~1Teco-pill-dark-pickup-time: ~D~%" (-> this eco-pill-dark-pickup-time)) + (format #t "~1Teco-pill-light-pickup-time: ~D~%" (-> this eco-pill-light-pickup-time)) + (format #t "~1Tmoney-pickup-time: ~D~%" (-> this money-pickup-time)) + (format #t "~1Tbuzzer-pickup-time: ~D~%" (-> this buzzer-pickup-time)) + (format #t "~1Ttask-pickup-time: ~D~%" (-> this task-pickup-time)) + (format #t "~1Tstop-time-timeout: ~D~%" (-> this stop-time-timeout)) + (format #t "~1Tdarkjak-start-time: ~D~%" (-> this darkjak-start-time)) + (format #t "~1Tdarkjak-effect-time: ~D~%" (-> this darkjak-effect-time)) + (format #t "~1Tlightjak-start-time: ~D~%" (-> this lightjak-start-time)) + (format #t "~1Tlightjak-effect-time: ~D~%" (-> this lightjak-effect-time)) + (format #t "~1Tammo-pickup-time: ~D~%" (-> this ammo-pickup-time)) + (format #t "~1Tshield-pickup-time: ~D~%" (-> this shield-pickup-time)) + (format #t "~1Tshield-start-time: ~D~%" (-> this shield-start-time)) + (format #t "~1Tshield-use-time: ~D~%" (-> this shield-use-time)) + (format #t "~1Tshield-level: ~f~%" (-> this shield-level)) + (format #t "~1Tshield-attack-id: ~D~%" (-> this shield-attack-id)) + (format #t "~1Ttrick-point: ~f~%" (-> this trick-point)) + (format #t "~1Ttrick-point-pickup-time: ~D~%" (-> this trick-point-pickup-time)) + (format #t "~1Ttrick-point-start-time: ~D~%" (-> this trick-point-start-time)) + (format #t "~1Ttrick-point-duration: ~D~%" (-> this trick-point-duration)) + (format #t "~1Tgem-pickup-time: ~D~%" (-> this gem-pickup-time)) + (format #t "~1Tskill-pickup-time: ~D~%" (-> this skill-pickup-time)) + (format #t "~1Tkarma-pickup-time: ~D~%" (-> this karma-pickup-time)) + (format #t "~1Teco-green: ~f~%" (-> this eco-green)) + (format #t "~1Teco-green-max: ~f~%" (-> this eco-green-max)) + (format #t "~1Teco-green-pickup-time: ~D~%" (-> this eco-green-pickup-time)) + (label cfg-62) + this + ) + +;; definition of type fact-info-enemy +(deftype fact-info-enemy (fact-info) + ((speed float) + (idle-distance meters) + (notice-top meters) + (notice-bottom meters) + (cam-horz meters) + (cam-vert meters) + (cam-notice-dist meters) + (enemy-options enemy-option) + (trig-dist meters) + (trig-actor-group (pointer actor-group)) + (trig-mask-count int8) + (trig-mask uint8 2) + ) + (:methods + (new (symbol type process (pointer float) pickup-type float) _type_) + (clear-mask-bits (_type_ int) none) + ) + ) + +;; definition for method 3 of type fact-info-enemy +(defmethod inspect ((this fact-info-enemy)) + (when (not this) + (set! this this) + (goto cfg-114) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tpickup-type: #x~X : ~S~%" (-> this pickup-type) (pickup-type->string (-> this pickup-type))) + (format #t "~1Tpickup-amount: ~f~%" (-> this pickup-amount)) + (format #t "~1Tpickup-spawn-amount: ~f~%" (-> this pickup-spawn-amount)) + (format #t "~1Toptions: #x~X : (actor-option " (-> this options)) + (let ((s5-1 (-> this options))) + (if (= (logand s5-1 (actor-option respawn-delay)) (actor-option respawn-delay)) + (format #t "respawn-delay ") + ) + (if (= (logand s5-1 (actor-option draw-blocker)) (actor-option draw-blocker)) + (format #t "draw-blocker ") + ) + (if (= (logand (actor-option user20) s5-1) (actor-option user20)) + (format #t "user20 ") + ) + (if (= (logand (actor-option no-amb-sound) s5-1) (actor-option no-amb-sound)) + (format #t "no-amb-sound ") + ) + (if (= (logand s5-1 (actor-option auto-pickup)) (actor-option auto-pickup)) + (format #t "auto-pickup ") + ) + (if (= (logand (actor-option no-track) s5-1) (actor-option no-track)) + (format #t "no-track ") + ) + (if (= (logand s5-1 (actor-option no-shadow)) (actor-option no-shadow)) + (format #t "no-shadow ") + ) + (if (= (logand s5-1 (actor-option loop)) (actor-option loop)) + (format #t "loop ") + ) + (if (= (logand s5-1 (actor-option fuel-cell-no-jump)) (actor-option fuel-cell-no-jump)) + (format #t "fuel-cell-no-jump ") + ) + (if (= (logand (actor-option fall) s5-1) (actor-option fall)) + (format #t "fall ") + ) + (if (= (logand (actor-option user18) s5-1) (actor-option user18)) + (format #t "user18 ") + ) + (if (= (logand s5-1 (actor-option big-collision)) (actor-option big-collision)) + (format #t "big-collision ") + ) + (if (= (logand s5-1 (actor-option no-reaction)) (actor-option no-reaction)) + (format #t "no-reaction ") + ) + (if (= (logand s5-1 (actor-option suck-in)) (actor-option suck-in)) + (format #t "suck-in ") + ) + (if (= (logand s5-1 (actor-option racer-only)) (actor-option racer-only)) + (format #t "racer-only ") + ) + (if (= (logand s5-1 (actor-option blocked)) (actor-option blocked)) + (format #t "blocked ") + ) + (if (= (logand (actor-option no-distance-check-fadeout) s5-1) (actor-option no-distance-check-fadeout)) + (format #t "no-distance-check-fadeout ") + ) + (if (= (logand (actor-option cond-hide) s5-1) (actor-option cond-hide)) + (format #t "cond-hide ") + ) + (if (= (logand (actor-option dont-override-fact) s5-1) (actor-option dont-override-fact)) + (format #t "dont-override-fact ") + ) + (if (= (logand (actor-option user17) s5-1) (actor-option user17)) + (format #t "user17 ") + ) + (if (= (logand s5-1 (actor-option wait-for-cue)) (actor-option wait-for-cue)) + (format #t "wait-for-cue ") + ) + (if (= (logand s5-1 (actor-option reflect)) (actor-option reflect)) + (format #t "reflect ") + ) + (if (= (logand (actor-option user19) s5-1) (actor-option user19)) + (format #t "user19 ") + ) + (if (= (logand (actor-option cond-respawn) s5-1) (actor-option cond-respawn)) + (format #t "cond-respawn ") + ) + (if (= (logand s5-1 (actor-option wait-for-task-complete)) (actor-option wait-for-task-complete)) + (format #t "wait-for-task-complete ") + ) + (if (= (logand s5-1 (actor-option fade-out)) (actor-option fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (actor-option cond-low-ammo) s5-1) (actor-option cond-low-ammo)) + (format #t "cond-low-ammo ") + ) + (if (= (logand (actor-option mirror) s5-1) (actor-option mirror)) + (format #t "mirror ") + ) + (if (= (logand s5-1 (actor-option spawns-fuel-cell)) (actor-option spawns-fuel-cell)) + (format #t "spawns-fuel-cell ") + ) + ) + (format #t ")~%") + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Tidle-distance: (meters ~m)~%" (-> this idle-distance)) + (format #t "~1Tnotice-top: (meters ~m)~%" (-> this notice-top)) + (format #t "~1Tnotice-bottom: (meters ~m)~%" (-> this notice-bottom)) + (format #t "~1Tcam-horz: (meters ~m)~%" (-> this cam-horz)) + (format #t "~1Tcam-vert: (meters ~m)~%" (-> this cam-vert)) + (format #t "~1Tcam-notice-dist: (meters ~m)~%" (-> this cam-notice-dist)) + (format #t "~1Tenemy-options: #x~X : (enemy-option " (-> this enemy-options)) + (let ((s5-2 (-> this enemy-options))) + (if (= (logand s5-2 (enemy-option user11)) (enemy-option user11)) + (format #t "user11 ") + ) + (if (= (logand (enemy-option spawner) s5-2) (enemy-option spawner)) + (format #t "spawner ") + ) + (if (= (logand (enemy-option dormant-aware) s5-2) (enemy-option dormant-aware)) + (format #t "dormant-aware ") + ) + (if (= (logand s5-2 (enemy-option user0)) (enemy-option user0)) + (format #t "user0 ") + ) + (if (= (logand s5-2 (enemy-option user2)) (enemy-option user2)) + (format #t "user2 ") + ) + (if (= (logand (enemy-option prespawned) s5-2) (enemy-option prespawned)) + (format #t "prespawned ") + ) + (if (= (logand s5-2 (enemy-option user4)) (enemy-option user4)) + (format #t "user4 ") + ) + (if (= (logand s5-2 (enemy-option user6)) (enemy-option user6)) + (format #t "user6 ") + ) + (if (= (logand s5-2 (enemy-option user8)) (enemy-option user8)) + (format #t "user8 ") + ) + (if (= (logand (enemy-option multi-focus) s5-2) (enemy-option multi-focus)) + (format #t "multi-focus ") + ) + (if (= (logand (enemy-option ambush) s5-2) (enemy-option ambush)) + (format #t "ambush ") + ) + (if (= (logand s5-2 (enemy-option user12)) (enemy-option user12)) + (format #t "user12 ") + ) + (if (= (logand (enemy-option water) s5-2) (enemy-option water)) + (format #t "water ") + ) + (if (= (logand s5-2 (enemy-option user14)) (enemy-option user14)) + (format #t "user14 ") + ) + (if (= (logand (enemy-option knocked-into-water) s5-2) (enemy-option knocked-into-water)) + (format #t "knocked-into-water ") + ) + (if (= (logand s5-2 (enemy-option user10)) (enemy-option user10)) + (format #t "user10 ") + ) + (if (= (logand (enemy-option idle-til-trigger) s5-2) (enemy-option idle-til-trigger)) + (format #t "idle-til-trigger ") + ) + (if (= (logand s5-2 (enemy-option user1)) (enemy-option user1)) + (format #t "user1 ") + ) + (if (= (logand s5-2 (enemy-option user3)) (enemy-option user3)) + (format #t "user3 ") + ) + (if (= (logand s5-2 (enemy-option user5)) (enemy-option user5)) + (format #t "user5 ") + ) + (if (= (logand s5-2 (enemy-option user7)) (enemy-option user7)) + (format #t "user7 ") + ) + (if (= (logand (enemy-option dormant) s5-2) (enemy-option dormant)) + (format #t "dormant ") + ) + (if (= (logand s5-2 (enemy-option user9)) (enemy-option user9)) + (format #t "user9 ") + ) + (if (= (logand s5-2 (enemy-option user13)) (enemy-option user13)) + (format #t "user13 ") + ) + (if (= (logand s5-2 (enemy-option user15)) (enemy-option user15)) + (format #t "user15 ") + ) + (if (= (logand (enemy-option has-trigger) s5-2) (enemy-option has-trigger)) + (format #t "has-trigger ") + ) + ) + (format #t ")~%") + (format #t "~1Ttrig-dist: (meters ~m)~%" (-> this trig-dist)) + (format #t "~1Ttrig-actor-group: #x~X~%" (-> this trig-actor-group)) + (format #t "~1Ttrig-mask-count: ~D~%" (-> this trig-mask-count)) + (format #t "~1Ttrig-mask[2] @ #x~X~%" (-> this trig-mask)) + (label cfg-114) + this + ) + +;; definition of type fact-info-crate +(deftype fact-info-crate (fact-info) + ((suck-count int32) + ) + (:methods + (new (symbol type process pickup-type float) _type_) + ) + ) + +;; definition for method 3 of type fact-info-crate +(defmethod inspect ((this fact-info-crate)) + (when (not this) + (set! this this) + (goto cfg-62) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tpickup-type: #x~X : ~S~%" (-> this pickup-type) (pickup-type->string (-> this pickup-type))) + (format #t "~1Tpickup-amount: ~f~%" (-> this pickup-amount)) + (format #t "~1Tpickup-spawn-amount: ~f~%" (-> this pickup-spawn-amount)) + (format #t "~1Toptions: #x~X : (actor-option " (-> this options)) + (let ((s5-1 (-> this options))) + (if (= (logand s5-1 (actor-option respawn-delay)) (actor-option respawn-delay)) + (format #t "respawn-delay ") + ) + (if (= (logand s5-1 (actor-option draw-blocker)) (actor-option draw-blocker)) + (format #t "draw-blocker ") + ) + (if (= (logand (actor-option user20) s5-1) (actor-option user20)) + (format #t "user20 ") + ) + (if (= (logand (actor-option no-amb-sound) s5-1) (actor-option no-amb-sound)) + (format #t "no-amb-sound ") + ) + (if (= (logand s5-1 (actor-option auto-pickup)) (actor-option auto-pickup)) + (format #t "auto-pickup ") + ) + (if (= (logand (actor-option no-track) s5-1) (actor-option no-track)) + (format #t "no-track ") + ) + (if (= (logand s5-1 (actor-option no-shadow)) (actor-option no-shadow)) + (format #t "no-shadow ") + ) + (if (= (logand s5-1 (actor-option loop)) (actor-option loop)) + (format #t "loop ") + ) + (if (= (logand s5-1 (actor-option fuel-cell-no-jump)) (actor-option fuel-cell-no-jump)) + (format #t "fuel-cell-no-jump ") + ) + (if (= (logand (actor-option fall) s5-1) (actor-option fall)) + (format #t "fall ") + ) + (if (= (logand (actor-option user18) s5-1) (actor-option user18)) + (format #t "user18 ") + ) + (if (= (logand s5-1 (actor-option big-collision)) (actor-option big-collision)) + (format #t "big-collision ") + ) + (if (= (logand s5-1 (actor-option no-reaction)) (actor-option no-reaction)) + (format #t "no-reaction ") + ) + (if (= (logand s5-1 (actor-option suck-in)) (actor-option suck-in)) + (format #t "suck-in ") + ) + (if (= (logand s5-1 (actor-option racer-only)) (actor-option racer-only)) + (format #t "racer-only ") + ) + (if (= (logand s5-1 (actor-option blocked)) (actor-option blocked)) + (format #t "blocked ") + ) + (if (= (logand (actor-option no-distance-check-fadeout) s5-1) (actor-option no-distance-check-fadeout)) + (format #t "no-distance-check-fadeout ") + ) + (if (= (logand (actor-option cond-hide) s5-1) (actor-option cond-hide)) + (format #t "cond-hide ") + ) + (if (= (logand (actor-option dont-override-fact) s5-1) (actor-option dont-override-fact)) + (format #t "dont-override-fact ") + ) + (if (= (logand (actor-option user17) s5-1) (actor-option user17)) + (format #t "user17 ") + ) + (if (= (logand s5-1 (actor-option wait-for-cue)) (actor-option wait-for-cue)) + (format #t "wait-for-cue ") + ) + (if (= (logand s5-1 (actor-option reflect)) (actor-option reflect)) + (format #t "reflect ") + ) + (if (= (logand (actor-option user19) s5-1) (actor-option user19)) + (format #t "user19 ") + ) + (if (= (logand (actor-option cond-respawn) s5-1) (actor-option cond-respawn)) + (format #t "cond-respawn ") + ) + (if (= (logand s5-1 (actor-option wait-for-task-complete)) (actor-option wait-for-task-complete)) + (format #t "wait-for-task-complete ") + ) + (if (= (logand s5-1 (actor-option fade-out)) (actor-option fade-out)) + (format #t "fade-out ") + ) + (if (= (logand (actor-option cond-low-ammo) s5-1) (actor-option cond-low-ammo)) + (format #t "cond-low-ammo ") + ) + (if (= (logand (actor-option mirror) s5-1) (actor-option mirror)) + (format #t "mirror ") + ) + (if (= (logand s5-1 (actor-option spawns-fuel-cell)) (actor-option spawns-fuel-cell)) + (format #t "spawns-fuel-cell ") + ) + ) + (format #t ")~%") + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (format #t "~1Tsuck-count: ~D~%" (-> this suck-count)) + (label cfg-62) + this + ) + +;; definition for method 0 of type fact-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs fact-info. +(defmethod new fact-info ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float)) + (local-vars (sv-16 fact-info) (sv-20 res-lump) (sv-24 task-mask)) + (set! sv-16 (object-new allocation type-to-make (the-as int (-> type-to-make size)))) + (set! sv-20 (the-as res-lump (-> arg0 entity))) + (set! sv-24 (process-task-mask arg0)) + (when (zero? sv-16) + (go process-drawable-art-error "memory") + (return (the-as fact-info 0)) + ) + (set! (-> sv-16 process) arg0) + (set! (-> sv-16 pickup-type) arg1) + (set! (-> sv-16 pickup-amount) arg2) + (let ((s4-1 (-> (lookup-tag-idx sv-20 'eco-info 'base -1000000000.0) lo))) + (when (>= (the-as int s4-1) 0) + (let ((s3-0 (the-as int s4-1)) + (s2-0 (-> sv-20 tag s4-1)) + ) + 0 + (while (= (-> s2-0 name) (-> sv-20 tag s4-1 name)) + (let ((v1-17 (make-property-data sv-20 0.0 (the-as res-tag-pair s3-0) (the-as pointer #f))) + (a0-7 (the int (-> s2-0 key-frame))) + ) + (when (or (< a0-7 0) (and (-> arg0 entity) (logtest? sv-24 (ash 1 a0-7)))) + (when v1-17 + (let ((a0-15 (-> s2-0 elt-count))) + (set! (-> sv-16 pickup-type) (the-as pickup-type (-> (the-as (pointer int32) v1-17)))) + (set! (-> sv-16 pickup-amount) (if (< (the-as uint 1) a0-15) + (the float (-> (the-as (pointer int32) v1-17) 1)) + arg2 + ) + ) + ) + ) + ) + ) + (+! s3-0 1) + (set! s2-0 (-> sv-20 tag s3-0)) + ) + ) + ) + ) + (set! (-> sv-16 options) (res-lump-value sv-20 'options actor-option :time -1000000000.0)) + (if (logtest? (-> sv-16 options) (actor-option fade-out respawn-delay)) + (set! (-> sv-16 fade-time) (the-as time-frame (the int (* 300.0 (res-lump-float sv-20 'timeout))))) + ) + (the-as fact-info sv-16) + ) + +;; definition for method 11 of type fact-info +(defmethod pickup-collectable! ((this fact-info) (arg0 pickup-type) (arg1 float) (arg2 handle)) + 0.0 + ) + +;; definition of type fact-info-enemy-defaults +(deftype fact-info-enemy-defaults (basic) + ((idle-distance meters) + (pickup-type int32) + (pickup-amount float) + ) + ) + +;; definition for method 3 of type fact-info-enemy-defaults +(defmethod inspect ((this fact-info-enemy-defaults)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tidle-distance: (meters ~m)~%" (-> this idle-distance)) + (format #t "~1Tpickup-type: ~D~%" (-> this pickup-type)) + (format #t "~1Tpickup-amount: ~f~%" (-> this pickup-amount)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-enemy-defaults*, type fact-info-enemy-defaults +(define *fact-info-enemy-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for method 0 of type fact-info-enemy +;; INFO: Used lq/sq +(defmethod new fact-info-enemy ((allocation symbol) + (type-to-make type) + (arg0 process) + (arg1 (pointer float)) + (arg2 pickup-type) + (arg3 float) + ) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((gp-0 + (the-as + fact-info-enemy + ((method-of-type fact-info new) allocation type-to-make arg0 (the-as pickup-type (-> arg1 1)) (-> arg1 2)) + ) + ) + ) + (let ((s5-0 (-> gp-0 process entity))) + (set! (-> gp-0 speed) (res-lump-float s5-0 'speed :default 1.0)) + (set! (-> gp-0 idle-distance) (res-lump-float s5-0 'idle-distance :default (-> arg1 0))) + (set! (-> gp-0 notice-top) (res-lump-float s5-0 'notice-top :default 4096000.0)) + (set! (-> gp-0 notice-bottom) (res-lump-float s5-0 'notice-bottom :default 4096000.0)) + (set! (-> gp-0 cam-horz) (res-lump-float s5-0 'cam-horz)) + (set! (-> gp-0 cam-vert) (res-lump-float s5-0 'cam-vert)) + (set! (-> gp-0 cam-notice-dist) (res-lump-float s5-0 'cam-notice-dist :default -4096.0)) + (set! (-> gp-0 enemy-options) (res-lump-value s5-0 'enemy-options enemy-option :time -1000000000.0)) + (let ((s4-1 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-11 (res-lump-data s5-0 'trigger pointer :tag-ptr (& sv-16)))) + (when v1-11 + (logior! (-> gp-0 enemy-options) (enemy-option has-trigger)) + (let ((a0-13 0)) + (dotimes (a1-11 (the-as int (-> sv-16 elt-count))) + (let ((a2-12 (-> (the-as (pointer uint32) (&+ v1-11 (* a1-11 4)))))) + (when (and (nonzero? a2-12) (< a0-13 2)) + (set! (-> gp-0 trig-mask a0-13) a2-12) + (set! s4-1 (logior s4-1 a2-12)) + (+! a0-13 1) + ) + ) + ) + (set! (-> gp-0 trig-mask-count) a0-13) + ) + ) + ) + (set! (-> gp-0 trig-dist) (if (logtest? s4-1 1) + (res-lump-float s5-0 'trig-dist :default 327680.0) + 327680.0 + ) + ) + (when (logtest? s4-1 2) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data s5-0 'trig-ag pointer :tag-ptr (& sv-32)))) + (if (and v1-20 (nonzero? (-> sv-32 elt-count))) + (set! (-> gp-0 trig-actor-group) (the-as (pointer actor-group) v1-20)) + (clear-mask-bits gp-0 2) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 12 of type fact-info-enemy +;; WARN: Return type mismatch int vs none. +(defmethod clear-mask-bits ((this fact-info-enemy) (arg0 int)) + (let ((v1-0 (lognot arg0))) + (dotimes (a1-1 (-> this trig-mask-count)) + (logand! (-> this trig-mask a1-1) v1-0) + ) + ) + 0 + (none) + ) + +;; definition for method 0 of type fact-info-crate +(defmethod new fact-info-crate ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float)) + (let ((gp-0 (the-as fact-info-crate ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2)))) + (let ((a0-1 (-> gp-0 process entity))) + (set! (-> gp-0 suck-count) (res-lump-value a0-1 'suck-count int :time -1000000000.0)) + ) + gp-0 + ) + ) + +;; definition for method 0 of type fact-info-target +(defmethod new fact-info-target ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 pickup-type) (arg2 float)) + (let ((gp-0 (the-as fact-info-target ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2)))) + (set! (-> gp-0 eco-source) (the-as handle #f)) + (reset! gp-0 #f) + gp-0 + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc new file mode 100644 index 0000000000..14ef2b31cd --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc @@ -0,0 +1,556 @@ +;;-*-Lisp-*- +(in-package goal) + +(local-vars (gp-0 game-info)) + +;; definition of type game-bank +(deftype game-bank (basic) + ((life-max-default float) + (life-start-default float) + (life-single-inc float) + (money-task-inc float) + (money-oracle-inc float) + ) + ) + +;; definition for method 3 of type game-bank +(defmethod inspect ((this game-bank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tlife-max-default: ~f~%" (-> this life-max-default)) + (format #t "~1Tlife-start-default: ~f~%" (-> this life-start-default)) + (format #t "~1Tlife-single-inc: ~f~%" (-> this life-single-inc)) + (format #t "~1Tmoney-task-inc: ~f~%" (-> this money-task-inc)) + (format #t "~1Tmoney-oracle-inc: ~f~%" (-> this money-oracle-inc)) + (label cfg-4) + this + ) + +;; definition for symbol *GAME-bank*, type game-bank +(define *GAME-bank* (new 'static 'game-bank + :life-max-default 99.0 + :life-start-default 5.0 + :life-single-inc 1.0 + :money-task-inc 90.0 + :money-oracle-inc 120.0 + ) + ) + +;; definition of type actor-id +(deftype actor-id (uint32) + () + ) + +;; definition of type highscore-info +(deftype highscore-info (structure) + ((flags highscore-flags) + (award-scores float 3) + (bronze-score float :overlay-at (-> award-scores 0)) + (silver-score float :overlay-at (-> award-scores 1)) + (gold-score float :overlay-at (-> award-scores 2)) + ) + (:methods + (get-rank (_type_ float) int) + ) + ) + +;; definition for method 3 of type highscore-info +(defmethod inspect ((this highscore-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'highscore-info) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Taward-scores[3] @ #x~X~%" (-> this award-scores)) + (format #t "~1Tbronze-score: ~f~%" (-> this bronze-score)) + (format #t "~1Tsilver-score: ~f~%" (-> this silver-score)) + (format #t "~1Tgold-score: ~f~%" (-> this gold-score)) + (label cfg-4) + this + ) + +;; definition of type level-buffer-state +(deftype level-buffer-state (structure) + ((name symbol) + (display? symbol) + (force-vis? symbol) + (force-inside? symbol) + ) + :pack-me + ) + +;; definition for method 3 of type level-buffer-state +(defmethod inspect ((this level-buffer-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'level-buffer-state) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tdisplay?: ~A~%" (-> this display?)) + (format #t "~1Tforce-vis?: ~A~%" (-> this force-vis?)) + (format #t "~1Tforce-inside?: ~A~%" (-> this force-inside?)) + (label cfg-4) + this + ) + +;; definition of type level-buffer-state-small +(deftype level-buffer-state-small (structure) + ((name basic) + (display? symbol) + ) + ) + +;; definition for method 3 of type level-buffer-state-small +(defmethod inspect ((this level-buffer-state-small)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'level-buffer-state-small) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tdisplay?: ~A~%" (-> this display?)) + (label cfg-4) + this + ) + +;; definition of type load-state +(deftype load-state (basic) + ((want level-buffer-state 10 :inline) + (want-exp level-buffer-state 10 :inline) + (target level-buffer-state 10 :inline) + (want-sound sound-bank-state 3 :inline) + (want-exp-sound sound-bank-state 6 :inline) + (target-sound sound-bank-state 6 :inline) + (vis-nick symbol) + (command-list pair) + (object-name string 256) + (object-status basic 256) + (update-callback basic) + ) + (:methods + (new (symbol type) _type_) + (load-state-method-9 () none) + (load-state-method-10 () none) + (load-state-method-11 () none) + (load-state-method-12 () none) + (load-state-method-13 () none) + (load-state-method-14 () none) + (load-state-method-15 () none) + (load-state-method-16 () none) + (load-state-method-17 () none) + (load-state-method-18 () none) + (load-state-method-19 () none) + (load-state-method-20 () none) + (load-state-method-21 () none) + ) + ) + +;; definition for method 3 of type load-state +(defmethod inspect ((this load-state)) + (when (not this) + (set! this this) + (goto cfg-22) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Twant[10] @ #x~X~%" (-> this want)) + (dotimes (s5-0 10) + (format #t "~T [~D]~1Twant: ~`level-buffer-state`P~%" s5-0 (-> this want s5-0)) + ) + (format #t "~1Twant-exp[10] @ #x~X~%" (-> this want-exp)) + (dotimes (s5-1 10) + (format #t "~T [~D]~1Twant-exp: ~`level-buffer-state`P~%" s5-1 (-> this want-exp s5-1)) + ) + (format #t "~1Ttarget[10] @ #x~X~%" (-> this target)) + (dotimes (s5-2 10) + (format #t "~T [~D]~1Ttarget: ~`level-buffer-state`P~%" s5-2 (-> this target s5-2)) + ) + (format #t "~1Twant-sound[3] @ #x~X~%" (-> this want-sound)) + (dotimes (s5-3 3) + (format #t "~T [~D]~1Twant-sound: ~`sound-bank-state`P~%" s5-3 (-> this want-sound s5-3)) + ) + (format #t "~1Twant-exp-sound[6] @ #x~X~%" (-> this want-exp-sound)) + (dotimes (s5-4 6) + (format #t "~T [~D]~1Twant-exp-sound: ~`sound-bank-state`P~%" s5-4 (-> this want-exp-sound s5-4)) + ) + (format #t "~1Ttarget-sound[6] @ #x~X~%" (-> this target-sound)) + (dotimes (s5-5 6) + (format #t "~T [~D]~1Ttarget-sound: ~`sound-bank-state`P~%" s5-5 (-> this target-sound s5-5)) + ) + (format #t "~1Tvis-nick: ~A~%" (-> this vis-nick)) + (format #t "~1Tcommand-list: ~A~%" (-> this command-list)) + (format #t "~1Tobject-name[256] @ #x~X~%" (-> this object-name)) + (format #t "~1Tobject-status[256] @ #x~X~%" (-> this object-status)) + (format #t "~1Tupdate-callback: ~A~%" (-> this update-callback)) + (label cfg-22) + this + ) + +;; definition for method 0 of type load-state +;; WARN: Return type mismatch none vs load-state. +(defmethod new load-state ((allocation symbol) (type-to-make type)) + (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> a0-1 update-callback) #f) + (the-as load-state ((method-of-object a0-1 load-state-method-9))) + ) + ) + +;; definition of type continue-point +(deftype continue-point (basic) + ((name string) + (level symbol) + (flags continue-flags) + (trans vector :inline) + (camera-trans vector :inline) + (quat vector4h :inline) + (camera-rot vector3s 3 :inline) + (on-goto pair :offset 76) + (vis-nick symbol :offset 80) + (vehicle-type uint8 :offset 84) + (want-count int8 :offset 85) + (want level-buffer-state-small :offset 88) + (want-sound symbol 3 :offset 92) + ) + (:methods + (continue-point-method-9 () none) + (continue-point-method-10 () none) + (continue-point-method-11 () none) + ) + ) + +;; definition for method 3 of type continue-point +(defmethod inspect ((this continue-point)) + (when (not this) + (set! this this) + (goto cfg-10) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~1Tcamera-trans: ~`vector`P~%" (-> this camera-trans)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tcamera-rot[9] @ #x~X~%" (-> this camera-rot)) + (format #t "~1Ton-goto: ~A~%" (-> this on-goto)) + (format #t "~1Tvis-nick: ~A~%" (-> this vis-nick)) + (format #t "~1Tvehicle-type: ~D~%" (-> this vehicle-type)) + (format #t "~1Twant-count: ~D~%" (-> this want-count)) + (format #t "~1Twant: #x~X~%" (-> this want)) + (dotimes (s5-0 (-> this want-count)) + (format #t "~T [~D]~1Twant: ~`level-buffer-state-small`P~%" s5-0 (+ (the-as uint (-> this want)) (* s5-0 8))) + ) + (format #t "~1Twant-sound[3] @ #x~X~%" (-> this want-sound)) + (dotimes (s5-1 3) + (format #t "~T [~D]~1Twant-sound: ~`symbol`P~%" s5-1 (-> this want-sound s5-1)) + ) + (label cfg-10) + this + ) + +;; definition of type game-info +(deftype game-info (basic) + ((mode symbol) + (save-name string) + (life float) + (life-max float) + (money float) + (money-total float) + (money-per-level uint8 32) + (deaths-per-level uint8 32) + (buzzer-total float) + (fuel float) + (gem float) + (gem-total float) + (skill float) + (skill-total float) + (skill-high-watermark float) + (light-crystal float) + (dark-crystal float) + (karma float) + (eco-pill-dark float) + (eco-pill-dark-total float) + (eco-pill-light float) + (eco-pill-light-total float) + (features game-feature) + (debug-features game-feature) + (old-features game-feature) + (items game-items) + (debug-items game-items) + (old-items game-items) + (secrets game-secrets) + (purchase-secrets game-secrets) + (gun-type pickup-type) + (gun-ammo float 4) + (shield float) + (vehicles game-vehicles) + (debug-vehicles game-vehicles) + (old-vehicles game-vehicles) + (score float) + (score-owner handle) + (timer time-frame) + (timer-owner handle) + (timer-flash symbol) + (counter float) + (counter-flash basic) + (health-bar float) + (health-bar-owner uint64) + (enemies-killed float) + (civilians-killed float) + (marauders-killed float) + (shots-fired float 4) + (shots-hit float 4) + (crates-opened float) + (health-collected float) + (board-time uint64) + (attack-id uint32) + (perm-list entity-perm-array) + (task-perm-list entity-perm-array) + (current-continue continue-point) + (last-continue continue-point) + (task-node-commands pair :offset 416) + (task-node-exclusive pair) + (task-counter uint32) + (unknown-arr4 (array uint16)) + (level-opened uint8 32) + (total-deaths int32) + (continue-deaths int32) + (task-deaths int32) + (total-trys int32) + (game-start-time uint64) + (continue-time uint64) + (death-time uint64) + (hit-time uint64) + (task-pickup-time uint64) + (unknown-arr0 (array uint64)) + (unknown-arr1 (array uint64)) + (unknown-arr2 (array uint64)) + (death-pos vector-array) + (stop-watch-start time-frame) + (stop-watch-stop time-frame) + (blackout-time time-frame) + (letterbox-time time-frame) + (hint-play-time time-frame) + (display-text-time time-frame) + (display-text-handle handle) + (death-movie-tick int32) + (want-auto-save symbol) + (auto-save-proc handle) + (auto-save-status mc-status-code) + (auto-save-card int32) + (auto-save-which int32) + (auto-save-count int32) + (pov-camera-handle handle) + (other-camera-handle handle) + (controller handle 2) + (race-timer time-frame) + (race-current-lap-count int32) + (race-total-lap-count int32) + (race-position int32) + (race-number-turbos int32) + (bot-health float 3) + (demo-state uint32) + (wanted-flash symbol) + (distance float) + (kiosk-timeout time-frame) + (pause-start-time time-frame) + (game-score (array float)) + (goal float) + (miss float) + (miss-max float) + (unknown-arr3 (array uint64)) + (live-eco-pill-count int32) + (live-gem-count int32) + (air-supply float) + (homing-beacon int32) + (dark-eco-pickup int32) + (green-eco-pickup int32) + (health-bar-vehicle float) + (dust-storm handle) + (flut-count int32) + (death-resetter resetter-spec :inline) + (current-vehicle uint8) + (vehicle-turbo-ready float) + (percent-complete float) + ) + (:methods + (game-info-method-9 () none) + (game-info-method-10 () none) + (game-info-method-11 () none) + (game-info-method-12 () none) + (game-info-method-13 () none) + (game-info-method-14 () none) + (game-info-method-15 () none) + (game-info-method-16 () none) + (game-info-method-17 () none) + (game-info-method-18 () none) + (game-info-method-19 () none) + (game-info-method-20 () none) + (game-info-method-21 () none) + (game-info-method-22 () none) + (game-info-method-23 () none) + (game-info-method-24 () none) + (game-info-method-25 () none) + (get-next-attack-id! (_type_) uint) + (game-info-method-27 () none) + (game-info-method-28 () none) + (game-info-method-29 () none) + (game-info-method-30 () none) + (game-info-method-31 () none) + (game-info-method-32 () none) + (game-info-method-33 () none) + (game-info-method-34 () none) + ) + ) + +;; definition for method 3 of type game-info +(defmethod inspect ((this game-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tmode: ~A~%" (-> this mode)) + (format #t "~1Tsave-name: ~A~%" (-> this save-name)) + (format #t "~1Tlife: ~f~%" (-> this life)) + (format #t "~1Tlife-max: ~f~%" (-> this life-max)) + (format #t "~1Tmoney: ~f~%" (-> this money)) + (format #t "~1Tmoney-total: ~f~%" (-> this money-total)) + (format #t "~1Tmoney-per-level[32] @ #x~X~%" (-> this money-per-level)) + (format #t "~1Tdeaths-per-level[32] @ #x~X~%" (-> this deaths-per-level)) + (format #t "~1Tbuzzer-total: ~f~%" (-> this buzzer-total)) + (format #t "~1Tfuel: ~f~%" (-> this fuel)) + (format #t "~1Tgem: ~f~%" (-> this gem)) + (format #t "~1Tgem-total: ~f~%" (-> this gem-total)) + (format #t "~1Tskill: ~f~%" (-> this skill)) + (format #t "~1Tskill-total: ~f~%" (-> this skill-total)) + (format #t "~1Tskill-high-watermark: ~f~%" (-> this skill-high-watermark)) + (format #t "~1Tlight-crystal: ~f~%" (-> this light-crystal)) + (format #t "~1Tdark-crystal: ~f~%" (-> this dark-crystal)) + (format #t "~1Tkarma: ~f~%" (-> this karma)) + (format #t "~1Teco-pill-dark: ~f~%" (-> this eco-pill-dark)) + (format #t "~1Teco-pill-dark-total: ~f~%" (-> this eco-pill-dark-total)) + (format #t "~1Teco-pill-light: ~f~%" (-> this eco-pill-light)) + (format #t "~1Teco-pill-light-total: ~f~%" (-> this eco-pill-light-total)) + (format #t "~1Tfeatures: ~D~%" (-> this features)) + (format #t "~1Tdebug-features: ~D~%" (-> this debug-features)) + (format #t "~1Told-features: ~D~%" (-> this old-features)) + (format #t "~1Titems: ~D~%" (-> this items)) + (format #t "~1Tdebug-items: ~D~%" (-> this debug-items)) + (format #t "~1Told-items: ~D~%" (-> this old-items)) + (format #t "~1Tsecrets: ~D~%" (-> this secrets)) + (format #t "~1Tpurchase-secrets: ~D~%" (-> this purchase-secrets)) + (format #t "~1Tgun-type: ~D~%" (-> this gun-type)) + (format #t "~1Tgun-ammo[4] @ #x~X~%" (-> this gun-ammo)) + (format #t "~1Tshield: ~f~%" (-> this shield)) + (format #t "~1Tvehicles: ~D~%" (-> this vehicles)) + (format #t "~1Tdebug-vehicles: ~D~%" (-> this debug-vehicles)) + (format #t "~1Told-vehicles: ~D~%" (-> this old-vehicles)) + (format #t "~1Tscore: ~f~%" (-> this score)) + (format #t "~1Tscore-owner: ~D~%" (-> this score-owner)) + (format #t "~1Ttimer: ~D~%" (-> this timer)) + (format #t "~1Ttimer-owner: ~D~%" (-> this timer-owner)) + (format #t "~1Ttimer-flash: ~A~%" (-> this timer-flash)) + (format #t "~1Tcounter: ~f~%" (-> this counter)) + (format #t "~1Tcounter-flash: ~A~%" (-> this counter-flash)) + (format #t "~1Thealth-bar: ~f~%" (-> this health-bar)) + (format #t "~1Thealth-bar-owner: ~D~%" (-> this health-bar-owner)) + (format #t "~1Tenemies-killed: ~f~%" (-> this enemies-killed)) + (format #t "~1Tcivilians-killed: ~f~%" (-> this civilians-killed)) + (format #t "~1Tmarauders-killed: ~f~%" (-> this marauders-killed)) + (format #t "~1Tshots-fired[4] @ #x~X~%" (-> this shots-fired)) + (format #t "~1Tshots-hit[4] @ #x~X~%" (-> this shots-hit)) + (format #t "~1Tcrates-opened: ~f~%" (-> this crates-opened)) + (format #t "~1Thealth-collected: ~f~%" (-> this health-collected)) + (format #t "~1Tboard-time: ~D~%" (-> this board-time)) + (format #t "~1Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~1Tperm-list: ~A~%" (-> this perm-list)) + (format #t "~1Ttask-perm-list: ~A~%" (-> this task-perm-list)) + (format #t "~1Tcurrent-continue: ~A~%" (-> this current-continue)) + (format #t "~1Tlast-continue: ~A~%" (-> this last-continue)) + (format #t "~1Ttask-node-commands: ~A~%" (-> this task-node-commands)) + (format #t "~1Ttask-node-exclusive: ~A~%" (-> this task-node-exclusive)) + (format #t "~1Ttask-counter: ~D~%" (-> this task-counter)) + (format #t "~1Tlevel-opened[32] @ #x~X~%" (-> this level-opened)) + (format #t "~1Ttotal-deaths: ~D~%" (-> this total-deaths)) + (format #t "~1Tcontinue-deaths: ~D~%" (-> this continue-deaths)) + (format #t "~1Ttask-deaths: ~D~%" (-> this task-deaths)) + (format #t "~1Ttotal-trys: ~D~%" (-> this total-trys)) + (format #t "~1Tgame-start-time: ~D~%" (-> this game-start-time)) + (format #t "~1Tcontinue-time: ~D~%" (-> this continue-time)) + (format #t "~1Tdeath-time: ~D~%" (-> this death-time)) + (format #t "~1Thit-time: ~D~%" (-> this hit-time)) + (format #t "~1Ttask-pickup-time: ~D~%" (-> this task-pickup-time)) + (format #t "~1Tdeath-pos: ~A~%" (-> this death-pos)) + (format #t "~1Tstop-watch-start: ~D~%" (-> this stop-watch-start)) + (format #t "~1Tstop-watch-stop: ~D~%" (-> this stop-watch-stop)) + (format #t "~1Tblackout-time: ~D~%" (-> this blackout-time)) + (format #t "~1Tletterbox-time: ~D~%" (-> this letterbox-time)) + (format #t "~1Thint-play-time: ~D~%" (-> this hint-play-time)) + (format #t "~1Tdisplay-text-time: ~D~%" (-> this display-text-time)) + (format #t "~1Tdisplay-text-handle: ~D~%" (-> this display-text-handle)) + (format #t "~1Tdeath-movie-tick: ~D~%" (-> this death-movie-tick)) + (format #t "~1Twant-auto-save: ~A~%" (-> this want-auto-save)) + (format #t "~1Tauto-save-proc: ~D~%" (-> this auto-save-proc)) + (format #t "~1Tauto-save-status: ~D~%" (-> this auto-save-status)) + (format #t "~1Tauto-save-card: ~D~%" (-> this auto-save-card)) + (format #t "~1Tauto-save-which: ~D~%" (-> this auto-save-which)) + (format #t "~1Tauto-save-count: ~D~%" (-> this auto-save-count)) + (format #t "~1Tpov-camera-handle: ~D~%" (-> this pov-camera-handle)) + (format #t "~1Tother-camera-handle: ~D~%" (-> this other-camera-handle)) + (format #t "~1Tcontroller[2] @ #x~X~%" (-> this controller)) + (format #t "~1Trace-timer: ~D~%" (-> this race-timer)) + (format #t "~1Trace-current-lap-count: ~D~%" (-> this race-current-lap-count)) + (format #t "~1Trace-total-lap-count: ~D~%" (-> this race-total-lap-count)) + (format #t "~1Trace-position: ~D~%" (-> this race-position)) + (format #t "~1Trace-number-turbos: ~D~%" (-> this race-number-turbos)) + (format #t "~1Tbot-health[3] @ #x~X~%" (-> this bot-health)) + (format #t "~1Tdemo-state: ~D~%" (-> this demo-state)) + (format #t "~1Twanted-flash: ~A~%" (-> this wanted-flash)) + (format #t "~1Tdistance: ~f~%" (-> this distance)) + (format #t "~1Tkiosk-timeout: ~D~%" (-> this kiosk-timeout)) + (format #t "~1Tpause-start-time: ~D~%" (-> this pause-start-time)) + (format #t "~1Tgame-score: ~A~%" (-> this game-score)) + (format #t "~1Tgoal: ~f~%" (-> this goal)) + (format #t "~1Tmiss: ~f~%" (-> this miss)) + (format #t "~1Tmiss-max: ~f~%" (-> this miss-max)) + (format #t "~1Tlive-eco-pill-count: ~D~%" (-> this live-eco-pill-count)) + (format #t "~1Tlive-gem-count: ~D~%" (-> this live-gem-count)) + (format #t "~1Tair-supply: ~f~%" (-> this air-supply)) + (format #t "~1Thoming-beacon: ~D~%" (-> this homing-beacon)) + (format #t "~1Tdark-eco-pickup: ~D~%" (-> this dark-eco-pickup)) + (format #t "~1Tgreen-eco-pickup: ~D~%" (-> this green-eco-pickup)) + (format #t "~1Thealth-bar-vehicle: ~f~%" (-> this health-bar-vehicle)) + (format #t "~1Tdust-storm: ~D~%" (-> this dust-storm)) + (format #t "~1Tflut-count: ~D~%" (-> this flut-count)) + (format #t "~1Tdeath-resetter: #~%" (-> this death-resetter)) + (format #t "~1Tcurrent-vehicle: ~D~%" (-> this current-vehicle)) + (format #t "~1Tvehicle-turbo-ready: ~f~%" (-> this vehicle-turbo-ready)) + (format #t "~1Tpercent-complete: ~f~%" (-> this percent-complete)) + (label cfg-4) + this + ) + +;; definition for method 26 of type game-info +(defmethod get-next-attack-id! ((this game-info)) + (let ((v0-0 (+ (-> this attack-id) 1))) + (set! (-> this attack-id) v0-0) + v0-0 + ) + ) + +;; failed to figure out what this is: +(set! gp-0 (when (or (not *game-info*) (zero? *game-info*)) + (set! gp-0 (new 'static 'game-info :mode 'debug :current-continue #f :last-continue #f)) + (set! (-> gp-0 unknown-arr0) (new 'global 'boxed-array uint64 138)) + (set! (-> gp-0 unknown-arr3) (new 'global 'boxed-array uint64 138)) + (set! (-> gp-0 unknown-arr1) (new 'global 'boxed-array uint64 32)) + (set! (-> gp-0 unknown-arr2) (new 'global 'boxed-array uint64 32)) + (set! *game-info* gp-0) + gp-0 + ) + ) diff --git a/test/decompiler/reference/jak3/engine/game/main-h_REF.gc b/test/decompiler/reference/jak3/engine/game/main-h_REF.gc index cdba76e74a..9061925b79 100644 --- a/test/decompiler/reference/jak3/engine/game/main-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/main-h_REF.gc @@ -467,7 +467,7 @@ :show-back-faces? #t :show-normals? #f :ghost-hidden? #t - :cspec (collide-spec cs3 cs4 cs5) + :cspec (collide-spec crate civilian enemy) :track #x1 :bbox-radius 24576.0 :camera-to-bbox-dist 65536.0 @@ -481,7 +481,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc new file mode 100644 index 0000000000..649c1428a9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc @@ -0,0 +1,414 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type prototype-bucket +(deftype prototype-bucket (basic) + ((name string) + (flags prototype-flags) + (texture-masks-index uint16) + (in-level uint16) + (utextures uint16) + (geometry drawable 4) + (dists vector :inline) + (rdists vector :inline) + (near-plane meters :overlay-at (-> dists data 0)) + (near-stiff meters :overlay-at (-> dists data 1)) + (mid-plane meters :overlay-at (-> dists data 2)) + (far-plane meters :overlay-at (-> dists data 3)) + (rlength-near float :overlay-at (-> rdists data 0)) + (rlength-stiff float :overlay-at (-> rdists data 1)) + (rlength-mid float :overlay-at (-> rdists data 2)) + (stiffness float :overlay-at (-> rdists data 3)) + ) + ) + +;; definition for method 3 of type prototype-bucket +(defmethod inspect ((this prototype-bucket)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Ttexture-masks-index: ~D~%" (-> this texture-masks-index)) + (format #t "~1Tin-level: ~D~%" (-> this in-level)) + (format #t "~1Tutextures: ~D~%" (-> this utextures)) + (format #t "~1Tgeometry[4] @ #x~X~%" (-> this geometry)) + (format #t "~1Tdists: #~%" (-> this dists)) + (format #t "~1Trdists: #~%" (-> this rdists)) + (format #t "~1Tnear-plane: (meters ~m)~%" (-> this dists x)) + (format #t "~1Tnear-stiff: (meters ~m)~%" (-> this dists y)) + (format #t "~1Tmid-plane: (meters ~m)~%" (-> this dists z)) + (format #t "~1Tfar-plane: (meters ~m)~%" (-> this dists w)) + (format #t "~1Trlength-near: ~f~%" (-> this rdists x)) + (format #t "~1Trlength-stiff: ~f~%" (-> this rdists y)) + (format #t "~1Trlength-mid: ~f~%" (-> this rdists z)) + (format #t "~1Tstiffness: ~f~%" (-> this rdists w)) + (label cfg-4) + this + ) + +;; definition of type prototype-bucket-shrub +(deftype prototype-bucket-shrub (prototype-bucket) + ((next uint32 4) + (count uint16 4) + (mod-count uint16 4) + (last dma-packet 4) + (next-clear uint128 :overlay-at (-> next 0)) + (count-clear uint64 :overlay-at (-> count 0)) + (last-clear uint128 :overlay-at (-> last 0)) + ) + ) + +;; definition for method 3 of type prototype-bucket-shrub +;; INFO: Used lq/sq +(defmethod inspect ((this prototype-bucket-shrub)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Ttexture-masks-index: ~D~%" (-> this texture-masks-index)) + (format #t "~1Tin-level: ~D~%" (-> this in-level)) + (format #t "~1Tutextures: ~D~%" (-> this utextures)) + (format #t "~1Tgeometry[4] @ #x~X~%" (-> this geometry)) + (format #t "~1Tdists: #~%" (-> this dists)) + (format #t "~1Trdists: #~%" (-> this rdists)) + (format #t "~1Tnear-plane: (meters ~m)~%" (-> this dists x)) + (format #t "~1Tnear-stiff: (meters ~m)~%" (-> this dists y)) + (format #t "~1Tmid-plane: (meters ~m)~%" (-> this dists z)) + (format #t "~1Tfar-plane: (meters ~m)~%" (-> this dists w)) + (format #t "~1Trlength-near: ~f~%" (-> this rdists x)) + (format #t "~1Trlength-stiff: ~f~%" (-> this rdists y)) + (format #t "~1Trlength-mid: ~f~%" (-> this rdists z)) + (format #t "~1Tstiffness: ~f~%" (-> this rdists w)) + (format #t "~1Tnext[4] @ #x~X~%" (-> this next)) + (format #t "~1Tcount[4] @ #x~X~%" (-> this count)) + (format #t "~1Tmod-count[4] @ #x~X~%" (-> this mod-count)) + (format #t "~1Tlast[4] @ #x~X~%" (-> this last)) + (format #t "~1Tnext-clear: ~D~%" (-> this next-clear)) + (format #t "~1Tcount-clear: ~D~%" (-> this count-clear)) + (format #t "~1Tlast-clear: ~D~%" (-> this last-clear)) + (label cfg-4) + this + ) + +;; definition of type prototype-inline-array-shrub +(deftype prototype-inline-array-shrub (drawable) + ((length int16 :offset 6) + (data prototype-bucket-shrub 1 :inline :offset 32) + (pad uint32) + ) + ) + +;; definition for method 3 of type prototype-inline-array-shrub +(defmethod inspect ((this prototype-inline-array-shrub)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tdata[1] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type prototype-array-shrub-info +(deftype prototype-array-shrub-info (basic) + ((prototype-inline-array-shrub prototype-inline-array-shrub) + (wind-vectors uint32) + (wind-count int32) + ) + ) + +;; definition for method 3 of type prototype-array-shrub-info +(defmethod inspect ((this prototype-array-shrub-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprototype-inline-array-shrub: ~A~%" (-> this prototype-inline-array-shrub)) + (format #t "~1Twind-vectors: #x~X~%" (-> this wind-vectors)) + (format #t "~1Twind-count: ~D~%" (-> this wind-count)) + (label cfg-4) + this + ) + +;; definition of type prototype-bucket-tie +(deftype prototype-bucket-tie (prototype-bucket) + ((next uint32 12) + (count uint16 12) + (frag-count uint8 4) + (index-start uint8 4) + (base-qw uint16 4) + (tie-rvanish float) + (tie-vanish-far float) + (envmap-rfade float) + (envmap-fade-far float) + (envmap-shader adgif-shader) + (tint-color uint32) + (collide-hash-fragment-array collide-hash-fragment-array) + (tie-colors time-of-day-palette) + (data uint32 :dynamic) + (color-index-qwc uint32 :dynamic) + (scissor-frag-count uint8 :overlay-at (-> frag-count 0)) + (near-frag-count uint8 :overlay-at (-> frag-count 1)) + (mid-frag-count uint8 :overlay-at (-> frag-count 2)) + (far-frag-count uint8 :overlay-at (-> frag-count 3)) + (scissor-index-start uint8 :overlay-at (-> index-start 0)) + (near-index-start uint8 :overlay-at (-> index-start 1)) + (mid-index-start uint8 :overlay-at (-> index-start 2)) + (far-index-start uint8 :overlay-at (-> index-start 3)) + (scissor-base-qw uint16 :overlay-at (-> base-qw 0)) + (near-base-qw uint16 :overlay-at (-> base-qw 1)) + (mid-base-qw uint16 :overlay-at (-> base-qw 2)) + (far-base-qw uint16 :overlay-at (-> base-qw 3)) + (tie-next uint32 4 :overlay-at (-> next 0)) + (tie-scissor-next uint32 :overlay-at (-> next 0)) + (tie-near-next uint32 :overlay-at (-> next 1)) + (tie-mid-next uint32 :overlay-at (-> next 2)) + (tie-far-next uint32 :overlay-at (-> next 3)) + (trans-next uint32 4 :overlay-at (-> next 0)) + (trans-scissor-next uint32 4 :overlay-at (-> next 0)) + (trans-near-next uint32 :overlay-at (-> next 1)) + (trans-mid-next uint32 :overlay-at (-> next 2)) + (trans-far-next uint32 :overlay-at (-> next 3)) + (water-next uint32 4 :overlay-at (-> next 0)) + (water-scissor-next uint32 4 :overlay-at (-> next 0)) + (water-near-next uint32 :overlay-at (-> next 1)) + (water-mid-next uint32 :overlay-at (-> next 2)) + (water-far-next uint32 :overlay-at (-> next 3)) + (envmap-next uint32 4 :overlay-at (-> next 4)) + (envmap-scissor-next uint32 4 :overlay-at (-> next 4)) + (envmap-near-next uint32 :overlay-at (-> next 5)) + (envmap-mid-next uint32 :overlay-at (-> next 6)) + (envmap-far-next uint32 :overlay-at (-> next 7)) + (generic-next uint32 3 :overlay-at (-> next 8)) + (generic-near-next uint32 :overlay-at (-> next 8)) + (generic-mid-next uint32 :overlay-at (-> next 9)) + (generic-far-next uint32 :overlay-at (-> next 10)) + (vanish-next uint32 :overlay-at (-> next 11)) + (tie-count uint16 4 :overlay-at (-> count 0)) + (tie-scissor-count uint16 :overlay-at (-> count 0)) + (tie-near-count uint16 :overlay-at (-> count 1)) + (tie-mid-count uint16 :overlay-at (-> count 2)) + (tie-far-count uint16 :overlay-at (-> count 3)) + (trans-count uint16 4 :overlay-at (-> count 0)) + (trans-scissor-count uint16 :overlay-at (-> count 0)) + (trans-near-count uint16 :overlay-at (-> count 1)) + (trans-mid-count uint16 :overlay-at (-> count 2)) + (trans-far-count uint16 :overlay-at (-> count 3)) + (water-count uint16 4 :overlay-at (-> count 0)) + (water-scissor-count uint16 :overlay-at (-> count 0)) + (water-near-count uint16 :overlay-at (-> count 1)) + (water-mid-count uint16 :overlay-at (-> count 2)) + (water-far-count uint16 :overlay-at (-> count 3)) + (envmap-count uint16 4 :overlay-at (-> count 4)) + (envmap-scissor-count uint16 :overlay-at (-> count 4)) + (envmap-near-count uint16 :overlay-at (-> count 5)) + (envmap-mid-count uint16 :overlay-at (-> count 6)) + (envmap-far-count uint16 :overlay-at (-> count 7)) + (generic-count uint16 3 :overlay-at (-> count 8)) + (generic-near-count uint16 :overlay-at (-> count 8)) + (generic-mid-count uint16 :overlay-at (-> count 9)) + (generic-far-count uint16 :overlay-at (-> count 10)) + (vanish-count uint16 :overlay-at (-> count 11)) + (next-clear uint128 3 :overlay-at (-> next 0)) + (count-clear uint64 3 :overlay-at (-> count 0)) + (tie-geom prototype-tie 4 :overlay-at (-> geometry 0)) + ) + ) + +;; definition for method 3 of type prototype-bucket-tie +(defmethod inspect ((this prototype-bucket-tie)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Ttexture-masks-index: ~D~%" (-> this texture-masks-index)) + (format #t "~1Tin-level: ~D~%" (-> this in-level)) + (format #t "~1Tutextures: ~D~%" (-> this utextures)) + (format #t "~1Tgeometry[4] @ #x~X~%" (-> this tie-geom)) + (format #t "~1Tdists: #~%" (-> this dists)) + (format #t "~1Trdists: #~%" (-> this rdists)) + (format #t "~1Tnear-plane: (meters ~m)~%" (-> this dists x)) + (format #t "~1Tnear-stiff: (meters ~m)~%" (-> this dists y)) + (format #t "~1Tmid-plane: (meters ~m)~%" (-> this dists z)) + (format #t "~1Tfar-plane: (meters ~m)~%" (-> this dists w)) + (format #t "~1Trlength-near: ~f~%" (-> this rdists x)) + (format #t "~1Trlength-stiff: ~f~%" (-> this rdists y)) + (format #t "~1Trlength-mid: ~f~%" (-> this rdists z)) + (format #t "~1Tstiffness: ~f~%" (-> this rdists w)) + (format #t "~1Tnext[12] @ #x~X~%" (-> this next)) + (format #t "~1Tcount[12] @ #x~X~%" (-> this count)) + (format #t "~1Tfrag-count[4] @ #x~X~%" (-> this frag-count)) + (format #t "~1Tindex-start[4] @ #x~X~%" (-> this index-start)) + (format #t "~1Tbase-qw[4] @ #x~X~%" (-> this base-qw)) + (format #t "~1Ttie-rvanish: ~f~%" (-> this tie-rvanish)) + (format #t "~1Ttie-vanish-far: ~f~%" (-> this tie-vanish-far)) + (format #t "~1Tenvmap-rfade: ~f~%" (-> this envmap-rfade)) + (format #t "~1Tenvmap-fade-far: ~f~%" (-> this envmap-fade-far)) + (format #t "~1Tenvmap-shader: #~%" (-> this envmap-shader)) + (format #t "~1Ttint-color: ~D~%" (-> this tint-color)) + (format #t "~1Tcollide-hash-fragment-array: ~A~%" (-> this collide-hash-fragment-array)) + (format #t "~1Ttie-colors: ~A~%" (-> this tie-colors)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (format #t "~1Tcolor-index-qwc[0] @ #x~X~%" (-> this data)) + (format #t "~1Tscissor-frag-count: ~D~%" (-> this scissor-frag-count)) + (format #t "~1Tnear-frag-count: ~D~%" (-> this near-frag-count)) + (format #t "~1Tmid-frag-count: ~D~%" (-> this mid-frag-count)) + (format #t "~1Tfar-frag-count: ~D~%" (-> this far-frag-count)) + (format #t "~1Tscissor-index-start: ~D~%" (-> this scissor-index-start)) + (format #t "~1Tnear-index-start: ~D~%" (-> this near-index-start)) + (format #t "~1Tmid-index-start: ~D~%" (-> this mid-index-start)) + (format #t "~1Tfar-index-start: ~D~%" (-> this far-index-start)) + (format #t "~1Tscissor-base-qw: ~D~%" (-> this scissor-base-qw)) + (format #t "~1Tnear-base-qw: ~D~%" (-> this near-base-qw)) + (format #t "~1Tmid-base-qw: ~D~%" (-> this mid-base-qw)) + (format #t "~1Tfar-base-qw: ~D~%" (-> this far-base-qw)) + (format #t "~1Ttie-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Ttie-scissor-next: #x~X~%" (-> this tie-scissor-next)) + (format #t "~1Ttie-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Ttie-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Ttie-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Ttrans-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Ttrans-scissor-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Ttrans-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Ttrans-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Ttrans-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Twater-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Twater-scissor-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Twater-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Twater-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Twater-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Tenvmap-next[4] @ #x~X~%" (-> this envmap-next)) + (format #t "~1Tenvmap-scissor-next[4] @ #x~X~%" (-> this envmap-next)) + (format #t "~1Tenvmap-near-next: #x~X~%" (-> this envmap-near-next)) + (format #t "~1Tenvmap-mid-next: #x~X~%" (-> this envmap-mid-next)) + (format #t "~1Tenvmap-far-next: #x~X~%" (-> this envmap-far-next)) + (format #t "~1Tgeneric-next[3] @ #x~X~%" (-> this generic-next)) + (format #t "~1Tgeneric-near-next: #x~X~%" (-> this generic-near-next)) + (format #t "~1Tgeneric-mid-next: #x~X~%" (-> this generic-mid-next)) + (format #t "~1Tgeneric-far-next: #x~X~%" (-> this generic-far-next)) + (format #t "~1Tvanish-next: #x~X~%" (-> this vanish-next)) + (format #t "~1Ttie-count[4] @ #x~X~%" (-> this count)) + (format #t "~1Ttie-scissor-count: ~D~%" (-> this tie-scissor-count)) + (format #t "~1Ttie-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Ttie-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Ttie-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Ttrans-count[4] @ #x~X~%" (-> this count)) + (format #t "~1Ttrans-scissor-count: ~D~%" (-> this tie-scissor-count)) + (format #t "~1Ttrans-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Ttrans-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Ttrans-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Twater-count[4] @ #x~X~%" (-> this count)) + (format #t "~1Twater-scissor-count: ~D~%" (-> this tie-scissor-count)) + (format #t "~1Twater-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Twater-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Twater-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Tenvmap-count[4] @ #x~X~%" (-> this envmap-count)) + (format #t "~1Tenvmap-scissor-count: ~D~%" (-> this envmap-scissor-count)) + (format #t "~1Tenvmap-near-count: ~D~%" (-> this envmap-near-count)) + (format #t "~1Tenvmap-mid-count: ~D~%" (-> this envmap-mid-count)) + (format #t "~1Tenvmap-far-count: ~D~%" (-> this envmap-far-count)) + (format #t "~1Tgeneric-count[3] @ #x~X~%" (-> this generic-count)) + (format #t "~1Tgeneric-near-count: ~D~%" (-> this generic-near-count)) + (format #t "~1Tgeneric-mid-count: ~D~%" (-> this generic-mid-count)) + (format #t "~1Tgeneric-far-count: ~D~%" (-> this generic-far-count)) + (format #t "~1Tvanish-count: ~D~%" (-> this vanish-count)) + (format #t "~1Tnext-clear[3] @ #x~X~%" (-> this next)) + (format #t "~1Tcount-clear[3] @ #x~X~%" (-> this count)) + (label cfg-4) + this + ) + +;; definition of type prototype-array-tie +(deftype prototype-array-tie (array) + ((array-data prototype-bucket-tie :dynamic :offset 16) + ) + (:methods + (prototype-array-tie-method-9 () none) + ) + ) + +;; definition for method 3 of type prototype-array-tie +(defmethod inspect ((this prototype-array-tie)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Ttype: ~A~%" (-> this type)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tcontent-type: ~A~%" (-> this content-type)) + (label cfg-4) + this + ) + +;; definition of type proxy-prototype-array-tie +(deftype proxy-prototype-array-tie (basic) + ((prototype-array-tie prototype-array-tie) + (wind-vectors uint32) + (wind-count uint16) + (prototype-max-qwc uint16) + ) + ) + +;; definition for method 3 of type proxy-prototype-array-tie +(defmethod inspect ((this proxy-prototype-array-tie)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprototype-array-tie: ~A~%" (-> this prototype-array-tie)) + (format #t "~1Twind-vectors: #x~X~%" (-> this wind-vectors)) + (format #t "~1Twind-count: ~D~%" (-> this wind-count)) + (format #t "~1Tprototype-max-qwc: ~D~%" (-> this prototype-max-qwc)) + (label cfg-4) + this + ) + +;; definition of type instance +(deftype instance (drawable) + ((bucket-index uint16 :offset 6) + (origin matrix4h :inline) + (flags instance-flags :overlay-at (-> origin data 7)) + (wind-index uint16 :overlay-at (-> origin data 15)) + ) + ) + +;; definition for method 3 of type instance +(defmethod inspect ((this instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tbucket-index: ~D~%" (-> this bucket-index)) + (format #t "~1Torigin: #~%" (-> this origin)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Twind-index: ~D~%" (-> this wind-index)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/wind-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/wind-h_REF.gc new file mode 100644 index 0000000000..0e40741afb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/wind-h_REF.gc @@ -0,0 +1,146 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type wind-vector +(deftype wind-vector (structure) + ((wind-pos vector4w :inline) + (wind-vel vector4w :inline) + (stiffness float :overlay-at (-> wind-vel data 3)) + ) + ) + +;; definition for method 3 of type wind-vector +(defmethod inspect ((this wind-vector)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wind-vector) + (format #t "~1Twind-pos: #~%" (-> this wind-pos)) + (format #t "~1Twind-vel: #~%" (-> this wind-vel)) + (format #t "~1Tstiffness: ~f~%" (-> this stiffness)) + (label cfg-4) + this + ) + +;; definition for symbol *wind-scales*, type (array uint8) +(define *wind-scales* (new 'static 'boxed-array :type uint8 + #x2 + #x5 + #x2 + #x3 + #x2 + #x2 + #x3 + #x10 + #xa + #x2 + #x4 + #x2 + #x8 + #x2 + #x2 + #x10 + #x2 + #x2 + #x8 + #x2 + #x10 + #x2 + #x4 + #x10 + #xa + #x2 + #x4 + #x2 + #x8 + #x2 + #x2 + #x10 + ) + ) + +;; definition of type wind-work +(deftype wind-work (basic) + ((wind-array vector 64 :inline) + (wind-normal vector :inline) + (wind-temp vector :inline) + (wind-force float 64) + (wind-const vector :inline) + (wind-time uint32) + (wait-to-vu0 uint32) + (wait-to-spr uint32) + (wait-from-spr uint32) + (spr-index uint32) + (count uint32) + (next-count uint32) + (last-count uint32) + (to-spr uint32) + (from-spr uint32) + (next-mem uint32) + (last-mem uint32) + (next-spr uint32) + (last-spr uint32) + (to-ptrs uint32 3) + ) + ) + +;; definition for method 3 of type wind-work +(defmethod inspect ((this wind-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Twind-array[64] @ #x~X~%" (-> this wind-array)) + (format #t "~1Twind-normal: ~`vector`P~%" (-> this wind-normal)) + (format #t "~1Twind-temp: ~`vector`P~%" (-> this wind-temp)) + (format #t "~1Twind-force[64] @ #x~X~%" (-> this wind-force)) + (format #t "~1Twind-const: ~`vector`P~%" (-> this wind-const)) + (format #t "~1Twind-time: ~D~%" (-> this wind-time)) + (format #t "~1Twait-to-vu0: ~D~%" (-> this wait-to-vu0)) + (format #t "~1Twait-to-spr: ~D~%" (-> this wait-to-spr)) + (format #t "~1Twait-from-spr: ~D~%" (-> this wait-from-spr)) + (format #t "~1Tspr-index: ~D~%" (-> this spr-index)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tnext-count: ~D~%" (-> this next-count)) + (format #t "~1Tlast-count: ~D~%" (-> this last-count)) + (format #t "~1Tto-spr: ~D~%" (-> this to-spr)) + (format #t "~1Tfrom-spr: ~D~%" (-> this from-spr)) + (format #t "~1Tnext-mem: #x~X~%" (-> this next-mem)) + (format #t "~1Tlast-mem: #x~X~%" (-> this last-mem)) + (format #t "~1Tnext-spr: #x~X~%" (-> this next-spr)) + (format #t "~1Tlast-spr: #x~X~%" (-> this last-spr)) + (format #t "~1Tto-ptrs[3] @ #x~X~%" (-> this to-ptrs)) + (label cfg-4) + this + ) + +;; definition of type wind-dma +(deftype wind-dma (structure) + ((buffer0 wind-vector 128 :inline) + (buffer1 wind-vector 128 :inline) + (buffer2 wind-vector 128 :inline) + ) + ) + +;; definition for method 3 of type wind-dma +(defmethod inspect ((this wind-dma)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wind-dma) + (format #t "~1Tbuffer0[128] @ #x~X~%" (-> this buffer0)) + (format #t "~1Tbuffer1[128] @ #x~X~%" (-> this buffer1)) + (format #t "~1Tbuffer2[128] @ #x~X~%" (-> this buffer2)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/generic-merc-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/generic-merc-h_REF.gc new file mode 100644 index 0000000000..9557bbe7b6 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/generic-merc-h_REF.gc @@ -0,0 +1,284 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type merc-matrix +(deftype merc-matrix (structure) + ((quad uint128 8) + (vector vector 8 :inline :overlay-at (-> quad 0)) + (tag uint64 :overlay-at (-> quad 0)) + ) + ) + +;; definition for method 3 of type merc-matrix +(defmethod inspect ((this merc-matrix)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-matrix) + (format #t "~1Tquad[8] @ #x~X~%" (-> this vector)) + (format #t "~1Tvector[8] @ #x~X~%" (-> this vector)) + (format #t "~1Ttag: ~D~%" (-> this tag)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-tag +(deftype generic-merc-tag (dma-packet) + ((next-ptr uint32 :overlay-at vif1) + (size uint32 :overlay-at vif0) + ) + ) + +;; definition for method 3 of type generic-merc-tag +;; INFO: Used lq/sq +(defmethod inspect ((this generic-merc-tag)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-tag) + (format #t "~1Tdma: #x~X~%" (-> this dma)) + (format #t "~1Tvif0: #x~X~%" (-> this vif0)) + (format #t "~1Tvif1: #x~X~%" (-> this vif1)) + (format #t "~1Tquad: ~D~%" (-> this quad)) + (format #t "~1Tnext-ptr: ~D~%" (-> this vif1)) + (format #t "~1Tsize: ~D~%" (-> this vif0)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-ctrl +(deftype generic-merc-ctrl (structure) + ((tag generic-merc-tag :inline) + (lights vu-lights :inline) + (header merc-ctrl-header :inline) + (effect merc-effect :inline) + ) + ) + +;; definition for method 3 of type generic-merc-ctrl +(defmethod inspect ((this generic-merc-ctrl)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-ctrl) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tlights: #~%" (-> this lights)) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Teffect: #~%" (-> this effect)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-ctrl-with-sfx +(deftype generic-merc-ctrl-with-sfx (generic-merc-ctrl) + ((sfx-data uint128 11) + ) + ) + +;; definition for method 3 of type generic-merc-ctrl-with-sfx +(defmethod inspect ((this generic-merc-ctrl-with-sfx)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-ctrl-with-sfx) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tlights: #~%" (-> this lights)) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Teffect: #~%" (-> this effect)) + (format #t "~1Tsfx-data[11] @ #x~X~%" (-> this sfx-data)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-input +(deftype generic-merc-input (structure) + ((geo-tag generic-merc-tag :inline) + (geo-block uint8 1296) + (byte-header merc-byte-header :inline :overlay-at (-> geo-block 0)) + (matrix merc-matrix 9 :inline) + (control generic-merc-ctrl-with-sfx :inline) + (end-tag generic-merc-tag :inline) + (shader adgif-shader :inline) + ) + ) + +;; definition for method 3 of type generic-merc-input +(defmethod inspect ((this generic-merc-input)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-input) + (format #t "~1Tgeo-tag: #~%" (-> this geo-tag)) + (format #t "~1Tgeo-block[1296] @ #x~X~%" (-> this geo-block)) + (format #t "~1Tbyte-header: #~%" (-> this geo-block)) + (format #t "~1Tmatrix[9] @ #x~X~%" (-> this matrix)) + (format #t "~1Tcontrol: #~%" (-> this control)) + (format #t "~1Tend-tag: #~%" (-> this end-tag)) + (format #t "~1Tshader: #~%" (-> this shader)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-output +(deftype generic-merc-output (structure) + ((info gsf-info :inline) + (header gsf-header :inline) + (index-kick-table uint16 80) + (index-table uint8 160 :overlay-at (-> index-kick-table 0)) + (inverse-table uint8 256) + (vertex-table gsf-vertex 72 :inline) + ) + ) + +;; definition for method 3 of type generic-merc-output +(defmethod inspect ((this generic-merc-output)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-output) + (format #t "~1Tinfo: #~%" (-> this info)) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Tindex-kick-table[80] @ #x~X~%" (-> this index-kick-table)) + (format #t "~1Tindex-table[160] @ #x~X~%" (-> this index-kick-table)) + (format #t "~1Tinverse-table[256] @ #x~X~%" (-> this inverse-table)) + (format #t "~1Tvertex-table[72] @ #x~X~%" (-> this vertex-table)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-dcache +(deftype generic-merc-dcache (structure) + ((output-a generic-merc-output :inline) + (output-b generic-merc-output :inline) + (inv-table-1 uint8 544) + (inv-table-7 uint8 544) + (inv-safety uint8 16) + (effect-data uint8 1584) + ) + ) + +;; definition for method 3 of type generic-merc-dcache +(defmethod inspect ((this generic-merc-dcache)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-dcache) + (format #t "~1Toutput-a: #~%" (-> this output-a)) + (format #t "~1Toutput-b: #~%" (-> this output-b)) + (format #t "~1Tinv-table-1[544] @ #x~X~%" (-> this inv-table-1)) + (format #t "~1Tinv-table-7[544] @ #x~X~%" (-> this inv-table-7)) + (format #t "~1Tinv-safety[16] @ #x~X~%" (-> this inv-safety)) + (format #t "~1Teffect-data[1584] @ #x~X~%" (-> this effect-data)) + (label cfg-4) + this + ) + +;; definition of type gm-shadow +(deftype gm-shadow (structure) + ((perspective matrix :inline) + (isometric matrix :inline) + (inv-camera-rot matrix :inline) + (envmap-shader adgif-shader :inline) + (current-chain uint32) + (next-chain uint32) + (buf-index uint32) + (fragment-count uint32) + (write-limit int32) + (indexed-input-base generic-merc-input) + (other-input-base generic-merc-input) + (indexed-output-base generic-merc-output) + (other-output-base generic-merc-output) + (p-input uint32) + (gsf-buf generic-merc-dcache) + (p-fheader merc-fp-header) + (curr-chain basic) + (mercneric-convert basic) + (generic-prepare-dma-single basic) + (generic-prepare-dma-double basic) + (generic-light-proc basic) + (generic-envmap-proc basic) + (high-speed-reject basic) + (dummy-0 uint32) + (hsr-xmult vector :inline) + (hsr-ymult vector :inline) + (warp-consts vector :inline) + ) + ) + +;; definition for method 3 of type gm-shadow +(defmethod inspect ((this gm-shadow)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gm-shadow) + (format #t "~1Tperspective: #~%" (-> this perspective)) + (format #t "~1Tisometric: #~%" (-> this isometric)) + (format #t "~1Tinv-camera-rot: #~%" (-> this inv-camera-rot)) + (format #t "~1Tenvmap-shader: #~%" (-> this envmap-shader)) + (format #t "~1Tcurrent-chain: ~D~%" (-> this current-chain)) + (format #t "~1Tnext-chain: ~D~%" (-> this next-chain)) + (format #t "~1Tbuf-index: ~D~%" (-> this buf-index)) + (format #t "~1Tfragment-count: ~D~%" (-> this fragment-count)) + (format #t "~1Twrite-limit: ~D~%" (-> this write-limit)) + (format #t "~1Tindexed-input-base: #~%" (-> this indexed-input-base)) + (format #t "~1Tother-input-base: #~%" (-> this other-input-base)) + (format #t "~1Tindexed-output-base: #~%" (-> this indexed-output-base)) + (format #t "~1Tother-output-base: #~%" (-> this other-output-base)) + (format #t "~1Tp-input: #x~X~%" (-> this p-input)) + (format #t "~1Tgsf-buf: #~%" (-> this gsf-buf)) + (format #t "~1Tp-fheader: #~%" (-> this p-fheader)) + (format #t "~1Tcurr-chain: ~A~%" (-> this curr-chain)) + (format #t "~1Tmercneric-convert: ~A~%" (-> this mercneric-convert)) + (format #t "~1Tgeneric-prepare-dma-single: ~A~%" (-> this generic-prepare-dma-single)) + (format #t "~1Tgeneric-prepare-dma-double: ~A~%" (-> this generic-prepare-dma-double)) + (format #t "~1Tgeneric-light-proc: ~A~%" (-> this generic-light-proc)) + (format #t "~1Tgeneric-envmap-proc: ~A~%" (-> this generic-envmap-proc)) + (format #t "~1Thigh-speed-reject: ~A~%" (-> this high-speed-reject)) + (format #t "~1Tdummy-0: ~D~%" (-> this dummy-0)) + (format #t "~1Thsr-xmult: #~%" (-> this hsr-xmult)) + (format #t "~1Thsr-ymult: #~%" (-> this hsr-ymult)) + (format #t "~1Twarp-consts: #~%" (-> this warp-consts)) + (label cfg-4) + this + ) + +;; definition of type generic-merc-work +(deftype generic-merc-work (structure) + ((input-a generic-merc-input :inline) + (input-b generic-merc-input :inline) + (ctrl generic-merc-ctrl-with-sfx :inline) + (shadow gm-shadow :inline) + (stack uint128 16) + ) + ) + +;; definition for method 3 of type generic-merc-work +(defmethod inspect ((this generic-merc-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-merc-work) + (format #t "~1Tinput-a: #~%" (-> this input-a)) + (format #t "~1Tinput-b: #~%" (-> this input-b)) + (format #t "~1Tctrl: #~%" (-> this ctrl)) + (format #t "~1Tshadow: #~%" (-> this shadow)) + (format #t "~1Tstack[16] @ #x~X~%" (-> this stack)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc new file mode 100644 index 0000000000..9957e4e978 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc @@ -0,0 +1,905 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ripple-merc-query +(deftype ripple-merc-query (inline-array-class) + "Information about which merc vertices to apply the 'ripple' effect to." + ((start-vertex int32) + (vertex-skip int32) + (vertex-count int32) + (current-loc int32) + (data vector :inline :dynamic) + ) + ) + +;; definition for method 3 of type ripple-merc-query +(defmethod inspect ((this ripple-merc-query)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tstart-vertex: ~D~%" (-> this start-vertex)) + (format #t "~1Tvertex-skip: ~D~%" (-> this vertex-skip)) + (format #t "~1Tvertex-count: ~D~%" (-> this vertex-count)) + (format #t "~1Tcurrent-loc: ~D~%" (-> this current-loc)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(set! (-> ripple-merc-query heap-base) (the-as uint 16)) + +;; definition of type merc-byte-header +(deftype merc-byte-header (structure) + "Header for a single [[merc-fragment]] uploaded to the VU." + ((srcdest-off uint8) + (rgba-off uint8) + (lump-off uint8) + (fp-off uint8) + (mat1-cnt uint8) + (mat2-cnt uint8) + (mat3-cnt uint8) + (samecopy-cnt uint8) + (crosscopy-cnt uint8) + (strip-len uint8) + (mm-quadword-fp-off uint8) + (mm-quadword-size uint8) + (perc-off uint8) + (mat-slot uint8 10) + ) + ) + +;; definition for method 3 of type merc-byte-header +(defmethod inspect ((this merc-byte-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-byte-header) + (format #t "~1Tsrcdest-off: ~D~%" (-> this srcdest-off)) + (format #t "~1Trgba-off: ~D~%" (-> this rgba-off)) + (format #t "~1Tlump-off: ~D~%" (-> this lump-off)) + (format #t "~1Tfp-off: ~D~%" (-> this fp-off)) + (format #t "~1Tmat1-cnt: ~D~%" (-> this mat1-cnt)) + (format #t "~1Tmat2-cnt: ~D~%" (-> this mat2-cnt)) + (format #t "~1Tmat3-cnt: ~D~%" (-> this mat3-cnt)) + (format #t "~1Tsamecopy-cnt: ~D~%" (-> this samecopy-cnt)) + (format #t "~1Tcrosscopy-cnt: ~D~%" (-> this crosscopy-cnt)) + (format #t "~1Tstrip-len: ~D~%" (-> this strip-len)) + (format #t "~1Tmm-quadword-fp-off: ~D~%" (-> this mm-quadword-fp-off)) + (format #t "~1Tmm-quadword-size: ~D~%" (-> this mm-quadword-size)) + (format #t "~1Tperc-off: ~D~%" (-> this perc-off)) + (format #t "~1Tmat-slot[10] @ #x~X~%" (-> this mat-slot)) + (label cfg-4) + this + ) + +;; definition of type merc-fragment +(deftype merc-fragment (structure) + "A single merc fragment that fits into VU memory." + ((header merc-byte-header :inline) + (rest uint8 1) + ) + (:methods + (login-adgifs (_type_) merc-fragment) + ) + ) + +;; definition for method 3 of type merc-fragment +(defmethod inspect ((this merc-fragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-fragment) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Trest[1] @ #x~X~%" (-> this rest)) + (label cfg-4) + this + ) + +;; definition of type merc-vtx +(deftype merc-vtx (structure) + "A packed merc vertex." + ((mat-0 uint8) + (mat-1 uint8) + (nrm-x uint8) + (pos-x uint8) + (dst-0 uint8) + (dst-1 uint8) + (nrm-y uint8) + (pos-y uint8) + (tex-s uint8) + (tex-t uint8) + (nrm-z uint8) + (pos-z uint8) + ) + ) + +;; definition for method 3 of type merc-vtx +(defmethod inspect ((this merc-vtx)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-vtx) + (format #t "~1Tmat-0: ~D~%" (-> this mat-0)) + (format #t "~1Tmat-1: ~D~%" (-> this mat-1)) + (format #t "~1Tnrm-x: ~D~%" (-> this nrm-x)) + (format #t "~1Tpos-x: ~D~%" (-> this pos-x)) + (format #t "~1Tdst-0: ~D~%" (-> this dst-0)) + (format #t "~1Tdst-1: ~D~%" (-> this dst-1)) + (format #t "~1Tnrm-y: ~D~%" (-> this nrm-y)) + (format #t "~1Tpos-y: ~D~%" (-> this pos-y)) + (format #t "~1Ttex-s: ~D~%" (-> this tex-s)) + (format #t "~1Ttex-t: ~D~%" (-> this tex-t)) + (format #t "~1Tnrm-z: ~D~%" (-> this nrm-z)) + (format #t "~1Tpos-z: ~D~%" (-> this pos-z)) + (label cfg-4) + this + ) + +;; definition of type merc-fp-header +(deftype merc-fp-header (structure) + "Merc header for a [[merc-fragment]]'s floating point data." + ((x-add float) + (y-add float) + (z-add float) + (shader-cnt uint8) + (kick-info-offset uint8) + (kick-info-step uint8) + (hword-cnt uint8) + ) + ) + +;; definition for method 3 of type merc-fp-header +(defmethod inspect ((this merc-fp-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-fp-header) + (format #t "~1Tx-add: ~f~%" (-> this x-add)) + (format #t "~1Ty-add: ~f~%" (-> this y-add)) + (format #t "~1Tz-add: ~f~%" (-> this z-add)) + (format #t "~1Tshader-cnt: ~D~%" (-> this shader-cnt)) + (format #t "~1Tkick-info-offset: ~D~%" (-> this kick-info-offset)) + (format #t "~1Tkick-info-step: ~D~%" (-> this kick-info-step)) + (format #t "~1Thword-cnt: ~D~%" (-> this hword-cnt)) + (label cfg-4) + this + ) + +;; definition for function merc-fragment-fp-data +;; WARN: Return type mismatch int vs merc-fp-header. +(defun merc-fragment-fp-data ((frag merc-fragment)) + "Get the floating point data of a [[merc-fragment]]." + (the-as merc-fp-header (+ (the-as uint frag) (* (-> frag header mm-quadword-fp-off) 16))) + ) + +;; definition of type merc-mat-dest +(deftype merc-mat-dest (structure) + "Metadata for a merc matrix upload." + ((matrix-number uint8) + (matrix-dest uint8) + ) + :pack-me + ) + +;; definition for method 3 of type merc-mat-dest +(defmethod inspect ((this merc-mat-dest)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-mat-dest) + (format #t "~1Tmatrix-number: ~D~%" (-> this matrix-number)) + (format #t "~1Tmatrix-dest: ~D~%" (-> this matrix-dest)) + (label cfg-4) + this + ) + +;; definition of type merc-fragment-control +(deftype merc-fragment-control (structure) + "Data about a [[merc-fragment]] needed for merc DMA generation." + ((unsigned-four-count uint8) + (lump-four-count uint8) + (fp-qwc uint8) + (mat-xfer-count uint8) + (mat-dest-data merc-mat-dest :dynamic) + ) + ) + +;; definition for method 3 of type merc-fragment-control +(defmethod inspect ((this merc-fragment-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-fragment-control) + (format #t "~1Tunsigned-four-count: ~D~%" (-> this unsigned-four-count)) + (format #t "~1Tlump-four-count: ~D~%" (-> this lump-four-count)) + (format #t "~1Tfp-qwc: ~D~%" (-> this fp-qwc)) + (format #t "~1Tmat-xfer-count: ~D~%" (-> this mat-xfer-count)) + (format #t "~1Tmat-dest-data[0] @ #x~X~%" (-> this mat-dest-data)) + (label cfg-4) + this + ) + +;; definition of type merc-blend-data +(deftype merc-blend-data (structure) + "Packed BLERC data." + ((int8-data int8 :dynamic) + ) + ) + +;; definition for method 3 of type merc-blend-data +(defmethod inspect ((this merc-blend-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-blend-data) + (format #t "~1Tint8-data[0] @ #x~X~%" (-> this int8-data)) + (label cfg-4) + this + ) + +;; definition of type merc-blend-ctrl +(deftype merc-blend-ctrl (structure) + "Information about the vertices of a model modified by BLERC." + ((blend-vtx-count uint8) + (nonzero-index-count uint8) + (bt-index uint8 :dynamic) + ) + ) + +;; definition for method 3 of type merc-blend-ctrl +(defmethod inspect ((this merc-blend-ctrl)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-blend-ctrl) + (format #t "~1Tblend-vtx-count: ~D~%" (-> this blend-vtx-count)) + (format #t "~1Tnonzero-index-count: ~D~%" (-> this nonzero-index-count)) + (format #t "~1Tbt-index[0] @ #x~X~%" (-> this bt-index)) + (label cfg-4) + this + ) + +;; definition of type mei-envmap-tint +(deftype mei-envmap-tint (structure) + "Data for the extra 'envmap tint' effect." + ((fade0 float) + (fade1 float) + (tint rgba) + (dummy int32) + ) + ) + +;; definition for method 3 of type mei-envmap-tint +(defmethod inspect ((this mei-envmap-tint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mei-envmap-tint) + (format #t "~1Tfade0: ~f~%" (-> this fade0)) + (format #t "~1Tfade1: ~f~%" (-> this fade1)) + (format #t "~1Ttint: ~D~%" (-> this tint)) + (format #t "~1Tdummy: ~D~%" (-> this dummy)) + (label cfg-4) + this + ) + +;; definition of type mei-texture-scroll +(deftype mei-texture-scroll (structure) + "Data for the extra 'texscroll' effect." + ((max-dist float) + (st-int-scale uint8) + (time-factor uint8) + (scroll-dir uint8) + (cached-time uint8) + (time-delta uint8) + (dummy uint8 7) + ) + ) + +;; definition for method 3 of type mei-texture-scroll +(defmethod inspect ((this mei-texture-scroll)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mei-texture-scroll) + (format #t "~1Tmax-dist: ~f~%" (-> this max-dist)) + (format #t "~1Tst-int-scale: ~D~%" (-> this st-int-scale)) + (format #t "~1Ttime-factor: ~D~%" (-> this time-factor)) + (format #t "~1Tscroll-dir: ~D~%" (-> this scroll-dir)) + (format #t "~1Tcached-time: ~D~%" (-> this cached-time)) + (format #t "~1Ttime-delta: ~D~%" (-> this time-delta)) + (format #t "~1Tdummy[7] @ #x~X~%" (-> this dummy)) + (label cfg-4) + this + ) + +;; definition of type mei-ripple +(deftype mei-ripple (structure) + "Data for the extra 'ripple' effect." + ((x-base float) + (z-base float) + (grid-size float) + (angle float) + ) + ) + +;; definition for method 3 of type mei-ripple +(defmethod inspect ((this mei-ripple)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mei-ripple) + (format #t "~1Tx-base: ~f~%" (-> this x-base)) + (format #t "~1Tz-base: ~f~%" (-> this z-base)) + (format #t "~1Tgrid-size: ~f~%" (-> this grid-size)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (label cfg-4) + this + ) + +;; definition of type merc-extra-info +(deftype merc-extra-info (structure) + "Info for merc extra effects." + ((envmap-tint-offset uint8) + (shader-offset uint8) + (texture-scroll-offset uint8) + (ripple-offset uint8) + (dummy uint8 12) + ) + ) + +;; definition for method 3 of type merc-extra-info +(defmethod inspect ((this merc-extra-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-extra-info) + (format #t "~1Tenvmap-tint-offset: ~D~%" (-> this envmap-tint-offset)) + (format #t "~1Tshader-offset: ~D~%" (-> this shader-offset)) + (format #t "~1Ttexture-scroll-offset: ~D~%" (-> this texture-scroll-offset)) + (format #t "~1Tripple-offset: ~D~%" (-> this ripple-offset)) + (format #t "~1Tdummy[12] @ #x~X~%" (-> this dummy)) + (label cfg-4) + this + ) + +;; definition of type merc-effect +(deftype merc-effect (structure) + "A collection of [[merc-fragment]]s with data for any extra effects." + ((frag-geo merc-fragment) + (frag-ctrl merc-fragment-control) + (blend-data merc-blend-data) + (blend-ctrl merc-blend-ctrl) + (merc-effect-version uint8) + (effect-bits uint8) + (frag-count uint16) + (blend-frag-count uint16) + (tri-count uint16) + (dvert-count uint16) + (texture-index uint8) + (effect-usage uint8) + (extra-info merc-extra-info) + ) + (:methods + (login-adgifs (_type_) none) + ) + ) + +;; definition for method 3 of type merc-effect +(defmethod inspect ((this merc-effect)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-effect) + (format #t "~1Tfrag-geo: #~%" (-> this frag-geo)) + (format #t "~1Tfrag-ctrl: #~%" (-> this frag-ctrl)) + (format #t "~1Tblend-data: #~%" (-> this blend-data)) + (format #t "~1Tblend-ctrl: #~%" (-> this blend-ctrl)) + (format #t "~1Tmerc-effect-version: ~D~%" (-> this merc-effect-version)) + (format #t "~1Teffect-bits: ~D~%" (-> this effect-bits)) + (format #t "~1Tfrag-count: ~D~%" (-> this frag-count)) + (format #t "~1Tblend-frag-count: ~D~%" (-> this blend-frag-count)) + (format #t "~1Ttri-count: ~D~%" (-> this tri-count)) + (format #t "~1Tdvert-count: ~D~%" (-> this dvert-count)) + (format #t "~1Ttexture-index: ~D~%" (-> this texture-index)) + (format #t "~1Teffect-usage: ~D~%" (-> this effect-usage)) + (format #t "~1Textra-info: #~%" (-> this extra-info)) + (label cfg-4) + this + ) + +;; definition of type merc-eye-ctrl +(deftype merc-eye-ctrl (structure) + "Eye info for both eyes of a merc model." + ((eye-slot int8) + (shader-offset int8) + (shader-count int8) + (eye-ctrl-index int8) + (shader adgif-shader 6 :inline) + (left-iris-shader adgif-shader :inline :overlay-at (-> shader 0)) + (left-pupil-shader adgif-shader :inline :overlay-at (-> shader 1)) + (left-lid-shader adgif-shader :inline :overlay-at (-> shader 2)) + (right-iris-shader adgif-shader :inline :overlay-at (-> shader 3)) + (right-pupil-shader adgif-shader :inline :overlay-at (-> shader 4)) + (right-lid-shader adgif-shader :inline :overlay-at (-> shader 5)) + ) + ) + +;; definition for method 3 of type merc-eye-ctrl +(defmethod inspect ((this merc-eye-ctrl)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-eye-ctrl) + (format #t "~1Teye-slot: ~D~%" (-> this eye-slot)) + (format #t "~1Tshader-offset: ~D~%" (-> this shader-offset)) + (format #t "~1Tshader-count: ~D~%" (-> this shader-count)) + (format #t "~1Teye-ctrl-index: ~D~%" (-> this eye-ctrl-index)) + (format #t "~1Tshader[6] @ #x~X~%" (-> this shader)) + (format #t "~1Tleft-iris-shader: #~%" (-> this shader)) + (format #t "~1Tleft-pupil-shader: #~%" (-> this left-pupil-shader)) + (format #t "~1Tleft-lid-shader: #~%" (-> this left-lid-shader)) + (format #t "~1Tright-iris-shader: #~%" (-> this right-iris-shader)) + (format #t "~1Tright-pupil-shader: #~%" (-> this right-pupil-shader)) + (format #t "~1Tright-lid-shader: #~%" (-> this right-lid-shader)) + (label cfg-4) + this + ) + +;; definition of type merc-eye-anim-frame +(deftype merc-eye-anim-frame (structure) + "A single frame of a merc eye animation." + ((pupil-trans-x int8) + (pupil-trans-y int8) + (blink int8) + (iris-scale int8 :offset 4) + (pupil-scale int8 :offset 5) + (lid-scale int8 :offset 6) + (dword uint64 :overlay-at pupil-trans-x) + ) + :pack-me + ) + +;; definition for method 3 of type merc-eye-anim-frame +(defmethod inspect ((this merc-eye-anim-frame)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-eye-anim-frame) + (format #t "~1Tpupil-trans-x: ~D~%" (-> this pupil-trans-x)) + (format #t "~1Tpupil-trans-y: ~D~%" (-> this pupil-trans-y)) + (format #t "~1Tblink: ~D~%" (-> this blink)) + (format #t "~1Tiris-scale: ~D~%" (-> this iris-scale)) + (format #t "~1Tpupil-scale: ~D~%" (-> this pupil-scale)) + (format #t "~1Tlid-scale: ~D~%" (-> this lid-scale)) + (format #t "~1Tdword: ~D~%" (-> this dword)) + (label cfg-4) + this + ) + +;; definition of type merc-eye-anim-block +(deftype merc-eye-anim-block (structure) + "A list of eye animation frames." + ((max-frame int16) + (data merc-eye-anim-frame :inline :dynamic) + ) + ) + +;; definition for method 3 of type merc-eye-anim-block +(defmethod inspect ((this merc-eye-anim-block)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-eye-anim-block) + (format #t "~1Tmax-frame: ~D~%" (-> this max-frame)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type texture-usage-group +(deftype texture-usage-group (structure) + ((data texture-masks 7 :inline) + ) + ) + +;; definition for method 3 of type texture-usage-group +(defmethod inspect ((this texture-usage-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'texture-usage-group) + (format #t "~1Tdata[7] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type merc-ctrl-header +(deftype merc-ctrl-header (structure) + "The header for a [[merc-ctrl]], +containing metadata about the model used for drawing." + ((xyz-scale float) + (st-magic uint32) + (st-out-a uint32) + (st-out-b uint32) + (st-vif-add uint32) + (st-int-off uint16) + (st-int-scale uint16) + (effect-count uint32) + (blend-target-count uint32) + (fragment-count uint16) + (tri-count uint16) + (matrix-count uint8) + (shader-count uint8) + (transform-vertex-count uint16) + (dvert-count uint16) + (one-mat-count uint16) + (two-mat-count uint16) + (two-mat-reuse-count uint16) + (three-mat-count uint16) + (three-mat-reuse-count uint16) + (shader-upload-count uint8) + (matrix-upload-count uint8) + (same-copy-count uint16) + (cross-copy-count uint16) + (num-verts uint16) + (longest-edge float) + (eye-ctrl merc-eye-ctrl) + (pad uint32 3) + (masks-padding texture-masks :inline) + (texture-usage-group texture-usage-group :overlay-at (-> masks-padding data 0 mask data 0)) + (dummy-bytes uint8 :dynamic :overlay-at fragment-count) + (envmap-tint uint32 :overlay-at fragment-count) + (query basic :overlay-at matrix-count) + (needs-clip uint8 :overlay-at dvert-count) + (use-isometric uint8 :offset 41) + (use-attached-shader uint8 :overlay-at one-mat-count) + (display-triangles uint8 :offset 43) + (death-vertex-skip uint16 :overlay-at two-mat-count) + (death-start-vertex uint16 :overlay-at two-mat-reuse-count) + (death-effect uint32 :overlay-at three-mat-count) + (use-translucent uint8 :overlay-at shader-upload-count) + (display-this-fragment uint8 :overlay-at matrix-upload-count) + (use-warp uint8 :overlay-at same-copy-count) + (ignore-alpha uint8 :offset 55) + (force-fade uint8 :overlay-at cross-copy-count) + (disable-fog uint8 :offset 57) + (disable-envmap uint8 :overlay-at num-verts) + ) + ) + +;; definition for method 3 of type merc-ctrl-header +(defmethod inspect ((this merc-ctrl-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-ctrl-header) + (format #t "~1Txyz-scale: #x~X~%" (-> this xyz-scale)) + (format #t "~1Tst-magic: #x~X~%" (-> this st-magic)) + (format #t "~1Tst-out-a: #x~X~%" (-> this st-out-a)) + (format #t "~1Tst-out-b: #x~X~%" (-> this st-out-b)) + (format #t "~1Tst-vif-add: #x~X~%" (-> this st-vif-add)) + (format #t "~1Tst-int-off: ~D~%" (-> this st-int-off)) + (format #t "~1Tst-int-scale: ~D~%" (-> this st-int-scale)) + (format #t "~1Teffect-count: ~D~%" (-> this effect-count)) + (format #t "~1Tblend-target-count: ~D~%" (-> this blend-target-count)) + (format #t "~1Tfragment-count: ~D~%" (-> this fragment-count)) + (format #t "~1Ttri-count: ~D~%" (-> this tri-count)) + (format #t "~1Tmatrix-count: ~D~%" (-> this matrix-count)) + (format #t "~1Tshader-count: ~D~%" (-> this shader-count)) + (format #t "~1Ttransform-vertex-count: ~D~%" (-> this transform-vertex-count)) + (format #t "~1Tdvert-count: ~D~%" (-> this dvert-count)) + (format #t "~1Tone-mat-count: ~D~%" (-> this one-mat-count)) + (format #t "~1Ttwo-mat-count: ~D~%" (-> this two-mat-count)) + (format #t "~1Ttwo-mat-reuse-count: ~D~%" (-> this two-mat-reuse-count)) + (format #t "~1Tthree-mat-count: ~D~%" (-> this three-mat-count)) + (format #t "~1Tthree-mat-reuse-count: ~D~%" (-> this three-mat-reuse-count)) + (format #t "~1Tshader-upload-count: ~D~%" (-> this shader-upload-count)) + (format #t "~1Tmatrix-upload-count: ~D~%" (-> this matrix-upload-count)) + (format #t "~1Tsame-copy-count: ~D~%" (-> this same-copy-count)) + (format #t "~1Tcross-copy-count: ~D~%" (-> this cross-copy-count)) + (format #t "~1Tnum-verts: ~D~%" (-> this num-verts)) + (format #t "~1Tlongest-edge: ~f~%" (-> this longest-edge)) + (format #t "~1Teye-ctrl: #~%" (-> this eye-ctrl)) + (format #t "~1Tpad[3] @ #x~X~%" (-> this pad)) + (format #t "~1Tmasks-padding: #~%" (-> this masks-padding)) + (format #t "~1Ttexture-usage-group: #~%" (-> this texture-usage-group)) + (format #t "~1Tdummy-bytes[0] @ #x~X~%" (&-> this fragment-count)) + (format #t "~1Tenvmap-tint: ~D~%" (-> this envmap-tint)) + (format #t "~1Tquery: ~A~%" (-> this query)) + (format #t "~1Tneeds-clip: ~D~%" (-> this needs-clip)) + (format #t "~1Tuse-isometric: ~D~%" (-> this use-isometric)) + (format #t "~1Tuse-attached-shader: ~D~%" (-> this use-attached-shader)) + (format #t "~1Tdisplay-triangles: ~D~%" (-> this display-triangles)) + (format #t "~1Tdeath-vertex-skip: ~D~%" (-> this two-mat-count)) + (format #t "~1Tdeath-start-vertex: ~D~%" (-> this two-mat-reuse-count)) + (format #t "~1Tdeath-effect: ~D~%" (-> this death-effect)) + (format #t "~1Tuse-translucent: ~D~%" (-> this shader-upload-count)) + (format #t "~1Tdisplay-this-fragment: ~D~%" (-> this matrix-upload-count)) + (format #t "~1Tuse-warp: ~D~%" (-> this use-warp)) + (format #t "~1Tignore-alpha: ~D~%" (-> this ignore-alpha)) + (format #t "~1Tforce-fade: ~D~%" (-> this force-fade)) + (format #t "~1Tdisable-fog: ~D~%" (-> this disable-fog)) + (format #t "~1Tdisable-envmap: ~D~%" (-> this disable-envmap)) + (label cfg-4) + this + ) + +;; definition of type merc-ctrl +(deftype merc-ctrl (art-element) + "The merc data for a single model as it's stored in an art group. +Consists of a header and a list of [[merc-effect]]s." + ((num-joints int32 :overlay-at length) + (seg-table (array uint64) :overlay-at (-> pad 0)) + (header merc-ctrl-header :inline) + (effect merc-effect :dynamic) + ) + ) + +;; definition for method 3 of type merc-ctrl +(defmethod inspect ((this merc-ctrl)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Textra: ~A~%" (-> this extra)) + (format #t "~1Tmaster-art-group-name: ~A~%" (-> this master-art-group-name)) + (format #t "~1Tmaster-art-group-index: ~D~%" (-> this master-art-group-index)) + (format #t "~1Tnum-joints: ~D~%" (-> this length)) + (format #t "~1Tseg-table: ~A~%" (-> this seg-table)) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Teffect[0] @ #x~X~%" (-> this effect)) + (label cfg-4) + this + ) + +;; definition of type merc-vu1-low-mem +(deftype merc-vu1-low-mem (structure) + ((tri-strip-gif gs-gif-tag :inline) + (ad-gif gs-gif-tag :inline) + (hvdf-offset vector :inline) + (perspective uint128 4) + (fog vector :inline) + ) + ) + +;; definition for method 3 of type merc-vu1-low-mem +(defmethod inspect ((this merc-vu1-low-mem)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'merc-vu1-low-mem) + (format #t "~1Ttri-strip-gif: #~%" (-> this tri-strip-gif)) + (format #t "~1Tad-gif: #~%" (-> this ad-gif)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Tperspective[4] @ #x~X~%" (-> this perspective)) + (format #t "~1Tfog: #~%" (-> this fog)) + (label cfg-4) + this + ) + +;; definition of type emerc-vu1-low-mem +(deftype emerc-vu1-low-mem (structure) + ((tri-strip-gif gs-gif-tag :inline) + (ad-gif gs-gif-tag :inline) + (hvdf-offset vector :inline) + (perspective vector 4 :inline) + (fog vector :inline) + (unperspect vector :inline) + ) + ) + +;; definition for method 3 of type emerc-vu1-low-mem +(defmethod inspect ((this emerc-vu1-low-mem)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'emerc-vu1-low-mem) + (format #t "~1Ttri-strip-gif: #~%" (-> this tri-strip-gif)) + (format #t "~1Tad-gif: #~%" (-> this ad-gif)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Tperspective[4] @ #x~X~%" (-> this perspective)) + (format #t "~1Tfog: #~%" (-> this fog)) + (format #t "~1Tunperspect: #~%" (-> this unperspect)) + (label cfg-4) + this + ) + +;; definition of type texture-login-data +(deftype texture-login-data (structure) + ((default-texture-index int32) + (current-texture-index int32) + (texture-usage-group texture-usage-group) + (merc-ctrl-header merc-ctrl-header) + (name basic) + ) + ) + +;; definition for method 3 of type texture-login-data +(defmethod inspect ((this texture-login-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'texture-login-data) + (format #t "~1Tdefault-texture-index: ~D~%" (-> this default-texture-index)) + (format #t "~1Tcurrent-texture-index: ~D~%" (-> this current-texture-index)) + (format #t "~1Ttexture-usage-group: #~%" (-> this texture-usage-group)) + (format #t "~1Tmerc-ctrl-header: #~%" (-> this merc-ctrl-header)) + (format #t "~1Tname: ~A~%" (-> this name)) + (label cfg-4) + this + ) + +;; definition of type ripple-wave +(deftype ripple-wave (structure) + ((scale float) + (offs float) + (xdiv int16) + (zdiv int16) + (speed float) + (xmul float) + (zmul float) + (delta float) + ) + :pack-me + ) + +;; definition for method 3 of type ripple-wave +(defmethod inspect ((this ripple-wave)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ripple-wave) + (format #t "~1Tscale: ~f~%" (-> this scale)) + (format #t "~1Toffs: ~f~%" (-> this offs)) + (format #t "~1Txdiv: ~D~%" (-> this xdiv)) + (format #t "~1Tzdiv: ~D~%" (-> this zdiv)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Txmul: ~f~%" (-> this xmul)) + (format #t "~1Tzmul: ~f~%" (-> this zmul)) + (format #t "~1Tdelta: ~f~%" (-> this delta)) + (label cfg-4) + this + ) + +;; definition of type ripple-wave-set +(deftype ripple-wave-set (basic) + ((count int32) + (converted basic) + (normal-scale float) + (wave ripple-wave 4 :inline) + (frame-save uint64) + ) + ) + +;; definition for method 3 of type ripple-wave-set +(defmethod inspect ((this ripple-wave-set)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tconverted: ~A~%" (-> this converted)) + (format #t "~1Tnormal-scale: ~f~%" (-> this normal-scale)) + (format #t "~1Twave[4] @ #x~X~%" (-> this wave)) + (format #t "~1Tframe-save: ~D~%" (-> this frame-save)) + (label cfg-4) + this + ) + +;; definition of type ripple-control +(deftype ripple-control (basic) + ((global-scale float) + (last-frame-scale float) + (close-fade-dist float) + (far-fade-dist float) + (faded-scale float) + (individual-normal-scale float) + (waveform ripple-wave-set) + (send-query symbol) + (query ripple-merc-query) + ) + (:methods + (new (symbol type) _type_) + ) + ) + +;; definition for method 3 of type ripple-control +(defmethod inspect ((this ripple-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tglobal-scale: ~f~%" (-> this global-scale)) + (format #t "~1Tlast-frame-scale: ~f~%" (-> this last-frame-scale)) + (format #t "~1Tclose-fade-dist: ~f~%" (-> this close-fade-dist)) + (format #t "~1Tfar-fade-dist: ~f~%" (-> this far-fade-dist)) + (format #t "~1Tfaded-scale: ~f~%" (-> this faded-scale)) + (format #t "~1Tindividual-normal-scale: ~f~%" (-> this individual-normal-scale)) + (format #t "~1Twaveform: ~A~%" (-> this waveform)) + (format #t "~1Tsend-query: ~A~%" (-> this send-query)) + (format #t "~1Tquery: ~A~%" (-> this query)) + (label cfg-4) + this + ) + +;; definition for method 0 of type ripple-control +(defmethod new ripple-control ((allocation symbol) (type-to-make type)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 global-scale) 0.0) + (set! (-> v0-0 last-frame-scale) -0.001) + (set! (-> v0-0 close-fade-dist) 4096000000.0) + (set! (-> v0-0 far-fade-dist) 8192000000.0) + (set! (-> v0-0 faded-scale) -0.001) + (set! (-> v0-0 waveform) #f) + (set! (-> v0-0 individual-normal-scale) 1.0) + (set! (-> v0-0 send-query) #f) + (set! (-> v0-0 query) #f) + v0-0 + ) + ) + +;; definition of type death-info +(deftype death-info (basic) + ((vertex-skip uint16) + (timer uint8) + (overlap uint8) + (effect uint32) + (sound symbol) + ) + ) + +;; definition for method 3 of type death-info +(defmethod inspect ((this death-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tvertex-skip: ~D~%" (-> this vertex-skip)) + (format #t "~1Ttimer: ~D~%" (-> this timer)) + (format #t "~1Toverlap: ~D~%" (-> this overlap)) + (format #t "~1Teffect: ~D~%" (-> this effect)) + (format #t "~1Tsound: ~A~%" (-> this sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-vu1-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-vu1-h_REF.gc new file mode 100644 index 0000000000..8e4b1f21d4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-vu1-h_REF.gc @@ -0,0 +1,9 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/generic-work-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/generic-work-h_REF.gc new file mode 100644 index 0000000000..f5a94b5450 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/generic-work-h_REF.gc @@ -0,0 +1,208 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type generic-input-buffer +(deftype generic-input-buffer (structure) + ((data uint128 473) + (merc generic-merc-work :inline :overlay-at (-> data 0)) + (tie generic-tie-work :inline :overlay-at (-> data 0)) + ) + ) + +;; definition for method 3 of type generic-input-buffer +(defmethod inspect ((this generic-input-buffer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-input-buffer) + (format #t "~1Tdata[473] @ #x~X~%" (-> this data)) + (format #t "~1Tmerc: #~%" (-> this data)) + (format #t "~1Ttie: #~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type generic-debug +(deftype generic-debug (structure) + ((locks uint32 4) + (timer uint32 32) + (count uint32 32) + (vps uint32 32) + (buffer int32) + (start-addr int32) + (lock int32) + ) + ) + +;; definition for method 3 of type generic-debug +(defmethod inspect ((this generic-debug)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-debug) + (format #t "~1Tlocks[4] @ #x~X~%" (-> this locks)) + (format #t "~1Ttimer[32] @ #x~X~%" (-> this timer)) + (format #t "~1Tcount[32] @ #x~X~%" (-> this count)) + (format #t "~1Tvps[32] @ #x~X~%" (-> this vps)) + (format #t "~1Tbuffer: ~D~%" (-> this buffer)) + (format #t "~1Tstart-addr: ~D~%" (-> this start-addr)) + (format #t "~1Tlock: ~D~%" (-> this lock)) + (label cfg-4) + this + ) + +;; definition of type generic-vu1-header +(deftype generic-vu1-header (structure) + ((matrix matrix :inline) + (strgif generic-gif-tag :inline) + (adcmds gs-adcmd 2 :inline) + (adnop1 gs-adcmd :inline :overlay-at (-> adcmds 0)) + (adnop2 gs-adcmd :inline :overlay-at (-> adcmds 1)) + (dps uint16 :overlay-at (-> adcmds 0 word 3)) + (kickoff uint16 :overlay-at (-> adnop2 w)) + (strips uint16 :overlay-at (-> strgif data 3)) + ) + ) + +;; definition for method 3 of type generic-vu1-header +(defmethod inspect ((this generic-vu1-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-vu1-header) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tstrgif: #~%" (-> this strgif)) + (format #t "~1Tadcmds[2] @ #x~X~%" (-> this adcmds)) + (format #t "~1Tadnop1: #~%" (-> this adcmds)) + (format #t "~1Tadnop2: #~%" (-> this adnop2)) + (format #t "~1Tdps: ~D~%" (-> this dps)) + (format #t "~1Tkickoff: ~D~%" (-> this kickoff)) + (format #t "~1Tstrips: ~D~%" (-> this strips)) + (label cfg-4) + this + ) + +;; definition of type generic-vu1-texbuf +(deftype generic-vu1-texbuf (structure) + ((header generic-vu1-header :inline) + (shader uint32 :dynamic) + ) + ) + +;; definition for method 3 of type generic-vu1-texbuf +(defmethod inspect ((this generic-vu1-texbuf)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-vu1-texbuf) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Tshader[0] @ #x~X~%" (-> this shader)) + (label cfg-4) + this + ) + +;; definition of type generic-texbuf +(deftype generic-texbuf (structure) + ((tag dma-packet :inline) + (header generic-vu1-header :inline) + (shader uint32 :dynamic) + ) + ) + +;; definition for method 3 of type generic-texbuf +(defmethod inspect ((this generic-texbuf)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-texbuf) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Theader: #~%" (-> this header)) + (format #t "~1Tshader[0] @ #x~X~%" (-> this shader)) + (label cfg-4) + this + ) + +;; definition of type generic-effect-work +(deftype generic-effect-work (structure) + ((consts generic-consts :inline) + (storage generic-storage :inline) + (storage2 generic-storage :inline) + (lights vu-lights :inline) + ) + ) + +;; definition for method 3 of type generic-effect-work +(defmethod inspect ((this generic-effect-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-effect-work) + (format #t "~1Tconsts: #~%" (-> this consts)) + (format #t "~1Tstorage: #~%" (-> this storage)) + (format #t "~1Tstorage2: #~%" (-> this storage2)) + (format #t "~1Tlights: #~%" (-> this lights)) + (label cfg-4) + this + ) + +;; definition of type generic-effect-buffer +(deftype generic-effect-buffer (structure) + ((outbuf-0 uint8 3552) + (work generic-effect-work :inline) + (outbuf-1 uint8 3552) + ) + ) + +;; definition for method 3 of type generic-effect-buffer +(defmethod inspect ((this generic-effect-buffer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-effect-buffer) + (format #t "~1Toutbuf-0[3552] @ #x~X~%" (-> this outbuf-0)) + (format #t "~1Twork: #~%" (-> this work)) + (format #t "~1Toutbuf-1[3552] @ #x~X~%" (-> this outbuf-1)) + (label cfg-4) + this + ) + +;; definition of type generic-work +(deftype generic-work (structure) + ((saves generic-saves :inline) + (storage generic-storage :inline) + (in-buf generic-input-buffer :inline) + (fx-buf generic-effect-buffer :inline) + ) + ) + +;; definition for method 3 of type generic-work +(defmethod inspect ((this generic-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-work) + (format #t "~1Tsaves: #~%" (-> this saves)) + (format #t "~1Tstorage: #~%" (-> this storage)) + (format #t "~1Tin-buf: #~%" (-> this in-buf)) + (format #t "~1Tfx-buf: #~%" (-> this fx-buf)) + (label cfg-4) + this + ) + +;; definition for symbol *generic-debug*, type generic-debug +(define *generic-debug* (new 'global 'generic-debug)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc new file mode 100644 index 0000000000..3a07f20187 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc @@ -0,0 +1,321 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type lightning-spec +(deftype lightning-spec (basic) + ((name string) + (flags lightning-spec-flags) + (rand-func uint8) + (adjust-distance uint8) + (start-color rgba) + (end-color rgba) + (fade-to-color rgba) + (fade-start-factor float) + (fade-time float) + (texture texture-id) + (reduction float) + (num-points int32) + (box-size float) + (merge-factor float) + (merge-count int32) + (radius float) + (duration float) + (duration-rand float) + (sound symbol) + (delay float) + (delay-rand float) + ) + ) + +;; definition for method 3 of type lightning-spec +(defmethod inspect ((this lightning-spec)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Trand-func: ~D~%" (-> this rand-func)) + (format #t "~1Tadjust-distance: ~D~%" (-> this adjust-distance)) + (format #t "~1Tstart-color: ~D~%" (-> this start-color)) + (format #t "~1Tend-color: ~D~%" (-> this end-color)) + (format #t "~1Tfade-to-color: ~D~%" (-> this fade-to-color)) + (format #t "~1Tfade-start-factor: ~f~%" (-> this fade-start-factor)) + (format #t "~1Tfade-time: ~f~%" (-> this fade-time)) + (format #t "~1Ttexture: ~D~%" (-> this texture)) + (format #t "~1Treduction: ~f~%" (-> this reduction)) + (format #t "~1Tnum-points: ~D~%" (-> this num-points)) + (format #t "~1Tbox-size: ~f~%" (-> this box-size)) + (format #t "~1Tmerge-factor: ~f~%" (-> this merge-factor)) + (format #t "~1Tmerge-count: ~D~%" (-> this merge-count)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tduration: ~f~%" (-> this duration)) + (format #t "~1Tduration-rand: ~f~%" (-> this duration-rand)) + (format #t "~1Tsound: ~A~%" (-> this sound)) + (format #t "~1Tdelay: ~f~%" (-> this delay)) + (format #t "~1Tdelay-rand: ~f~%" (-> this delay-rand)) + (label cfg-4) + this + ) + +;; definition for function lookup-lightning-spec-by-name +(defun lookup-lightning-spec-by-name ((arg0 string)) + (let* ((s5-0 *lightning-spec-id-table*) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 s4-0) + (let ((s2-0 (-> s5-0 s3-0))) + (if (and (nonzero? s2-0) (string= arg0 (-> s2-0 name))) + (return s2-0) + ) + ) + ) + ) + (the-as lightning-spec #f) + ) + +;; definition of type lightning-state +(deftype lightning-state (structure) + ((mode uint8) + (counter float) + (points-to-draw int32) + (box-size float) + (gcf-control gcf-control :inline) + (line vector-array) + (meet vector-array) + (path vector-array) + (start-color rgba) + (end-color rgba) + ) + ) + +;; definition for method 3 of type lightning-state +(defmethod inspect ((this lightning-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-state) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tcounter: ~f~%" (-> this counter)) + (format #t "~1Tpoints-to-draw: ~D~%" (-> this points-to-draw)) + (format #t "~1Tbox-size: ~f~%" (-> this box-size)) + (format #t "~1Tgcf-control: #~%" (-> this gcf-control)) + (format #t "~1Tline: ~A~%" (-> this line)) + (format #t "~1Tmeet: ~A~%" (-> this meet)) + (format #t "~1Tpath: ~A~%" (-> this path)) + (format #t "~1Tstart-color: ~D~%" (-> this start-color)) + (format #t "~1Tend-color: ~D~%" (-> this end-color)) + (label cfg-4) + this + ) + +;; definition of type lightning-control +(deftype lightning-control (basic) + ((spec lightning-spec) + (process (pointer process)) + (state lightning-state :inline) + ) + (:methods + (new (symbol type lightning-spec process float) _type_) + (change-mode (_type_ lightning-mode) lightning-mode) + (get-mode (_type_) lightning-mode) + (set-point! (_type_ int vector) none) + (set-first-meet-point (_type_ vector) none) + (set-last-meet-point (_type_ vector) none) + ) + ) + +;; definition for method 3 of type lightning-control +(defmethod inspect ((this lightning-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tspec: ~A~%" (-> this spec)) + (format #t "~1Tprocess: #x~X~%" (-> this process)) + (format #t "~1Tstate: #~%" (-> this state)) + (label cfg-4) + this + ) + +;; definition for method 9 of type lightning-control +(defmethod change-mode ((this lightning-control) (arg0 lightning-mode)) + (let ((v1-1 (!= arg0 (-> this state mode)))) + (case arg0 + (((lightning-mode lm3)) + (if v1-1 + (set! (-> this state counter) 0.0) + ) + ) + (((lightning-mode lm1)) + (set! (-> this state start-color) (-> this spec start-color)) + (set! (-> this state end-color) (-> this spec end-color)) + ) + ) + ) + (set! (-> this state mode) (the-as uint arg0)) + arg0 + ) + +;; definition for method 10 of type lightning-control +;; WARN: Return type mismatch uint vs lightning-mode. +(defmethod get-mode ((this lightning-control)) + (the-as lightning-mode (-> this state mode)) + ) + +;; definition for method 11 of type lightning-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-point! ((this lightning-control) (arg0 int) (arg1 vector)) + (let ((v1-0 (-> this state))) + (when (and (-> v1-0 path) (>= arg0 0) (< arg0 (-> v1-0 path length))) + (set! (-> v1-0 path data arg0 quad) (-> arg1 quad)) + (when (and (< (+ (-> v1-0 points-to-draw) -1) arg0) (case (-> v1-0 mode) + ((2 3) + #t + ) + (else + #f + ) + ) + ) + (set! (-> v1-0 line data arg0 quad) (-> arg1 quad)) + (set! (-> v1-0 meet data arg0 quad) (-> arg1 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type lightning-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch (inline-array vector) vs none. +(defmethod set-first-meet-point ((this lightning-control) (arg0 vector)) + (set! (-> this state meet data 0 quad) (-> arg0 quad)) + (none) + ) + +;; definition for method 13 of type lightning-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-last-meet-point ((this lightning-control) (arg0 vector)) + (set! (-> this state meet data (+ (-> this state points-to-draw) -1) quad) (-> arg0 quad)) + (none) + ) + +;; definition for method 7 of type lightning-control +(defmethod relocate ((this lightning-control) (offset int)) + (&+! (-> this state line) offset) + (&+! (-> this state meet) offset) + (if (-> this state path) + (&+! (-> this state path) offset) + ) + (let ((v1-8 (-> this spec))) + (if (and (>= (the-as int v1-8) (-> *kernel-context* relocating-min)) + (< (the-as int v1-8) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this spec) offset) + ) + ) + this + ) + +;; definition for method 0 of type lightning-control +;; WARN: Return type mismatch object vs lightning-control. +(defmethod new lightning-control ((allocation symbol) (type-to-make type) (arg0 lightning-spec) (arg1 process) (arg2 float)) + (with-pp + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as lightning-control gp-0)) + (go process-drawable-art-error "memory") + (set! gp-0 0) + (goto cfg-14) + ) + (let ((s3-0 (-> arg0 num-points))) + (let ((f0-0 (-> arg0 box-size))) + (when (logtest? (-> arg0 flags) (lightning-spec-flags lsf4)) + (let ((f1-1 (fmax 1.0 (fmin 5.0 (/ arg2 (* 4096.0 (the float (-> arg0 adjust-distance)))))))) + (set! s3-0 (* s3-0 (the int f1-1))) + (set! f0-0 (* f0-0 f1-1)) + ) + ) + (set! (-> (the-as lightning-control gp-0) state box-size) f0-0) + ) + (set! (-> (the-as lightning-control gp-0) process) (process->ppointer arg1)) + (set! (-> (the-as lightning-control gp-0) state mode) (the-as uint 1)) + (set! (-> (the-as lightning-control gp-0) state line) + ((method-of-type vector-array new) allocation vector-array s3-0) + ) + (set! (-> (the-as lightning-control gp-0) state meet) + ((method-of-type vector-array new) allocation vector-array s3-0) + ) + (let ((v1-18 (-> arg0 rand-func))) + (set! (-> (the-as lightning-control gp-0) state path) + (if (or (= v1-18 2) (= v1-18 3)) + ((method-of-type vector-array new) allocation vector-array s3-0) + (the-as vector-array #f) + ) + ) + ) + (set! (-> (the-as lightning-control gp-0) state counter) 0.0) + (set! (-> (the-as lightning-control gp-0) state points-to-draw) s3-0) + ) + (set! (-> (the-as lightning-control gp-0) spec) arg0) + (set! (-> (the-as lightning-control gp-0) state start-color) (-> arg0 start-color)) + (set! (-> (the-as lightning-control gp-0) state end-color) (-> arg0 end-color)) + (add-connection *lightning-engine* pp nothing (the-as lightning-control gp-0) #f #f) + (label cfg-14) + (the-as lightning-control gp-0) + ) + ) + ) + +;; definition of type lightning-probe-vars +(deftype lightning-probe-vars (basic) + ((src-joint-index uint32) + (next-spawn-time time-frame) + (last-valid-time time-frame) + (point vector 2 :inline) + (start-pos vector :inline :overlay-at (-> point 0)) + (end-pos vector :inline :overlay-at (-> point 1)) + (probe-dirs (inline-array vector)) + ) + ) + +;; definition for method 3 of type lightning-probe-vars +(defmethod inspect ((this lightning-probe-vars)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tsrc-joint-index: ~D~%" (-> this src-joint-index)) + (format #t "~1Tnext-spawn-time: ~D~%" (-> this next-spawn-time)) + (format #t "~1Tlast-valid-time: ~D~%" (-> this last-valid-time)) + (format #t "~1Tpoint[2] @ #x~X~%" (-> this point)) + (format #t "~1Tstart-pos: #~%" (-> this point)) + (format #t "~1Tend-pos: #~%" (-> this end-pos)) + (format #t "~1Tprobe-dirs: #x~X~%" (-> this probe-dirs)) + (label cfg-4) + this + ) + +;; definition for symbol *lightning-probe-vars*, type lightning-probe-vars +(define *lightning-probe-vars* + (new 'static 'lightning-probe-vars :probe-dirs (new 'static 'inline-array vector 6 + (new 'static 'vector :z 1.0 :w 1.0) + (new 'static 'vector :x 1.0 :w 1.0) + (new 'static 'vector :z -1.0 :w 1.0) + (new 'static 'vector :x -1.0 :w 1.0) + (new 'static 'vector :y 1.0 :w 1.0) + (new 'static 'vector :y -1.0 :w 1.0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc index 950474b4aa..a5609c3220 100644 --- a/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc @@ -27,18 +27,18 @@ ) ;; definition for method 8 of type texture-page -(defmethod mem-usage ((this texture-page) (arg0 memory-usage-block) (arg1 int)) - (set! (-> arg0 length) (max 84 (-> arg0 length))) - (set! (-> arg0 data 83 name) "texture") - (+! (-> arg0 data 83 count) (-> this length)) +(defmethod mem-usage ((this texture-page) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 84 (-> usage length))) + (set! (-> usage data 83 name) "texture") + (+! (-> usage data 83 count) (-> this length)) (let ((v1-7 (+ (asize-of this) (* (-> this dram-size) 4)))) (dotimes (a0-6 (-> this length)) (if (-> this data a0-6) (+! v1-7 112) ) ) - (+! (-> arg0 data 83 used) v1-7) - (+! (-> arg0 data 83 total) (logand -16 (+ v1-7 15))) + (+! (-> usage data 83 used) v1-7) + (+! (-> usage data 83 total) (logand -16 (+ v1-7 15))) ) this ) @@ -1814,7 +1814,7 @@ ;; definition for method 7 of type texture-page-dir ;; WARN: Return type mismatch texture-page-dir vs none. -(defmethod relocate ((this texture-page-dir) (arg0 kheap) (arg1 (pointer uint8))) +(defmethod relocate ((this texture-page-dir) (heap kheap) (name (pointer uint8))) (set! *texture-page-dir* this) (none) ) @@ -2513,7 +2513,3 @@ ;; definition for symbol *texture-pool*, type texture-pool (define *texture-pool* (new 'global 'texture-pool)) - - - - diff --git a/test/decompiler/reference/jak3/engine/physics/dynamics-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/dynamics-h_REF.gc new file mode 100644 index 0000000000..5c3d0f15f5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/dynamics-h_REF.gc @@ -0,0 +1,82 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type dynamics +(deftype dynamics (basic) + ((name symbol) + (gravity-max meters) + (gravity-length meters) + (gravity vector :inline) + (gravity-normal vector :inline) + (walk-distance meters) + (run-distance meters) + ) + (:methods + (set-gravity-length (_type_ float) none) + ) + ) + +;; definition for method 3 of type dynamics +(defmethod inspect ((this dynamics)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tgravity-max: (meters ~m)~%" (-> this gravity-max)) + (format #t "~1Tgravity-length: (meters ~m)~%" (-> this gravity-length)) + (format #t "~1Tgravity: ~`vector`P~%" (-> this gravity)) + (format #t "~1Tgravity-normal: ~`vector`P~%" (-> this gravity-normal)) + (format #t "~1Twalk-distance: (meters ~m)~%" (-> this walk-distance)) + (format #t "~1Trun-distance: (meters ~m)~%" (-> this run-distance)) + (label cfg-4) + this + ) + +;; definition for method 9 of type dynamics +;; WARN: Return type mismatch int vs none. +(defmethod set-gravity-length ((this dynamics) (arg0 float)) + (set! (-> this gravity-length) arg0) + (vector-float*! (-> this gravity) (-> this gravity-normal) arg0) + 0 + (none) + ) + +;; definition for function time-to-apex +(defun time-to-apex ((arg0 float) (arg1 float)) + (the int (/ arg0 (- (* 0.0033333334 arg1)))) + ) + +;; definition for function time-to-ground +(defun time-to-ground ((arg0 float) (arg1 float) (arg2 float)) + (let ((f0-0 0.0) + (v0-0 0) + ) + (while (< (- arg2) f0-0) + (set! arg0 (- arg0 (* 0.0033333334 arg1))) + (+! f0-0 (* 0.0033333334 arg0)) + (+! v0-0 1) + ) + v0-0 + ) + ) + +;; definition for symbol *standard-dynamics*, type dynamics +(define *standard-dynamics* (new 'static 'dynamics + :name 'standard + :gravity-max (meters 40) + :gravity-length (meters 60) + :gravity (new 'static 'vector :y 245760.0 :w 1.0) + :gravity-normal (new 'static 'vector :y 1.0 :w 1.0) + :walk-distance (meters 2) + :run-distance (meters 5) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/ps2/memcard-h_REF.gc b/test/decompiler/reference/jak3/engine/ps2/memcard-h_REF.gc new file mode 100644 index 0000000000..1737c9b80b --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ps2/memcard-h_REF.gc @@ -0,0 +1,168 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mc-handle +(deftype mc-handle (int32) + () + ) + +;; definition of type mc-file-info +(deftype mc-file-info (structure) + "Data stored in a save file." + ((present int32) + (blind-data float 16) + (blind-data-int8 int8 64 :overlay-at (-> blind-data 0)) + (level-index int32 :overlay-at (-> blind-data 0)) + (gem-count float :overlay-at (-> blind-data 1)) + (skill-count float :overlay-at (-> blind-data 2)) + (completion-percentage float :overlay-at (-> blind-data 3)) + (minute uint8 :overlay-at (-> blind-data 5)) + (hour uint8 :overlay-at (-> blind-data-int8 21)) + (week uint8 :overlay-at (-> blind-data-int8 22)) + (day uint8 :overlay-at (-> blind-data-int8 23)) + (month uint8 :overlay-at (-> blind-data 6)) + (year uint8 :overlay-at (-> blind-data-int8 25)) + (language uint8 :overlay-at (-> blind-data-int8 26)) + (game-time0 uint32 :overlay-at (-> blind-data 8)) + (game-time1 uint32 :overlay-at (-> blind-data 9)) + (purchase-secrets uint32 :overlay-at (-> blind-data 10)) + (secrets uint32 :overlay-at (-> blind-data 12)) + (features uint32 :overlay-at (-> blind-data 14)) + ) + :pack-me + ) + +;; definition for method 3 of type mc-file-info +(defmethod inspect ((this mc-file-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mc-file-info) + (format #t "~1Tpresent: ~D~%" (-> this present)) + (format #t "~1Tblind-data[16] @ #x~X~%" (-> this blind-data)) + (format #t "~1Tblind-data-int8[64] @ #x~X~%" (-> this blind-data)) + (format #t "~1Tlevel-index: ~D~%" (-> this level-index)) + (format #t "~1Tgem-count: ~f~%" (-> this gem-count)) + (format #t "~1Tskill-count: ~f~%" (-> this skill-count)) + (format #t "~1Tcompletion-percentage: ~f~%" (-> this completion-percentage)) + (format #t "~1Tminute: #x~X~%" (-> this minute)) + (format #t "~1Thour: #x~X~%" (-> this hour)) + (format #t "~1Tweek: #x~X~%" (-> this week)) + (format #t "~1Tday: #x~X~%" (-> this day)) + (format #t "~1Tmonth: #x~X~%" (-> this month)) + (format #t "~1Tyear: #x~X~%" (-> this year)) + (format #t "~1Tlanguage: ~D~%" (-> this language)) + (format #t "~1Tgame-time0: ~D~%" (-> this game-time0)) + (format #t "~1Tgame-time1: ~D~%" (-> this game-time1)) + (format #t "~1Tpurchase-secrets: #x~X~%" (&-> this purchase-secrets)) + (format #t "~1Tsecrets: #x~X~%" (&-> this secrets)) + (format #t "~1Tfeatures: #x~X~%" (&-> this features)) + (label cfg-4) + this + ) + +;; definition of type mc-slot-info +(deftype mc-slot-info (structure) + "Data about a memory card slot." + ((handle mc-handle) + (known int32) + (formatted int32) + (inited int32) + (last-file int32) + (mem-required int32) + (mem-actual int32) + (file mc-file-info 4 :inline) + ) + :pack-me + ) + +;; definition for method 3 of type mc-slot-info +(defmethod inspect ((this mc-slot-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mc-slot-info) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tknown: ~D~%" (-> this known)) + (format #t "~1Tformatted: ~D~%" (-> this formatted)) + (format #t "~1Tinited: ~D~%" (-> this inited)) + (format #t "~1Tlast-file: ~D~%" (-> this last-file)) + (format #t "~1Tmem-required: ~D~%" (-> this mem-required)) + (format #t "~1Tmem-actual: ~D~%" (-> this mem-actual)) + (format #t "~1Tfile[4] @ #x~X~%" (-> this file)) + (label cfg-4) + this + ) + +;; definition for function mc-sync +(defun mc-sync () + "Synchronize the memory card state." + (let ((v0-0 0)) + (while (zero? v0-0) + (mc-run) + (set! v0-0 (the-as int (mc-check-result))) + ) + v0-0 + ) + ) + +;; definition for function show-mc-info +;; WARN: Return type mismatch int vs none. +(defun show-mc-info ((buf dma-buffer)) + "Display the memory card debug text." + (let ((slot (new 'stack-no-clear 'mc-slot-info))) + (dotimes (slot-idx 2) + (mc-get-slot-info slot-idx slot) + (cond + ((zero? (-> slot known)) + (format (clear *temp-string*) "SLOT ~D: EXAMINING SLOT~%" slot-idx) + *temp-string* + ) + ((zero? (-> slot handle)) + (format (clear *temp-string*) "SLOT ~D: NO CARD~%" slot-idx) + *temp-string* + ) + ((zero? (-> slot formatted)) + (format (clear *temp-string*) "SLOT ~D: CARD [~D] : NOT FORMATTED~%" slot-idx (-> slot handle)) + *temp-string* + ) + ((zero? (-> slot inited)) + (format + (clear *temp-string*) + "SLOT ~D: CARD [~D] : NO FILE [~D/~D]~%" + slot-idx + (-> slot handle) + (-> slot mem-required) + (-> slot mem-actual) + ) + *temp-string* + ) + (else + (format (clear *temp-string*) "SLOT ~D: CARD [~D] : " slot-idx (-> slot handle)) + *temp-string* + (format + *temp-string* + "SAVES ~D ~D ~D ~D : LAST ~D~%" + (-> slot file 0 present) + (-> slot file 1 present) + (-> slot file 2 present) + (-> slot file 3 present) + (-> slot last-file) + ) + ) + ) + (draw-string-xy *temp-string* buf 32 (+ (* 12 slot-idx) 8) (font-color red) (font-flags shadow)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/sound/speech-h_REF.gc b/test/decompiler/reference/jak3/engine/sound/speech-h_REF.gc new file mode 100644 index 0000000000..e8c5ab555e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/sound/speech-h_REF.gc @@ -0,0 +1,170 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type speech-type-info +(deftype speech-type-info (structure) + ((channel uint8) + (flags speech-type-flag) + (priority int8) + (delay-pre-time uint16) + (request-timeout uint16) + (min-delay uint16) + (max-delay uint16) + (delay uint16) + (play-index int16) + (list (array string)) + (time uint64) + ) + ) + +;; definition for method 3 of type speech-type-info +(defmethod inspect ((this speech-type-info)) + (when (not this) + (set! this this) + (goto cfg-12) + ) + (format #t "[~8x] ~A~%" this 'speech-type-info) + (format #t "~1Tchannel: ~D~%" (-> this channel)) + (format #t "~1Tflags: #x~X : (speech-type-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (speech-type-flag linked-next)) (speech-type-flag linked-next)) + (format #t "linked-next ") + ) + (if (= (logand s5-0 (speech-type-flag first-time)) (speech-type-flag first-time)) + (format #t "first-time ") + ) + (if (= (logand s5-0 (speech-type-flag random-order)) (speech-type-flag random-order)) + (format #t "random-order ") + ) + (if (= (logand s5-0 (speech-type-flag skip-first-time)) (speech-type-flag skip-first-time)) + (format #t "skip-first-time ") + ) + ) + (format #t ")~%") + (format #t "~1Tpriority: ~D~%" (-> this priority)) + (format #t "~1Tdelay-pre-time: ~D~%" (-> this delay-pre-time)) + (format #t "~1Trequest-timeout: ~D~%" (-> this request-timeout)) + (format #t "~1Tmin-delay: ~D~%" (-> this min-delay)) + (format #t "~1Tmax-delay: ~D~%" (-> this max-delay)) + (format #t "~1Tdelay: ~D~%" (-> this delay)) + (format #t "~1Tplay-index: ~D~%" (-> this play-index)) + (format #t "~1Tlist: ~A~%" (-> this list)) + (format #t "~1Ttime: ~D~%" (-> this time)) + (label cfg-12) + this + ) + +;; definition of type speech-request +(deftype speech-request (structure) + ((handle handle) + (time time-frame) + (priority float) + (speech-type speech-type) + ) + :pack-me + ) + +;; definition for method 3 of type speech-request +(defmethod inspect ((this speech-request)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'speech-request) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Ttime: ~D~%" (-> this time)) + (format #t "~1Tpriority: ~f~%" (-> this priority)) + (format #t "~1Tspeech-type: ~D~%" (-> this speech-type)) + (label cfg-4) + this + ) + +;; definition of type speech-channel +(deftype speech-channel (structure) + ((flags speech-channel-flag) + (gui-channel gui-channel) + (delay uint16) + (id sound-id) + (update-time time-frame) + (start-time time-frame) + (end-time time-frame) + (request speech-request :inline) + (last-request speech-request :inline) + (target-pos vector :inline) + (speech-table (pointer speech-type-info)) + ) + (:methods + (speech-channel-method-9 () none) + (speech-channel-method-10 () none) + (speech-channel-method-11 () none) + (speech-channel-method-12 () none) + (speech-channel-method-13 () none) + (speech-channel-method-14 () none) + ) + ) + +;; definition for method 3 of type speech-channel +(defmethod inspect ((this speech-channel)) + (when (not this) + (set! this this) + (goto cfg-6) + ) + (format #t "[~8x] ~A~%" this 'speech-channel) + (format #t "~1Tflags: #x~X : (speech-channel-flag " (-> this flags)) + (let ((a0-3 (-> this flags))) + (if (= (logand a0-3 (speech-channel-flag disable)) (speech-channel-flag disable)) + (format #t "disable ") + ) + ) + (format #t ")~%") + (format #t "~1Tgui-channel: ~D~%" (-> this gui-channel)) + (format #t "~1Tdelay: ~D~%" (-> this delay)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tupdate-time: ~D~%" (-> this update-time)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tend-time: ~D~%" (-> this end-time)) + (format #t "~1Trequest: #~%" (-> this request)) + (format #t "~1Tlast-request: #~%" (-> this last-request)) + (format #t "~1Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~1Tspeech-table: #x~X~%" (-> this speech-table)) + (label cfg-6) + this + ) + +;; definition of type speech-control +(deftype speech-control (structure) + ((channel-array speech-channel 2 :inline) + (speech-table speech-type-info 61) + ) + (:methods + (speech-control-method-9 () none) + (speech-control-method-10 () none) + (speech-control-method-11 () none) + (speech-control-method-12 () none) + (speech-control-method-13 () none) + (speech-control-method-14 () none) + (speech-control-method-15 () none) + (speech-control-method-16 () none) + (speech-control-method-17 () none) + ) + ) + +;; definition for method 3 of type speech-control +(defmethod inspect ((this speech-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'speech-control) + (format #t "~1Tchannel-array[2] @ #x~X~%" (-> this channel-array)) + (format #t "~1Tspeech-table[61] @ #x~X~%" (-> this speech-table)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/target/surface-h_REF.gc b/test/decompiler/reference/jak3/engine/target/surface-h_REF.gc new file mode 100644 index 0000000000..c5d5247568 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/surface-h_REF.gc @@ -0,0 +1,1376 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type surface +(deftype surface (basic) + "Definition of a bunch of parameters for different types of surfaces. +Parameters include values such as max speed, friction, callback functions that run +on impact, during touch, on exit, etc." + ((name symbol) + (data float 30) + (turnv float :overlay-at (-> data 0)) + (turnvf float :overlay-at (-> data 23)) + (turnvv float :overlay-at (-> data 1)) + (turnvvf float :overlay-at (-> data 24)) + (tiltv float :overlay-at (-> data 2)) + (tiltvf float :overlay-at (-> data 25)) + (tiltvv float :overlay-at (-> data 3)) + (tiltvvf float :overlay-at (-> data 26)) + (vel-turn float :overlay-at (-> data 27)) + (transv-max float :overlay-at (-> data 4)) + (target-speed float :overlay-at (-> data 5)) + (seek0 float :overlay-at (-> data 6)) + (seek90 float :overlay-at (-> data 7)) + (seek180 float :overlay-at (-> data 8)) + (fric float :overlay-at (-> data 9)) + (nonlin-fric-dist float :overlay-at (-> data 10)) + (slip-factor float :overlay-at (-> data 11)) + (slide-factor float :overlay-at (-> data 12)) + (slope-up-factor float :overlay-at (-> data 13)) + (slope-down-factor float :overlay-at (-> data 14)) + (slope-slip-angle float :overlay-at (-> data 15)) + (impact-fric float :overlay-at (-> data 16)) + (bend-factor float :overlay-at (-> data 17)) + (bend-speed float :overlay-at (-> data 18)) + (alignv float :overlay-at (-> data 19)) + (slope-up-traction float :overlay-at (-> data 20)) + (align-speed float :overlay-at (-> data 21)) + (slope-change-preserve float :overlay-at (-> data 22)) + (hook function 5) + (active-hook (function none) :overlay-at (-> hook 0)) + (touch-hook (function none) :overlay-at (-> hook 1)) + (impact-hook (function control-info (pointer float) vector none) :overlay-at (-> hook 2)) + (mult-hook (function surface surface surface int none) :overlay-at (-> hook 3)) + (exit-hook function :overlay-at (-> hook 4)) + (dataw uint32 2) + (mode symbol :overlay-at (-> dataw 0)) + (flags surface-flag :overlay-at (-> dataw 1)) + ) + ) + +;; definition for method 3 of type surface +(defmethod inspect ((this surface)) + (when (not this) + (set! this this) + (goto cfg-64) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tdata[30] @ #x~X~%" (&-> this turnv)) + (format #t "~1Tturnv: ~f~%" (-> this turnv)) + (format #t "~1Tturnvf: ~f~%" (-> this turnvf)) + (format #t "~1Tturnvv: ~f~%" (-> this turnvv)) + (format #t "~1Tturnvvf: ~f~%" (-> this turnvvf)) + (format #t "~1Ttiltv: ~f~%" (-> this tiltv)) + (format #t "~1Ttiltvf: ~f~%" (-> this tiltvf)) + (format #t "~1Ttiltvv: ~f~%" (-> this tiltvv)) + (format #t "~1Ttiltvvf: ~f~%" (-> this tiltvvf)) + (format #t "~1Tvel-turn: ~f~%" (-> this vel-turn)) + (format #t "~1Ttransv-max: ~f~%" (-> this transv-max)) + (format #t "~1Ttarget-speed: ~f~%" (-> this target-speed)) + (format #t "~1Tseek0: ~f~%" (-> this seek0)) + (format #t "~1Tseek90: ~f~%" (-> this seek90)) + (format #t "~1Tseek180: ~f~%" (-> this seek180)) + (format #t "~1Tfric: ~f~%" (-> this fric)) + (format #t "~1Tnonlin-fric-dist: ~f~%" (-> this nonlin-fric-dist)) + (format #t "~1Tslip-factor: ~f~%" (-> this slip-factor)) + (format #t "~1Tslide-factor: ~f~%" (-> this slide-factor)) + (format #t "~1Tslope-up-factor: ~f~%" (-> this slope-up-factor)) + (format #t "~1Tslope-down-factor: ~f~%" (-> this slope-down-factor)) + (format #t "~1Tslope-slip-angle: ~f~%" (-> this slope-slip-angle)) + (format #t "~1Timpact-fric: ~f~%" (-> this impact-fric)) + (format #t "~1Tbend-factor: ~f~%" (-> this bend-factor)) + (format #t "~1Tbend-speed: ~f~%" (-> this bend-speed)) + (format #t "~1Talignv: ~f~%" (-> this alignv)) + (format #t "~1Tslope-up-traction: ~f~%" (-> this slope-up-traction)) + (format #t "~1Talign-speed: ~f~%" (-> this align-speed)) + (format #t "~1Tslope-change-preserve: ~f~%" (-> this slope-change-preserve)) + (format #t "~1Thook[5] @ #x~X~%" (-> this hook)) + (format #t "~1Tactive-hook: ~A~%" (-> this active-hook)) + (format #t "~1Ttouch-hook: ~A~%" (-> this touch-hook)) + (format #t "~1Timpact-hook: ~A~%" (-> this impact-hook)) + (format #t "~1Tmult-hook: ~A~%" (-> this mult-hook)) + (format #t "~1Texit-hook: ~A~%" (-> this exit-hook)) + (format #t "~1Tdataw[2] @ #x~X~%" (&-> this mode)) + (format #t "~1Tmode: ~A~%" (-> this mode)) + (format #t "~1Tflags: #x~X : (surface-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand (surface-flag gun-inactive) s5-0) (surface-flag gun-inactive)) + (format #t "gun-inactive ") + ) + (if (= (logand s5-0 (surface-flag momentum)) (surface-flag momentum)) + (format #t "momentum ") + ) + (if (= (logand (surface-flag sf29) s5-0) (surface-flag sf29)) + (format #t "no-change-gun ") + ) + (if (= (logand (surface-flag no-board) s5-0) (surface-flag no-board)) + (format #t "no-board ") + ) + (if (= (logand s5-0 (surface-flag xz-local)) (surface-flag xz-local)) + (format #t "xz-local ") + ) + (if (= (logand s5-0 (surface-flag no-feet)) (surface-flag no-feet)) + (format #t "no-feet ") + ) + (if (= (logand (surface-flag gun-direct) s5-0) (surface-flag gun-direct)) + (format #t "gun-direct ") + ) + (if (= (logand s5-0 (surface-flag turn-to-vel)) (surface-flag turn-to-vel)) + (format #t "turn-to-vel ") + ) + (if (= (logand (surface-flag gun-strafe) s5-0) (surface-flag gun-strafe)) + (format #t "gun-strafe ") + ) + (if (= (logand (surface-flag gun-fast-exit) s5-0) (surface-flag gun-fast-exit)) + (format #t "gun-fast-exit ") + ) + (if (= (logand s5-0 (surface-flag attack)) (surface-flag attack)) + (format #t "attack ") + ) + (if (= (logand s5-0 (surface-flag turn-to-pad)) (surface-flag turn-to-pad)) + (format #t "turn-to-pad ") + ) + (if (= (logand (surface-flag spin) s5-0) (surface-flag spin)) + (format #t "spin ") + ) + (if (= (logand s5-0 (surface-flag no-jump)) (surface-flag no-jump)) + (format #t "no-jump ") + ) + (if (= (logand s5-0 (surface-flag look-around)) (surface-flag look-around)) + (format #t "look-around ") + ) + (if (= (logand (surface-flag gun-off) s5-0) (surface-flag gun-off)) + (format #t "gun-off ") + ) + (if (= (logand (surface-flag gun-turn-fast) s5-0) (surface-flag gun-turn-fast)) + (format #t "gun-turn-fast ") + ) + (if (= (logand s5-0 (surface-flag turn-when-centered)) (surface-flag turn-when-centered)) + (format #t "turn-when-centered ") + ) + (if (= (logand (surface-flag laser-hide) s5-0) (surface-flag laser-hide)) + (format #t "laser-hide ") + ) + (if (= (logand (surface-flag turn-to-alt) s5-0) (surface-flag turn-to-alt)) + (format #t "turn-to-alt ") + ) + (if (= (logand s5-0 (surface-flag no-attack)) (surface-flag no-attack)) + (format #t "no-attack ") + ) + (if (= (logand (surface-flag gun-no-twist) s5-0) (surface-flag gun-no-twist)) + (format #t "gun-no-twist ") + ) + (if (= (logand s5-0 (surface-flag air)) (surface-flag air)) + (format #t "air ") + ) + (if (= (logand s5-0 (surface-flag duck)) (surface-flag duck)) + (format #t "duck ") + ) + (if (= (logand s5-0 (surface-flag no-turn-around)) (surface-flag no-turn-around)) + (format #t "no-turn-around ") + ) + (if (= (logand s5-0 (surface-flag no-hands)) (surface-flag no-hands)) + (format #t "no-hands ") + ) + (if (= (logand (surface-flag gun-hide) s5-0) (surface-flag gun-hide)) + (format #t "gun-hide ") + ) + (if (= (logand s5-0 (surface-flag check-edge)) (surface-flag check-edge)) + (format #t "check-edge ") + ) + (if (= (logand (surface-flag super) s5-0) (surface-flag super)) + (format #t "super ") + ) + (if (= (logand s5-0 (surface-flag smooth-collision)) (surface-flag smooth-collision)) + (format #t "smooth-collision ") + ) + ) + (format #t ")~%") + (label cfg-64) + this + ) + +;; definition for function calc-terminal-vel +(defun calc-terminal-vel ((arg0 float) (arg1 float) (arg2 float)) + (- (* (/ (- (* 0.016666668 arg0) arg1) arg2) (- 1.0 arg2)) arg1) + ) + +;; definition for function calc-terminal2-vel +(defun calc-terminal2-vel ((arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (let ((f0-4 (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2)))) + (- f0-4 (+ arg1 (* arg2 (* f0-4 f0-4)))) + ) + ) + +;; definition for function calc-terminal4-vel +(defun calc-terminal4-vel ((arg0 float) (arg1 float) (arg2 float)) + (let ((f0-5 (sqrtf (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2))))) + (- f0-5 (+ arg1 (* arg2 (* f0-5 f0-5 f0-5 f0-5)))) + ) + ) + +;; definition for method 2 of type surface +;; ERROR: Function may read a register that is not set: t3 +(defmethod print ((this surface)) + (local-vars (t3-0 none)) + (format + #t + "# this turnv) + (-> this turnvv) + (-> this tiltv) + (-> this tiltvv) + (-> this transv-max) + t3-0 + ) + (format #t " tm:~m rv:~R rvv:~R @ #x~X>" (-> this target-speed) (-> this seek0) (-> this seek90) this) + this + ) + +;; definition for function surface-interp! +(defun surface-interp! ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 float)) + (dotimes (v1-0 30) + (set! (-> arg0 data v1-0) (+ (* (-> arg2 data v1-0) arg3) (* (-> arg1 data v1-0) (- 1.0 arg3)))) + ) + (dotimes (v1-3 5) + (set! (-> arg0 hook v1-3) (cond + ((and (nonzero? (-> arg2 hook v1-3)) (!= (-> arg2 hook v1-3) nothing)) + (-> arg2 hook v1-3) + ) + ((and (nonzero? (-> arg1 hook v1-3)) (!= (-> arg1 hook v1-3) nothing)) + (-> arg1 hook v1-3) + ) + (else + nothing + ) + ) + ) + ) + (dotimes (v1-6 2) + (set! (-> arg0 dataw v1-6) (-> arg2 dataw v1-6)) + ) + arg0 + ) + +;; definition for function surface-mult! +(defun surface-mult! ((arg0 surface) (arg1 surface) (arg2 surface)) + (dotimes (v1-0 30) + (set! (-> arg0 data v1-0) (* (-> arg2 data v1-0) (-> arg1 data v1-0))) + ) + (dotimes (v1-3 5) + (set! (-> arg0 hook v1-3) (cond + ((and (nonzero? (-> arg2 hook v1-3)) (!= (-> arg2 hook v1-3) nothing)) + (-> arg2 hook v1-3) + ) + ((and (nonzero? (-> arg1 hook v1-3)) (!= (-> arg1 hook v1-3) nothing)) + (-> arg1 hook v1-3) + ) + (else + nothing + ) + ) + ) + ) + (dotimes (v1-6 2) + (set! (-> arg0 dataw v1-6) (-> arg2 dataw v1-6)) + ) + (set! (-> arg0 flags) (logior (-> arg1 flags) (-> arg2 flags))) + ((-> arg0 mult-hook) arg0 arg1 arg2 1) + arg0 + ) + +;; definition for function surface-clamp-speed +;; WARN: Return type mismatch float vs none. +(defun surface-clamp-speed ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (when (= arg3 1) + (set! (-> arg0 transv-max) (fmin (-> arg0 transv-max) (-> arg1 transv-max))) + (set! (-> arg0 target-speed) (fmin (-> arg0 target-speed) (-> arg1 target-speed))) + ) + (none) + ) + +;; definition for symbol *walk-mods*, type surface +(define *walk-mods* (new 'static 'surface + :name 'run + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag look-around) + ) + ) + +;; definition for symbol *walk-no-turn-mods*, type surface +(define *walk-no-turn-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + ) + ) + +;; definition for symbol *turn-around-mods*, type surface +(define *turn-around-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :fric 0.1 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around) + ) + ) + +;; definition for symbol *jump-mods*, type surface +(define *jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *double-jump-mods*, type surface +(define *double-jump-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 32768.0 + :target-speed 32768.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *smack-jump-mods*, type surface +(define *smack-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air gun-inactive) + ) + ) + +;; definition for symbol *high-jump-mods*, type surface +(define *high-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 26624.0 + :target-speed 26624.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *launch-jump-mods*, type surface +(define *launch-jump-mods* (new 'static 'surface + :name 'launch-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 61440.0 + :target-speed 61440.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag no-attack check-edge air) + ) + ) + +;; definition for symbol *forward-high-jump-mods*, type surface +(define *forward-high-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 45056.0 + :target-speed 45056.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *flip-jump-mods*, type surface +(define *flip-jump-mods* (new 'static 'surface + :name 'high-jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 65536.0 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 80281.6 + :target-speed 51200.0 + :seek0 0.9 + :seek90 0.9 + :seek180 0.9 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *forward-jump-mods*, type surface +(define *forward-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 65536.0 + :target-speed 65536.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air) + ) + ) + +;; definition for symbol *forward-pole-jump-mods*, type surface +(define *forward-pole-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 53248.0 + :target-speed 53248.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag check-edge air gun-hide gun-fast-exit) + ) + ) + +;; failed to figure out what this is: +(let ((v1-20 (copy *jump-mods* 'global))) + (set! (-> v1-20 flags) (surface-flag check-edge air super)) + (set! (-> v1-20 name) 'high-jump) + (set! (-> v1-20 target-speed) 245760.0) + (set! (-> v1-20 transv-max) 245760.0) + (set! (-> v1-20 seek0) 0.9) + (set! *dark-jump-mods* v1-20) + ) + +;; definition for symbol *roll-mods*, type surface +(define *roll-mods* (new 'static 'surface + :name 'roll + :turnv 131072.0 + :turnvf 30.0 + :turnvv 5461.3335 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 11468.8 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag no-turn-around attack gun-inactive gun-no-twist no-board) + ) + ) + +;; definition for symbol *roll-flip-mods*, type surface +(define *roll-flip-mods* + (new 'static 'surface + :name 'roll-flip + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 103219.195 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag no-turn-around check-edge air attack gun-inactive gun-no-twist no-board) + ) + ) + +;; definition for symbol *flop-mods*, type surface +(define *flop-mods* (new 'static 'surface + :name 'flop + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 0.3 + :seek180 1.5 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'attack + :flags (surface-flag air attack gun-inactive gun-no-twist) + ) + ) + +;; failed to figure out what this is: +(let ((a0-9 (new 'static 'surface + :name 'flop + :turnv 9102.223 + :turnvf 30.0 + :turnvv 9102.223 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.1 + :seek180 0.15 + :fric 0.2 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'air + :flags (surface-flag air gun-inactive gun-no-twist) + ) + ) + ) + (set! (-> a0-9 mult-hook) surface-clamp-speed) + (set! *flop-land-mods* a0-9) + ) + +;; definition for symbol *wade-mods*, type surface +(define *wade-mods* (new 'static 'surface + :name 'wade + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.0 + :seek90 0.5 + :seek180 0.5 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'wade + :flags (surface-flag look-around) + ) + ) + +;; definition for symbol *swim-mods*, type surface +(define *swim-mods* (new 'static 'surface + :name 'swim + :turnv 49152.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 28672.0 + :target-speed 28672.0 + :seek0 0.75 + :seek90 0.2 + :seek180 0.2 + :fric 0.05 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'swim + :flags (surface-flag gun-off) + ) + ) + +;; definition for symbol *dive-mods*, type surface +(define *dive-mods* (new 'static 'surface + :name 'swim + :turnv 21845.334 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 20480.0 + :target-speed 20480.0 + :seek0 0.05 + :seek90 0.05 + :seek180 0.05 + :fric 1.0 + :nonlin-fric-dist 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :align-speed 1.0 + :mode 'dive + :flags (surface-flag xz-local gun-off gun-fast-exit) + ) + ) + +;; definition for symbol *dive-bottom-mods*, type surface +(define *dive-bottom-mods* (new 'static 'surface + :name 'swim-bottom + :turnv 21845.334 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 20480.0 + :target-speed 20480.0 + :seek0 0.1 + :seek90 0.05 + :seek180 0.05 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :mode 'dive + :flags (surface-flag xz-local gun-off gun-fast-exit) + ) + ) + +;; failed to figure out what this is: +(let ((v1-30 (copy *walk-mods* 'global))) + (set! (-> v1-30 name) 'pole) + (set! (-> v1-30 flags) (surface-flag gun-hide gun-fast-exit)) + (set! *pole-mods* v1-30) + ) + +;; failed to figure out what this is: +(let ((v1-32 (copy *walk-mods* 'global))) + (set! (-> v1-32 name) 'grab) + (set! (-> v1-32 flags) (surface-flag sf29)) + (set! *grab-mods* v1-32) + ) + +;; failed to figure out what this is: +(let ((v1-34 (copy *walk-mods* 'global))) + (set! (-> v1-34 name) 'edge-grab) + (set! (-> v1-34 flags) (surface-flag gun-inactive gun-no-twist sf29)) + (set! *edge-grab-mods* v1-34) + ) + +;; definition for symbol *empty-mods*, type surface +(define *empty-mods* (new 'static 'surface + :name 'empty + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :flags (surface-flag gun-off) + ) + ) + +;; definition for symbol *empty-mods-allow-gun*, type surface +(define *empty-mods-allow-gun* (new 'static 'surface + :name 'empty + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :flags (surface-flag gun-inactive gun-no-twist sf29) + ) + ) + +;; definition for symbol *neutral-mods*, type surface +(define *neutral-mods* (new 'static 'surface + :name 'walk + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + ) + ) + +;; failed to figure out what this is: +(let ((v1-38 (new 'static 'surface + :name '*stone-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *stone-surface* v1-38) + (set! (-> v1-38 exit-hook) nothing) + (set! (-> v1-38 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-38 touch-hook) nothing) + (set! (-> v1-38 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-39 (new 'static 'surface + :name '*mushroom-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 0.25 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *mushroom-surface* v1-39) + (set! (-> v1-39 exit-hook) nothing) + (set! (-> v1-39 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-39 touch-hook) (lambda () (mushroom-surface-touch) (none))) + (set! (-> v1-39 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-40 (new 'static 'surface + :name '*gravel-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-down-factor 32768.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + ) + ) + ) + (set! *gravel-surface* v1-40) + (set! (-> v1-40 exit-hook) nothing) + (set! (-> v1-40 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-40 touch-hook) (lambda () (gravel-surface-touch) (none))) + (set! (-> v1-40 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-41 (new 'static 'surface + :name '*edge-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 30720.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 18432.0 + :slope-slip-angle 10922.667 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :align-speed 1.0 + ) + ) + ) + (set! *edge-surface* v1-41) + (set! (-> v1-41 exit-hook) nothing) + (set! (-> v1-41 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-41 touch-hook) nothing) + (set! (-> v1-41 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-42 (new 'static 'surface + :name '*wade-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.7 + :target-speed 0.7 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.6 + :slope-up-traction 1.0 + :align-speed 0.6 + ) + ) + ) + (set! *wade-surface* v1-42) + (set! (-> v1-42 exit-hook) nothing) + (set! (-> v1-42 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-42 touch-hook) nothing) + (set! (-> v1-42 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-43 (new 'static 'surface + :name '*quicksand-surface* + :turnv 0.25 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.5 + :target-speed 0.5 + :seek0 81920.0 + :seek90 83968.0 + :seek180 165888.0 + :fric 329728.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 1.0 + :align-speed 0.5 + ) + ) + ) + (set! *quicksand-surface* v1-43) + (set! (-> v1-43 exit-hook) nothing) + (set! (-> v1-43 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-43 touch-hook) nothing) + (set! (-> v1-43 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-44 (new 'static 'surface + :name '*tar-surface* + :turnv 0.25 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 0.4 + :target-speed 0.4 + :seek0 81920.0 + :seek90 83968.0 + :seek180 165888.0 + :fric 329728.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 1.0 + :align-speed 0.5 + ) + ) + ) + (set! *tar-surface* v1-44) + (set! (-> v1-44 exit-hook) nothing) + (set! (-> v1-44 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-44 touch-hook) nothing) + (set! (-> v1-44 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-45 (new 'static 'surface + :name '*ice-surface* + :turnv 0.5 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.5 + :target-speed 1.5 + :seek0 24576.0 + :seek90 24576.0 + :seek180 24576.0 + :fric 23756.8 + :nonlin-fric-dist 4091904.0 + :slip-factor 0.7 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-pad) + ) + ) + ) + (set! *ice-surface* v1-45) + (set! (-> v1-45 exit-hook) nothing) + (set! (-> v1-45 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-45 touch-hook) nothing) + (set! (-> v1-45 active-hook) nothing) + ) + +;; failed to figure out what this is: +(let ((v1-46 (new 'static 'surface + :name '*rail-surface* + :turnv 1.0 + :turnvf 1.0 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :vel-turn 1.0 + :transv-max 1.0 + :target-speed 1.0 + :seek0 153600.0 + :seek90 153600.0 + :seek180 256000.0 + :fric 153600.0 + :nonlin-fric-dist 5120.0 + :slip-factor 1.0 + :slope-down-factor 10240.0 + :slope-slip-angle 10922.667 + :impact-fric 1.0 + :bend-factor 0.8 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :slope-change-preserve 1.0 + :flags (surface-flag no-attack) + ) + ) + ) + (set! *rail-surface* v1-46) + (set! (-> v1-46 exit-hook) nothing) + (set! (-> v1-46 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-46 touch-hook) (lambda () (rail-surface-touch) (none))) + (set! (-> v1-46 active-hook) nothing) + ) + +;; definition for symbol *standard-ground-surface*, type surface +(define *standard-ground-surface* *stone-surface*) + +;; definition for symbol *swim-surface*, type surface +(define *swim-surface* *stone-surface*) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/util/smush-control-h_REF.gc b/test/decompiler/reference/jak3/engine/util/smush-control-h_REF.gc new file mode 100644 index 0000000000..594388c77e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/util/smush-control-h_REF.gc @@ -0,0 +1,145 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type smush-control +(deftype smush-control (structure) + "This holds information about the current state of an object's smush." + ((start-time time-frame) + (period float) + (duration float) + (amp float) + (damp-amp float) + (damp-period float) + (ticks float) + ) + (:methods + (set-zero! (_type_) _type_) + (update! (_type_) float) + (get-no-update (_type_) float) + (activate! (_type_ float int int float float clock) _type_) + (nonzero-amplitude? (_type_) symbol) + (die-on-next-update! (_type_) _type_) + ) + ) + +;; definition for method 3 of type smush-control +(defmethod inspect ((this smush-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'smush-control) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tperiod: ~f~%" (-> this period)) + (format #t "~1Tduration: ~f~%" (-> this duration)) + (format #t "~1Tamp: ~f~%" (-> this amp)) + (format #t "~1Tdamp-amp: ~f~%" (-> this damp-amp)) + (format #t "~1Tdamp-period: ~f~%" (-> this damp-period)) + (format #t "~1Tticks: ~f~%" (-> this ticks)) + (label cfg-4) + this + ) + +;; definition for method 13 of type smush-control +(defmethod nonzero-amplitude? ((this smush-control)) + "Is the smush currently active?" + (!= (-> this amp) 0.0) + ) + +;; definition for method 9 of type smush-control +(defmethod set-zero! ((this smush-control)) + "Reset this [[smush-control]]." + (set! (-> this period) 0.0) + (set! (-> this duration) 0.0) + (set! (-> this amp) 0.0) + (set! (-> this damp-amp) 0.0) + (set! (-> this damp-period) 0.0) + (set! (-> this ticks) 0.0) + this + ) + +;; definition for method 10 of type smush-control +(defmethod update! ((this smush-control)) + "Calculate the next smush amplitude and update the smush state." + (cond + ((!= (-> this amp) 0.0) + (let* ((elapsed-time (the float (- (current-time) (-> this start-time)))) + (period (-> this period)) + (f28-0 (- elapsed-time (* (the float (the int (/ elapsed-time period))) period))) + ) + (when (>= (- elapsed-time (-> this ticks)) (-> this period)) + (set! (-> this amp) (* (-> this amp) (-> this damp-amp))) + (set! (-> this period) (* (-> this period) (-> this damp-period))) + (set! (-> this ticks) elapsed-time) + (if (< (-> this damp-period) 0.0) + (set-zero! this) + ) + ) + (if (>= elapsed-time (-> this duration)) + (set-zero! this) + ) + (* (sin (/ (* 65536.0 f28-0) (-> this period))) + (* (-> this amp) (/ (- (-> this duration) elapsed-time) (-> this duration))) + ) + ) + ) + (else + 0.0 + ) + ) + ) + +;; definition for method 11 of type smush-control +(defmethod get-no-update ((this smush-control)) + "Get the next amplitude, but do not update the smush state." + (cond + ((!= (-> this amp) 0.0) + (let* ((elapsed-time (the float (- (current-time) (-> this start-time)))) + (period (-> this period)) + (f0-4 (- elapsed-time (* (the float (the int (/ elapsed-time period))) period))) + ) + (* (sin (/ (* 65536.0 f0-4) (-> this period))) + (* (-> this amp) (/ (- (-> this duration) elapsed-time) (-> this duration))) + ) + ) + ) + (else + 0.0 + ) + ) + ) + +;; definition for method 14 of type smush-control +(defmethod die-on-next-update! ((this smush-control)) + "Set the dampening period so the smush stops on the next update." + (if (!= (-> this amp) 0.0) + (set! (-> this damp-period) -1.0) + ) + this + ) + +;; definition for method 12 of type smush-control +(defmethod activate! ((this smush-control) + (amplitude float) + (period int) + (duration int) + (damp-amplitude float) + (damp-period float) + (clock clock) + ) + "Start the smush with the given parameters." + (when (>= (fabs (* 0.2 (-> this amp))) (fabs (get-no-update this))) + (set! (-> this amp) amplitude) + (set! (-> this period) (the float period)) + (set! (-> this duration) (the float duration)) + (set! (-> this damp-amp) damp-amplitude) + (set! (-> this damp-period) damp-period) + (set! (-> this ticks) 0.0) + (set! (-> this start-time) (-> clock frame-counter)) + ) + this + ) + + + + diff --git a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc index 544aadca6d..8d5f200fba 100644 --- a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc @@ -26,7 +26,7 @@ (define *last-loado-debug-usage* 0) ;; definition for method 7 of type object -(defmethod relocate ((this object) (arg0 int)) +(defmethod relocate ((this object) (offset int)) this ) @@ -1805,7 +1805,3 @@ ;; failed to figure out what this is: (kmemclose) - - - -