diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index 2d454e5faa..9e606cd051 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -654,9 +654,9 @@ void SimpleExpressionElement::update_from_stack_float_2(const Env& env, } else { auto type0 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(0).var().reg()); auto type1 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(1).var().reg()); - throw std::runtime_error( - fmt::format("Floating point math attempted on invalid types: {} and {} in op {}.", - type0.print(), type1.print(), to_string(env))); + throw std::runtime_error(fmt::format( + "[OP: {}] - Floating point math attempted on invalid types: {} and {} in op {}.", m_my_idx, + type0.print(), type1.print(), to_string(env))); } } diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 319ff271c0..eebcd72416 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -990,7 +990,7 @@ (define-extern process-tree type) ; deftype provided by C Kernel (declare-type process basic) - +(declare-type res-lump basic) (deftype process-tree (basic) ((name basic :offset-assert 4) (mask process-mask :offset-assert 8) @@ -1004,7 +1004,7 @@ (new (symbol type basic) _type_ 0) (activate (_type_ process-tree basic pointer) process-tree 9) (deactivate (_type_) none 10) - (dummy-method-11 (_type_ object) none 11) + (copy-defaults! (_type_ res-lump) none 11) (run-logic? (_type_) symbol 12) (dummy-method () none 13) ) @@ -1247,11 +1247,6 @@ ) (:methods (new (symbol type basic int) _type_ 0) - (activate (_type_ process-tree basic pointer) process-tree 9) - (deactivate (process) none 10) - (dummy-method-11 (_type_ object) none 11) - (run-logic? (process) symbol 12) - (dummy-method () none 13) ) :size-assert #x70 :method-count-assert 14 @@ -10687,12 +10682,13 @@ :flag-assert #x900000020 ) +(declare-type collide-shape-prim basic) (deftype collide-shape-intersect (basic) ((move-vec vector :inline :offset-assert 16) (best-u float :offset-assert 32) (best-tri collide-tri-result :inline :offset-assert 48) - (best-from-prim basic :offset-assert 132) - (best-to-prim basic :offset-assert 136) + (best-from-prim collide-shape-prim :offset-assert 132) + (best-to-prim collide-shape-prim :offset-assert 136) ) :method-count-assert 10 :size-assert #x8c @@ -10702,10 +10698,11 @@ ) ) +(declare-type collide-shape-prim basic) (deftype collide-overlap-result (structure) ((best-dist float :offset-assert 0) - (best-from-prim basic :offset-assert 4) - (best-to-prim basic :offset-assert 8) + (best-from-prim collide-shape-prim :offset-assert 4) + (best-to-prim collide-shape-prim :offset-assert 8) (best-from-tri collide-tri-result :inline :offset-assert 16) ) :method-count-assert 10 @@ -15361,7 +15358,7 @@ (define-extern ripple-execute (function none)) (define-extern ripple-matrix-scale function) (define-extern ripple-add-debug-sphere (function process-drawable vector float float none)) ; TODO - this could be a child type of process-drawable instead -(define-extern ripple-find-height (function process-drawable basic vector float)) +(define-extern ripple-find-height (function process-drawable int vector float)) ;; - Symbols @@ -17744,13 +17741,13 @@ (:methods (water-vol-idle () none 20) ;; state (water-vol-startup () none 21) ;; state - (dummy-22 () none 22) + (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (dummy-25 () none 25) + (TODO-RENAME-25 (_type_) quaternion 25) (dummy-26 () none 26) (dummy-27 () none 27) - (dummy-28 () none 28) + (get-ripple-height (_type_ vector) float 28) (dummy-29 () none 29) ) ) @@ -19888,7 +19885,7 @@ (define-extern splash-spawn function) (define-extern part-water-splash-callback function) -(define-extern ocean-get-height function) +(define-extern ocean-get-height (function vector float)) (define-extern birth-func-y->userdata function) (define-extern birth-func-ocean-height function) (define-extern check-water-level-drop function) @@ -21818,20 +21815,20 @@ :size-assert #x1a8 :flag-assert #x17000001a8 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 () none 13) - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 () none 16) - (dummy-17 () none 17) - (dummy-18 () none 18) - (dummy-19 () none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) + (TODO-RENAME-9 (_type_ float float float float) none 9) + (dummy-10 (_type_ float) none 10) + (clear-force-torque! (_type_) none 11) + (clear-momentum! (_type_) none 12) + (TODO-RENAME-13 (_type_ vector vector) none 13) + (TODO-RENAME-14 (_type_ vector vector) none 14) + (TODO-RENAME-15 (_type_ vector) none 15) + (TODO-RENAME-16 (_type_ vector vector float) none 16) + (TODO-RENAME-17 (_type_ vector vector) vector 17) + (TODO-RENAME-18 (_type_ vector) vector 18) + (dummy-19 (_type_) none 19) + (dummy-20 (_type_) none 20) + (TODO-RENAME-21 (_type_) none 21) + (TODO-RENAME-22 (_type_ vector quaternion float float) none 22) ) ) @@ -21855,12 +21852,13 @@ ;; - Types (deftype water-anim (water-vol) - ((look int32 :offset-assert 212) - (play-ambient-sound? symbol :offset-assert 216) + ((ppointer-water-anim (pointer water-anim) :score 100 :offset 24) + (look int32 :offset-assert 212) + (play-ambient-sound? basic :offset-assert 216) ) :method-count-assert 30 - :size-assert #xdc :heap-base #x70 + :size-assert #xdc :flag-assert #x1e007000dc (:methods (water-vol-idle () none 20) ;; state @@ -21868,19 +21866,19 @@ ) ) -; (deftype water-anim-look (structure) -; ((skel-group basic :offset-assert 0) -; (anim int32 :offset-assert 4) -; (ambient-sound-spec basic :offset-assert 8) -; ) -; :method-count-assert 9 -; :size-assert #xc -; :flag-assert #x90000000c -; ) +(deftype water-anim-look (structure) + ((skel-group symbol :offset-assert 0) + (anim int32 :offset-assert 4) + (ambient-sound-spec sound-spec :offset-assert 8) + ) + :method-count-assert 9 + :size-assert #xc + :flag-assert #x90000000c + ) ;; - Unknowns -;;(define-extern *water-anim-look* object) ;; unknown type +(define-extern *water-anim-look* (array water-anim-look)) (define-extern *water-anim-sunken-dark-eco-qbert-sg* skeleton-group) (define-extern *water-anim-sunken-dark-eco-platform-room-sg* skeleton-group) (define-extern *water-anim-sunken-dark-eco-helix-room-sg* skeleton-group) @@ -21949,14 +21947,6 @@ (:methods (water-vol-idle () none 20) ;; state (water-vol-startup () none 21) ;; state - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) - (dummy-27 () none 27) - (dummy-28 () none 28) - (dummy-29 () none 29) ) ) @@ -22009,20 +21999,19 @@ :flag-assert #x900000068 ) -; (deftype rigid-body-control-point-inline-array (inline-array-class) -; ((length int32 :offset-assert 4) -; (allocated-length int32 :offset-assert 8) -; (data UNKNOWN :dynamic :offset-assert 16) -; ) -; :method-count-assert 9 -; :size-assert #x10 -; :flag-assert #x900000010 -; ) +(deftype rigid-body-control-point-inline-array (inline-array-class) + ((data rigid-body-control-point :inline :dynamic :offset 16) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) (deftype rigid-body-platform (process-drawable) - ((info rigid-body-platform-constants :offset-assert 176) + ((root-overlay collide-shape-moving :score 100 :offset 112) + (info rigid-body-platform-constants :offset-assert 176) (rbody rigid-body :inline :offset-assert 192) - (control-point-array basic :offset-assert 616) + (control-point-array rigid-body-control-point-inline-array :offset-assert 616) (player-velocity vector :inline :offset-assert 624) (player-velocity-prev vector :inline :offset-assert 640) (player-force-position vector :inline :offset-assert 656) @@ -22031,43 +22020,44 @@ (float-height-offset float :offset-assert 692) (player-attack-id int32 :offset-assert 696) (player-bonk-timeout uint64 :offset-assert 704) - (water-anim basic :offset-assert 712) - (player-contact basic :offset-assert 716) - (player-impulse basic :offset-assert 720) + (water-anim water-anim :offset-assert 712) + (player-contact basic :offset-assert 716) ; not a basic + (player-impulse collide-shape-prim-mesh :offset-assert 720) ) :method-count-assert 35 - :size-assert #x2d4 :heap-base #x270 + :size-assert #x2d4 :flag-assert #x23027002d4 ;; inherited inspect of process-drawable (:methods (rigid-body-platform-idle () none 20) ;; state (rigid-body-platform-float () none 21) ;; state - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) - (dummy-27 () none 27) - (dummy-28 () none 28) - (dummy-29 () none 29) - (dummy-30 () none 30) - (dummy-31 () none 31) - (dummy-32 () none 32) - (dummy-33 () none 33) - (dummy-34 () none 34) + (TODO-RENAME-22 (_type_ vector basic) float 22) ;; TODO - basic is seemingly unused + (TODO-RENAME-23 (_type_ basic) none 23) ;; TODO - basic is seemingly unused + (TODO-RENAME-24 (_type_ rigid-body-control-point basic) none 24) ;; TODO - basic is seemingly unused + (TODO-RENAME-25 (_type_) none 25) + (TODO-RENAME-26 (_type_) none 26) + (TODO-RENAME-27 (_type_ vector) none 27) + (TODO-RENAME-28 (_type_) none 28) + (TODO-RENAME-29 (_type_ rigid-body-platform-constants) none 29) + (TODO-RENAME-30 (_type_) none 30) + (TODO-RENAME-31 (_type_) none 31) + (dummy-32 (_type_) none 32) + (dummy-33 (_type_) none 33) + (TODO-RENAME-34 (_type_) none 34) ) ) + ;; - Functions -(define-extern matrix-3x3-triple-transpose-product function) -(define-extern rigid-body-platform-event-handler function) -(define-extern rigid-body-platform-post function) +(define-extern matrix-3x3-triple-transpose-product (function matrix matrix matrix matrix)) +(define-extern rigid-body-platform-event-handler (function process int symbol event-message-block vector :behavior rigid-body-platform)) +(define-extern rigid-body-platform-post (function int :behavior rigid-body-platform)) ;; - Unknowns -;;(define-extern *rigid-body-platform-constants* object) ;; unknown type +(define-extern *rigid-body-platform-constants* rigid-body-platform-constants) ;; ---------------------- @@ -25900,46 +25890,19 @@ ; ) ; ) -; (deftype citb-chain-plat (rigid-body-platform) -; ((orig-trans vector :inline :offset-assert 736) -; (orig-quat quaternion :inline :offset-assert 752) -; (beam-end vector :inline :offset-assert 768) -; (float-offset float :offset-assert 784) -; (idle-offset float :offset-assert 788) -; ) -; :method-count-assert 35 -; :size-assert #x318 -; :flag-assert #x2302b00318 -; ;; inherited inspect of rigid-body-platform -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; (dummy-12 () none 12) -; (dummy-13 () none 13) -; (dummy-14 () none 14) -; (dummy-15 () none 15) -; (dummy-16 () none 16) -; (dummy-17 () none 17) -; (dummy-18 () none 18) -; (dummy-19 () none 19) -; (dummy-20 () none 20) -; (dummy-21 () none 21) -; (dummy-22 () none 22) -; (dummy-23 () none 23) -; (dummy-24 () none 24) -; (dummy-25 () none 25) -; (dummy-26 () none 26) -; (dummy-27 () none 27) -; (dummy-28 () none 28) -; (dummy-29 () none 29) -; (dummy-30 () none 30) -; (dummy-31 () none 31) -; (dummy-32 () none 32) -; (dummy-33 () none 33) -; (dummy-34 () none 34) -; ) -; ) +(deftype citb-chain-plat (rigid-body-platform) + ((orig-trans vector :inline :offset-assert 736) + (orig-quat quaternion :inline :offset-assert 752) + (beam-end vector :inline :offset-assert 768) + (float-offset float :offset-assert 784) + (idle-offset float :offset-assert 788) + ) + :method-count-assert 35 + :heap-base #x2b0 + :size-assert #x318 + :flag-assert #x2302b00318 + ;; inherited inspect of rigid-body-platform + ) ; (deftype citb-rotatebox (citb-base-plat) ; () @@ -31486,7 +31449,6 @@ :size-assert #x17c :flag-assert #x350110017c (:methods - (dummy-method-11 (_type_ object) none 11) (dummy-31 (_type_) none 31) (dummy-32 (_type_ symbol) spool-anim 32) (dummy-41 (_type_) none 41) @@ -33259,41 +33221,18 @@ ;; - Types -; (deftype mud (water-anim) -; () -; :method-count-assert 30 -; :size-assert #xdc -; :flag-assert #x1e007000dc -; ;; not enough basic ops -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; (dummy-12 () none 12) -; (dummy-13 () none 13) -; (dummy-14 () none 14) -; (dummy-15 () none 15) -; (dummy-16 () none 16) -; (dummy-17 () none 17) -; (dummy-18 () none 18) -; (dummy-19 () none 19) -; (dummy-20 () none 20) -; (dummy-21 () none 21) -; (dummy-22 () none 22) -; (dummy-23 () none 23) -; (dummy-24 () none 24) -; (dummy-25 () none 25) -; (dummy-26 () none 26) -; (dummy-27 () none 27) -; (dummy-28 () none 28) -; (dummy-29 () none 29) -; ) -; ) +(deftype mud (water-anim) + () + :method-count-assert 30 + :heap-base #x70 + :size-assert #xdc + :flag-assert #x1e007000dc + ) ;; - Unknowns -;;(define-extern ripple-for-mud object) ;; unknown type -;;(define-extern ripple-for-small-mud object) ;; unknown type +(define-extern ripple-for-mud ripple-wave-set) ;; unknown type +(define-extern ripple-for-small-mud ripple-wave-set) ;; unknown type ;; ---------------------- @@ -34023,116 +33962,32 @@ ; ) ; ) -; (deftype pontoon (rigid-body-platform) -; ((anchor-point vector :inline :offset-assert 736) -; (task uint8 :offset-assert 752) -; (alt-task uint8 :offset-assert 753) -; ) -; :method-count-assert 35 -; :size-assert #x2f2 -; :flag-assert #x23029002f2 -; ;; inherited inspect of rigid-body-platform -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; (dummy-12 () none 12) -; (dummy-13 () none 13) -; (dummy-14 () none 14) -; (dummy-15 () none 15) -; (dummy-16 () none 16) -; (dummy-17 () none 17) -; (dummy-18 () none 18) -; (dummy-19 () none 19) -; (dummy-20 () none 20) -; (dummy-21 () none 21) -; (dummy-22 () none 22) -; (dummy-23 () none 23) -; (dummy-24 () none 24) -; (dummy-25 () none 25) -; (dummy-26 () none 26) -; (dummy-27 () none 27) -; (dummy-28 () none 28) -; (dummy-29 () none 29) -; (dummy-30 () none 30) -; (dummy-31 () none 31) -; (dummy-32 () none 32) -; (dummy-33 () none 33) -; (dummy-34 () none 34) -; ) -; ) +(deftype pontoon (rigid-body-platform) + ((anchor-point vector :inline :offset-assert 736) + (task uint8 :offset-assert 752) + (alt-task uint8 :offset-assert 753) + ) + :method-count-assert 35 + :heap-base #x290 + :size-assert #x2f2 + :flag-assert #x23029002f2 + ) -; (deftype pontoonfive (pontoon) -; () -; :method-count-assert 35 -; :size-assert #x2f2 -; :flag-assert #x23029002f2 -; ;; not enough basic ops -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; (dummy-12 () none 12) -; (dummy-13 () none 13) -; (dummy-14 () none 14) -; (dummy-15 () none 15) -; (dummy-16 () none 16) -; (dummy-17 () none 17) -; (dummy-18 () none 18) -; (dummy-19 () none 19) -; (dummy-20 () none 20) -; (dummy-21 () none 21) -; (dummy-22 () none 22) -; (dummy-23 () none 23) -; (dummy-24 () none 24) -; (dummy-25 () none 25) -; (dummy-26 () none 26) -; (dummy-27 () none 27) -; (dummy-28 () none 28) -; (dummy-29 () none 29) -; (dummy-30 () none 30) -; (dummy-31 () none 31) -; (dummy-32 () none 32) -; (dummy-33 () none 33) -; (dummy-34 () none 34) -; ) -; ) +(deftype pontoonfive (pontoon) + () + :method-count-assert 35 + :heap-base #x290 + :size-assert #x2f2 + :flag-assert #x23029002f2 + ) -; (deftype pontoonten (pontoon) -; () -; :method-count-assert 35 -; :size-assert #x2f2 -; :flag-assert #x23029002f2 -; ;; not enough basic ops -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; (dummy-12 () none 12) -; (dummy-13 () none 13) -; (dummy-14 () none 14) -; (dummy-15 () none 15) -; (dummy-16 () none 16) -; (dummy-17 () none 17) -; (dummy-18 () none 18) -; (dummy-19 () none 19) -; (dummy-20 () none 20) -; (dummy-21 () none 21) -; (dummy-22 () none 22) -; (dummy-23 () none 23) -; (dummy-24 () none 24) -; (dummy-25 () none 25) -; (dummy-26 () none 26) -; (dummy-27 () none 27) -; (dummy-28 () none 28) -; (dummy-29 () none 29) -; (dummy-30 () none 30) -; (dummy-31 () none 31) -; (dummy-32 () none 32) -; (dummy-33 () none 33) -; (dummy-34 () none 34) -; ) -; ) +(deftype pontoonten (pontoon) + () + :method-count-assert 35 + :heap-base #x290 + :size-assert #x2f2 + :flag-assert #x23029002f2 + ) ; (deftype allpontoons (process-drawable) ; ((task uint8 :offset-assert 176) diff --git a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc index 08d486b93b..b8af2ca154 100644 --- a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc @@ -600,5 +600,22 @@ [8, "(function process int symbol event-message-block none :behavior silostep)"] ], + "rigid-body": [ + [5, "(function none :behavior rigid-body-platform)"], + [6, "(function none :behavior rigid-body-platform)"], + [7, "(function none :behavior rigid-body-platform)"], + [8, "(function none :behavior rigid-body-platform)"] + ], + + "water-anim": [ + [4, "(function none :behavior water-anim)"], + [5, "(function none :behavior water-anim)"], + [6, "(function process int symbol event-message-block process-mask :behavior water-anim)"] + ], + + "plat-eco": [ + [9, "(function none :behavior plat-eco)"] + ], + "placeholder-do-not-add-below": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index 33ad2aba5a..33110871f6 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -1470,6 +1470,85 @@ ["L51", "uint64", true] ], + "rigid-body": [ + ["L8", "_lambda_", true], + ["L10", "_lambda_", true], + ["L13", "_lambda_", true], + ["L15", "_lambda_", true], + ["L89", "rigid-body-platform-constants", true], + ["L90", "state", true], + ["L91", "state", true], + ["L106", "float", true] + ], + + "ocean": [ + ["L90", "float", true] + ], + + "water-anim": [ + ["L13", "_lambda_", true], + ["L15", "_lambda_", true], + ["L21", "_lambda_", true], + ["L26", "state", true], + ["L27", "_auto_", true], + ["L99", "skeleton-group", true], + ["L101", "skeleton-group", true], + ["L102", "skeleton-group", true], + ["L103", "skeleton-group", true], + ["L104", "skeleton-group", true], + ["L106", "skeleton-group", true], + ["L108", "skeleton-group", true], + ["L110", "skeleton-group", true], + ["L111", "skeleton-group", true], + ["L113", "skeleton-group", true], + ["L115", "skeleton-group", true], + ["L117", "skeleton-group", true], + ["L119", "skeleton-group", true], + ["L121", "skeleton-group", true], + ["L123", "skeleton-group", true], + ["L124", "skeleton-group", true], + ["L125", "skeleton-group", true], + ["L126", "skeleton-group", true], + ["L127", "skeleton-group", true], + ["L128", "skeleton-group", true], + ["L129", "skeleton-group", true], + ["L130", "skeleton-group", true], + ["L131", "skeleton-group", true], + ["L132", "skeleton-group", true], + ["L133", "skeleton-group", true], + ["L134", "skeleton-group", true], + ["L136", "skeleton-group", true], + ["L138", "skeleton-group", true], + ["L140", "skeleton-group", true], + ["L141", "skeleton-group", true], + ["L142", "skeleton-group", true], + ["L143", "skeleton-group", true], + ["L144", "skeleton-group", true], + ["L146", "skeleton-group", true], + ["L147", "skeleton-group", true], + ["L148", "skeleton-group", true], + ["L149", "skeleton-group", true], + ["L150", "skeleton-group", true], + ["L151", "skeleton-group", true], + ["L152", "skeleton-group", true], + ["L153", "skeleton-group", true], + ["L154", "skeleton-group", true], + ["L155", "skeleton-group", true], + ["L156", "skeleton-group", true], + ["L157", "skeleton-group", true], + ["L159", "skeleton-group", true], + ["L160", "skeleton-group", true], + ["L161", "skeleton-group", true], + ["L163", "float", true], + ["L165", "float", true] + ], + + "mud": [ + ["L8", "ripple-wave-set", true], + ["L9", "ripple-wave-set", true], + ["L10", "float", true] + ], + // please do not add things after this entry! git is dumb. "object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc index a1cec8137e..f1c2db344b 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -858,5 +858,64 @@ [16, "event-message-block"] ], + "(method 17 rigid-body)": [ + [16, "vector"] + ], + + "matrix-3x3-triple-transpose-product": [ + [16, "matrix"], + [80, "matrix"] + ], + + "(method 10 rigid-body)": [ + [16, "quaternion"] + ], + + "(method 13 rigid-body)": [ + [16, "vector"], + [32, "vector"] + ], + + "(method 16 rigid-body)": [ + [16, "vector"], + [32, "vector"] + ], + + "(method 14 rigid-body)": [ + [16, "vector"], + [32, "vector"] + ], + + "(method 18 rigid-body)": [ + [16, "vector"] + ], + + "(method 24 rigid-body-platform)": [ + [16, "vector"] + ], + + "(method 26 rigid-body-platform)": [ + [16, "vector"] + ], + + "(method 27 rigid-body-platform)": [ + [16, "vector"] + ], + + "(method 22 water-anim)": [ + [16, "vector"] + ], + + "(anon-function 9 plat-eco)": [ + [16, "event-message-block"] + ], + + "default-collision-reaction": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [96, "vector"] + ], + "placeholder-do-not-add-below!": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index ba02554a23..5bfffac061 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -1791,6 +1791,74 @@ [[0, 999], "s6", "target"], [46, "v1", "collide-shape-prim"] // `event-other` from collide-shape ], + + "(anon-function 6 water-anim)": [ + [6, "a0", "vector"] + ], + + "(anon-function 5 water-anim)": [ + [2, "v1", "(state none)"] + ], + + "(anon-function 8 rigid-body)": [ + [[16, 21], "t9", "(function object)"] + ], + + "(anon-function 6 rigid-body)": [ + [[16, 21], "t9", "(function object)"] + ], + + "(method 34 rigid-body-platform)": [ + [[0, 5], "t9", "(function object)"] + ], + + "(method 22 water-anim)": [ + [[9, 14], "t9", "(function object object)"], + [25, "s3", "basic"], + [[32, 37], "t9", "(function object object)"] + ], + + "(method 25 water-anim)": [ + [[27, 45], "v1", "transform"] + ], + + "(method 22 rigid-body-platform)": [ + [26, "f0", "float"] + ], + + "rigid-body-platform-event-handler": [ + [28, "v1", "process-drawable"], + [34, "v1", "float"], + [83, "v1", "process-drawable"], + [119, "v1", "process-drawable"], + [125, "v1", "process-drawable"], + [158, "v1", "vector"], + [170, "v1", "vector"], + [184, "v1", "(pointer handle)"], + [213, "v1", "process-drawable"] + ], + + "(anon-function 9 plat-eco)": [ + [23, "v1", "(state symbol none)"], + [58, "v1", "(state symbol none)"] + ], + + "(method 7 rigid-body-platform)": [ + [5, "v1", "int"], + [14, "t9", "(function process-drawable int process-drawable)"] + ], + + "(method 10 rigid-body)": [ + [50, "v1", "vector"] + ], + + "(method 11 rigid-body-platform)": [ + [5, "v1", "process-mask"] + ], + + "(method 22 mud)": [ + [[37, 41], "v1", "ripple-control"] + ], "(method 11 twister)": [ [7, "s4", "twist-joint"], diff --git a/goal_src/engine/collide/collide-shape-h.gc b/goal_src/engine/collide/collide-shape-h.gc index ff994e4df0..64a9519b0b 100644 --- a/goal_src/engine/collide/collide-shape-h.gc +++ b/goal_src/engine/collide/collide-shape-h.gc @@ -62,33 +62,35 @@ :flag-assert #x900000020 ) +(declare-type collide-shape-prim basic) (deftype collide-shape-intersect (basic) ((move-vec vector :inline :offset-assert 16) (best-u float :offset-assert 32) (best-tri collide-tri-result :inline :offset-assert 48) - (best-from-prim basic :offset-assert 132) - (best-to-prim basic :offset-assert 136) + (best-from-prim collide-shape-prim :offset-assert 132) + (best-to-prim collide-shape-prim :offset-assert 136) ) :method-count-assert 10 :size-assert #x8c :flag-assert #xa0000008c (:methods - (dummy-9 () none 9) - ) + (dummy-9 () none 9) + ) ) +(declare-type collide-shape-prim basic) (deftype collide-overlap-result (structure) ((best-dist float :offset-assert 0) - (best-from-prim basic :offset-assert 4) - (best-to-prim basic :offset-assert 8) + (best-from-prim collide-shape-prim :offset-assert 4) + (best-to-prim collide-shape-prim :offset-assert 8) (best-from-tri collide-tri-result :inline :offset-assert 16) ) :method-count-assert 10 :size-assert #x64 :flag-assert #xa00000064 (:methods - (reset! (_type_) none 9) - ) + (reset! (_type_) none 9) + ) ) (defmethod reset! collide-overlap-result ((obj collide-overlap-result)) diff --git a/goal_src/engine/collide/collide-shape.gc b/goal_src/engine/collide/collide-shape.gc index f86e799d3a..ea3ecb8052 100644 --- a/goal_src/engine/collide/collide-shape.gc +++ b/goal_src/engine/collide/collide-shape.gc @@ -5,5 +5,5 @@ ;; name in dgo: collide-shape ;; dgos: GAME, ENGINE -;; TODO - for misty-teetertotter +;; TODO - for misty-teetertotter | rigid-body (define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) ;; TODO - not completely confirmed diff --git a/goal_src/engine/draw/process-drawable.gc b/goal_src/engine/draw/process-drawable.gc index 7e951a11ab..2beaa940de 100644 --- a/goal_src/engine/draw/process-drawable.gc +++ b/goal_src/engine/draw/process-drawable.gc @@ -5,7 +5,13 @@ ;; name in dgo: process-drawable ;; dgos: GAME, ENGINE +;; TODO - for water-anim +(define-extern ja-post (function int)) +;; TODO - for rigid-body +(define-extern rider-post (function int)) +(define-extern transform-post (function int)) ;; TODO - for misty-teetertotter (define-extern transform-post (function int)) (define-extern ja-done? (function int symbol)) -(define-extern rider-post (function int)) +;; TODO - for misty-warehouse +(define-extern rider-trans (function int)) diff --git a/goal_src/engine/entity/entity.gc b/goal_src/engine/entity/entity.gc index 35b3dc49e2..2c9f2eb01c 100644 --- a/goal_src/engine/entity/entity.gc +++ b/goal_src/engine/entity/entity.gc @@ -118,5 +118,7 @@ (the-as entity-actor #f) ) -;; TODO - for misty-teetertotter +;; TODO - for misty-teetertotter | rigid-body (define-extern process-drawable-from-entity! (function process-drawable object none)) +;; TODO - for misty-warehouse +(define-extern process-entity-status! (function process entity-perm-status symbol int)) diff --git a/goal_src/engine/game/generic-obs.gc b/goal_src/engine/game/generic-obs.gc index 9c856b34c1..75efd72671 100644 --- a/goal_src/engine/game/generic-obs.gc +++ b/goal_src/engine/game/generic-obs.gc @@ -11,4 +11,10 @@ :method-count-assert 15 :size-assert #x70 :flag-assert #xf00000070 - ) \ No newline at end of file + ) + +;; TODO - for misty-warehouse +(define-extern camera-tracker-init (function function none)) ;; TODO - not confirmed, see misty-warehouse::camera-view +(define-extern process-grab? (function process symbol)) +(define-extern camera-change-to (function string int symbol none)) ;; TODO - not confirmed yet +(define-extern process-release? (function process symbol)) diff --git a/goal_src/engine/gfx/ocean/ocean.gc b/goal_src/engine/gfx/ocean/ocean.gc index a7aca41e6d..aae27a448a 100644 --- a/goal_src/engine/gfx/ocean/ocean.gc +++ b/goal_src/engine/gfx/ocean/ocean.gc @@ -7,3 +7,5 @@ ;; TODO - for ocean-transition (define-extern *ocean-map* ocean-map) +;; TODO - for rigid-body +(define-extern ocean-get-height (function vector float)) diff --git a/goal_src/engine/gfx/ripple.gc b/goal_src/engine/gfx/ripple.gc index 34c8f2e5b2..627f25ab24 100644 --- a/goal_src/engine/gfx/ripple.gc +++ b/goal_src/engine/gfx/ripple.gc @@ -149,7 +149,7 @@ ) ;; definition for function ripple-find-height -(defun ripple-find-height ((arg0 process-drawable) (arg1 basic) (arg2 vector)) +(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector)) (local-vars (sv-16 float) (sv-32 float)) (let* ((f30-0 (-> arg0 root trans y)) (v1-1 (-> arg0 draw)) diff --git a/goal_src/engine/gfx/water/water-h.gc b/goal_src/engine/gfx/water/water-h.gc index 1d5bd1dd51..4cb008d0de 100644 --- a/goal_src/engine/gfx/water/water-h.gc +++ b/goal_src/engine/gfx/water/water-h.gc @@ -97,16 +97,67 @@ :method-count-assert 30 :size-assert #xd4 :flag-assert #x1e007000d4 + ;; inherited inspect of process-drawable (:methods (water-vol-idle () none 20) ;; state (water-vol-startup () none 21) ;; state - (dummy-22 () none 22) + (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (dummy-25 () none 25) + (TODO-RENAME-25 (_type_) quaternion 25) (dummy-26 () none 26) (dummy-27 () none 27) - (dummy-28 () none 28) + (get-ripple-height (_type_ vector) float 28) (dummy-29 () none 29) ) ) + +;; Manually Added +(define-extern *water-anim-sunken-dark-eco-qbert-sg* skeleton-group) +(define-extern *water-anim-sunken-dark-eco-platform-room-sg* skeleton-group) +(define-extern *water-anim-sunken-dark-eco-helix-room-sg* skeleton-group) +(define-extern *water-anim-sunken-big-room-sg* skeleton-group) +(define-extern *water-anim-sunken-first-room-from-entrance-sg* skeleton-group) +(define-extern *water-anim-sunken-qbert-room-sg* skeleton-group) +(define-extern *water-anim-sunken-first-right-branch-sg* skeleton-group) +(define-extern *water-anim-sunken-circular-with-bullys-sg* skeleton-group) +(define-extern *water-anim-sunken-hall-with-one-whirlpool-sg* skeleton-group) +(define-extern *water-anim-sunken-hall-with-three-whirlpools-sg* skeleton-group) +(define-extern *water-anim-sunken-start-of-helix-slide-sg* skeleton-group) +(define-extern *water-anim-sunken-room-above-exit-chamber-sg* skeleton-group) +(define-extern *water-anim-sunken-hall-before-big-room-sg* skeleton-group) +(define-extern *water-anim-sunken-short-piece-sg* skeleton-group) +(define-extern *water-anim-sunken-big-room-upper-water-sg* skeleton-group) +(define-extern *water-anim-maincave-center-pool-sg* skeleton-group) +(define-extern *water-anim-maincave-lower-right-pool-sg* skeleton-group) +(define-extern *water-anim-maincave-mid-right-pool-sg* skeleton-group) +(define-extern *water-anim-maincave-lower-left-pool-sg* skeleton-group) +(define-extern *water-anim-maincave-mid-left-pool-sg* skeleton-group) +(define-extern *water-anim-maincave-water-with-crystal-sg* skeleton-group) +(define-extern *water-anim-robocave-main-pool-sg* skeleton-group) +(define-extern *water-anim-misty-mud-by-arena-sg* skeleton-group) +(define-extern *water-anim-misty-mud-above-skeleton-sg* skeleton-group) +(define-extern *water-anim-misty-mud-behind-skeleton-sg* skeleton-group) +(define-extern *water-anim-misty-mud-above-skull-back-sg* skeleton-group) +(define-extern *water-anim-misty-mud-above-skull-front-sg* skeleton-group) +(define-extern *water-anim-misty-mud-other-near-skull-sg* skeleton-group) +(define-extern *water-anim-misty-mud-near-skull-sg* skeleton-group) +(define-extern *water-anim-misty-mud-under-spine-sg* skeleton-group) +(define-extern *water-anim-misty-mud-by-dock-sg* skeleton-group) +(define-extern *water-anim-misty-mud-island-near-dock-sg* skeleton-group) +(define-extern *water-anim-misty-mud-lonely-island-sg* skeleton-group) +(define-extern *water-anim-misty-dark-eco-pool-sg* skeleton-group) +(define-extern *water-anim-ogre-lava-sg* skeleton-group) +(define-extern *water-anim-jungle-river-sg* skeleton-group) +(define-extern *water-anim-village3-lava-sg* skeleton-group) +(define-extern *water-anim-training-lake-sg* skeleton-group) +(define-extern *water-anim-darkcave-water-with-crystal-sg* skeleton-group) +(define-extern *water-anim-rolling-water-back-sg* skeleton-group) +(define-extern *water-anim-rolling-water-front-sg* skeleton-group) +(define-extern *water-anim-finalboss-dark-eco-pool-sg* skeleton-group) +(define-extern *water-anim-lavatube-energy-lava-sg* skeleton-group) +(define-extern *water-anim-village1-rice-paddy-sg* skeleton-group) +(define-extern *water-anim-village1-fountain-sg* skeleton-group) +(define-extern *water-anim-village1-rice-paddy-mid-sg* skeleton-group) +(define-extern *water-anim-village1-rice-paddy-top-sg* skeleton-group) +(define-extern *water-anim-village2-bucket-sg* skeleton-group) diff --git a/goal_src/kernel-defs.gc b/goal_src/kernel-defs.gc index 75b040f58c..6a85a584be 100644 --- a/goal_src/kernel-defs.gc +++ b/goal_src/kernel-defs.gc @@ -228,7 +228,7 @@ ) (declare-type process basic) - +(declare-type res-lump basic) (deftype process-tree (basic) ((name basic :offset-assert 4) (mask process-mask :offset-assert 8) @@ -243,7 +243,7 @@ (new (symbol type basic) _type_ 0) (activate (_type_ process-tree basic pointer) process-tree 9) (deactivate (_type_) none 10) - (dummy-method-11 (_type_ object) none 11) + (copy-defaults! (_type_ res-lump) none 11) (run-logic? (_type_) symbol 12) (dummy-method () none 13) ) diff --git a/goal_src/kernel/gkernel-h.gc b/goal_src/kernel/gkernel-h.gc index 623b9e9618..b9e9ec2559 100644 --- a/goal_src/kernel/gkernel-h.gc +++ b/goal_src/kernel/gkernel-h.gc @@ -212,7 +212,7 @@ (new (symbol type basic) _type_ 0) (activate (_type_ process-tree basic pointer) process-tree 9) (deactivate (_type_) none 10) - (dummy-method-11 (_type_ object) none 11) + (copy-defaults! (_type_ res-lump) none 11) (run-logic? (_type_) symbol 12) (dummy-method () none 13) ) @@ -246,16 +246,9 @@ (connection-list connectable :inline :offset-assert #x60) (stack uint8 :dynamic :offset-assert #x70) ) - (:methods (new (symbol type basic int) _type_ 0) - (activate (_type_ process-tree basic pointer) process-tree 9) - (deactivate (process) none 10) - (dummy-method-11 (_type_ object) none 11) - (run-logic? (process) symbol 12) - (dummy-method () none 13) - ) - + ) :size-assert #x70 :method-count-assert 14 :no-runtime-type ;; already defined by kscheme. Don't do it again. @@ -593,4 +586,4 @@ (defmacro scratchpad-object (type &key (offset 0)) "Access an object on the scratchpad." `(the-as ,type (&+ *fake-scratchpad-data* ,offset)) - ) \ No newline at end of file + ) diff --git a/goal_src/levels/common/baseplat.gc b/goal_src/levels/common/baseplat.gc index 54b2c0950e..2af6fc7b72 100644 --- a/goal_src/levels/common/baseplat.gc +++ b/goal_src/levels/common/baseplat.gc @@ -5,3 +5,33 @@ ;; name in dgo: baseplat ;; dgos: GAME, COMMON, L1 +;; TODO - for misty-warehouse +(deftype eco-door (process-drawable) + ((root-override collide-shape :score 100 :offset 112) + (speed float :offset-assert 176) + (open-distance float :offset-assert 180) + (close-distance float :offset-assert 184) + (out-dir vector :inline :offset-assert 192) + (open-sound uint128 :offset-assert 208) + (close-sound uint128 :offset-assert 224) + (state-actor basic :offset-assert 240) + (flags int32 :offset-assert 244) + (locked symbol :offset-assert 248) + (auto-close symbol :offset-assert 252) + (one-way symbol :offset-assert 256) + ) + :method-count-assert 27 + :size-assert #x104 + :heap-base #xa0 + :flag-assert #x1b00a00104 + ;; inherited inspect of process-drawable + (:methods + (dummy-20 () none 20) + (dummy-21 () none 21) + (dummy-22 () none 22) + (dummy-23 () none 23) + (TODO-RENAME-24 (_type_) none 24) + (TODO-RENAME-25 (_type_) none 25) + (dummy-26 () none 26) + ) + ) diff --git a/goal_src/levels/common/rigid-body-h.gc b/goal_src/levels/common/rigid-body-h.gc index de995e7800..325ece7a2e 100644 --- a/goal_src/levels/common/rigid-body-h.gc +++ b/goal_src/levels/common/rigid-body-h.gc @@ -31,20 +31,20 @@ :size-assert #x1a8 :flag-assert #x17000001a8 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 () none 13) - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 () none 16) - (dummy-17 () none 17) - (dummy-18 () none 18) - (dummy-19 () none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) + (TODO-RENAME-9 (_type_ float float float float) none 9) + (dummy-10 (_type_ float) none 10) + (clear-force-torque! (_type_) none 11) + (clear-momentum! (_type_) none 12) + (TODO-RENAME-13 (_type_ vector vector) none 13) + (TODO-RENAME-14 (_type_ vector vector) none 14) + (TODO-RENAME-15 (_type_ vector) none 15) + (TODO-RENAME-16 (_type_ vector vector float) none 16) + (TODO-RENAME-17 (_type_ vector vector) vector 17) + (TODO-RENAME-18 (_type_ vector) vector 18) + (dummy-19 (_type_) none 19) + (dummy-20 (_type_) none 20) + (TODO-RENAME-21 (_type_) none 21) + (TODO-RENAME-22 (_type_ vector quaternion float float) none 22) ) ) diff --git a/goal_src/levels/common/rigid-body.gc b/goal_src/levels/common/rigid-body.gc index fdf6cad47d..9532020c6b 100644 --- a/goal_src/levels/common/rigid-body.gc +++ b/goal_src/levels/common/rigid-body.gc @@ -5,3 +5,1178 @@ ;; name in dgo: rigid-body ;; dgos: GAME, COMMON, L1 +;; definition for method 11 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod clear-force-torque! rigid-body ((obj rigid-body)) + (set! (-> obj force quad) (-> *null-vector* quad)) + (set! (-> obj torque quad) (-> *null-vector* quad)) + 0 + (none) + ) + +;; definition for method 12 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod clear-momentum! rigid-body ((obj rigid-body)) + (set! (-> obj lin-momentum quad) (-> *null-vector* quad)) + (set! (-> obj ang-momentum quad) (-> *null-vector* quad)) + 0 + (none) + ) + +;; definition for method 21 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-21 rigid-body ((obj rigid-body)) + (quaternion->matrix (-> obj matrix) (-> obj rotation)) + (TODO-RENAME-18 obj (-> obj matrix vector 3)) + 0 + (none) + ) + +;; definition for method 22 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod + TODO-RENAME-22 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 quaternion) (arg2 float) (arg3 float)) + (clear-force-torque! obj) + (clear-momentum! obj) + (vector+! (-> obj position) arg0 (-> obj cm-offset-joint)) + (quaternion-copy! (-> obj rotation) arg1) + (quaternion-normalize! (-> obj rotation)) + (set! (-> obj lin-momentum-damping-factor) arg2) + (set! (-> obj ang-momentum-damping-factor) arg3) + (TODO-RENAME-21 obj) + (set! (-> obj lin-velocity quad) (-> *null-vector* quad)) + (set! (-> obj ang-velocity quad) (-> *null-vector* quad)) + (set! (-> obj inv-i-world vector 0 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 1 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 2 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 3 quad) (the-as uint128 0)) + (set! (-> obj max-ang-velocity) 0.0) + (set! (-> obj max-ang-momentum) 0.0) + 0 + (none) + ) + +;; definition for method 9 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-9 + rigid-body + ((obj rigid-body) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> obj mass) arg0) + (let ((f0-1 arg0)) + (set! (-> obj inv-mass) (/ 1.0 f0-1)) + ) + (matrix-identity! (-> obj inertial-tensor)) + (matrix-identity! (-> obj inv-inertial-tensor)) + (let* ((f0-4 arg0) + (f1-1 12.0) + (f0-5 (* f0-4 (/ 1.0 f1-1))) + ) + (let* ((f1-4 arg2) + (f1-6 (* f1-4 f1-4)) + (f2-1 arg3) + ) + (set! (-> obj inertial-tensor vector 0 x) (* f0-5 (+ f1-6 (* f2-1 f2-1)))) + ) + (let* ((f1-9 arg1) + (f1-11 (* f1-9 f1-9)) + (f2-4 arg3) + ) + (set! (-> obj inertial-tensor vector 1 y) (* f0-5 (+ f1-11 (* f2-4 f2-4)))) + ) + (let* ((f1-14 arg1) + (f1-16 (* f1-14 f1-14)) + (f2-7 arg2) + ) + (set! (-> obj inertial-tensor vector 2 z) (* f0-5 (+ f1-16 (* f2-7 f2-7)))) + ) + ) + (let ((f0-7 (-> obj inertial-tensor vector 0 x))) + (set! (-> obj inv-inertial-tensor vector 0 x) (/ 1.0 f0-7)) + ) + (let ((f0-10 (-> obj inertial-tensor vector 1 y))) + (set! (-> obj inv-inertial-tensor vector 1 y) (/ 1.0 f0-10)) + ) + (let ((f0-13 (-> obj inertial-tensor vector 2 z))) + (set! (-> obj inv-inertial-tensor vector 2 z) (/ 1.0 f0-13)) + ) + 0 + (none) + ) + +;; definition for method 17 of type rigid-body +(defmethod + TODO-RENAME-17 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position)))) + (vector-cross! arg1 (-> obj ang-velocity) v1-1) + ) + (vector+! arg1 arg1 (-> obj lin-velocity)) + arg1 + ) + +;; definition for function matrix-3x3-triple-transpose-product +(defun + matrix-3x3-triple-transpose-product + ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (let ((s2-0 (new 'stack-no-clear 'matrix)) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (matrix-transpose! s2-0 arg1) + (cond + (#t + (matrix*! s3-0 arg1 arg2) + (matrix*! arg0 s3-0 s2-0) + ) + (else + (matrix*! s3-0 s2-0 arg2) + (matrix*! arg0 s3-0 arg1) + ) + ) + ) + arg0 + ) + +;; definition for method 10 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod dummy-10 rigid-body ((obj rigid-body) (arg0 float)) + (vector+*! (-> obj lin-momentum) (-> obj lin-momentum) (-> obj force) arg0) + (vector+*! (-> obj ang-momentum) (-> obj ang-momentum) (-> obj torque) arg0) + (vector-float*! + (-> obj lin-momentum) + (-> obj lin-momentum) + (-> obj lin-momentum-damping-factor) + ) + (vector-float*! + (-> obj ang-momentum) + (-> obj ang-momentum) + (-> obj ang-momentum-damping-factor) + ) + (vector-float*! (-> obj lin-velocity) (-> obj lin-momentum) (-> obj inv-mass)) + (set! (-> obj matrix vector 3 quad) (-> *null-vector* quad)) + (matrix-3x3-triple-transpose-product + (-> obj inv-i-world) + (-> obj matrix) + (-> obj inv-inertial-tensor) + ) + (vector-rotate*! + (-> obj ang-velocity) + (-> obj ang-momentum) + (-> obj inv-i-world) + ) + (vector+*! (-> obj position) (-> obj position) (-> obj lin-velocity) arg0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (set! (-> (the-as vector (&-> s4-0 x)) quad) (-> obj ang-velocity quad)) + (set! (-> s4-0 w) 0.0) + (quaternion*! s4-0 s4-0 (-> obj rotation)) + (quaternion-float*! s4-0 s4-0 0.5) + (+! (-> obj rotation x) (* (-> s4-0 x) arg0)) + (+! (-> obj rotation y) (* (-> s4-0 y) arg0)) + (+! (-> obj rotation z) (* (-> s4-0 z) arg0)) + (+! (-> obj rotation w) (* (-> s4-0 w) arg0)) + ) + (quaternion-normalize! (-> obj rotation)) + (quaternion->matrix (-> obj matrix) (-> obj rotation)) + (TODO-RENAME-18 obj (-> obj matrix vector 3)) + 0 + (none) + ) + +;; definition for method 13 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-13 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (vector+! (-> obj force) (-> obj force) arg1) + (let* ((v1-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position))) + (a1-2 (vector-cross! (new 'stack-no-clear 'vector) v1-2 arg1)) + ) + (vector+! (-> obj torque) (-> obj torque) a1-2) + ) + 0 + (none) + ) + +;; definition for method 16 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-16 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector) (arg2 float)) + (vector+! (-> obj force) (-> obj force) arg1) + (let* ((a0-3 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position))) + (s4-1 (vector-cross! (new 'stack-no-clear 'vector) a0-3 arg1)) + ) + (let ((f0-0 (vector-length a0-3))) + (if (< arg2 f0-0) + (vector-float*! s4-1 s4-1 (/ arg2 f0-0)) + ) + ) + (vector+! (-> obj torque) (-> obj torque) s4-1) + ) + 0 + (none) + ) + +;; definition for method 14 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-14 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate*! s4-0 arg1 (-> obj matrix)) + (vector-rotate*! s5-0 arg0 (-> obj matrix)) + (vector+! s5-0 s5-0 (-> obj position)) + (TODO-RENAME-13 obj s5-0 s4-0) + ) + 0 + (none) + ) + +;; definition for method 15 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-15 rigid-body ((obj rigid-body) (arg0 vector)) + (vector+! (-> obj force) (-> obj force) arg0) + 0 + (none) + ) + +;; definition for method 18 of type rigid-body +(defmethod TODO-RENAME-18 rigid-body ((obj rigid-body) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! gp-0 (-> obj cm-offset-joint) (-> obj matrix)) + (vector-! arg0 (-> obj position) gp-0) + ) + arg0 + ) + +;; definition for method 19 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod dummy-19 rigid-body ((obj rigid-body)) + (format + #t + " force ~M ~M ~M" + (-> obj force x) + (-> obj force y) + (-> obj force z) + ) + (format + #t + " torque ~f ~f ~f~%" + (-> obj torque x) + (-> obj torque y) + (-> obj torque z) + ) + (format + #t + " position ~M ~M ~M" + (-> obj position x) + (-> obj position y) + (-> obj position z) + ) + (format + #t + " rotation ~f ~f ~f ~f~%" + (-> obj rotation x) + (-> obj rotation y) + (-> obj rotation z) + (-> obj rotation w) + ) + (format + #t + " lin-mom ~M ~M ~M" + (-> obj lin-momentum x) + (-> obj lin-momentum y) + (-> obj lin-momentum z) + ) + (format + #t + " ang-mom ~f ~f ~f~%" + (-> obj ang-momentum x) + (-> obj ang-momentum y) + (-> obj ang-momentum z) + ) + (format + #t + " lin-vel ~M ~M ~M" + (-> obj lin-velocity x) + (-> obj lin-velocity y) + (-> obj lin-velocity z) + ) + (format + #t + " ang-vel ~f ~f ~f~%" + (-> obj ang-velocity x) + (-> obj ang-velocity y) + (-> obj ang-velocity z) + ) + 0 + (none) + ) + +;; definition for method 20 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod dummy-20 rigid-body ((obj rigid-body)) + (format + #t + " force ~M ~M ~M" + (-> obj force x) + (-> obj force y) + (-> obj force z) + ) + (format + #t + " torque ~f ~f ~f~%" + (-> obj torque x) + (-> obj torque y) + (-> obj torque z) + ) + 0 + (none) + ) + +;; definition of type rigid-body-platform-constants +(deftype rigid-body-platform-constants (structure) + ((drag-factor float :offset-assert 0) + (buoyancy-factor float :offset-assert 4) + (max-buoyancy-depth meters :offset-assert 8) + (gravity-factor float :offset-assert 12) + (gravity meters :offset-assert 16) + (player-weight meters :offset-assert 20) + (player-bonk-factor float :offset-assert 24) + (player-dive-factor float :offset-assert 28) + (player-force-distance meters :offset-assert 32) + (player-force-clamp meters :offset-assert 36) + (player-force-timeout uint64 :offset-assert 40) + (explosion-force meters :offset-assert 48) + (linear-damping float :offset-assert 52) + (angular-damping float :offset-assert 56) + (control-point-count int32 :offset-assert 60) + (mass float :offset-assert 64) + (inertial-tensor-x meters :offset-assert 68) + (inertial-tensor-y meters :offset-assert 72) + (inertial-tensor-z meters :offset-assert 76) + (cm-joint-x meters :offset-assert 80) + (cm-joint-y meters :offset-assert 84) + (cm-joint-z meters :offset-assert 88) + (idle-distance meters :offset-assert 92) + (platform basic :offset-assert 96) + (sound-name basic :offset-assert 100) + ) + :method-count-assert 9 + :size-assert #x68 + :flag-assert #x900000068 + ) + +;; definition of type rigid-body-control-point-inline-array +(deftype rigid-body-control-point-inline-array (inline-array-class) + ((data rigid-body-control-point :inline :dynamic :offset 16) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +;; failed to figure out what this is: +(set! (-> rigid-body-control-point-inline-array heap-base) (the-as uint 48)) + +;; definition of type rigid-body-platform +(deftype rigid-body-platform (process-drawable) + ((root-overlay collide-shape-moving :offset 112) + (info rigid-body-platform-constants :offset-assert 176) + (rbody rigid-body :inline :offset-assert 192) + (control-point-array rigid-body-control-point-inline-array :offset-assert 616) + (player-velocity vector :inline :offset-assert 624) + (player-velocity-prev vector :inline :offset-assert 640) + (player-force-position vector :inline :offset-assert 656) + (player-force vector :inline :offset-assert 672) + (sim-time-remaining float :offset-assert 688) + (float-height-offset float :offset-assert 692) + (player-attack-id int32 :offset-assert 696) + (player-bonk-timeout uint64 :offset-assert 704) + (water-anim water-anim :offset-assert 712) + (player-contact basic :offset-assert 716) + (player-impulse collide-shape-prim-mesh :offset-assert 720) + ) + :heap-base #x270 + :method-count-assert 35 + :size-assert #x2d4 + :flag-assert #x23027002d4 + (:methods + (rigid-body-platform-idle () none 20) + (rigid-body-platform-float () none 21) + (TODO-RENAME-22 (_type_ vector basic) float 22) + (TODO-RENAME-23 (_type_ basic) none 23) + (TODO-RENAME-24 (_type_ rigid-body-control-point basic) none 24) + (TODO-RENAME-25 (_type_) none 25) + (TODO-RENAME-26 (_type_) none 26) + (TODO-RENAME-27 (_type_ vector) none 27) + (TODO-RENAME-28 (_type_) none 28) + (TODO-RENAME-29 (_type_ rigid-body-platform-constants) none 29) + (TODO-RENAME-30 (_type_) none 30) + (TODO-RENAME-31 (_type_) none 31) + (dummy-32 (_type_) none 32) + (dummy-33 (_type_) none 33) + (TODO-RENAME-34 (_type_) none 34) + ) + ) + +;; definition for method 7 of type rigid-body-platform +;; INFO: Return type mismatch process-drawable vs rigid-body-platform. +(defmethod relocate rigid-body-platform ((obj rigid-body-platform) (arg0 int)) + (if (nonzero? (-> obj control-point-array)) + (set! + (-> obj control-point-array) + (the-as + rigid-body-control-point-inline-array + (+ (the-as int (-> obj control-point-array)) arg0) + ) + ) + ) + (the-as + rigid-body-platform + ((the-as + (function process-drawable int process-drawable) + (find-parent-method rigid-body-platform 7) + ) + obj + arg0 + ) + ) + ) + +;; definition for method 22 of type rigid-body-platform +(defmethod + TODO-RENAME-22 + rigid-body-platform + ((obj rigid-body-platform) (arg0 vector) (arg1 basic)) + (let ((v1-0 (-> obj water-anim))) + 0.0 + (+ (the-as float (cond + (v1-0 + (let* ((a2-1 v1-0) + (a0-1 (if a2-1 + (-> a2-1 ppointer-water-anim 3) + ) + ) + ) + (if a0-1 + (get-ripple-height a0-1 arg0) + (-> v1-0 ppointer-water-anim 9) + ) + ) + ) + (else + (ocean-get-height arg0) + ) + ) + ) + (-> obj float-height-offset) + ) + ) + ) + +;; definition for method 24 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-24 + rigid-body-platform + ((obj rigid-body-platform) (arg0 rigid-body-control-point) (arg1 basic)) + (set! (-> arg0 world-pos w) (TODO-RENAME-22 obj (-> arg0 world-pos) arg1)) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (f0-2 (- (-> arg0 world-pos w) (-> arg0 world-pos y))) + (f30-0 (/ f0-2 (-> obj info max-buoyancy-depth))) + ) + (when (< 0.0 f0-2) + (vector-float*! + s4-0 + *y-vector* + (* + (* + (* + (* (-> obj rbody mass) (fmin 1.0 f30-0)) + (/ (-> obj info gravity) (the float (-> obj info control-point-count))) + ) + (-> obj info gravity-factor) + ) + (-> obj info buoyancy-factor) + ) + ) + (TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0) + (vector-float*! + s4-0 + (-> arg0 velocity) + (* (* -1.0 (-> obj info drag-factor)) (fmin 1.0 f30-0)) + ) + (TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 25 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-25 rigid-body-platform ((obj rigid-body-platform)) + (when (or (-> obj player-impulse) (-> obj player-contact)) + (set! (-> obj player-impulse) #f) + (TODO-RENAME-16 + (-> obj rbody) + (-> obj player-force-position) + (-> obj player-force) + (-> obj info player-force-distance) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-26 rigid-body-platform ((obj rigid-body-platform)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (vector-float*! + a1-0 + *y-vector* + (* + (* (* -1.0 (-> obj info gravity-factor)) (-> obj info gravity)) + (-> obj rbody mass) + ) + ) + (TODO-RENAME-15 (-> obj rbody) a1-0) + ) + 0 + (none) + ) + +;; definition for method 27 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-27 + rigid-body-platform + ((obj rigid-body-platform) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 (-> obj rbody position)) + (set! (-> gp-0 y) 0.0) + (let* ((f0-1 (vector-length gp-0)) + (f1-1 (* 10.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! gp-0 gp-0 (/ f1-1 f0-1)) + (TODO-RENAME-15 (-> obj rbody) gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 23 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-23 + rigid-body-platform + ((obj rigid-body-platform) (arg0 basic)) + (let ((s4-0 (-> obj rbody matrix))) + (dotimes (s3-0 (-> obj info control-point-count)) + (let ((s2-0 (-> obj control-point-array data s3-0))) + (vector-matrix*! (-> s2-0 world-pos) (-> s2-0 local-pos) s4-0) + (TODO-RENAME-17 (-> obj rbody) (-> s2-0 world-pos) (-> s2-0 velocity)) + (TODO-RENAME-24 obj s2-0 arg0) + ) + ) + ) + (TODO-RENAME-26 obj) + (TODO-RENAME-25 obj) + 0 + (none) + ) + +;; definition for method 28 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod TODO-RENAME-28 rigid-body-platform ((obj rigid-body-platform)) + (if (-> obj info platform) + (dummy-35 (-> obj root-overlay)) + ) + (set! (-> obj player-velocity-prev quad) (-> obj player-velocity quad)) + (if *target* + (set! (-> obj player-velocity quad) (-> *target* control transv quad)) + (set! (-> obj player-velocity quad) (-> *null-vector* quad)) + ) + (+! + (-> obj sim-time-remaining) + (* + 0.0033333334 + (the + float + (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)) + ) + ) + ) + (let ((f30-0 0.016666668) + (f28-0 + (* + 0.0033333334 + (the float (logand #xffffff (-> *display* base-frame-counter))) + ) + ) + ) + (while (>= (-> obj sim-time-remaining) (* 0.5 f30-0)) + (clear-force-torque! (-> obj rbody)) + (TODO-RENAME-23 obj (the-as basic f28-0)) + (dummy-10 (-> obj rbody) f30-0) + (set! (-> obj sim-time-remaining) (- (-> obj sim-time-remaining) f30-0)) + ) + ) + (set! (-> obj player-contact) #f) + 0 + (none) + ) + +;; definition for function rigid-body-platform-event-handler +;; INFO: Return type mismatch vector vs object. +;; Used lq/sq +(defbehavior + rigid-body-platform-event-handler rigid-body-platform + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (when + (>= + (the-as + int + (- (-> *display* base-frame-counter) (-> self player-bonk-timeout)) + ) + (the-as int (-> self info player-force-timeout)) + ) + (set! (-> self player-bonk-timeout) (-> *display* base-frame-counter)) + (let* ((s5-0 arg0) + (v1-7 + (if + (and + (nonzero? s5-0) + (type-type? (-> s5-0 type) process-drawable) + ) + s5-0 + ) + ) + ) + (when v1-7 + (set! (-> self player-impulse) (the-as collide-shape-prim-mesh #t)) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-7) root trans quad) + ) + (let + ((f0-4 + (fmin + (* + (* + (* 0.00012207031 (the-as float (-> arg3 param 1))) + (-> self info player-bonk-factor) + ) + (-> self info player-weight) + ) + (-> self info player-force-clamp) + ) + ) + ) + (vector-float*! (-> self player-force) *y-vector* (- f0-4)) + ) + ) + ) + ) + ) + (('attack) + (let ((v1-16 (-> arg3 param 2))) + (when (!= v1-16 (-> self player-attack-id)) + (set! (-> self player-attack-id) (the-as int v1-16)) + (the-as vector (cond + ((= (-> arg3 param 1) 'flop) + (when + (>= + (the-as + int + (- + (-> *display* base-frame-counter) + (-> self player-bonk-timeout) + ) + ) + (the-as int (-> self info player-force-timeout)) + ) + (set! + (-> self player-bonk-timeout) + (-> *display* base-frame-counter) + ) + (let* ((gp-1 arg0) + (v1-24 + (if + (and + (nonzero? gp-1) + (type-type? (-> gp-1 type) process-drawable) + ) + gp-1 + ) + ) + ) + (when v1-24 + (set! + (-> self player-impulse) + (the-as collide-shape-prim-mesh #t) + ) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-24) root trans quad) + ) + (let + ((f0-9 + (fmin + (* + (* 16.0 (-> self info player-weight)) + (-> self info player-dive-factor) + ) + (-> self info player-force-clamp) + ) + ) + ) + (vector-float*! + (-> self player-force) + *y-vector* + (- f0-9) + ) + ) + ) + ) + ) + ) + ((= (-> arg3 param 1) 'explode) + (let* ((gp-2 arg0) + (v1-34 + (if + (and + (nonzero? gp-2) + (type-type? (-> gp-2 type) process-drawable) + ) + gp-2 + ) + ) + ) + (when v1-34 + (set! + (-> self player-impulse) + (the-as collide-shape-prim-mesh #t) + ) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-34) root trans quad) + ) + (vector-! + (-> self player-force) + (-> self rbody position) + (-> (the-as process-drawable v1-34) root trans) + ) + (vector-normalize! + (-> self player-force) + (-> self info explosion-force) + ) + ) + ) + ) + (else + (the-as vector #f) + ) + ) + ) + ) + ) + ) + (('impulse) + (let ((s5-1 arg0)) + (when + (if (and (nonzero? s5-1) (type-type? (-> s5-1 type) process-drawable)) + s5-1 + ) + (set! (-> self player-impulse) (the-as collide-shape-prim-mesh #t)) + (set! (-> self player-force-position quad) (-> self rbody position quad)) + (let ((v0-0 (-> self player-force))) + (set! (-> v0-0 quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-0 + ) + ) + ) + ) + (('edge-grabbed) + (let ((v1-44 (-> arg3 param 0))) + (when (not (-> self player-impulse)) + (set! (-> self player-contact) #t) + (set! + (-> self player-force-position quad) + (-> (the-as vector (+ v1-44 32)) quad) + ) + (vector-float*! + (-> self player-force) + *y-vector* + (* -1.0 (-> self info player-weight)) + ) + ) + ) + ) + (('ridden) + (let ((v1-48 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-48) + (let ((v1-50 (handle->process (-> (the-as (pointer handle) v1-48) 0)))) + (when + (and + v1-50 + (= v1-50 *target*) + (!= (-> *target* control unknown-surface mode) 'swim) + ) + (when (not (-> self player-impulse)) + (set! (-> self player-contact) #t) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-50) root trans quad) + ) + (set! (-> self player-force quad) (-> *null-vector* quad)) + (vector+*! + (-> self player-force) + (-> self player-force) + *y-vector* + (* -1.0 (-> self info player-weight)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function rigid-body-platform-post +(defbehavior rigid-body-platform-post rigid-body-platform () + (set! + (-> self rbody lin-momentum-damping-factor) + (-> self info linear-damping) + ) + (set! + (-> self rbody ang-momentum-damping-factor) + (-> self info angular-damping) + ) + (if (-> self player-impulse) + (sound-play-by-name + (string->sound-name (the-as string (-> self info sound-name))) + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (TODO-RENAME-28 self) + (quaternion-copy! (-> self root-overlay quat) (-> self rbody rotation)) + (TODO-RENAME-18 (-> self rbody) (-> self root-overlay trans)) + (if (-> self info platform) + (rider-post) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(let + ((gp-0 + (new 'static 'state + :name 'rigid-body-platform-idle + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (method-set! rigid-body-platform 20 (the-as function gp-0)) + (set! + (-> gp-0 trans) + (the-as + (function object) + (lambda :behavior rigid-body-platform + () + (when + (and + *target* + (>= + (-> self info idle-distance) + (vector-vector-distance + (-> self root-overlay trans) + (-> *target* control trans) + ) + ) + ) + (let ((t9-1 (the-as (function object) enter-state))) + (set! + (-> self next-state) + (the-as state (method-of-object self rigid-body-platform-float)) + ) + (t9-1) + ) + ) + (none) + ) + ) + ) + (set! (-> gp-0 code) (lambda :behavior rigid-body-platform () (while #t + (suspend) + ) + (none) + ) + ) + (set! (-> gp-0 post) ja-post) + ) + +;; TODO - something here is causing the tests to crash! +; (let +; ((gp-1 +; (new 'static 'state +; :name 'rigid-body-platform-float +; :next #f +; :exit #f +; :code #f +; :trans #f +; :post #f +; :enter #f +; :event #f +; ) +; ) +; ) +; (method-set! rigid-body-platform 21 (the-as function gp-1)) +; (set! (-> gp-1 event) rigid-body-platform-event-handler) +; (set! +; (-> gp-1 trans) +; (the-as +; (function object) +; (lambda :behavior rigid-body-platform +; () +; (when +; (or +; (not *target*) +; (< +; (-> self info idle-distance) +; (vector-vector-distance +; (-> self root-overlay trans) +; (-> *target* control trans) +; ) +; ) +; ) +; (let ((t9-1 (the-as (function object) enter-state))) +; (set! +; (-> self next-state) +; (the-as state (method-of-object self rigid-body-platform-idle)) +; ) +; (t9-1) +; ) +; ) +; (none) +; ) +; ) +; ) +; (set! (-> gp-1 code) (lambda :behavior rigid-body-platform () (while #t +; (suspend) +; ) +; (none) +; ) +; ) +; (set! (-> gp-1 post) rigid-body-platform-post) +; ) + +;; definition for method 29 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod + TODO-RENAME-29 + rigid-body-platform + ((obj rigid-body-platform) (arg0 rigid-body-platform-constants)) + (set! (-> obj info) arg0) + (set! + (-> obj control-point-array) + (new + 'process + 'rigid-body-control-point-inline-array + (-> obj info control-point-count) + ) + ) + (logior! (-> obj skel status) 1) + (dummy-47 (-> obj root-overlay)) + (set-vector! + (-> obj rbody cm-offset-joint) + (-> obj info cm-joint-x) + (-> obj info cm-joint-y) + (-> obj info cm-joint-z) + 1.0 + ) + (TODO-RENAME-22 + (-> obj rbody) + (-> obj root-overlay trans) + (-> obj root-overlay quat) + (-> obj info linear-damping) + (-> obj info angular-damping) + ) + (TODO-RENAME-9 + (-> obj rbody) + (-> obj info mass) + (-> obj info inertial-tensor-x) + (-> obj info inertial-tensor-y) + (-> obj info inertial-tensor-z) + ) + (set! (-> obj player-impulse) #f) + (set! (-> obj player-contact) #f) + (set! (-> obj player-bonk-timeout) (-> *display* base-frame-counter)) + (set! (-> obj player-force quad) (-> *null-vector* quad)) + (set! (-> obj player-velocity quad) (-> *null-vector* quad)) + (set! (-> obj player-velocity-prev quad) (-> *null-vector* quad)) + (set! + (-> obj water-anim) + (the-as water-anim (entity-actor-lookup (-> obj entity) 'water-actor 0)) + ) + 0 + (none) + ) + +;; definition for method 30 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-30 rigid-body-platform ((obj rigid-body-platform)) + (let + ((s5-0 + (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player)) + ) + ) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) default-collision-reaction) + (set! (-> s5-0 no-reaction) nothing) + (let ((t9-2 (method-of-object s5-0 dummy-29))) + 1 + (t9-2) + ) + (let + ((s4-0 + (new + 'process + 'collide-shape-prim-mesh + s5-0 + (the-as uint 0) + (the-as uint 0) + ) + ) + ) + (set! (-> s4-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s4-0 collide-with) (the-as uint 16)) + (set! (-> s4-0 prim-core action) (the-as uint 3)) + (set! (-> s4-0 prim-core offense) 4) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + ) + ((method-of-object s5-0 dummy-46)) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + ((method-of-object s5-0 dummy-50)) + (set! (-> obj root-overlay) s5-0) + ) + 0 + (none) + ) + +;; definition for symbol *rigid-body-platform-constants*, type rigid-body-platform-constants +(define + *rigid-body-platform-constants* + (new 'static 'rigid-body-platform-constants + :drag-factor 0.8 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 1.5) + :gravity-factor 1.0 + :gravity (meters 10.0) + :player-weight (meters 6.6) + :player-bonk-factor 1.0 + :player-dive-factor 1.0 + :player-force-distance (meters 1000.0) + :player-force-clamp (meters 1000000.0) + :player-force-timeout #x1e + :explosion-force (meters 1000.0) + :linear-damping 1.0 + :angular-damping 1.0 + :control-point-count 1 + :mass 2.0 + :inertial-tensor-x (meters 3.0) + :inertial-tensor-y (meters 2.0) + :inertial-tensor-z (meters 3.0) + :idle-distance (meters 50.0) + :platform #t + :sound-name #f + ) + ) + +;; definition for method 34 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-34 rigid-body-platform ((obj rigid-body-platform)) + (with-pp + (let ((t9-0 (the-as (function object) enter-state))) + (set! + (-> pp next-state) + (the-as state (method-of-object obj rigid-body-platform-idle)) + ) + (t9-0) + ) + 0 + (none) + ) + ) + +;; definition for method 31 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-31 rigid-body-platform ((obj rigid-body-platform)) + (set! (-> obj float-height-offset) 0.0) + (TODO-RENAME-29 obj *rigid-body-platform-constants*) + (let ((s5-0 (-> obj info control-point-count))) + (dotimes (s4-0 s5-0) + (let ((s3-0 (-> obj control-point-array data s4-0))) + (let ((f30-0 (* 65536.0 (/ (the float s4-0) (the float s5-0))))) + (set! (-> s3-0 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-0 local-pos y) -10240.0) + (set! (-> s3-0 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-0 local-pos w) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + copy-defaults! + rigid-body-platform + ((obj rigid-body-platform) (arg0 res-lump)) + (set! (-> obj mask) (the-as process-mask (logior #x80000 (-> obj mask)))) + (TODO-RENAME-30 obj) + (process-drawable-from-entity! obj arg0) + (TODO-RENAME-31 obj) + (TODO-RENAME-34 obj) + 0 + (none) + ) diff --git a/goal_src/levels/common/water-anim.gc b/goal_src/levels/common/water-anim.gc index c9e5f5e24a..0fa04b5a75 100644 --- a/goal_src/levels/common/water-anim.gc +++ b/goal_src/levels/common/water-anim.gc @@ -5,3 +5,1981 @@ ;; name in dgo: water-anim ;; dgos: GAME, COMMON, L1, WATER-AN +;; definition of type water-anim +(deftype water-anim (water-vol) + ((ppointer-water-anim (pointer water-anim) :offset 24) + (look int32 :offset-assert 212) + (play-ambient-sound? basic :offset-assert 216) + ) + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; failed to figure out what this is: +(let + ((v1-1 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 163840.0) + :version #x6 + ) + ) + ) + (set! (-> v1-1 jgeo) 0) + (set! (-> v1-1 janim) -1) + (set! (-> v1-1 mgeo 0) (the-as uint 1)) + (set! (-> v1-1 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-qbert-sg* v1-1) + ) + +;; failed to figure out what this is: +(let + ((v1-2 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 90112.0) + :version #x6 + ) + ) + ) + (set! (-> v1-2 jgeo) 2) + (set! (-> v1-2 janim) -1) + (set! (-> v1-2 mgeo 0) (the-as uint 3)) + (set! (-> v1-2 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-platform-room-sg* v1-2) + ) + +;; failed to figure out what this is: +(let + ((v1-3 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 86016.0) + :version #x6 + ) + ) + ) + (set! (-> v1-3 jgeo) 4) + (set! (-> v1-3 janim) -1) + (set! (-> v1-3 mgeo 0) (the-as uint 5)) + (set! (-> v1-3 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-helix-room-sg* v1-3) + ) + +;; failed to figure out what this is: +(let + ((v1-4 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds + (new 'static 'vector :x 61440.0 :z -147456.0 :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-4 jgeo) 0) + (set! (-> v1-4 janim) -1) + (set! (-> v1-4 mgeo 0) (the-as uint 1)) + (set! (-> v1-4 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-big-room-sg* v1-4) + ) + +;; failed to figure out what this is: +(let + ((v1-5 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 204800.0) + :version #x6 + ) + ) + ) + (set! (-> v1-5 jgeo) 2) + (set! (-> v1-5 janim) -1) + (set! (-> v1-5 mgeo 0) (the-as uint 3)) + (set! (-> v1-5 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-first-room-from-entrance-sg* v1-5) + ) + +;; failed to figure out what this is: +(let + ((v1-6 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 196608.0) + :version #x6 + ) + ) + ) + (set! (-> v1-6 jgeo) 4) + (set! (-> v1-6 janim) -1) + (set! (-> v1-6 mgeo 0) (the-as uint 5)) + (set! (-> v1-6 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-qbert-room-sg* v1-6) + ) + +;; failed to figure out what this is: +(let + ((v1-7 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 122880.0) + :version #x6 + ) + ) + ) + (set! (-> v1-7 jgeo) 6) + (set! (-> v1-7 janim) -1) + (set! (-> v1-7 mgeo 0) (the-as uint 7)) + (set! (-> v1-7 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-first-right-branch-sg* v1-7) + ) + +;; failed to figure out what this is: +(let + ((v1-8 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-8 jgeo) 8) + (set! (-> v1-8 janim) -1) + (set! (-> v1-8 mgeo 0) (the-as uint 9)) + (set! (-> v1-8 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-circular-with-bullys-sg* v1-8) + ) + +;; failed to figure out what this is: +(let + ((v1-9 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-9 jgeo) 10) + (set! (-> v1-9 janim) -1) + (set! (-> v1-9 mgeo 0) (the-as uint 11)) + (set! (-> v1-9 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-with-one-whirlpool-sg* v1-9) + ) + +;; failed to figure out what this is: +(let + ((v1-10 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 106496.0) + :version #x6 + ) + ) + ) + (set! (-> v1-10 jgeo) 12) + (set! (-> v1-10 janim) -1) + (set! (-> v1-10 mgeo 0) (the-as uint 13)) + (set! (-> v1-10 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-with-three-whirlpools-sg* v1-10) + ) + +;; failed to figure out what this is: +(let + ((v1-11 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-11 jgeo) 14) + (set! (-> v1-11 janim) -1) + (set! (-> v1-11 mgeo 0) (the-as uint 15)) + (set! (-> v1-11 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-start-of-helix-slide-sg* v1-11) + ) + +;; failed to figure out what this is: +(let + ((v1-12 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 184320.0) + :version #x6 + ) + ) + ) + (set! (-> v1-12 jgeo) 16) + (set! (-> v1-12 janim) -1) + (set! (-> v1-12 mgeo 0) (the-as uint 17)) + (set! (-> v1-12 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-room-above-exit-chamber-sg* v1-12) + ) + +;; failed to figure out what this is: +(let + ((v1-13 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds + (new 'static 'vector :x 20480.0 :z -12288.0 :w 98304.0) + :version #x6 + ) + ) + ) + (set! (-> v1-13 jgeo) 18) + (set! (-> v1-13 janim) -1) + (set! (-> v1-13 mgeo 0) (the-as uint 19)) + (set! (-> v1-13 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-before-big-room-sg* v1-13) + ) + +;; failed to figure out what this is: +(let + ((v1-14 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-14 jgeo) 20) + (set! (-> v1-14 janim) -1) + (set! (-> v1-14 mgeo 0) (the-as uint 21)) + (set! (-> v1-14 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-short-piece-sg* v1-14) + ) + +;; failed to figure out what this is: +(let + ((v1-15 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-15 jgeo) 22) + (set! (-> v1-15 janim) -1) + (set! (-> v1-15 mgeo 0) (the-as uint 23)) + (set! (-> v1-15 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-big-room-upper-water-sg* v1-15) + ) + +;; failed to figure out what this is: +(let + ((v1-16 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-16 jgeo) 0) + (set! (-> v1-16 janim) -1) + (set! (-> v1-16 mgeo 0) (the-as uint 1)) + (set! (-> v1-16 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-center-pool-sg* v1-16) + ) + +;; failed to figure out what this is: +(let + ((v1-17 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds + (new 'static 'vector :x 24576.0 :z 20480.0 :w 249856.0) + :version #x6 + ) + ) + ) + (set! (-> v1-17 jgeo) 2) + (set! (-> v1-17 janim) -1) + (set! (-> v1-17 mgeo 0) (the-as uint 3)) + (set! (-> v1-17 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-lower-right-pool-sg* v1-17) + ) + +;; failed to figure out what this is: +(let + ((v1-18 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 151552.0) + :version #x6 + ) + ) + ) + (set! (-> v1-18 jgeo) 4) + (set! (-> v1-18 janim) -1) + (set! (-> v1-18 mgeo 0) (the-as uint 5)) + (set! (-> v1-18 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-mid-right-pool-sg* v1-18) + ) + +;; failed to figure out what this is: +(let + ((v1-19 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds + (new 'static 'vector :x -4096.0 :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-19 jgeo) 6) + (set! (-> v1-19 janim) -1) + (set! (-> v1-19 mgeo 0) (the-as uint 7)) + (set! (-> v1-19 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-lower-left-pool-sg* v1-19) + ) + +;; failed to figure out what this is: +(let + ((v1-20 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 208896.0) + :version #x6 + ) + ) + ) + (set! (-> v1-20 jgeo) 8) + (set! (-> v1-20 janim) -1) + (set! (-> v1-20 mgeo 0) (the-as uint 9)) + (set! (-> v1-20 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-mid-left-pool-sg* v1-20) + ) + +;; failed to figure out what this is: +(let + ((v1-21 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave-water" + :bounds + (new 'static 'vector :z -12288.0 :w 90112.0) + :version #x6 + ) + ) + ) + (set! (-> v1-21 jgeo) 0) + (set! (-> v1-21 janim) -1) + (set! (-> v1-21 mgeo 0) (the-as uint 1)) + (set! (-> v1-21 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-water-with-crystal-sg* v1-21) + ) + +;; failed to figure out what this is: +(let + ((v1-22 + (new 'static 'skeleton-group + :art-group-name "water-anim-robocave" + :bounds (new 'static 'vector :w 221184.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-22 jgeo) 0) + (set! (-> v1-22 janim) -1) + (set! (-> v1-22 mgeo 0) (the-as uint 1)) + (set! (-> v1-22 lod-dist 0) 81920.0) + (set! (-> v1-22 mgeo 1) (the-as uint 2)) + (set! (-> v1-22 lod-dist 1) 4095996000.0) + (set! *water-anim-robocave-main-pool-sg* v1-22) + ) + +;; failed to figure out what this is: +(let + ((v1-23 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :z -10240.0 :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-23 jgeo) 0) + (set! (-> v1-23 janim) -1) + (set! (-> v1-23 mgeo 0) (the-as uint 1)) + (set! (-> v1-23 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-by-arena-sg* v1-23) + ) + +;; failed to figure out what this is: +(let + ((v1-24 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 57344.0) + :version #x6 + ) + ) + ) + (set! (-> v1-24 jgeo) 2) + (set! (-> v1-24 janim) -1) + (set! (-> v1-24 mgeo 0) (the-as uint 3)) + (set! (-> v1-24 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skeleton-sg* v1-24) + ) + +;; failed to figure out what this is: +(let + ((v1-25 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :z 16384.0 :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-25 jgeo) 4) + (set! (-> v1-25 janim) -1) + (set! (-> v1-25 mgeo 0) (the-as uint 5)) + (set! (-> v1-25 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-behind-skeleton-sg* v1-25) + ) + +;; failed to figure out what this is: +(let + ((v1-26 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 57344.0) + :version #x6 + ) + ) + ) + (set! (-> v1-26 jgeo) 6) + (set! (-> v1-26 janim) -1) + (set! (-> v1-26 mgeo 0) (the-as uint 7)) + (set! (-> v1-26 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skull-back-sg* v1-26) + ) + +;; failed to figure out what this is: +(let + ((v1-27 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 65536.0) + :version #x6 + ) + ) + ) + (set! (-> v1-27 jgeo) 8) + (set! (-> v1-27 janim) -1) + (set! (-> v1-27 mgeo 0) (the-as uint 9)) + (set! (-> v1-27 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skull-front-sg* v1-27) + ) + +;; failed to figure out what this is: +(let + ((v1-28 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 53248.0) + :version #x6 + ) + ) + ) + (set! (-> v1-28 jgeo) 10) + (set! (-> v1-28 janim) -1) + (set! (-> v1-28 mgeo 0) (the-as uint 11)) + (set! (-> v1-28 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-other-near-skull-sg* v1-28) + ) + +;; failed to figure out what this is: +(let + ((v1-29 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-29 jgeo) 12) + (set! (-> v1-29 janim) -1) + (set! (-> v1-29 mgeo 0) (the-as uint 13)) + (set! (-> v1-29 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-near-skull-sg* v1-29) + ) + +;; failed to figure out what this is: +(let + ((v1-30 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 65536.0) + :version #x6 + ) + ) + ) + (set! (-> v1-30 jgeo) 14) + (set! (-> v1-30 janim) -1) + (set! (-> v1-30 mgeo 0) (the-as uint 15)) + (set! (-> v1-30 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-under-spine-sg* v1-30) + ) + +;; failed to figure out what this is: +(let + ((v1-31 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 86016.0) + :version #x6 + ) + ) + ) + (set! (-> v1-31 jgeo) 16) + (set! (-> v1-31 janim) -1) + (set! (-> v1-31 mgeo 0) (the-as uint 17)) + (set! (-> v1-31 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-by-dock-sg* v1-31) + ) + +;; failed to figure out what this is: +(let + ((v1-32 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :x -4096.0 :z -4096.0 :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-32 jgeo) 18) + (set! (-> v1-32 janim) -1) + (set! (-> v1-32 mgeo 0) (the-as uint 19)) + (set! (-> v1-32 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-island-near-dock-sg* v1-32) + ) + +;; failed to figure out what this is: +(let + ((v1-33 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 40960.0) + :version #x6 + ) + ) + ) + (set! (-> v1-33 jgeo) 20) + (set! (-> v1-33 janim) -1) + (set! (-> v1-33 mgeo 0) (the-as uint 21)) + (set! (-> v1-33 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-lonely-island-sg* v1-33) + ) + +;; failed to figure out what this is: +(let + ((v1-34 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 69632.0) + :version #x6 + ) + ) + ) + (set! (-> v1-34 jgeo) 22) + (set! (-> v1-34 janim) -1) + (set! (-> v1-34 mgeo 0) (the-as uint 23)) + (set! (-> v1-34 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-dark-eco-pool-sg* v1-34) + ) + +;; failed to figure out what this is: +(let + ((v1-35 + (new 'static 'skeleton-group + :art-group-name "water-anim-ogre" + :bounds (new 'static 'vector :w 458752.0) + :version #x6 + ) + ) + ) + (set! (-> v1-35 jgeo) 0) + (set! (-> v1-35 janim) -1) + (set! (-> v1-35 mgeo 0) (the-as uint 1)) + (set! (-> v1-35 lod-dist 0) 4095996000.0) + (set! *water-anim-ogre-lava-sg* v1-35) + ) + +;; failed to figure out what this is: +(let + ((v1-36 + (new 'static 'skeleton-group + :art-group-name "water-anim-jungle" + :bounds (new 'static 'vector :w 372736.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-36 jgeo) 0) + (set! (-> v1-36 janim) -1) + (set! (-> v1-36 mgeo 0) (the-as uint 1)) + (set! (-> v1-36 lod-dist 0) 81920.0) + (set! (-> v1-36 mgeo 1) (the-as uint 2)) + (set! (-> v1-36 lod-dist 1) 4095996000.0) + (set! *water-anim-jungle-river-sg* v1-36) + ) + +;; failed to figure out what this is: +(let + ((v1-37 + (new 'static 'skeleton-group + :art-group-name "water-anim-village3" + :bounds + (new 'static 'vector :x 61440.0 :z 40960.0 :w 667648.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-37 jgeo) 0) + (set! (-> v1-37 janim) -1) + (set! (-> v1-37 mgeo 0) (the-as uint 1)) + (set! (-> v1-37 lod-dist 0) 81920.0) + (set! (-> v1-37 mgeo 1) (the-as uint 2)) + (set! (-> v1-37 lod-dist 1) 4095996000.0) + (set! *water-anim-village3-lava-sg* v1-37) + ) + +;; failed to figure out what this is: +(let + ((v1-38 + (new 'static 'skeleton-group + :art-group-name "water-anim-training" + :bounds + (new 'static 'vector :x -73728.0 :w 212992.0) + :version #x6 + ) + ) + ) + (set! (-> v1-38 jgeo) 0) + (set! (-> v1-38 janim) -1) + (set! (-> v1-38 mgeo 0) (the-as uint 1)) + (set! (-> v1-38 lod-dist 0) 4095996000.0) + (set! *water-anim-training-lake-sg* v1-38) + ) + +;; failed to figure out what this is: +(let + ((v1-39 + (new 'static 'skeleton-group + :art-group-name "water-anim-darkcave" + :bounds (new 'static 'vector :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-39 jgeo) 0) + (set! (-> v1-39 janim) -1) + (set! (-> v1-39 mgeo 0) (the-as uint 1)) + (set! (-> v1-39 lod-dist 0) 4095996000.0) + (set! *water-anim-darkcave-water-with-crystal-sg* v1-39) + ) + +;; failed to figure out what this is: +(let + ((v1-40 + (new 'static 'skeleton-group + :art-group-name "water-anim-rolling" + :bounds + (new 'static 'vector :x -40960.0 :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-40 jgeo) 0) + (set! (-> v1-40 janim) -1) + (set! (-> v1-40 mgeo 0) (the-as uint 1)) + (set! (-> v1-40 lod-dist 0) 4095996000.0) + (set! *water-anim-rolling-water-back-sg* v1-40) + ) + +;; failed to figure out what this is: +(let + ((v1-41 + (new 'static 'skeleton-group + :art-group-name "water-anim-rolling" + :bounds (new 'static 'vector :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-41 jgeo) 2) + (set! (-> v1-41 janim) -1) + (set! (-> v1-41 mgeo 0) (the-as uint 3)) + (set! (-> v1-41 lod-dist 0) 4095996000.0) + (set! *water-anim-rolling-water-front-sg* v1-41) + ) + +;; failed to figure out what this is: +(let + ((v1-42 + (new 'static 'skeleton-group + :art-group-name "water-anim-finalboss" + :bounds (new 'static 'vector :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-42 jgeo) 0) + (set! (-> v1-42 janim) -1) + (set! (-> v1-42 mgeo 0) (the-as uint 1)) + (set! (-> v1-42 lod-dist 0) 4095996000.0) + (set! *water-anim-finalboss-dark-eco-pool-sg* v1-42) + ) + +;; failed to figure out what this is: +(let + ((v1-43 + (new 'static 'skeleton-group + :art-group-name "water-anim-lavatube" + :bounds + (new 'static 'vector :y -28672.0 :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-43 jgeo) 0) + (set! (-> v1-43 janim) -1) + (set! (-> v1-43 mgeo 0) (the-as uint 1)) + (set! (-> v1-43 lod-dist 0) 4095996000.0) + (set! *water-anim-lavatube-energy-lava-sg* v1-43) + ) + +;; failed to figure out what this is: +(let + ((v1-44 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds + (new 'static 'vector :x -61440.0 :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-44 jgeo) 0) + (set! (-> v1-44 janim) -1) + (set! (-> v1-44 mgeo 0) (the-as uint 1)) + (set! (-> v1-44 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-sg* v1-44) + ) + +;; failed to figure out what this is: +(let + ((v1-45 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds (new 'static 'vector :w 18432.0) + :version #x6 + ) + ) + ) + (set! (-> v1-45 jgeo) 6) + (set! (-> v1-45 janim) -1) + (set! (-> v1-45 mgeo 0) (the-as uint 7)) + (set! (-> v1-45 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-fountain-sg* v1-45) + ) + +;; failed to figure out what this is: +(let + ((v1-46 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds (new 'static 'vector :w 143360.0) + :version #x6 + ) + ) + ) + (set! (-> v1-46 jgeo) 2) + (set! (-> v1-46 janim) -1) + (set! (-> v1-46 mgeo 0) (the-as uint 3)) + (set! (-> v1-46 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-mid-sg* v1-46) + ) + +;; failed to figure out what this is: +(let + ((v1-47 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds + (new 'static 'vector :x 24576.0 :z -69632.0 :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-47 jgeo) 4) + (set! (-> v1-47 janim) -1) + (set! (-> v1-47 mgeo 0) (the-as uint 5)) + (set! (-> v1-47 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-top-sg* v1-47) + ) + +;; failed to figure out what this is: +(let + ((v1-48 + (new 'static 'skeleton-group + :art-group-name "water-anim-village2" + :bounds (new 'static 'vector :w 2867.2) + :version #x6 + ) + ) + ) + (set! (-> v1-48 jgeo) 0) + (set! (-> v1-48 janim) -1) + (set! (-> v1-48 mgeo 0) (the-as uint 1)) + (set! (-> v1-48 lod-dist 0) 4095996000.0) + (set! *water-anim-village2-bucket-sg* v1-48) + ) + +;; definition of type water-anim-look +(deftype water-anim-look (structure) + ((skel-group symbol :offset-assert 0) + (anim int32 :offset-assert 4) + (ambient-sound-spec sound-spec :offset-assert 8) + ) + :method-count-assert 9 + :size-assert #xc + :flag-assert #x90000000c + ) + +;; definition for symbol *water-anim-look*, type (array water-anim-look) +(define + *water-anim-look* + (the-as (array water-anim-look) + (new + 'static + 'boxed-array + :type water-anim-look :length 48 :allocated-length 48 + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-big-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 70 + :fo-max 80 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-first-room-from-entrance-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 50 + :fo-max 60 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-qbert-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 48 + :fo-max 58 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-first-right-branch-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 30 + :fo-max 40 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-circular-with-bullys-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 15 + :fo-max 25 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-with-one-whirlpool-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 27 + :fo-max 37 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-with-three-whirlpools-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 26 + :fo-max 36 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-start-of-helix-slide-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 25 + :fo-max 35 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-room-above-exit-chamber-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 45 + :fo-max 55 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-before-big-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-dark-eco-qbert-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 40 + :fo-max 50 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-short-piece-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-big-room-upper-water-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 27 + :fo-max 37 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-dark-eco-platform-room-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 22 + :fo-max 32 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-water-with-crystal-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-maincave-center-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 70 + :fo-max 80 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-lower-right-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 40 + :fo-max 50 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-mid-right-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 37 + :fo-max 47 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-lower-left-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-maincave-mid-left-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 51 + :fo-max 61 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-robocave-main-pool-sg* + :anim 3 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 54 + :fo-max 64 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-by-arena-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skeleton-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-behind-skeleton-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skull-back-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skull-front-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-other-near-skull-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-near-skull-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-under-spine-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-by-dock-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-island-near-dock-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-lonely-island-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-dark-eco-pool-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 17 + :fo-max 27 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-ogre-lava-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-jungle-river-sg* + :anim 3 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village3-lava-sg* + :anim 3 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-training-lake-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-darkcave-water-with-crystal-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-rolling-water-back-sg* + :anim 4 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-rolling-water-front-sg* + :anim 4 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-dark-eco-helix-room-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x68 + #x65 + #x6c + #x69 + #x78 + #x2d + #x64 + #x61 + #x72 + #x6b + #x2d + #x65 + #x63 + #x6f + #x0 + #x0 + ) + :volume #x400 + :fo-min #x78 + :fo-max #x82 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-finalboss-dark-eco-pool-sg* + :anim 2 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 19 + :fo-max 29 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-lavatube-energy-lava-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village1-rice-paddy-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village1-fountain-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-village1-rice-paddy-mid-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-village1-rice-paddy-top-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village2-bucket-sg* + :anim 2 + :ambient-sound-spec #f + ) + ) + ) + ) + +;; TODO - something here is causing the tests to crash! +; (let +; ((gp-0 +; (new 'static 'state +; :name 'water-vol-idle +; :next #f +; :exit #f +; :code #f +; :trans #f +; :post #f +; :enter #f +; :event #f +; ) +; ) +; ) +; (inherit-state gp-0 (the-as state (method-of-type water-vol water-vol-idle))) +; (method-set! water-anim 20 (the-as function gp-0)) +; (set! +; (-> gp-0 event) +; (lambda :behavior water-anim +; ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) +; (case arg2 +; (('move-to) +; (set! +; (-> self root trans quad) +; (-> (the-as vector (-> arg3 param 0)) quad) +; ) +; (set! (-> self water-height) (-> self root trans y)) +; (if (nonzero? (-> self sound)) +; (update-trans! (-> self sound) (-> self root trans)) +; ) +; (let ((v0-0 (logclear (-> self mask) (process-mask sleep-code)))) +; (set! (-> self mask) v0-0) +; v0-0 +; ) +; ) +; ) +; ) +; ) +; (set! +; (-> gp-0 trans) +; (the-as +; (function object) +; (lambda :behavior water-anim +; () +; (let +; ((t9-0 +; (-> +; (the-as (state none) (method-of-type water-vol water-vol-idle)) +; trans +; ) +; ) +; ) +; (if t9-0 +; (t9-0) +; ) +; ) +; (if (< (-> (math-camera-pos) y) (+ -8192.0 (-> self root trans y))) +; (logior! (-> self draw status) 2) +; (set! (-> self draw status) (logand -3 (-> self draw status))) +; ) +; (if (and (-> self play-ambient-sound?) (nonzero? (-> self sound))) +; (update! (-> self sound)) +; ) +; (none) +; ) +; ) +; ) +; (set! (-> gp-0 code) (lambda :behavior water-anim () (while #t +; (ja-post) +; (logior! +; (-> self mask) +; (process-mask +; sleep-code +; ) +; ) +; (suspend) +; ) +; (none) +; ) +; ) +; ) + +;; definition for method 28 of type water-anim +(defmethod get-ripple-height water-anim ((obj water-anim) (arg0 vector)) + (ripple-find-height obj 0 arg0) + ) + +;; definition for method 24 of type water-anim +;; INFO: Return type mismatch symbol vs none. +(defmethod dummy-24 water-anim () + (none) + ) + +;; definition for method 25 of type water-anim +;; Used lq/sq +(defmethod TODO-RENAME-25 water-anim ((obj water-anim)) + (local-vars (sv-16 int)) + (set! (-> obj play-ambient-sound?) #t) + (set! + (-> obj look) + (the-as + int + ((method-of-type res-lump get-property-value) + (-> obj entity) + 'look + 'interp + -1000000000.0 + (the-as uint128 -1) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! sv-16 0) + (let + ((v1-3 + (the-as + object + ((method-of-type res-lump get-property-data) + (-> obj entity) + 'trans-offset + 'interp + -1000000000.0 + (the-as pointer #f) + (the-as (pointer res-tag) (& sv-16)) + *res-static-buf* + ) + ) + ) + ) + (when (the-as pointer v1-3) + (+! (-> obj root trans x) (-> (the-as transform v1-3) trans x)) + (+! (-> obj root trans y) (-> (the-as transform v1-3) trans y)) + (set! + (-> (the-as transform (-> obj root)) rot y) + (+ (-> obj root trans z) (-> (the-as transform v1-3) trans z)) + ) + ) + ) + (let + ((f0-6 + ((method-of-type res-lump get-property-value-float) + (-> obj entity) + 'rotoffset + 'interp + -1000000000.0 + 0.0 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (!= f0-6 0.0) + (quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6) + ) + ) + ) + +;; definition for method 22 of type water-anim +;; INFO: Return type mismatch int vs ripple-wave-set. +(defmethod TODO-RENAME-22 water-anim ((obj water-anim)) + (with-pp + (let ((s5-0 (-> obj look))) + (when (or (< s5-0 0) (>= s5-0 (-> *water-anim-look* length))) + (let ((t9-0 (the-as (function object object) enter-state)) + (a0-2 "skel group") + ) + (set! (-> pp next-state) process-drawable-art-error) + (t9-0 a0-2) + ) + ) + (let ((s5-1 (-> *water-anim-look* s5-0))) + (let ((s4-0 (-> s5-1 skel-group value))) + (let ((s3-0 s4-0)) + (when + (not + (if + (and + (nonzero? s3-0) + (type-type? (-> (the-as basic s3-0) type) skeleton-group) + ) + s3-0 + ) + ) + (let ((t9-2 (the-as (function object object) enter-state)) + (a0-5 "skel group") + ) + (set! (-> pp next-state) process-drawable-art-error) + (t9-2 a0-5) + ) + ) + ) + (dummy-14 obj (the-as skeleton-group s4-0) '()) + ) + (ja-channel-set! 1) + (let ((s4-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s4-1 + (the-as art-joint-anim (-> obj draw art-group data (-> s5-1 anim))) + num-func-identity + ) + (set! (-> s4-1 frame-num) 0.0) + ) + (let ((a2-2 (-> s5-1 ambient-sound-spec))) + (when a2-2 + (let ((a3-0 (new 'stack-no-clear 'vector))) + (vector+! a3-0 (-> obj root trans) (-> obj draw bounds)) + (set! (-> obj sound) (new 'process 'ambient-sound a2-2 a3-0)) + ) + ) + ) + ) + ) + (the-as ripple-wave-set (ja-post)) + ) + ) diff --git a/goal_src/levels/misty/misty-teetertotter.gc b/goal_src/levels/misty/misty-teetertotter.gc index 332846954a..c131706d88 100644 --- a/goal_src/levels/misty/misty-teetertotter.gc +++ b/goal_src/levels/misty/misty-teetertotter.gc @@ -360,7 +360,7 @@ ) ;; definition for method 11 of type teetertotter -(defmethod dummy-method-11 teetertotter ((obj teetertotter) (arg0 object)) +(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump)) (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player)) diff --git a/goal_src/levels/misty/misty-warehouse.gc b/goal_src/levels/misty/misty-warehouse.gc index 6c72a7a471..3a4bc7b3bf 100644 --- a/goal_src/levels/misty/misty-warehouse.gc +++ b/goal_src/levels/misty/misty-warehouse.gc @@ -5,3 +5,464 @@ ;; name in dgo: misty-warehouse ;; dgos: L1, MIS +(define-extern *rounddoor-sg* skeleton-group) +(define-extern *silostep-sg* skeleton-group) +(define-extern silostep-rise (state none)) ;; unknown type +(define-extern silostep-idle (state none)) ;; unknown type +(define-extern silostep-camera (state none)) ;; unknown type + +;; definition of type silostep +(deftype silostep (process-drawable) + ((anim-limit float :offset-assert 176) + (cam-tracker uint64 :offset-assert 184) + ) + :heap-base #x50 + :method-count-assert 20 + :size-assert #xc0 + :flag-assert #x14005000c0 + ) + +;; failed to figure out what this is: +(let + ((v1-1 + (new 'static 'skeleton-group + :art-group-name "silostep" + :bounds + (new 'static 'vector :y 8192.0 :w 32768.0) + :version #x6 + ) + ) + ) + (set! (-> v1-1 jgeo) 0) + (set! (-> v1-1 janim) 2) + (set! (-> v1-1 mgeo 0) (the-as uint 1)) + (set! (-> v1-1 lod-dist 0) 4095996000.0) + (set! *silostep-sg* v1-1) + ) + +;; failed to figure out what this is: +(let + ((v1-2 + (new 'static 'state + :name 'silostep-idle + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (set! silostep-idle (the-as (state none) v1-2)) + (set! + (-> v1-2 event) + (the-as + (function process int symbol event-message-block object) + (lambda :behavior silostep + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (go silostep-camera) + ) + (('trigger-rise) + enter-state + (go silostep-rise) + ) + ) + (none) + ) + ) + ) + (set! + (-> v1-2 code) + (lambda :behavior silostep () (let ((gp-0 (-> self skel root-channel 0))) + (joint-control-channel-group-eval! + gp-0 + (the-as + art-joint-anim + (-> self draw art-group data 2) + ) + num-func-identity + ) + (set! (-> gp-0 frame-num) 0.0) + ) + (transform-post) + (while #t + (suspend) + ) + (none) + ) + ) + (set! (-> v1-2 post) ja-post) + ) + +;; definition for function misty-camera-view +(defbehavior misty-camera-view silostep () + (let* ((gp-0 (get-process *default-dead-pool* camera-tracker #x4000)) + (v1-1 (when gp-0 + (let ((t9-1 (method-of-type camera-tracker activate))) + (t9-1 + (the-as camera-tracker gp-0) + self + 'camera-tracker + (the-as pointer #x70004000) + ) + ) + ((the-as + (function object object object object) + run-function-in-process + ) + gp-0 + camera-tracker-init + (lambda :behavior camera-tracker + () + (while (not (process-grab? *target*)) + (suspend) + ) + (camera-change-to "camera-160" 150 #f) + (let ((gp-0 (-> *display* base-frame-counter))) + (until (begin + (suspend) + (>= + (the-as + int + (- (-> *display* base-frame-counter) gp-0) + ) + 900 + ) + ) + (empty) + ) + ) + (while + (not + (process-release? (handle->process (-> self grab-target))) + ) + (suspend) + ) + (camera-change-to (the-as string 'base) 150 #f) + (none) + ) + ) + (-> gp-0 ppointer) + ) + ) + (v0-3 + (logior (shl (-> v1-1 0 pid) 32) (new 'static 'handle :process v1-1)) + ) + ) + (set! (-> self cam-tracker) (the-as uint v0-3)) + v0-3 + ) + ) + +;; failed to figure out what this is: +(let + ((v1-4 + (new 'static 'state + :name 'silostep-camera + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (set! silostep-camera (the-as (state none) v1-4)) + (set! + (-> v1-4 code) + (lambda :behavior silostep + () + (misty-camera-view) + (let* ((gp-0 (get-task-control (game-task misty-warehouse))) + (v1-1 (get-reminder gp-0 0)) + ) + (save-reminder gp-0 (logior v1-1 2) 0) + ) + (set! (-> self state-time) (-> *display* base-frame-counter)) + (let ((gp-1 (-> *display* base-frame-counter))) + (until (begin + (suspend) + (>= (the-as int (- (-> *display* base-frame-counter) gp-1)) 300) + ) + (empty) + ) + ) + (sound-play-by-name + (static-sound-name "arena-steps") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + (send-to-all-after (-> self link) 'trigger-rise) + enter-state + (go silostep-rise) + (none) + ) + ) + (set! (-> v1-4 post) ja-post) + ) + +;; failed to figure out what this is: +(let + ((v1-5 + (new 'static 'state + :name 'silostep-rise + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (set! silostep-rise (the-as (state none) v1-5)) + (set! + (-> v1-5 code) + (lambda :behavior silostep + ((arg0 symbol)) + (process-entity-status! self (entity-perm-status complete) #t) + (when (not arg0) + (let ((a0-2 (-> self skel root-channel 0))) + (set! + (-> a0-2 frame-group) + (the-as art-joint-anim (-> self draw art-group data 2)) + ) + (set! (-> a0-2 param 0) (-> self anim-limit)) + (set! (-> a0-2 param 1) 1.0) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! + a0-2 + (the-as art-joint-anim (-> self draw art-group data 2)) + num-func-seek! + ) + ) + (until (begin + (rider-trans) + (rider-post) + (suspend) + (let ((a0-3 (-> self skel root-channel 0))) + (set! (-> a0-3 param 0) (-> self anim-limit)) + (set! (-> a0-3 param 1) 1.0) + (joint-control-channel-group-eval! + a0-3 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + (ja-done? 0) + ) + (empty) + ) + ) + (let ((gp-1 (-> self skel root-channel 0))) + (joint-control-channel-group-eval! + gp-1 + (the-as art-joint-anim (-> self draw art-group data 2)) + num-func-identity + ) + (set! (-> gp-1 frame-num) (-> self anim-limit)) + ) + (rider-post) + (while #t + (ja-post) + (suspend) + ) + (none) + ) + ) + (set! (-> v1-5 post) #f) + ) + +;; definition for method 11 of type silostep +(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump)) + (logior! (-> obj mask) (process-mask movie-subject)) + (let + ((s4-0 + (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player)) + ) + ) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) default-collision-reaction) + (set! (-> s4-0 no-reaction) nothing) + (let ((t9-2 (method-of-object s4-0 dummy-29))) + 1 + (t9-2) + ) + (let + ((s3-0 + (new + 'process + 'collide-shape-prim-mesh + s4-0 + (the-as uint 0) + (the-as uint 0) + ) + ) + ) + (set! (-> s3-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s3-0 collide-with) (the-as uint 16)) + (set! (-> s3-0 prim-core action) (the-as uint 1)) + (set! (-> s3-0 prim-core offense) 4) + (set! (-> s3-0 transform-index) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 18432.0) + ) + ((method-of-object s4-0 dummy-46)) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + ((method-of-object s4-0 dummy-50)) + (set! (-> obj root) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (dummy-14 obj *silostep-sg* '()) + (set! + (-> obj anim-limit) + (* + (get-property-value-float + arg0 + 'distance + 'interp + -1000000000.0 + 1.0 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + (the + float + (+ + (-> (the-as art-joint-anim (-> obj draw art-group data 2)) data 0 length) + -1 + ) + ) + ) + ) + (set! (-> obj link) (new 'process 'actor-link-info obj)) + (cond + ((and + (-> obj entity) + (nonzero? + (logand (-> obj entity extra perm status) (entity-perm-status complete)) + ) + ) + enter-state + #t + (go silostep-rise) + ) + (else + (go silostep-idle) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(let + ((v1-6 + (new 'static 'skeleton-group + :art-group-name "rounddoor" + :bounds (new 'static 'vector :w 32768.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-6 jgeo) 0) + (set! (-> v1-6 janim) 3) + (set! (-> v1-6 mgeo 0) (the-as uint 1)) + (set! (-> v1-6 lod-dist 0) 81920.0) + (set! (-> v1-6 mgeo 1) (the-as uint 2)) + (set! (-> v1-6 lod-dist 1) 4095996000.0) + (set! *rounddoor-sg* v1-6) + ) + +;; definition of type rounddoor +(deftype rounddoor (eco-door) + () + :heap-base #xa0 + :method-count-assert 27 + :size-assert #x104 + :flag-assert #x1b00a00104 + ) + +;; definition for method 3 of type rounddoor +(defmethod inspect rounddoor ((obj rounddoor)) + (let ((t9-0 (method-of-type eco-door inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for method 24 of type rounddoor +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-24 rounddoor ((obj rounddoor)) + (let + ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others)))) + (let + ((s4-0 + (new + 'process + 'collide-shape-prim-mesh + s5-0 + (the-as uint 0) + (the-as uint 0) + ) + ) + ) + (set! (-> s4-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s4-0 collide-with) (the-as uint 16)) + (set! (-> s4-0 prim-core action) (the-as uint 1)) + (set! (-> s4-0 prim-core offense) 4) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) -12288.0 0.0 0.0 40960.0) + ) + ((method-of-object s5-0 dummy-46)) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + ((method-of-object s5-0 dummy-50)) + (set! (-> obj root-override) s5-0) + ) + 0 + (none) + ) + +;; definition for method 25 of type rounddoor +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod TODO-RENAME-25 rounddoor ((obj rounddoor)) + (dummy-14 obj *rounddoor-sg* '()) + (set! (-> obj open-distance) 69632.0) + (set! (-> obj close-distance) 81920.0) + (set! + (-> obj open-sound) + (the-as + uint128 + (make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f64616e657261)) + ) + ) + (set! + (-> obj close-sound) + (the-as + uint128 + (make-u128 (the-as uint #x65736f6c632d72) (the-as uint #x6f6f64616e657261)) + ) + ) + (set! (-> obj speed) 1.5) + (set! (-> obj auto-close) #t) + (set! (-> obj one-way) #t) + (vector-x-quaternion! (-> obj out-dir) (-> obj root-override quat)) + (set! + (-> obj out-dir w) + (- 8192.0 (vector-dot (-> obj out-dir) (-> obj root-override trans))) + ) + (dummy-47 (-> obj root-override)) + 0 + (none) + ) diff --git a/goal_src/levels/misty/mud.gc b/goal_src/levels/misty/mud.gc index ebf980b9f4..9053353d7f 100644 --- a/goal_src/levels/misty/mud.gc +++ b/goal_src/levels/misty/mud.gc @@ -5,3 +5,100 @@ ;; name in dgo: mud ;; dgos: L1, MIS +;; definition of type mud +(deftype mud (water-anim) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for symbol ripple-for-mud, type ripple-wave-set +(define + ripple-for-mud + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-small-mud, type ripple-wave-set +(define + ripple-for-small-mud + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 22 of type mud +(defmethod TODO-RENAME-22 mud ((obj mud)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-22))) + (t9-0 obj) + ) + (set! (-> obj flags) (logand -8388609 (-> obj flags))) + (set! (-> obj flags) (logior #x40000 (-> obj flags))) + (let ((gp-0 (new 'process 'ripple-control))) + (set! (-> obj draw ripple) gp-0) + (set! (-> gp-0 global-scale) 3072.0) + (set! (-> gp-0 waveform) ripple-for-mud) + (let + ((v1-9 + (the-as + object + ((method-of-type res-lump get-property-data) + (-> obj entity) + 'water-anim-fade-dist + 'interp + -1000000000.0 + (the-as pointer #f) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (when (the-as pointer v1-9) + (set! + (-> gp-0 close-fade-dist) + (-> (the-as ripple-control v1-9) global-scale) + ) + (set! + (-> gp-0 far-fade-dist) + (-> (the-as ripple-control v1-9) last-frame-scale) + ) + ) + ) + (case (-> obj look) + ((21 25 29) + (set! (-> gp-0 close-fade-dist) 4096000000.0) + (set! (-> gp-0 far-fade-dist) 8192000000.0) + ) + ) + (case (-> obj look) + ((22 25 24 27 26 31) + (let ((v0-3 ripple-for-small-mud)) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ) + ) + ) + ) diff --git a/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc b/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc index 8375ee8933..446e16bbe4 100644 --- a/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc +++ b/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc @@ -94,8 +94,8 @@ ((move-vec vector :inline :offset-assert 16) (best-u float :offset-assert 32) (best-tri collide-tri-result :inline :offset-assert 48) - (best-from-prim basic :offset-assert 132) - (best-to-prim basic :offset-assert 136) + (best-from-prim collide-shape-prim :offset-assert 132) + (best-to-prim collide-shape-prim :offset-assert 136) ) :method-count-assert 10 :size-assert #x8c @@ -119,8 +119,8 @@ ;; definition of type collide-overlap-result (deftype collide-overlap-result (structure) ((best-dist float :offset-assert 0) - (best-from-prim basic :offset-assert 4) - (best-to-prim basic :offset-assert 8) + (best-from-prim collide-shape-prim :offset-assert 4) + (best-to-prim collide-shape-prim :offset-assert 8) (best-from-tri collide-tri-result :inline :offset-assert 16) ) :method-count-assert 10 diff --git a/test/decompiler/reference/engine/gfx/ripple_REF.gc b/test/decompiler/reference/engine/gfx/ripple_REF.gc index 52eb3e8350..705af4b35b 100644 --- a/test/decompiler/reference/engine/gfx/ripple_REF.gc +++ b/test/decompiler/reference/engine/gfx/ripple_REF.gc @@ -183,7 +183,7 @@ ) ;; definition for function ripple-find-height -(defun ripple-find-height ((arg0 process-drawable) (arg1 basic) (arg2 vector)) +(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector)) (local-vars (sv-16 float) (sv-32 float)) (let* ((f30-0 (-> arg0 root trans y)) (v1-1 (-> arg0 draw)) diff --git a/test/decompiler/reference/engine/gfx/water/water-h_REF.gc b/test/decompiler/reference/engine/gfx/water/water-h_REF.gc index 7029471268..c3b1627885 100644 --- a/test/decompiler/reference/engine/gfx/water/water-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/water/water-h_REF.gc @@ -151,13 +151,13 @@ (:methods (water-vol-idle () none 20) (water-vol-startup () none 21) - (dummy-22 () none 22) + (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (dummy-25 () none 25) + (TODO-RENAME-25 (_type_) quaternion 25) (dummy-26 () none 26) (dummy-27 () none 27) - (dummy-28 () none 28) + (get-ripple-height (_type_ vector) float 28) (dummy-29 () none 29) ) ) diff --git a/test/decompiler/reference/levels/common/rigid-body-h_REF.gc b/test/decompiler/reference/levels/common/rigid-body-h_REF.gc index ae06d1e47b..b2fe45bf16 100644 --- a/test/decompiler/reference/levels/common/rigid-body-h_REF.gc +++ b/test/decompiler/reference/levels/common/rigid-body-h_REF.gc @@ -27,20 +27,20 @@ :size-assert #x1a8 :flag-assert #x17000001a8 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 () none 13) - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 () none 16) - (dummy-17 () none 17) - (dummy-18 () none 18) - (dummy-19 () none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) + (TODO-RENAME-9 (_type_ float float float float) none 9) + (dummy-10 (_type_ float) none 10) + (clear-force-torque! (_type_) none 11) + (clear-momentum! (_type_) none 12) + (TODO-RENAME-13 (_type_ vector vector) none 13) + (TODO-RENAME-14 (_type_ vector vector) none 14) + (TODO-RENAME-15 (_type_ vector) none 15) + (TODO-RENAME-16 (_type_ vector vector float) none 16) + (TODO-RENAME-17 (_type_ vector vector) vector 17) + (TODO-RENAME-18 (_type_ vector) vector 18) + (dummy-19 (_type_) none 19) + (dummy-20 (_type_) none 20) + (TODO-RENAME-21 (_type_) none 21) + (TODO-RENAME-22 (_type_ vector quaternion float float) none 22) ) ) diff --git a/test/decompiler/reference/levels/common/rigid-body_REF.gc b/test/decompiler/reference/levels/common/rigid-body_REF.gc new file mode 100644 index 0000000000..3ce3482bfe --- /dev/null +++ b/test/decompiler/reference/levels/common/rigid-body_REF.gc @@ -0,0 +1,1261 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 11 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod clear-force-torque! rigid-body ((obj rigid-body)) + (set! (-> obj force quad) (-> *null-vector* quad)) + (set! (-> obj torque quad) (-> *null-vector* quad)) + 0 + (none) + ) + +;; definition for method 12 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod clear-momentum! rigid-body ((obj rigid-body)) + (set! (-> obj lin-momentum quad) (-> *null-vector* quad)) + (set! (-> obj ang-momentum quad) (-> *null-vector* quad)) + 0 + (none) + ) + +;; definition for method 21 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-21 rigid-body ((obj rigid-body)) + (quaternion->matrix (-> obj matrix) (-> obj rotation)) + (TODO-RENAME-18 obj (-> obj matrix vector 3)) + 0 + (none) + ) + +;; definition for method 22 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod + TODO-RENAME-22 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 quaternion) (arg2 float) (arg3 float)) + (clear-force-torque! obj) + (clear-momentum! obj) + (vector+! (-> obj position) arg0 (-> obj cm-offset-joint)) + (quaternion-copy! (-> obj rotation) arg1) + (quaternion-normalize! (-> obj rotation)) + (set! (-> obj lin-momentum-damping-factor) arg2) + (set! (-> obj ang-momentum-damping-factor) arg3) + (TODO-RENAME-21 obj) + (set! (-> obj lin-velocity quad) (-> *null-vector* quad)) + (set! (-> obj ang-velocity quad) (-> *null-vector* quad)) + (set! (-> obj inv-i-world vector 0 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 1 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 2 quad) (the-as uint128 0)) + (set! (-> obj inv-i-world vector 3 quad) (the-as uint128 0)) + (set! (-> obj max-ang-velocity) 0.0) + (set! (-> obj max-ang-momentum) 0.0) + 0 + (none) + ) + +;; definition for method 9 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-9 + rigid-body + ((obj rigid-body) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> obj mass) arg0) + (let ((f0-1 arg0)) + (set! (-> obj inv-mass) (/ 1.0 f0-1)) + ) + (matrix-identity! (-> obj inertial-tensor)) + (matrix-identity! (-> obj inv-inertial-tensor)) + (let* ((f0-4 arg0) + (f1-1 12.0) + (f0-5 (* f0-4 (/ 1.0 f1-1))) + ) + (let* ((f1-4 arg2) + (f1-6 (* f1-4 f1-4)) + (f2-1 arg3) + ) + (set! (-> obj inertial-tensor vector 0 x) (* f0-5 (+ f1-6 (* f2-1 f2-1)))) + ) + (let* ((f1-9 arg1) + (f1-11 (* f1-9 f1-9)) + (f2-4 arg3) + ) + (set! (-> obj inertial-tensor vector 1 y) (* f0-5 (+ f1-11 (* f2-4 f2-4)))) + ) + (let* ((f1-14 arg1) + (f1-16 (* f1-14 f1-14)) + (f2-7 arg2) + ) + (set! (-> obj inertial-tensor vector 2 z) (* f0-5 (+ f1-16 (* f2-7 f2-7)))) + ) + ) + (let ((f0-7 (-> obj inertial-tensor vector 0 x))) + (set! (-> obj inv-inertial-tensor vector 0 x) (/ 1.0 f0-7)) + ) + (let ((f0-10 (-> obj inertial-tensor vector 1 y))) + (set! (-> obj inv-inertial-tensor vector 1 y) (/ 1.0 f0-10)) + ) + (let ((f0-13 (-> obj inertial-tensor vector 2 z))) + (set! (-> obj inv-inertial-tensor vector 2 z) (/ 1.0 f0-13)) + ) + 0 + (none) + ) + +;; definition for method 17 of type rigid-body +(defmethod + TODO-RENAME-17 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position)))) + (vector-cross! arg1 (-> obj ang-velocity) v1-1) + ) + (vector+! arg1 arg1 (-> obj lin-velocity)) + arg1 + ) + +;; definition for function matrix-3x3-triple-transpose-product +(defun + matrix-3x3-triple-transpose-product + ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (let ((s2-0 (new 'stack-no-clear 'matrix)) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (matrix-transpose! s2-0 arg1) + (cond + (#t + (matrix*! s3-0 arg1 arg2) + (matrix*! arg0 s3-0 s2-0) + ) + (else + (matrix*! s3-0 s2-0 arg2) + (matrix*! arg0 s3-0 arg1) + ) + ) + ) + arg0 + ) + +;; definition for method 10 of type rigid-body +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod dummy-10 rigid-body ((obj rigid-body) (arg0 float)) + (vector+*! (-> obj lin-momentum) (-> obj lin-momentum) (-> obj force) arg0) + (vector+*! (-> obj ang-momentum) (-> obj ang-momentum) (-> obj torque) arg0) + (vector-float*! + (-> obj lin-momentum) + (-> obj lin-momentum) + (-> obj lin-momentum-damping-factor) + ) + (vector-float*! + (-> obj ang-momentum) + (-> obj ang-momentum) + (-> obj ang-momentum-damping-factor) + ) + (vector-float*! (-> obj lin-velocity) (-> obj lin-momentum) (-> obj inv-mass)) + (set! (-> obj matrix vector 3 quad) (-> *null-vector* quad)) + (matrix-3x3-triple-transpose-product + (-> obj inv-i-world) + (-> obj matrix) + (-> obj inv-inertial-tensor) + ) + (vector-rotate*! + (-> obj ang-velocity) + (-> obj ang-momentum) + (-> obj inv-i-world) + ) + (vector+*! (-> obj position) (-> obj position) (-> obj lin-velocity) arg0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (set! (-> (the-as vector (&-> s4-0 x)) quad) (-> obj ang-velocity quad)) + (set! (-> s4-0 w) 0.0) + (quaternion*! s4-0 s4-0 (-> obj rotation)) + (quaternion-float*! s4-0 s4-0 0.5) + (+! (-> obj rotation x) (* (-> s4-0 x) arg0)) + (+! (-> obj rotation y) (* (-> s4-0 y) arg0)) + (+! (-> obj rotation z) (* (-> s4-0 z) arg0)) + (+! (-> obj rotation w) (* (-> s4-0 w) arg0)) + ) + (quaternion-normalize! (-> obj rotation)) + (quaternion->matrix (-> obj matrix) (-> obj rotation)) + (TODO-RENAME-18 obj (-> obj matrix vector 3)) + 0 + (none) + ) + +;; definition for method 13 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-13 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (vector+! (-> obj force) (-> obj force) arg1) + (let* ((v1-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position))) + (a1-2 (vector-cross! (new 'stack-no-clear 'vector) v1-2 arg1)) + ) + (vector+! (-> obj torque) (-> obj torque) a1-2) + ) + 0 + (none) + ) + +;; definition for method 16 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-16 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector) (arg2 float)) + (vector+! (-> obj force) (-> obj force) arg1) + (let* ((a0-3 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position))) + (s4-1 (vector-cross! (new 'stack-no-clear 'vector) a0-3 arg1)) + ) + (let ((f0-0 (vector-length a0-3))) + (if (< arg2 f0-0) + (vector-float*! s4-1 s4-1 (/ arg2 f0-0)) + ) + ) + (vector+! (-> obj torque) (-> obj torque) s4-1) + ) + 0 + (none) + ) + +;; definition for method 14 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-14 + rigid-body + ((obj rigid-body) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate*! s4-0 arg1 (-> obj matrix)) + (vector-rotate*! s5-0 arg0 (-> obj matrix)) + (vector+! s5-0 s5-0 (-> obj position)) + (TODO-RENAME-13 obj s5-0 s4-0) + ) + 0 + (none) + ) + +;; definition for method 15 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-15 rigid-body ((obj rigid-body) (arg0 vector)) + (vector+! (-> obj force) (-> obj force) arg0) + 0 + (none) + ) + +;; definition for method 18 of type rigid-body +(defmethod TODO-RENAME-18 rigid-body ((obj rigid-body) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! gp-0 (-> obj cm-offset-joint) (-> obj matrix)) + (vector-! arg0 (-> obj position) gp-0) + ) + arg0 + ) + +;; definition for method 19 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod dummy-19 rigid-body ((obj rigid-body)) + (format + #t + " force ~M ~M ~M" + (-> obj force x) + (-> obj force y) + (-> obj force z) + ) + (format + #t + " torque ~f ~f ~f~%" + (-> obj torque x) + (-> obj torque y) + (-> obj torque z) + ) + (format + #t + " position ~M ~M ~M" + (-> obj position x) + (-> obj position y) + (-> obj position z) + ) + (format + #t + " rotation ~f ~f ~f ~f~%" + (-> obj rotation x) + (-> obj rotation y) + (-> obj rotation z) + (-> obj rotation w) + ) + (format + #t + " lin-mom ~M ~M ~M" + (-> obj lin-momentum x) + (-> obj lin-momentum y) + (-> obj lin-momentum z) + ) + (format + #t + " ang-mom ~f ~f ~f~%" + (-> obj ang-momentum x) + (-> obj ang-momentum y) + (-> obj ang-momentum z) + ) + (format + #t + " lin-vel ~M ~M ~M" + (-> obj lin-velocity x) + (-> obj lin-velocity y) + (-> obj lin-velocity z) + ) + (format + #t + " ang-vel ~f ~f ~f~%" + (-> obj ang-velocity x) + (-> obj ang-velocity y) + (-> obj ang-velocity z) + ) + 0 + (none) + ) + +;; definition for method 20 of type rigid-body +;; INFO: Return type mismatch int vs none. +(defmethod dummy-20 rigid-body ((obj rigid-body)) + (format + #t + " force ~M ~M ~M" + (-> obj force x) + (-> obj force y) + (-> obj force z) + ) + (format + #t + " torque ~f ~f ~f~%" + (-> obj torque x) + (-> obj torque y) + (-> obj torque z) + ) + 0 + (none) + ) + +;; definition of type rigid-body-platform-constants +(deftype rigid-body-platform-constants (structure) + ((drag-factor float :offset-assert 0) + (buoyancy-factor float :offset-assert 4) + (max-buoyancy-depth meters :offset-assert 8) + (gravity-factor float :offset-assert 12) + (gravity meters :offset-assert 16) + (player-weight meters :offset-assert 20) + (player-bonk-factor float :offset-assert 24) + (player-dive-factor float :offset-assert 28) + (player-force-distance meters :offset-assert 32) + (player-force-clamp meters :offset-assert 36) + (player-force-timeout uint64 :offset-assert 40) + (explosion-force meters :offset-assert 48) + (linear-damping float :offset-assert 52) + (angular-damping float :offset-assert 56) + (control-point-count int32 :offset-assert 60) + (mass float :offset-assert 64) + (inertial-tensor-x meters :offset-assert 68) + (inertial-tensor-y meters :offset-assert 72) + (inertial-tensor-z meters :offset-assert 76) + (cm-joint-x meters :offset-assert 80) + (cm-joint-y meters :offset-assert 84) + (cm-joint-z meters :offset-assert 88) + (idle-distance meters :offset-assert 92) + (platform basic :offset-assert 96) + (sound-name basic :offset-assert 100) + ) + :method-count-assert 9 + :size-assert #x68 + :flag-assert #x900000068 + ) + +;; definition for method 3 of type rigid-body-platform-constants +(defmethod + inspect + rigid-body-platform-constants + ((obj rigid-body-platform-constants)) + (format #t "[~8x] ~A~%" obj 'rigid-body-platform-constants) + (format #t "~Tdrag-factor: ~f~%" (-> obj drag-factor)) + (format #t "~Tbuoyancy-factor: ~f~%" (-> obj buoyancy-factor)) + (format #t "~Tmax-buoyancy-depth: (meters ~m)~%" (-> obj max-buoyancy-depth)) + (format #t "~Tgravity-factor: ~f~%" (-> obj gravity-factor)) + (format #t "~Tgravity: (meters ~m)~%" (-> obj gravity)) + (format #t "~Tplayer-weight: (meters ~m)~%" (-> obj player-weight)) + (format #t "~Tplayer-bonk-factor: ~f~%" (-> obj player-bonk-factor)) + (format #t "~Tplayer-dive-factor: ~f~%" (-> obj player-dive-factor)) + (format + #t + "~Tplayer-force-distance: (meters ~m)~%" + (-> obj player-force-distance) + ) + (format #t "~Tplayer-force-clamp: (meters ~m)~%" (-> obj player-force-clamp)) + (format #t "~Tplayer-force-timeout: ~D~%" (-> obj player-force-timeout)) + (format #t "~Texplosion-force: (meters ~m)~%" (-> obj explosion-force)) + (format #t "~Tlinear-damping: ~f~%" (-> obj linear-damping)) + (format #t "~Tangular-damping: ~f~%" (-> obj angular-damping)) + (format #t "~Tcontrol-point-count: ~D~%" (-> obj control-point-count)) + (format #t "~Tmass: ~f~%" (-> obj mass)) + (format #t "~Tinertial-tensor-x: (meters ~m)~%" (-> obj inertial-tensor-x)) + (format #t "~Tinertial-tensor-y: (meters ~m)~%" (-> obj inertial-tensor-y)) + (format #t "~Tinertial-tensor-z: (meters ~m)~%" (-> obj inertial-tensor-z)) + (format #t "~Tcm-joint-x: (meters ~m)~%" (-> obj cm-joint-x)) + (format #t "~Tcm-joint-y: (meters ~m)~%" (-> obj cm-joint-y)) + (format #t "~Tcm-joint-z: (meters ~m)~%" (-> obj cm-joint-z)) + (format #t "~Tidle-distance: (meters ~m)~%" (-> obj idle-distance)) + (format #t "~Tplatform: ~A~%" (-> obj platform)) + (format #t "~Tsound-name: ~A~%" (-> obj sound-name)) + obj + ) + +;; definition of type rigid-body-control-point-inline-array +(deftype rigid-body-control-point-inline-array (inline-array-class) + ((data rigid-body-control-point :inline :dynamic :offset 16) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +;; definition for method 3 of type rigid-body-control-point-inline-array +(defmethod + inspect + rigid-body-control-point-inline-array + ((obj rigid-body-control-point-inline-array)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tallocated-length: ~D~%" (-> obj allocated-length)) + (format #t "~Tdata[0] @ #x~X~%" (-> obj data)) + obj + ) + +;; failed to figure out what this is: +(set! (-> rigid-body-control-point-inline-array heap-base) (the-as uint 48)) + +;; definition of type rigid-body-platform +(deftype rigid-body-platform (process-drawable) + ((root-overlay collide-shape-moving :offset 112) + (info rigid-body-platform-constants :offset-assert 176) + (rbody rigid-body :inline :offset-assert 192) + (control-point-array rigid-body-control-point-inline-array :offset-assert 616) + (player-velocity vector :inline :offset-assert 624) + (player-velocity-prev vector :inline :offset-assert 640) + (player-force-position vector :inline :offset-assert 656) + (player-force vector :inline :offset-assert 672) + (sim-time-remaining float :offset-assert 688) + (float-height-offset float :offset-assert 692) + (player-attack-id int32 :offset-assert 696) + (player-bonk-timeout uint64 :offset-assert 704) + (water-anim water-anim :offset-assert 712) + (player-contact basic :offset-assert 716) + (player-impulse collide-shape-prim-mesh :offset-assert 720) + ) + :heap-base #x270 + :method-count-assert 35 + :size-assert #x2d4 + :flag-assert #x23027002d4 + (:methods + (rigid-body-platform-idle () none 20) + (rigid-body-platform-float () none 21) + (TODO-RENAME-22 (_type_ vector basic) float 22) + (TODO-RENAME-23 (_type_ basic) none 23) + (TODO-RENAME-24 (_type_ rigid-body-control-point basic) none 24) + (TODO-RENAME-25 (_type_) none 25) + (TODO-RENAME-26 (_type_) none 26) + (TODO-RENAME-27 (_type_ vector) none 27) + (TODO-RENAME-28 (_type_) none 28) + (TODO-RENAME-29 (_type_ rigid-body-platform-constants) none 29) + (TODO-RENAME-30 (_type_) none 30) + (TODO-RENAME-31 (_type_) none 31) + (dummy-32 (_type_) none 32) + (dummy-33 (_type_) none 33) + (TODO-RENAME-34 (_type_) none 34) + ) + ) + +;; definition for method 3 of type rigid-body-platform +(defmethod inspect rigid-body-platform ((obj rigid-body-platform)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format + #t + "~T~Tinfo: #~%" + (-> obj info) + ) + (format #t "~T~Trbody: #~%" (-> obj rbody)) + (format #t "~T~Tcontrol-point-array: ~A~%" (-> obj control-point-array)) + (format #t "~T~Tplayer-velocity: #~%" (-> obj player-velocity)) + (format + #t + "~T~Tplayer-velocity-prev: #~%" + (-> obj player-velocity-prev) + ) + (format + #t + "~T~Tplayer-force-position: #~%" + (-> obj player-force-position) + ) + (format #t "~T~Tplayer-force: #~%" (-> obj player-force)) + (format #t "~T~Tsim-time-remaining: ~f~%" (-> obj sim-time-remaining)) + (format #t "~T~Tfloat-height-offset: ~f~%" (-> obj float-height-offset)) + (format #t "~T~Tplayer-attack-id: ~D~%" (-> obj player-attack-id)) + (format #t "~T~Tplayer-bonk-timeout: ~D~%" (-> obj player-bonk-timeout)) + (format #t "~T~Twater-anim: ~A~%" (-> obj water-anim)) + (format #t "~T~Tplayer-contact: ~A~%" (-> obj player-contact)) + (format #t "~T~Tplayer-impulse: ~A~%" (-> obj player-impulse)) + obj + ) + +;; definition for method 7 of type rigid-body-platform +;; INFO: Return type mismatch process-drawable vs rigid-body-platform. +(defmethod relocate rigid-body-platform ((obj rigid-body-platform) (arg0 int)) + (if (nonzero? (-> obj control-point-array)) + (set! + (-> obj control-point-array) + (the-as + rigid-body-control-point-inline-array + (+ (the-as int (-> obj control-point-array)) arg0) + ) + ) + ) + (the-as + rigid-body-platform + ((the-as + (function process-drawable int process-drawable) + (find-parent-method rigid-body-platform 7) + ) + obj + arg0 + ) + ) + ) + +;; definition for method 22 of type rigid-body-platform +(defmethod + TODO-RENAME-22 + rigid-body-platform + ((obj rigid-body-platform) (arg0 vector) (arg1 basic)) + (let ((v1-0 (-> obj water-anim))) + 0.0 + (+ (the-as float (cond + (v1-0 + (let* ((a2-1 v1-0) + (a0-1 (if a2-1 + (-> a2-1 ppointer-water-anim 3) + ) + ) + ) + (if a0-1 + (get-ripple-height a0-1 arg0) + (-> v1-0 ppointer-water-anim 9) + ) + ) + ) + (else + (ocean-get-height arg0) + ) + ) + ) + (-> obj float-height-offset) + ) + ) + ) + +;; definition for method 24 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-24 + rigid-body-platform + ((obj rigid-body-platform) (arg0 rigid-body-control-point) (arg1 basic)) + (set! (-> arg0 world-pos w) (TODO-RENAME-22 obj (-> arg0 world-pos) arg1)) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (f0-2 (- (-> arg0 world-pos w) (-> arg0 world-pos y))) + (f30-0 (/ f0-2 (-> obj info max-buoyancy-depth))) + ) + (when (< 0.0 f0-2) + (vector-float*! + s4-0 + *y-vector* + (* + (* + (* + (* (-> obj rbody mass) (fmin 1.0 f30-0)) + (/ (-> obj info gravity) (the float (-> obj info control-point-count))) + ) + (-> obj info gravity-factor) + ) + (-> obj info buoyancy-factor) + ) + ) + (TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0) + (vector-float*! + s4-0 + (-> arg0 velocity) + (* (* -1.0 (-> obj info drag-factor)) (fmin 1.0 f30-0)) + ) + (TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 25 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-25 rigid-body-platform ((obj rigid-body-platform)) + (when (or (-> obj player-impulse) (-> obj player-contact)) + (set! (-> obj player-impulse) #f) + (TODO-RENAME-16 + (-> obj rbody) + (-> obj player-force-position) + (-> obj player-force) + (-> obj info player-force-distance) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-26 rigid-body-platform ((obj rigid-body-platform)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (vector-float*! + a1-0 + *y-vector* + (* + (* (* -1.0 (-> obj info gravity-factor)) (-> obj info gravity)) + (-> obj rbody mass) + ) + ) + (TODO-RENAME-15 (-> obj rbody) a1-0) + ) + 0 + (none) + ) + +;; definition for method 27 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-27 + rigid-body-platform + ((obj rigid-body-platform) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 (-> obj rbody position)) + (set! (-> gp-0 y) 0.0) + (let* ((f0-1 (vector-length gp-0)) + (f1-1 (* 10.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! gp-0 gp-0 (/ f1-1 f0-1)) + (TODO-RENAME-15 (-> obj rbody) gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 23 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + TODO-RENAME-23 + rigid-body-platform + ((obj rigid-body-platform) (arg0 basic)) + (let ((s4-0 (-> obj rbody matrix))) + (dotimes (s3-0 (-> obj info control-point-count)) + (let ((s2-0 (-> obj control-point-array data s3-0))) + (vector-matrix*! (-> s2-0 world-pos) (-> s2-0 local-pos) s4-0) + (TODO-RENAME-17 (-> obj rbody) (-> s2-0 world-pos) (-> s2-0 velocity)) + (TODO-RENAME-24 obj s2-0 arg0) + ) + ) + ) + (TODO-RENAME-26 obj) + (TODO-RENAME-25 obj) + 0 + (none) + ) + +;; definition for method 28 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod TODO-RENAME-28 rigid-body-platform ((obj rigid-body-platform)) + (if (-> obj info platform) + (dummy-35 (-> obj root-overlay)) + ) + (set! (-> obj player-velocity-prev quad) (-> obj player-velocity quad)) + (if *target* + (set! (-> obj player-velocity quad) (-> *target* control transv quad)) + (set! (-> obj player-velocity quad) (-> *null-vector* quad)) + ) + (+! + (-> obj sim-time-remaining) + (* + 0.0033333334 + (the + float + (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)) + ) + ) + ) + (let ((f30-0 0.016666668) + (f28-0 + (* + 0.0033333334 + (the float (logand #xffffff (-> *display* base-frame-counter))) + ) + ) + ) + (while (>= (-> obj sim-time-remaining) (* 0.5 f30-0)) + (clear-force-torque! (-> obj rbody)) + (TODO-RENAME-23 obj (the-as basic f28-0)) + (dummy-10 (-> obj rbody) f30-0) + (set! (-> obj sim-time-remaining) (- (-> obj sim-time-remaining) f30-0)) + ) + ) + (set! (-> obj player-contact) #f) + 0 + (none) + ) + +;; definition for function rigid-body-platform-event-handler +;; Used lq/sq +(defbehavior + rigid-body-platform-event-handler rigid-body-platform + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (when + (>= + (the-as + int + (- (-> *display* base-frame-counter) (-> self player-bonk-timeout)) + ) + (the-as int (-> self info player-force-timeout)) + ) + (set! (-> self player-bonk-timeout) (-> *display* base-frame-counter)) + (let* ((s5-0 arg0) + (v1-7 + (if + (and + (nonzero? s5-0) + (type-type? (-> s5-0 type) process-drawable) + ) + s5-0 + ) + ) + ) + (when v1-7 + (set! (-> self player-impulse) (the-as collide-shape-prim-mesh #t)) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-7) root trans quad) + ) + (let + ((f0-4 + (fmin + (* + (* + (* 0.00012207031 (the-as float (-> arg3 param 1))) + (-> self info player-bonk-factor) + ) + (-> self info player-weight) + ) + (-> self info player-force-clamp) + ) + ) + ) + (vector-float*! (-> self player-force) *y-vector* (- f0-4)) + ) + ) + ) + ) + ) + (('attack) + (let ((v1-16 (-> arg3 param 2))) + (when (!= v1-16 (-> self player-attack-id)) + (set! (-> self player-attack-id) (the-as int v1-16)) + (the-as vector (cond + ((= (-> arg3 param 1) 'flop) + (when + (>= + (the-as + int + (- + (-> *display* base-frame-counter) + (-> self player-bonk-timeout) + ) + ) + (the-as int (-> self info player-force-timeout)) + ) + (set! + (-> self player-bonk-timeout) + (-> *display* base-frame-counter) + ) + (let* ((gp-1 arg0) + (v1-24 + (if + (and + (nonzero? gp-1) + (type-type? (-> gp-1 type) process-drawable) + ) + gp-1 + ) + ) + ) + (when v1-24 + (set! + (-> self player-impulse) + (the-as collide-shape-prim-mesh #t) + ) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-24) root trans quad) + ) + (let + ((f0-9 + (fmin + (* + (* 16.0 (-> self info player-weight)) + (-> self info player-dive-factor) + ) + (-> self info player-force-clamp) + ) + ) + ) + (vector-float*! + (-> self player-force) + *y-vector* + (- f0-9) + ) + ) + ) + ) + ) + ) + ((= (-> arg3 param 1) 'explode) + (let* ((gp-2 arg0) + (v1-34 + (if + (and + (nonzero? gp-2) + (type-type? (-> gp-2 type) process-drawable) + ) + gp-2 + ) + ) + ) + (when v1-34 + (set! + (-> self player-impulse) + (the-as collide-shape-prim-mesh #t) + ) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-34) root trans quad) + ) + (vector-! + (-> self player-force) + (-> self rbody position) + (-> (the-as process-drawable v1-34) root trans) + ) + (vector-normalize! + (-> self player-force) + (-> self info explosion-force) + ) + ) + ) + ) + (else + (the-as vector #f) + ) + ) + ) + ) + ) + ) + (('impulse) + (let ((s5-1 arg0)) + (when + (if (and (nonzero? s5-1) (type-type? (-> s5-1 type) process-drawable)) + s5-1 + ) + (set! (-> self player-impulse) (the-as collide-shape-prim-mesh #t)) + (set! (-> self player-force-position quad) (-> self rbody position quad)) + (let ((v0-0 (-> self player-force))) + (set! (-> v0-0 quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-0 + ) + ) + ) + ) + (('edge-grabbed) + (let ((v1-44 (-> arg3 param 0))) + (when (not (-> self player-impulse)) + (set! (-> self player-contact) #t) + (set! + (-> self player-force-position quad) + (-> (the-as vector (+ v1-44 32)) quad) + ) + (vector-float*! + (-> self player-force) + *y-vector* + (* -1.0 (-> self info player-weight)) + ) + ) + ) + ) + (('ridden) + (let ((v1-48 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-48) + (let ((v1-50 (handle->process (-> (the-as (pointer handle) v1-48) 0)))) + (when + (and + v1-50 + (= v1-50 *target*) + (!= (-> *target* control unknown-surface mode) 'swim) + ) + (when (not (-> self player-impulse)) + (set! (-> self player-contact) #t) + (set! + (-> self player-force-position quad) + (-> (the-as process-drawable v1-50) root trans quad) + ) + (set! (-> self player-force quad) (-> *null-vector* quad)) + (vector+*! + (-> self player-force) + (-> self player-force) + *y-vector* + (* -1.0 (-> self info player-weight)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function rigid-body-platform-post +(defbehavior rigid-body-platform-post rigid-body-platform () + (set! + (-> self rbody lin-momentum-damping-factor) + (-> self info linear-damping) + ) + (set! + (-> self rbody ang-momentum-damping-factor) + (-> self info angular-damping) + ) + (if (-> self player-impulse) + (sound-play-by-name + (string->sound-name (the-as string (-> self info sound-name))) + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (TODO-RENAME-28 self) + (quaternion-copy! (-> self root-overlay quat) (-> self rbody rotation)) + (TODO-RENAME-18 (-> self rbody) (-> self root-overlay trans)) + (if (-> self info platform) + (rider-post) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(let + ((gp-0 + (new 'static 'state + :name 'rigid-body-platform-idle + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (method-set! rigid-body-platform 20 (the-as function gp-0)) + (set! + (-> gp-0 trans) + (the-as + (function object) + (lambda :behavior rigid-body-platform + () + (when + (and + *target* + (>= + (-> self info idle-distance) + (vector-vector-distance + (-> self root-overlay trans) + (-> *target* control trans) + ) + ) + ) + (let ((t9-1 (the-as (function object) enter-state))) + (set! + (-> self next-state) + (the-as state (method-of-object self rigid-body-platform-float)) + ) + (t9-1) + ) + ) + (none) + ) + ) + ) + (set! (-> gp-0 code) (lambda :behavior rigid-body-platform () (while #t + (suspend) + ) + (none) + ) + ) + (set! (-> gp-0 post) ja-post) + ) + +;; failed to figure out what this is: +(let + ((gp-1 + (new 'static 'state + :name 'rigid-body-platform-float + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (method-set! rigid-body-platform 21 (the-as function gp-1)) + (set! (-> gp-1 event) rigid-body-platform-event-handler) + (set! + (-> gp-1 trans) + (the-as + (function object) + (lambda :behavior rigid-body-platform + () + (when + (or + (not *target*) + (< + (-> self info idle-distance) + (vector-vector-distance + (-> self root-overlay trans) + (-> *target* control trans) + ) + ) + ) + (let ((t9-1 (the-as (function object) enter-state))) + (set! + (-> self next-state) + (the-as state (method-of-object self rigid-body-platform-idle)) + ) + (t9-1) + ) + ) + (none) + ) + ) + ) + (set! (-> gp-1 code) (lambda :behavior rigid-body-platform () (while #t + (suspend) + ) + (none) + ) + ) + (set! (-> gp-1 post) rigid-body-platform-post) + ) + +;; definition for method 29 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod + TODO-RENAME-29 + rigid-body-platform + ((obj rigid-body-platform) (arg0 rigid-body-platform-constants)) + (set! (-> obj info) arg0) + (set! + (-> obj control-point-array) + (new + 'process + 'rigid-body-control-point-inline-array + (-> obj info control-point-count) + ) + ) + (logior! (-> obj skel status) 1) + (dummy-47 (-> obj root-overlay)) + (set-vector! + (-> obj rbody cm-offset-joint) + (-> obj info cm-joint-x) + (-> obj info cm-joint-y) + (-> obj info cm-joint-z) + 1.0 + ) + (TODO-RENAME-22 + (-> obj rbody) + (-> obj root-overlay trans) + (-> obj root-overlay quat) + (-> obj info linear-damping) + (-> obj info angular-damping) + ) + (TODO-RENAME-9 + (-> obj rbody) + (-> obj info mass) + (-> obj info inertial-tensor-x) + (-> obj info inertial-tensor-y) + (-> obj info inertial-tensor-z) + ) + (set! (-> obj player-impulse) #f) + (set! (-> obj player-contact) #f) + (set! (-> obj player-bonk-timeout) (-> *display* base-frame-counter)) + (set! (-> obj player-force quad) (-> *null-vector* quad)) + (set! (-> obj player-velocity quad) (-> *null-vector* quad)) + (set! (-> obj player-velocity-prev quad) (-> *null-vector* quad)) + (set! + (-> obj water-anim) + (the-as water-anim (entity-actor-lookup (-> obj entity) 'water-actor 0)) + ) + 0 + (none) + ) + +;; definition for method 30 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-30 rigid-body-platform ((obj rigid-body-platform)) + (let + ((s5-0 + (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player)) + ) + ) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) default-collision-reaction) + (set! (-> s5-0 no-reaction) nothing) + (let ((t9-2 (method-of-object s5-0 dummy-29))) + 1 + (t9-2) + ) + (let + ((s4-0 + (new + 'process + 'collide-shape-prim-mesh + s5-0 + (the-as uint 0) + (the-as uint 0) + ) + ) + ) + (set! (-> s4-0 prim-core collide-as) (the-as uint 2048)) + (set! (-> s4-0 collide-with) (the-as uint 16)) + (set! (-> s4-0 prim-core action) (the-as uint 3)) + (set! (-> s4-0 prim-core offense) 4) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + ) + ((method-of-object s5-0 dummy-46)) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + ((method-of-object s5-0 dummy-50)) + (set! (-> obj root-overlay) s5-0) + ) + 0 + (none) + ) + +;; definition for symbol *rigid-body-platform-constants*, type rigid-body-platform-constants +(define + *rigid-body-platform-constants* + (new 'static 'rigid-body-platform-constants + :drag-factor 0.8 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 1.5) + :gravity-factor 1.0 + :gravity (meters 10.0) + :player-weight (meters 6.6) + :player-bonk-factor 1.0 + :player-dive-factor 1.0 + :player-force-distance (meters 1000.0) + :player-force-clamp (meters 1000000.0) + :player-force-timeout #x1e + :explosion-force (meters 1000.0) + :linear-damping 1.0 + :angular-damping 1.0 + :control-point-count 1 + :mass 2.0 + :inertial-tensor-x (meters 3.0) + :inertial-tensor-y (meters 2.0) + :inertial-tensor-z (meters 3.0) + :idle-distance (meters 50.0) + :platform #t + :sound-name #f + ) + ) + +;; definition for method 34 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-34 rigid-body-platform ((obj rigid-body-platform)) + (with-pp + (let ((t9-0 (the-as (function object) enter-state))) + (set! + (-> pp next-state) + (the-as state (method-of-object obj rigid-body-platform-idle)) + ) + (t9-0) + ) + 0 + (none) + ) + ) + +;; definition for method 31 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-31 rigid-body-platform ((obj rigid-body-platform)) + (set! (-> obj float-height-offset) 0.0) + (TODO-RENAME-29 obj *rigid-body-platform-constants*) + (let ((s5-0 (-> obj info control-point-count))) + (dotimes (s4-0 s5-0) + (let ((s3-0 (-> obj control-point-array data s4-0))) + (let ((f30-0 (* 65536.0 (/ (the float s4-0) (the float s5-0))))) + (set! (-> s3-0 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-0 local-pos y) -10240.0) + (set! (-> s3-0 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-0 local-pos w) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type rigid-body-platform +;; INFO: Return type mismatch int vs none. +(defmethod + copy-defaults! + rigid-body-platform + ((obj rigid-body-platform) (arg0 res-lump)) + (set! (-> obj mask) (the-as process-mask (logior #x80000 (-> obj mask)))) + (TODO-RENAME-30 obj) + (process-drawable-from-entity! obj arg0) + (TODO-RENAME-31 obj) + (TODO-RENAME-34 obj) + 0 + (none) + ) diff --git a/test/decompiler/reference/levels/common/water-anim_REF.gc b/test/decompiler/reference/levels/common/water-anim_REF.gc new file mode 100644 index 0000000000..cb32f8b9ea --- /dev/null +++ b/test/decompiler/reference/levels/common/water-anim_REF.gc @@ -0,0 +1,2000 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type water-anim +(deftype water-anim (water-vol) + ((ppointer-water-anim (pointer water-anim) :offset 24) + (look int32 :offset-assert 212) + (play-ambient-sound? basic :offset-assert 216) + ) + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for method 3 of type water-anim +(defmethod inspect water-anim ((obj water-anim)) + (let ((t9-0 (method-of-type water-vol inspect))) + (t9-0 obj) + ) + (format #t "~T~Tlook: ~D~%" (-> obj look)) + (format #t "~T~Tplay-ambient-sound?: ~A~%" (-> obj play-ambient-sound?)) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-1 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 163840.0) + :version #x6 + ) + ) + ) + (set! (-> v1-1 jgeo) 0) + (set! (-> v1-1 janim) -1) + (set! (-> v1-1 mgeo 0) (the-as uint 1)) + (set! (-> v1-1 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-qbert-sg* v1-1) + ) + +;; failed to figure out what this is: +(let + ((v1-2 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 90112.0) + :version #x6 + ) + ) + ) + (set! (-> v1-2 jgeo) 2) + (set! (-> v1-2 janim) -1) + (set! (-> v1-2 mgeo 0) (the-as uint 3)) + (set! (-> v1-2 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-platform-room-sg* v1-2) + ) + +;; failed to figure out what this is: +(let + ((v1-3 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken-dark-eco" + :bounds (new 'static 'vector :w 86016.0) + :version #x6 + ) + ) + ) + (set! (-> v1-3 jgeo) 4) + (set! (-> v1-3 janim) -1) + (set! (-> v1-3 mgeo 0) (the-as uint 5)) + (set! (-> v1-3 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-dark-eco-helix-room-sg* v1-3) + ) + +;; failed to figure out what this is: +(let + ((v1-4 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds + (new 'static 'vector :x 61440.0 :z -147456.0 :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-4 jgeo) 0) + (set! (-> v1-4 janim) -1) + (set! (-> v1-4 mgeo 0) (the-as uint 1)) + (set! (-> v1-4 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-big-room-sg* v1-4) + ) + +;; failed to figure out what this is: +(let + ((v1-5 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 204800.0) + :version #x6 + ) + ) + ) + (set! (-> v1-5 jgeo) 2) + (set! (-> v1-5 janim) -1) + (set! (-> v1-5 mgeo 0) (the-as uint 3)) + (set! (-> v1-5 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-first-room-from-entrance-sg* v1-5) + ) + +;; failed to figure out what this is: +(let + ((v1-6 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 196608.0) + :version #x6 + ) + ) + ) + (set! (-> v1-6 jgeo) 4) + (set! (-> v1-6 janim) -1) + (set! (-> v1-6 mgeo 0) (the-as uint 5)) + (set! (-> v1-6 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-qbert-room-sg* v1-6) + ) + +;; failed to figure out what this is: +(let + ((v1-7 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 122880.0) + :version #x6 + ) + ) + ) + (set! (-> v1-7 jgeo) 6) + (set! (-> v1-7 janim) -1) + (set! (-> v1-7 mgeo 0) (the-as uint 7)) + (set! (-> v1-7 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-first-right-branch-sg* v1-7) + ) + +;; failed to figure out what this is: +(let + ((v1-8 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-8 jgeo) 8) + (set! (-> v1-8 janim) -1) + (set! (-> v1-8 mgeo 0) (the-as uint 9)) + (set! (-> v1-8 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-circular-with-bullys-sg* v1-8) + ) + +;; failed to figure out what this is: +(let + ((v1-9 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-9 jgeo) 10) + (set! (-> v1-9 janim) -1) + (set! (-> v1-9 mgeo 0) (the-as uint 11)) + (set! (-> v1-9 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-with-one-whirlpool-sg* v1-9) + ) + +;; failed to figure out what this is: +(let + ((v1-10 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 106496.0) + :version #x6 + ) + ) + ) + (set! (-> v1-10 jgeo) 12) + (set! (-> v1-10 janim) -1) + (set! (-> v1-10 mgeo 0) (the-as uint 13)) + (set! (-> v1-10 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-with-three-whirlpools-sg* v1-10) + ) + +;; failed to figure out what this is: +(let + ((v1-11 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-11 jgeo) 14) + (set! (-> v1-11 janim) -1) + (set! (-> v1-11 mgeo 0) (the-as uint 15)) + (set! (-> v1-11 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-start-of-helix-slide-sg* v1-11) + ) + +;; failed to figure out what this is: +(let + ((v1-12 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 184320.0) + :version #x6 + ) + ) + ) + (set! (-> v1-12 jgeo) 16) + (set! (-> v1-12 janim) -1) + (set! (-> v1-12 mgeo 0) (the-as uint 17)) + (set! (-> v1-12 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-room-above-exit-chamber-sg* v1-12) + ) + +;; failed to figure out what this is: +(let + ((v1-13 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds + (new 'static 'vector :x 20480.0 :z -12288.0 :w 98304.0) + :version #x6 + ) + ) + ) + (set! (-> v1-13 jgeo) 18) + (set! (-> v1-13 janim) -1) + (set! (-> v1-13 mgeo 0) (the-as uint 19)) + (set! (-> v1-13 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-hall-before-big-room-sg* v1-13) + ) + +;; failed to figure out what this is: +(let + ((v1-14 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-14 jgeo) 20) + (set! (-> v1-14 janim) -1) + (set! (-> v1-14 mgeo 0) (the-as uint 21)) + (set! (-> v1-14 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-short-piece-sg* v1-14) + ) + +;; failed to figure out what this is: +(let + ((v1-15 + (new 'static 'skeleton-group + :art-group-name "water-anim-sunken" + :bounds (new 'static 'vector :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-15 jgeo) 22) + (set! (-> v1-15 janim) -1) + (set! (-> v1-15 mgeo 0) (the-as uint 23)) + (set! (-> v1-15 lod-dist 0) 4095996000.0) + (set! *water-anim-sunken-big-room-upper-water-sg* v1-15) + ) + +;; failed to figure out what this is: +(let + ((v1-16 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-16 jgeo) 0) + (set! (-> v1-16 janim) -1) + (set! (-> v1-16 mgeo 0) (the-as uint 1)) + (set! (-> v1-16 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-center-pool-sg* v1-16) + ) + +;; failed to figure out what this is: +(let + ((v1-17 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds + (new 'static 'vector :x 24576.0 :z 20480.0 :w 249856.0) + :version #x6 + ) + ) + ) + (set! (-> v1-17 jgeo) 2) + (set! (-> v1-17 janim) -1) + (set! (-> v1-17 mgeo 0) (the-as uint 3)) + (set! (-> v1-17 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-lower-right-pool-sg* v1-17) + ) + +;; failed to figure out what this is: +(let + ((v1-18 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 151552.0) + :version #x6 + ) + ) + ) + (set! (-> v1-18 jgeo) 4) + (set! (-> v1-18 janim) -1) + (set! (-> v1-18 mgeo 0) (the-as uint 5)) + (set! (-> v1-18 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-mid-right-pool-sg* v1-18) + ) + +;; failed to figure out what this is: +(let + ((v1-19 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds + (new 'static 'vector :x -4096.0 :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-19 jgeo) 6) + (set! (-> v1-19 janim) -1) + (set! (-> v1-19 mgeo 0) (the-as uint 7)) + (set! (-> v1-19 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-lower-left-pool-sg* v1-19) + ) + +;; failed to figure out what this is: +(let + ((v1-20 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave" + :bounds (new 'static 'vector :w 208896.0) + :version #x6 + ) + ) + ) + (set! (-> v1-20 jgeo) 8) + (set! (-> v1-20 janim) -1) + (set! (-> v1-20 mgeo 0) (the-as uint 9)) + (set! (-> v1-20 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-mid-left-pool-sg* v1-20) + ) + +;; failed to figure out what this is: +(let + ((v1-21 + (new 'static 'skeleton-group + :art-group-name "water-anim-maincave-water" + :bounds + (new 'static 'vector :z -12288.0 :w 90112.0) + :version #x6 + ) + ) + ) + (set! (-> v1-21 jgeo) 0) + (set! (-> v1-21 janim) -1) + (set! (-> v1-21 mgeo 0) (the-as uint 1)) + (set! (-> v1-21 lod-dist 0) 4095996000.0) + (set! *water-anim-maincave-water-with-crystal-sg* v1-21) + ) + +;; failed to figure out what this is: +(let + ((v1-22 + (new 'static 'skeleton-group + :art-group-name "water-anim-robocave" + :bounds (new 'static 'vector :w 221184.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-22 jgeo) 0) + (set! (-> v1-22 janim) -1) + (set! (-> v1-22 mgeo 0) (the-as uint 1)) + (set! (-> v1-22 lod-dist 0) 81920.0) + (set! (-> v1-22 mgeo 1) (the-as uint 2)) + (set! (-> v1-22 lod-dist 1) 4095996000.0) + (set! *water-anim-robocave-main-pool-sg* v1-22) + ) + +;; failed to figure out what this is: +(let + ((v1-23 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :z -10240.0 :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-23 jgeo) 0) + (set! (-> v1-23 janim) -1) + (set! (-> v1-23 mgeo 0) (the-as uint 1)) + (set! (-> v1-23 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-by-arena-sg* v1-23) + ) + +;; failed to figure out what this is: +(let + ((v1-24 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 57344.0) + :version #x6 + ) + ) + ) + (set! (-> v1-24 jgeo) 2) + (set! (-> v1-24 janim) -1) + (set! (-> v1-24 mgeo 0) (the-as uint 3)) + (set! (-> v1-24 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skeleton-sg* v1-24) + ) + +;; failed to figure out what this is: +(let + ((v1-25 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :z 16384.0 :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-25 jgeo) 4) + (set! (-> v1-25 janim) -1) + (set! (-> v1-25 mgeo 0) (the-as uint 5)) + (set! (-> v1-25 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-behind-skeleton-sg* v1-25) + ) + +;; failed to figure out what this is: +(let + ((v1-26 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 57344.0) + :version #x6 + ) + ) + ) + (set! (-> v1-26 jgeo) 6) + (set! (-> v1-26 janim) -1) + (set! (-> v1-26 mgeo 0) (the-as uint 7)) + (set! (-> v1-26 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skull-back-sg* v1-26) + ) + +;; failed to figure out what this is: +(let + ((v1-27 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 65536.0) + :version #x6 + ) + ) + ) + (set! (-> v1-27 jgeo) 8) + (set! (-> v1-27 janim) -1) + (set! (-> v1-27 mgeo 0) (the-as uint 9)) + (set! (-> v1-27 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-above-skull-front-sg* v1-27) + ) + +;; failed to figure out what this is: +(let + ((v1-28 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 53248.0) + :version #x6 + ) + ) + ) + (set! (-> v1-28 jgeo) 10) + (set! (-> v1-28 janim) -1) + (set! (-> v1-28 mgeo 0) (the-as uint 11)) + (set! (-> v1-28 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-other-near-skull-sg* v1-28) + ) + +;; failed to figure out what this is: +(let + ((v1-29 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-29 jgeo) 12) + (set! (-> v1-29 janim) -1) + (set! (-> v1-29 mgeo 0) (the-as uint 13)) + (set! (-> v1-29 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-near-skull-sg* v1-29) + ) + +;; failed to figure out what this is: +(let + ((v1-30 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 65536.0) + :version #x6 + ) + ) + ) + (set! (-> v1-30 jgeo) 14) + (set! (-> v1-30 janim) -1) + (set! (-> v1-30 mgeo 0) (the-as uint 15)) + (set! (-> v1-30 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-under-spine-sg* v1-30) + ) + +;; failed to figure out what this is: +(let + ((v1-31 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 86016.0) + :version #x6 + ) + ) + ) + (set! (-> v1-31 jgeo) 16) + (set! (-> v1-31 janim) -1) + (set! (-> v1-31 mgeo 0) (the-as uint 17)) + (set! (-> v1-31 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-by-dock-sg* v1-31) + ) + +;; failed to figure out what this is: +(let + ((v1-32 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds + (new 'static 'vector :x -4096.0 :z -4096.0 :w 61440.0) + :version #x6 + ) + ) + ) + (set! (-> v1-32 jgeo) 18) + (set! (-> v1-32 janim) -1) + (set! (-> v1-32 mgeo 0) (the-as uint 19)) + (set! (-> v1-32 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-island-near-dock-sg* v1-32) + ) + +;; failed to figure out what this is: +(let + ((v1-33 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 40960.0) + :version #x6 + ) + ) + ) + (set! (-> v1-33 jgeo) 20) + (set! (-> v1-33 janim) -1) + (set! (-> v1-33 mgeo 0) (the-as uint 21)) + (set! (-> v1-33 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-mud-lonely-island-sg* v1-33) + ) + +;; failed to figure out what this is: +(let + ((v1-34 + (new 'static 'skeleton-group + :art-group-name "water-anim-misty" + :bounds (new 'static 'vector :w 69632.0) + :version #x6 + ) + ) + ) + (set! (-> v1-34 jgeo) 22) + (set! (-> v1-34 janim) -1) + (set! (-> v1-34 mgeo 0) (the-as uint 23)) + (set! (-> v1-34 lod-dist 0) 4095996000.0) + (set! *water-anim-misty-dark-eco-pool-sg* v1-34) + ) + +;; failed to figure out what this is: +(let + ((v1-35 + (new 'static 'skeleton-group + :art-group-name "water-anim-ogre" + :bounds (new 'static 'vector :w 458752.0) + :version #x6 + ) + ) + ) + (set! (-> v1-35 jgeo) 0) + (set! (-> v1-35 janim) -1) + (set! (-> v1-35 mgeo 0) (the-as uint 1)) + (set! (-> v1-35 lod-dist 0) 4095996000.0) + (set! *water-anim-ogre-lava-sg* v1-35) + ) + +;; failed to figure out what this is: +(let + ((v1-36 + (new 'static 'skeleton-group + :art-group-name "water-anim-jungle" + :bounds (new 'static 'vector :w 372736.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-36 jgeo) 0) + (set! (-> v1-36 janim) -1) + (set! (-> v1-36 mgeo 0) (the-as uint 1)) + (set! (-> v1-36 lod-dist 0) 81920.0) + (set! (-> v1-36 mgeo 1) (the-as uint 2)) + (set! (-> v1-36 lod-dist 1) 4095996000.0) + (set! *water-anim-jungle-river-sg* v1-36) + ) + +;; failed to figure out what this is: +(let + ((v1-37 + (new 'static 'skeleton-group + :art-group-name "water-anim-village3" + :bounds + (new 'static 'vector :x 61440.0 :z 40960.0 :w 667648.0) + :max-lod 1 + :version #x6 + ) + ) + ) + (set! (-> v1-37 jgeo) 0) + (set! (-> v1-37 janim) -1) + (set! (-> v1-37 mgeo 0) (the-as uint 1)) + (set! (-> v1-37 lod-dist 0) 81920.0) + (set! (-> v1-37 mgeo 1) (the-as uint 2)) + (set! (-> v1-37 lod-dist 1) 4095996000.0) + (set! *water-anim-village3-lava-sg* v1-37) + ) + +;; failed to figure out what this is: +(let + ((v1-38 + (new 'static 'skeleton-group + :art-group-name "water-anim-training" + :bounds + (new 'static 'vector :x -73728.0 :w 212992.0) + :version #x6 + ) + ) + ) + (set! (-> v1-38 jgeo) 0) + (set! (-> v1-38 janim) -1) + (set! (-> v1-38 mgeo 0) (the-as uint 1)) + (set! (-> v1-38 lod-dist 0) 4095996000.0) + (set! *water-anim-training-lake-sg* v1-38) + ) + +;; failed to figure out what this is: +(let + ((v1-39 + (new 'static 'skeleton-group + :art-group-name "water-anim-darkcave" + :bounds (new 'static 'vector :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-39 jgeo) 0) + (set! (-> v1-39 janim) -1) + (set! (-> v1-39 mgeo 0) (the-as uint 1)) + (set! (-> v1-39 lod-dist 0) 4095996000.0) + (set! *water-anim-darkcave-water-with-crystal-sg* v1-39) + ) + +;; failed to figure out what this is: +(let + ((v1-40 + (new 'static 'skeleton-group + :art-group-name "water-anim-rolling" + :bounds + (new 'static 'vector :x -40960.0 :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-40 jgeo) 0) + (set! (-> v1-40 janim) -1) + (set! (-> v1-40 mgeo 0) (the-as uint 1)) + (set! (-> v1-40 lod-dist 0) 4095996000.0) + (set! *water-anim-rolling-water-back-sg* v1-40) + ) + +;; failed to figure out what this is: +(let + ((v1-41 + (new 'static 'skeleton-group + :art-group-name "water-anim-rolling" + :bounds (new 'static 'vector :w 286720.0) + :version #x6 + ) + ) + ) + (set! (-> v1-41 jgeo) 2) + (set! (-> v1-41 janim) -1) + (set! (-> v1-41 mgeo 0) (the-as uint 3)) + (set! (-> v1-41 lod-dist 0) 4095996000.0) + (set! *water-anim-rolling-water-front-sg* v1-41) + ) + +;; failed to figure out what this is: +(let + ((v1-42 + (new 'static 'skeleton-group + :art-group-name "water-anim-finalboss" + :bounds (new 'static 'vector :w 77824.0) + :version #x6 + ) + ) + ) + (set! (-> v1-42 jgeo) 0) + (set! (-> v1-42 janim) -1) + (set! (-> v1-42 mgeo 0) (the-as uint 1)) + (set! (-> v1-42 lod-dist 0) 4095996000.0) + (set! *water-anim-finalboss-dark-eco-pool-sg* v1-42) + ) + +;; failed to figure out what this is: +(let + ((v1-43 + (new 'static 'skeleton-group + :art-group-name "water-anim-lavatube" + :bounds + (new 'static 'vector :y -28672.0 :w 102400.0) + :version #x6 + ) + ) + ) + (set! (-> v1-43 jgeo) 0) + (set! (-> v1-43 janim) -1) + (set! (-> v1-43 mgeo 0) (the-as uint 1)) + (set! (-> v1-43 lod-dist 0) 4095996000.0) + (set! *water-anim-lavatube-energy-lava-sg* v1-43) + ) + +;; failed to figure out what this is: +(let + ((v1-44 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds + (new 'static 'vector :x -61440.0 :w 110592.0) + :version #x6 + ) + ) + ) + (set! (-> v1-44 jgeo) 0) + (set! (-> v1-44 janim) -1) + (set! (-> v1-44 mgeo 0) (the-as uint 1)) + (set! (-> v1-44 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-sg* v1-44) + ) + +;; failed to figure out what this is: +(let + ((v1-45 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds (new 'static 'vector :w 18432.0) + :version #x6 + ) + ) + ) + (set! (-> v1-45 jgeo) 6) + (set! (-> v1-45 janim) -1) + (set! (-> v1-45 mgeo 0) (the-as uint 7)) + (set! (-> v1-45 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-fountain-sg* v1-45) + ) + +;; failed to figure out what this is: +(let + ((v1-46 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds (new 'static 'vector :w 143360.0) + :version #x6 + ) + ) + ) + (set! (-> v1-46 jgeo) 2) + (set! (-> v1-46 janim) -1) + (set! (-> v1-46 mgeo 0) (the-as uint 3)) + (set! (-> v1-46 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-mid-sg* v1-46) + ) + +;; failed to figure out what this is: +(let + ((v1-47 + (new 'static 'skeleton-group + :art-group-name "water-anim-village1" + :bounds + (new 'static 'vector :x 24576.0 :z -69632.0 :w 81920.0) + :version #x6 + ) + ) + ) + (set! (-> v1-47 jgeo) 4) + (set! (-> v1-47 janim) -1) + (set! (-> v1-47 mgeo 0) (the-as uint 5)) + (set! (-> v1-47 lod-dist 0) 4095996000.0) + (set! *water-anim-village1-rice-paddy-top-sg* v1-47) + ) + +;; failed to figure out what this is: +(let + ((v1-48 + (new 'static 'skeleton-group + :art-group-name "water-anim-village2" + :bounds (new 'static 'vector :w 2867.2) + :version #x6 + ) + ) + ) + (set! (-> v1-48 jgeo) 0) + (set! (-> v1-48 janim) -1) + (set! (-> v1-48 mgeo 0) (the-as uint 1)) + (set! (-> v1-48 lod-dist 0) 4095996000.0) + (set! *water-anim-village2-bucket-sg* v1-48) + ) + +;; definition of type water-anim-look +(deftype water-anim-look (structure) + ((skel-group symbol :offset-assert 0) + (anim int32 :offset-assert 4) + (ambient-sound-spec sound-spec :offset-assert 8) + ) + :method-count-assert 9 + :size-assert #xc + :flag-assert #x90000000c + ) + +;; definition for method 3 of type water-anim-look +(defmethod inspect water-anim-look ((obj water-anim-look)) + (format #t "[~8x] ~A~%" obj 'water-anim-look) + (format #t "~Tskel-group: ~A~%" (-> obj skel-group)) + (format #t "~Tanim: ~D~%" (-> obj anim)) + (format #t "~Tambient-sound-spec: ~A~%" (-> obj ambient-sound-spec)) + obj + ) + +;; definition for symbol *water-anim-look*, type (array water-anim-look) +(define + *water-anim-look* + (the-as (array water-anim-look) + (new + 'static + 'boxed-array + :type water-anim-look :length 48 :allocated-length 48 + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-big-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 70 + :fo-max 80 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-first-room-from-entrance-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 50 + :fo-max 60 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-qbert-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 48 + :fo-max 58 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-first-right-branch-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 30 + :fo-max 40 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-circular-with-bullys-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 15 + :fo-max 25 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-with-one-whirlpool-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 27 + :fo-max 37 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-with-three-whirlpools-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 26 + :fo-max 36 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-start-of-helix-slide-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 25 + :fo-max 35 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-room-above-exit-chamber-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 45 + :fo-max 55 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-hall-before-big-room-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-dark-eco-qbert-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 40 + :fo-max 50 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-sunken-short-piece-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-big-room-upper-water-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x77 + #x61 + #x74 + #x65 + #x72 + #x2d + #x6c + #x6f + #x6f + #x70 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 27 + :fo-max 37 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-dark-eco-platform-room-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 22 + :fo-max 32 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-water-with-crystal-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-maincave-center-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 70 + :fo-max 80 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-lower-right-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 40 + :fo-max 50 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-mid-right-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 37 + :fo-max 47 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-maincave-lower-left-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 20 + :fo-max 30 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-maincave-mid-left-pool-sg* + :anim 10 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 51 + :fo-max 61 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-robocave-main-pool-sg* + :anim 3 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 54 + :fo-max 64 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-by-arena-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skeleton-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-behind-skeleton-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skull-back-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-above-skull-front-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-other-near-skull-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-near-skull-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-under-spine-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-mud-by-dock-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-island-near-dock-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-misty-mud-lonely-island-sg* + :anim 24 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-misty-dark-eco-pool-sg* + :anim 24 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 17 + :fo-max 27 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-ogre-lava-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-jungle-river-sg* + :anim 3 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village3-lava-sg* + :anim 3 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-training-lake-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-darkcave-water-with-crystal-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-rolling-water-back-sg* + :anim 4 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-rolling-water-front-sg* + :anim 4 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-sunken-dark-eco-helix-room-sg* + :anim 6 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x68 + #x65 + #x6c + #x69 + #x78 + #x2d + #x64 + #x61 + #x72 + #x6b + #x2d + #x65 + #x63 + #x6f + #x0 + #x0 + ) + :volume #x400 + :fo-min #x78 + :fo-max #x82 + ) + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-finalboss-dark-eco-pool-sg* + :anim 2 + :ambient-sound-spec + (new 'static 'sound-spec + :mask #xc0 + :num 1.0 + :group #x1 + :sound-name-char + (new 'static 'array uint8 16 + #x64 + #x61 + #x72 + #x6b + #x65 + #x63 + #x6f + #x2d + #x70 + #x6f + #x6f + #x6c + #x0 + #x0 + #x0 + #x0 + ) + :volume #x400 + :fo-min 19 + :fo-max 29 + ) + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-lavatube-energy-lava-sg* + :anim 2 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village1-rice-paddy-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village1-fountain-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-village1-rice-paddy-mid-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group + '*water-anim-village1-rice-paddy-top-sg* + :anim 8 + :ambient-sound-spec #f + ) + (new 'static 'water-anim-look + :skel-group '*water-anim-village2-bucket-sg* + :anim 2 + :ambient-sound-spec #f + ) + ) + ) + ) + +;; failed to figure out what this is: +(let + ((gp-0 + (new 'static 'state + :name 'water-vol-idle + :next #f + :exit #f + :code #f + :trans #f + :post #f + :enter #f + :event #f + ) + ) + ) + (inherit-state gp-0 (the-as state (method-of-type water-vol water-vol-idle))) + (method-set! water-anim 20 (the-as function gp-0)) + (set! + (-> gp-0 event) + (lambda :behavior water-anim + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('move-to) + (set! + (-> self root trans quad) + (-> (the-as vector (-> arg3 param 0)) quad) + ) + (set! (-> self water-height) (-> self root trans y)) + (if (nonzero? (-> self sound)) + (update-trans! (-> self sound) (-> self root trans)) + ) + (let ((v0-0 (logclear (-> self mask) (process-mask sleep-code)))) + (set! (-> self mask) v0-0) + v0-0 + ) + ) + ) + ) + ) + (set! + (-> gp-0 trans) + (the-as + (function object) + (lambda :behavior water-anim + () + (let + ((t9-0 + (-> + (the-as (state none) (method-of-type water-vol water-vol-idle)) + trans + ) + ) + ) + (if t9-0 + (t9-0) + ) + ) + (if (< (-> (math-camera-pos) y) (+ -8192.0 (-> self root trans y))) + (logior! (-> self draw status) 2) + (set! (-> self draw status) (logand -3 (-> self draw status))) + ) + (if (and (-> self play-ambient-sound?) (nonzero? (-> self sound))) + (update! (-> self sound)) + ) + (none) + ) + ) + ) + (set! (-> gp-0 code) (lambda :behavior water-anim () (while #t + (ja-post) + (logior! + (-> self mask) + (process-mask + sleep-code + ) + ) + (suspend) + ) + (none) + ) + ) + ) + +;; definition for method 28 of type water-anim +(defmethod get-ripple-height water-anim ((obj water-anim) (arg0 vector)) + (ripple-find-height obj 0 arg0) + ) + +;; definition for method 24 of type water-anim +;; INFO: Return type mismatch symbol vs none. +(defmethod dummy-24 water-anim () + (none) + ) + +;; definition for method 25 of type water-anim +;; Used lq/sq +(defmethod TODO-RENAME-25 water-anim ((obj water-anim)) + (local-vars (sv-16 int)) + (set! (-> obj play-ambient-sound?) #t) + (set! + (-> obj look) + (the-as + int + ((method-of-type res-lump get-property-value) + (-> obj entity) + 'look + 'interp + -1000000000.0 + (the-as uint128 -1) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! sv-16 0) + (let + ((v1-3 + (the-as + object + ((method-of-type res-lump get-property-data) + (-> obj entity) + 'trans-offset + 'interp + -1000000000.0 + (the-as pointer #f) + (the-as (pointer res-tag) (& sv-16)) + *res-static-buf* + ) + ) + ) + ) + (when (the-as pointer v1-3) + (+! (-> obj root trans x) (-> (the-as transform v1-3) trans x)) + (+! (-> obj root trans y) (-> (the-as transform v1-3) trans y)) + (set! + (-> (the-as transform (-> obj root)) rot y) + (+ (-> obj root trans z) (-> (the-as transform v1-3) trans z)) + ) + ) + ) + (let + ((f0-6 + ((method-of-type res-lump get-property-value-float) + (-> obj entity) + 'rotoffset + 'interp + -1000000000.0 + 0.0 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (!= f0-6 0.0) + (quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6) + ) + ) + ) + +;; definition for method 22 of type water-anim +;; INFO: Return type mismatch int vs ripple-wave-set. +(defmethod TODO-RENAME-22 water-anim ((obj water-anim)) + (with-pp + (let ((s5-0 (-> obj look))) + (when (or (< s5-0 0) (>= s5-0 (-> *water-anim-look* length))) + (let ((t9-0 (the-as (function object object) enter-state)) + (a0-2 "skel group") + ) + (set! (-> pp next-state) process-drawable-art-error) + (t9-0 a0-2) + ) + ) + (let ((s5-1 (-> *water-anim-look* s5-0))) + (let ((s4-0 (-> s5-1 skel-group value))) + (let ((s3-0 s4-0)) + (when + (not + (if + (and + (nonzero? s3-0) + (type-type? (-> (the-as basic s3-0) type) skeleton-group) + ) + s3-0 + ) + ) + (let ((t9-2 (the-as (function object object) enter-state)) + (a0-5 "skel group") + ) + (set! (-> pp next-state) process-drawable-art-error) + (t9-2 a0-5) + ) + ) + ) + (dummy-14 obj (the-as skeleton-group s4-0) '()) + ) + (ja-channel-set! 1) + (let ((s4-1 (-> obj skel root-channel 0))) + (joint-control-channel-group-eval! + s4-1 + (the-as art-joint-anim (-> obj draw art-group data (-> s5-1 anim))) + num-func-identity + ) + (set! (-> s4-1 frame-num) 0.0) + ) + (let ((a2-2 (-> s5-1 ambient-sound-spec))) + (when a2-2 + (let ((a3-0 (new 'stack-no-clear 'vector))) + (vector+! a3-0 (-> obj root trans) (-> obj draw bounds)) + (set! (-> obj sound) (new 'process 'ambient-sound a2-2 a3-0)) + ) + ) + ) + ) + ) + (the-as ripple-wave-set (ja-post)) + ) + ) diff --git a/test/decompiler/reference/levels/misty/misty-teetertotter_REF.gc b/test/decompiler/reference/levels/misty/misty-teetertotter_REF.gc index 5dde03778a..c7d81e6dcd 100644 --- a/test/decompiler/reference/levels/misty/misty-teetertotter_REF.gc +++ b/test/decompiler/reference/levels/misty/misty-teetertotter_REF.gc @@ -362,7 +362,7 @@ ) ;; definition for method 11 of type teetertotter -(defmethod dummy-method-11 teetertotter ((obj teetertotter) (arg0 object)) +(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump)) (let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player)) @@ -479,7 +479,3 @@ (go teetertotter-idle) (none) ) - - - - diff --git a/test/decompiler/reference/levels/misty/misty-warehouse_REF.gc b/test/decompiler/reference/levels/misty/misty-warehouse_REF.gc index 61d385ba0d..903036afb5 100644 --- a/test/decompiler/reference/levels/misty/misty-warehouse_REF.gc +++ b/test/decompiler/reference/levels/misty/misty-warehouse_REF.gc @@ -285,7 +285,7 @@ ) ;; definition for method 11 of type silostep -(defmethod dummy-method-11 silostep ((obj silostep) (arg0 object)) +(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump)) (logior! (-> obj mask) (process-mask movie-subject)) (let ((s4-0 @@ -327,8 +327,8 @@ (set! (-> obj anim-limit) (* - ((method-of-type res-lump get-property-value-float) - (the-as res-lump arg0) + (get-property-value-float + arg0 'distance 'interp -1000000000.0 @@ -466,7 +466,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/levels/misty/mud_REF.gc b/test/decompiler/reference/levels/misty/mud_REF.gc new file mode 100644 index 0000000000..341536e634 --- /dev/null +++ b/test/decompiler/reference/levels/misty/mud_REF.gc @@ -0,0 +1,112 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mud +(deftype mud (water-anim) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for method 3 of type mud +(defmethod inspect mud ((obj mud)) + (let ((t9-0 (method-of-type water-anim inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for symbol ripple-for-mud, type ripple-wave-set +(define + ripple-for-mud + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-small-mud, type ripple-wave-set +(define + ripple-for-small-mud + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 22 of type mud +(defmethod TODO-RENAME-22 mud ((obj mud)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-22))) + (t9-0 obj) + ) + (set! (-> obj flags) (logand -8388609 (-> obj flags))) + (set! (-> obj flags) (logior #x40000 (-> obj flags))) + (let ((gp-0 (new 'process 'ripple-control))) + (set! (-> obj draw ripple) gp-0) + (set! (-> gp-0 global-scale) 3072.0) + (set! (-> gp-0 waveform) ripple-for-mud) + (let + ((v1-9 + (the-as + object + ((method-of-type res-lump get-property-data) + (-> obj entity) + 'water-anim-fade-dist + 'interp + -1000000000.0 + (the-as pointer #f) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (when (the-as pointer v1-9) + (set! + (-> gp-0 close-fade-dist) + (-> (the-as ripple-control v1-9) global-scale) + ) + (set! + (-> gp-0 far-fade-dist) + (-> (the-as ripple-control v1-9) last-frame-scale) + ) + ) + ) + (case (-> obj look) + ((21 25 29) + (set! (-> gp-0 close-fade-dist) 4096000000.0) + (set! (-> gp-0 far-fade-dist) 8192000000.0) + ) + ) + (case (-> obj look) + ((22 25 24 27 26 31) + (let ((v0-3 ripple-for-small-mud)) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ) + ) + ) + ) + + + +