From 42f7a675b238697931890ebaae99cfc704f6b693 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Wed, 1 Sep 2021 11:20:05 -0400 Subject: [PATCH] decomp: a few files that were done except for `sp-launch-group` (#802) * decomp: dark-eco-pool blocked by sparticle-launch-group label * decomp: finalize `dark-eco-pool` * decomp: mostly finish `beach-rocks` waiting for sparticle label supp * decomp: almost done `beach-rocks` but potential new handle case * decomp: finish `beach-rocks` * decomp: finish `assistant` * decomp: finish `miners` --- decompiler/config/all-types.gc | 109 +- .../anonymous_function_types.jsonc | 15 +- .../jak1_ntsc_black_label/label_types.jsonc | 11 +- .../stack_structures.jsonc | 17 + .../jak1_ntsc_black_label/type_casts.jsonc | 34 + .../jak1_ntsc_black_label/var_names.jsonc | 6 + goal_src/engine/entity/entity.gc | 2 +- goal_src/engine/game/collectables.gc | 72 +- goal_src/engine/game/generic-obs.gc | 2 + goal_src/engine/game/task/process-taskable.gc | 2 + goal_src/engine/gfx/merc/merc-h.gc | 4 +- goal_src/engine/gfx/water/water-h.gc | 2 +- goal_src/engine/ui/text-h.gc | 2 + goal_src/levels/beach/beach-rocks.gc | 1601 ++++++++++++++++ goal_src/levels/common/dark-eco-pool.gc | 1215 +++++++++++++ goal_src/levels/common/water-anim.gc | 48 +- goal_src/levels/village1/assistant.gc | 1247 ++++++++++++- goal_src/levels/village3/miners.gc | 1334 ++++++++++++++ .../reference/engine/gfx/merc/merc-h_REF.gc | 18 +- .../reference/engine/gfx/water/water-h_REF.gc | 2 +- .../reference/levels/beach/beach-rocks_REF.gc | 1602 +++++++++++++++++ .../levels/common/dark-eco-pool_REF.gc | 1226 +++++++++++++ .../reference/levels/common/water-anim_REF.gc | 10 +- .../levels/village1/assistant_REF.gc | 1268 +++++++++++++ .../reference/levels/village1/sage_REF.gc | 4 + .../reference/levels/village3/miners_REF.gc | 1349 ++++++++++++++ test/offline/offline_test_main.cpp | 3 +- 27 files changed, 11088 insertions(+), 117 deletions(-) create mode 100644 test/decompiler/reference/levels/beach/beach-rocks_REF.gc create mode 100644 test/decompiler/reference/levels/common/dark-eco-pool_REF.gc create mode 100644 test/decompiler/reference/levels/village1/assistant_REF.gc create mode 100644 test/decompiler/reference/levels/village3/miners_REF.gc diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 05f2b2e35d..689eda859d 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -872,6 +872,8 @@ (misty-bike-jump #x266) (misty-eco-challenge #x267) + (beach-seagulls-avalanche #x273) + (misty-teetertotter-bonk-dax-tutorial #x2a4) (village2-gambler-money #x300) @@ -8167,8 +8169,8 @@ (faded-scale float :offset-assert 20) (individual-normal-scale float :offset-assert 24) (waveform ripple-wave-set :offset-assert 28) - (send-query basic :offset-assert 32) - (query basic :offset-assert 36) + (send-query symbol :offset-assert 32) ;; bool + (query ripple-merc-query :offset-assert 36) ) (:methods (new (symbol type) _type_ 0) @@ -17434,7 +17436,7 @@ (define-extern load-state-want-force-vis (function symbol symbol int)) (define-extern command-get-param (function object symbol symbol)) (define-extern entity-birth-no-kill (function entity none)) -(define-extern part-tracker-init function) +(define-extern part-tracker-init (function sparticle-launch-group int basic basic basic vector none)) ;; TODO - not confirmed (define-extern command-list-get-process (function object process)) (define-extern command-get-quoted-param (function object symbol symbol)) (define-extern command-get-int (function object int int)) @@ -17908,7 +17910,7 @@ (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (TODO-RENAME-25 (_type_) quaternion 25) + (TODO-RENAME-25 (_type_) object 25) (dummy-26 () none 26) (dummy-27 () none 27) (get-ripple-height (_type_ vector) float 28) @@ -20304,9 +20306,9 @@ (define-extern vent-standard-event-handler function) (define-extern ecovalve-init-by-other function) -(define-extern birth-pickup-at-point (function vector int float symbol process symbol basic)) ;; TODO - not confirmed at all! (the symbols are wrong) +(define-extern birth-pickup-at-point (function vector int float symbol process-drawable symbol none)) ;; TODO - unconfirmed - see beach-rocks (define-extern fuel-cell-pick-anim function) -(define-extern othercam-init-by-other function) +(define-extern othercam-init-by-other (function int symbol symbol none)) ;; TODO - unconfirmed - see beach-rocks (define-extern fuel-cell-animate function) (define-extern add-blue-motion function) (define-extern check-blue-suck function) @@ -20315,7 +20317,7 @@ (define-extern money-init-by-other function) (define-extern money-init-by-other-no-bob function) (define-extern fuel-cell-init-by-other function) -(define-extern fuel-cell-init-as-clone function) +(define-extern fuel-cell-init-as-clone (function game-task none)) ;; TODO - unconfirmed - see beach-rocks (define-extern buzzer-init-by-other function) ;; - Symbols @@ -22034,11 +22036,11 @@ ;; - Unknowns -;;(define-extern ripple-for-dark-eco-pool object) ;; unknown type -;;(define-extern ripple-for-misty-dark-eco-pool object) ;; unknown type -;;(define-extern ripple-for-maincave-dark-eco-pool object) ;; unknown type -;;(define-extern ripple-for-sunken-dark-eco-helix-room object) ;; unknown type -;;(define-extern ripple-for-finalboss-dark-eco-pool object) ;; unknown type +(define-extern ripple-for-dark-eco-pool ripple-wave-set) ;; unknown type +(define-extern ripple-for-misty-dark-eco-pool ripple-wave-set) ;; unknown type +(define-extern ripple-for-maincave-dark-eco-pool ripple-wave-set) ;; unknown type +(define-extern ripple-for-sunken-dark-eco-helix-room ripple-wave-set) ;; unknown type +(define-extern ripple-for-finalboss-dark-eco-pool ripple-wave-set) ;; unknown type ;; ---------------------- @@ -23960,62 +23962,33 @@ ;; - Types -; (deftype beach-rock (process-drawable) -; ((trigger basic :offset-assert 176) -; (movie-start uint64 :offset-assert 184) -; (part-falling basic :offset-assert 192) -; (part-landing basic :offset-assert 196) -; (prev-frame float :offset-assert 200) -; ) -; :method-count-assert 24 -; :size-assert #xcc -; :heap-base #x60 -; :flag-assert #x18006000cc -; ;; inherited inspect of process-drawable -; (: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) -; ) -; ) +(deftype beach-rock (process-drawable) + ((root-override collide-shape-moving :score 100 :offset 112) + (trigger basic :offset-assert 176) + (movie-start uint64 :offset-assert 184) + (part-falling sparticle-launch-control :offset-assert 192) + (part-landing sparticle-launch-control :offset-assert 196) + (prev-frame float :offset-assert 200) + ) + :method-count-assert 24 + :heap-base #x60 + :size-assert #xcc + :flag-assert #x18006000cc + (:methods + (idle () _type_ :state 20) ;; state + (loading () _type_ :state 21) ;; state + (falling () _type_ :state 22) ;; state + (fallen () _type_ :state 23) ;; state + ) + ) -; (deftype lrocklrg (beach-rock) -; () -; :method-count-assert 24 -; :size-assert #xcc -; :heap-base #x60 -; :flag-assert #x18006000cc -; ;; 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) -; ) -; ) +(deftype lrocklrg (beach-rock) + () + :method-count-assert 24 + :heap-base #x60 + :size-assert #xcc + :flag-assert #x18006000cc + ) ;; - Unknowns @@ -40123,7 +40096,7 @@ :heap-base #x40 :flag-assert #x15004000b0 (:methods - (dummy-20 (_type_) none 20) + (idle () _type_ :state 20) ) ) 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 1b1c2d9c4f..88f7e0565e 100644 --- a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc @@ -671,10 +671,6 @@ [2, "(function sparticle-launch-group :behavior oracle)"], [3, "(function none :behavior oracle)"] ], - - "miners": [ - [1, "(function none :behavior minershort)"] - ], "time-of-day": [ [10, "(function none)"], @@ -688,6 +684,15 @@ "entity": [ [10, "(function process-drawable none)"] ], - + + "beach-rocks": [ + [2, "(function none :behavior beach-rock)"], + [3, "(function none :behavior beach-rock)"], + [4, "(function none :behavior beach-rock)"], + [5, "(function none :behavior beach-rock)"], + [6, "(function none :behavior beach-rock)"], + [7, "(function process int symbol event-message-block none :behavior beach-rock)"] + ], + "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 a83fba398e..59aa1720ef 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -420,11 +420,8 @@ ], "miners": [ - ["L111", "vector"] - // ["L270", "sparticle-launcher", true], - // ["L272", "sparticle-launcher", true], - // ["L274", "sparticle-launcher", true], - // ["L276", "sparticle-launch-group", true], + ["L111", "vector"], + ["L281", "vector"] ], "entity": [ @@ -442,6 +439,10 @@ ["L471", "vector4w"] ], + "assistant": [ + ["L71", "vector"] + ], + // 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 783c1bb77c..394fca970f 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -1428,5 +1428,22 @@ [32, "vector"] ], + "(trans falling beach-rock)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "vector"], + [96, "vector"] + ], + + "(code falling beach-rock)": [ + [16, "event-message-block"] + ], + + "(method 11 beach-rock)": [ + [16, "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 46ae037f25..746fc48ffe 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -2562,5 +2562,39 @@ [[0, 999], "s6", "camera-master"] ], + "(anon-function 0 dark-eco-pool)": [ + [2, "v1", "state"] + ], + + "(method 25 dark-eco-pool)": [ + [22, "t9", "(function res-lump symbol symbol float structure (pointer res-tag) pointer object)"] + ], + + "(top-level-login beach-rocks)": [ + [78, "v1", "state"] + ], + + "(method 7 beach-rock)": [ + [5, "v1", "int"], + [10, "v1", "int"], + [19, "t9", "(function process-drawable int none)"] + ], + + "(method 10 beach-rock)": [ + [21, "t9", "(function process-drawable none)"] + ], + + "(code falling beach-rock)": [ + [63, "t9", "(function object object object object object object)"], + [98, "t9", "(function object object object object object)"], + [138, "gp", "handle"], + [150, "gp", "handle"], + [[158, 165], "s5", "handle"] + ], + + "(method 11 beach-rock)": [ + [77, "v1", "int"] + ], + "placeholder-do-not-add-below": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc index b94de87195..3db9c8c197 100644 --- a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc @@ -3341,7 +3341,13 @@ "a0-10":"amb-to-birth", "s4-2":"cams" } + }, + "(code falling beach-rock)": { + "vars": { + "gp-2": ["gp-2", "handle"], + "s5-1": ["s5-1", "handle"] + } }, diff --git a/goal_src/engine/entity/entity.gc b/goal_src/engine/entity/entity.gc index a2a8fe1be9..d14fedc1ba 100644 --- a/goal_src/engine/entity/entity.gc +++ b/goal_src/engine/entity/entity.gc @@ -1321,4 +1321,4 @@ (none)) (define-extern process-drawable-from-entity! (function process-drawable res-lump none)) -(define-extern entity-birth-no-kill (function entity none)) \ No newline at end of file +(define-extern entity-birth-no-kill (function entity none)) diff --git a/goal_src/engine/game/collectables.gc b/goal_src/engine/game/collectables.gc index 626e074f1a..d0351964be 100644 --- a/goal_src/engine/game/collectables.gc +++ b/goal_src/engine/game/collectables.gc @@ -6,6 +6,76 @@ ;; dgos: GAME, ENGINE ;; TODO - for nav-enemy -(define-extern birth-pickup-at-point (function vector int float symbol process symbol basic)) ;; TODO - not confirmed at all! (the symbols are wrong) +(define-extern birth-pickup-at-point (function vector int float symbol process-drawable symbol none)) ;; TODO - unconfirmed - see beach-rocks ;; TODO - for oracle (define-extern *fuel-cell-sg* skeleton-group) ;; unknown type +;; TODO - for entity and beach-rocks +(deftype collectable (process-drawable) + ((pickup-type int32 :offset-assert 176) + (pickup-amount float :offset-assert 180) + (notify-parent basic :offset-assert 184) + (old-base vector :inline :offset-assert 192) + (base vector :inline :offset-assert 208) + (extra-trans vector :inline :offset-assert 224) + (jump-pos vector :inline :offset-assert 240) + (flags uint32 :offset-assert 256) + (birth-time uint64 :offset-assert 264) + (collect-timeout uint64 :offset-assert 272) + (fadeout-timeout uint64 :offset-assert 280) + (bob-offset uint64 :offset-assert 288) + (bob-amount float :offset-assert 296) + (pickup-handle handle :offset-assert 304) ;; not sure it's a handle + (actor-pause basic :offset-assert 312) + ) + + (:methods + (dummy-20 () none 20) + (dummy-21 () none 21) + ) + :heap-base #xd0 + + :method-count-assert 22 + :size-assert #x13c + :flag-assert #x1600d0013c + ) + +(deftype eco-collectable (collectable) + ((eco-effect basic :offset-assert 316) + (collect-effect basic :offset-assert 320) + (collect-effect2 basic :offset-assert 324) + (collect-effect-time uint64 :offset-assert 328) + (respawn-delay uint64 :offset-assert 336) + (sound-name basic :offset-assert 344) + (target uint64 :offset-assert 352) + (suck-time uint64 :offset-assert 360) + (suck-y-offset float :offset-assert 368) + (speed vector :inline :offset-assert 384) + (movie-pos-index int32 :offset-assert 400) + ) + (:methods + (wait () none 22) ;; state + (pickup () none 23) ;; state + (die () none 24) ;; state + (dummy-25 () none 25) + (notice-blue () none 26) ;; state + (dummy-27 () none 27) + (dummy-28 () none 28) + (dummy-29 () none 29) + (dummy-30 () none 30) + ) + + :heap-base #x130 + :method-count-assert 31 + :size-assert #x194 + :flag-assert #x1f01300194 + ) + +(deftype fuel-cell (eco-collectable) + ((victory-anim basic :offset-assert 404) + (state-object basic :offset-assert 408)) + :heap-base #x130 + :method-count-assert 31 + :size-assert #x19c + :flag-assert #x1f0130019c + ) +(define-extern fuel-cell-init-as-clone (function game-task none)) diff --git a/goal_src/engine/game/generic-obs.gc b/goal_src/engine/game/generic-obs.gc index 00927652b3..38d115e59f 100644 --- a/goal_src/engine/game/generic-obs.gc +++ b/goal_src/engine/game/generic-obs.gc @@ -20,3 +20,5 @@ (define-extern process-release? (function process symbol)) ;; TODO - for bird-lady-beach (define-extern manipy-init (function trsqv vector entity skeleton-group symbol none)) ;; TODO - not confirmed yet +;; TODO - for projectiles | dark-eco-pool +(define-extern part-tracker-init (function sparticle-launch-group int basic basic basic vector none)) ;; TODO - not confirmed diff --git a/goal_src/engine/game/task/process-taskable.gc b/goal_src/engine/game/task/process-taskable.gc index b11eb4bf8b..67718a764c 100644 --- a/goal_src/engine/game/task/process-taskable.gc +++ b/goal_src/engine/game/task/process-taskable.gc @@ -5,3 +5,5 @@ ;; name in dgo: process-taskable ;; dgos: GAME, ENGINE +;; TODO - for beach-rocks +(define-extern othercam-init-by-other (function int symbol symbol none)) diff --git a/goal_src/engine/gfx/merc/merc-h.gc b/goal_src/engine/gfx/merc/merc-h.gc index 4e289fc4ff..fd426a3e26 100644 --- a/goal_src/engine/gfx/merc/merc-h.gc +++ b/goal_src/engine/gfx/merc/merc-h.gc @@ -358,8 +358,8 @@ (faded-scale float :offset-assert 20) (individual-normal-scale float :offset-assert 24) (waveform ripple-wave-set :offset-assert 28) - (send-query basic :offset-assert 32) - (query basic :offset-assert 36) + (send-query symbol :offset-assert 32) ;; bool + (query ripple-merc-query :offset-assert 36) ) (:methods (new (symbol type) _type_ 0) diff --git a/goal_src/engine/gfx/water/water-h.gc b/goal_src/engine/gfx/water/water-h.gc index 30a82f1f1c..d15d0fdb08 100644 --- a/goal_src/engine/gfx/water/water-h.gc +++ b/goal_src/engine/gfx/water/water-h.gc @@ -115,7 +115,7 @@ (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (TODO-RENAME-25 (_type_) quaternion 25) + (TODO-RENAME-25 (_type_) object 25) (dummy-26 () none 26) (dummy-27 () none 27) (get-ripple-height (_type_ vector) float 28) diff --git a/goal_src/engine/ui/text-h.gc b/goal_src/engine/ui/text-h.gc index 6eef4ad777..085ca4f6bd 100644 --- a/goal_src/engine/ui/text-h.gc +++ b/goal_src/engine/ui/text-h.gc @@ -93,6 +93,8 @@ (misty-bike-jump #x266) (misty-eco-challenge #x267) + (beach-seagulls-avalanche #x273) + (misty-teetertotter-bonk-dax-tutorial #x2a4) (village2-gambler-money #x300) diff --git a/goal_src/levels/beach/beach-rocks.gc b/goal_src/levels/beach/beach-rocks.gc index fd750ebd92..1ac92f7ff4 100644 --- a/goal_src/levels/beach/beach-rocks.gc +++ b/goal_src/levels/beach/beach-rocks.gc @@ -5,3 +5,1604 @@ ;; name in dgo: beach-rocks ;; dgos: BEA, L1 +(define-extern *lrocklrg-sg* skeleton-group) + +;; failed to figure out what this is: +(let + ((v1-0 + (new 'static 'skeleton-group + :art-group-name "lrocklrg" + :bounds (new 'static 'vector :w 20480.0) + :longest-edge (meters 11.0) + :version #x6 + ) + ) + ) + (set! (-> v1-0 jgeo) 0) + (set! (-> v1-0 janim) 2) + (set! (-> v1-0 mgeo 0) (the-as uint 1)) + (set! (-> v1-0 lod-dist 0) 4095996000.0) + (set! *lrocklrg-sg* v1-0) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 553) + (new 'static 'sparticle-launch-group + :length 3 + :duration #x384 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-start" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item :launcher #x924 :period #x4b :length #xa) + (new 'static 'sparticle-group-item :launcher #x925 :period #x4b :length #xa) + (new 'static 'sparticle-group-item :launcher #x8f1 :period #x4b :length #xa) + ) + :bounds (new 'static 'sphere :w 262144.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2341) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 22 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201d00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44800000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x44800000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1053184142 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f7851ec + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x46638e39 + :random-range #x470e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2340) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 23 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201700) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x41000000 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42800000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1112620226 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f6e147b + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x46638e39 + :random-range #x470e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2289) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x46c00000 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x4323d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1121008834 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1115998039 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1121008834 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1123872145 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f733333 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 554) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-fall" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (new 'static 'sparticle-group-item :launcher #x8f2 :period #xf :length #x5) + ) + :bounds (new 'static 'sphere :w 32768.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2290) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x46e00000 + :random-range #x47100000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x425a740e + :random-range #x41da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x42da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f7ae148 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 555) + (new 'static 'sparticle-launch-group + :length 3 + :duration #x384 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-land" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item + :launcher #x926 + :period #x384 + :length #x28 + ) + (new 'static 'sparticle-group-item + :launcher #x927 + :period #x384 + :length #x28 + ) + (new 'static 'sparticle-group-item + :launcher #x8f3 + :period #x384 + :length #x28 + ) + ) + :bounds (new 'static 'sphere :w 262144.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2343) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -968884224 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x48000000 + :random-range #x47200000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x1 + :initial-value #x465a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1068708659 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2342) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 23 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201700) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x43da740e + :random-range #x445a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1112620226 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f733333 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x462aaaab + :random-range #x45638e39 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2291) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x47000000 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x43da740e + :random-range #x44a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x43088889 + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f59999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x468e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition of type beach-rock +(deftype beach-rock (process-drawable) + ((root-override collide-shape-moving :offset 112) + (trigger basic :offset-assert 176) + (movie-start uint64 :offset-assert 184) + (part-falling sparticle-launch-control :offset-assert 192) + (part-landing sparticle-launch-control :offset-assert 196) + (prev-frame float :offset-assert 200) + ) + :heap-base #x60 + :method-count-assert 24 + :size-assert #xcc + :flag-assert #x18006000cc + (:methods + (idle () _type_ :state 20) + (loading () _type_ :state 21) + (falling () _type_ :state 22) + (fallen () _type_ :state 23) + ) + ) + +;; definition for method 3 of type beach-rock +(defmethod inspect beach-rock ((obj beach-rock)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~T~Ttrigger: ~A~%" (-> obj trigger)) + (format #t "~T~Tmovie-start: ~D~%" (-> obj movie-start)) + (format #t "~T~Tpart-falling: ~A~%" (-> obj part-falling)) + (format #t "~T~Tpart-landing: ~A~%" (-> obj part-landing)) + (format #t "~T~Tprev-frame: ~f~%" (-> obj prev-frame)) + obj + ) + +;; definition for method 7 of type beach-rock +;; INFO: Return type mismatch none vs beach-rock. +(defmethod relocate beach-rock ((obj beach-rock) (arg0 int)) + (if (nonzero? (-> obj part-falling)) + (set! + (-> obj part-falling) + (the-as + sparticle-launch-control + (+ (the-as int (-> obj part-falling)) arg0) + ) + ) + ) + (if (nonzero? (-> obj part-landing)) + (set! + (-> obj part-landing) + (the-as + sparticle-launch-control + (+ (the-as int (-> obj part-landing)) arg0) + ) + ) + ) + (the-as + beach-rock + ((the-as + (function process-drawable int none) + (find-parent-method beach-rock 7) + ) + obj + arg0 + ) + ) + ) + +;; definition for method 10 of type beach-rock +(defmethod deactivate beach-rock ((obj beach-rock)) + (if (nonzero? (-> obj part-falling)) + (deactivate (-> obj part-falling)) + ) + (if (nonzero? (-> obj part-landing)) + (deactivate (-> obj part-landing)) + ) + ((the-as (function process-drawable none) (find-parent-method beach-rock 10)) + obj + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (beach-rock) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'trigger) + (set! (-> self trigger) #t) + (go-virtual falling) + ) + ((= v1-0 'loading) + (go-virtual loading) + ) + ) + ) + ) + ) + :code + (behavior () + (if (-> self trigger) + (go-virtual falling) + ) + (ja-channel-set! 0) + (ja-post) + (while #t + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate loading (beach-rock) + :virtual #t + :event + (-> (the-as state (method-of-type beach-rock idle)) event) + :code + (behavior () + (while #t + (let* ((a0-0 *art-control*) + (t9-0 (method-of-object a0-0 spool-push)) + (a1-0 "lrocklrg-falling") + (a2-0 0) + (t0-0 -1.0) + ) + (t9-0 a0-0 a1-0 a2-0 self t0-0) + ) + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate falling (beach-rock) + :virtual #t + :trans + (behavior () + (set! (-> self draw bounds w) 819200.0) + (let ((f30-0 (ja-aframe-num 0))) + (when (and (< -50.0 f30-0) (< f30-0 158.0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root-override trans quad)) + (dummy-11 (-> self part) gp-0) + (set! (-> gp-0 x) (+ 122880.0 (-> gp-0 x))) + (set! (-> gp-0 z) (+ 102400.0 (-> gp-0 z))) + (dummy-11 (-> self part) gp-0) + ) + ) + (if (and (< 200.0 f30-0) (< f30-0 275.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 3)) + ) + ) + (if (and (< 270.0 f30-0) (< f30-0 333.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)) + ) + ) + (if (and (< (-> self prev-frame) 333.0) (>= f30-0 333.0)) + (dummy-11 + (-> self part-landing) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)) + ) + ) + (if (and (< 169.0 f30-0) (< f30-0 202.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 5)) + ) + ) + (if (and (< 240.0 f30-0) (< f30-0 270.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 6)) + ) + ) + (set! (-> self prev-frame) f30-0) + ) + (none) + ) + :code + (behavior () + (local-vars (v1-3 symbol) (v1-49 symbol)) + (until v1-3 + (let* ((a0-0 *art-control*) + (t9-0 (method-of-object a0-0 spool-push)) + (a1-0 "lrocklrg-falling") + (a2-0 0) + (t0-0 -1.0) + ) + (t9-0 a0-0 a1-0 a2-0 self t0-0) + ) + (suspend) + (set! v1-3 (or (not *target*) (process-grab? *target*))) + ) + (set! (-> self draw status) (logand -3 (-> self draw status))) + (ja-channel-set! 1) + (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) + ) + (let* ((gp-1 (get-process *default-dead-pool* othercam #x4000)) + (gp-2 (ppointer->handle (when gp-1 + (let + ((t9-5 (method-of-type othercam activate)) + (a0-8 gp-1) + (a2-3 'othercam) + (a3-1 #x70004000) + ) + (t9-5 + (the-as othercam a0-8) + self + a2-3 + (the-as pointer a3-1) + ) + ) + (let + ((t9-6 + (the-as function run-function-in-process) + ) + (a0-9 gp-1) + (a1-4 othercam-init-by-other) + (a3-2 7) + (t0-1 #f) + ) + #t + ((the-as + (function object object object object object object) + t9-6 + ) + a0-9 + a1-4 + self + a3-2 + t0-1 + ) + ) + (-> gp-1 ppointer) + ) + ) + ) + (s5-0 (get-process *default-dead-pool* fuel-cell #x4000)) + (s5-1 (ppointer->handle (when s5-0 + (let + ((t9-8 (method-of-type fuel-cell activate)) + (a0-14 s5-0) + (a2-6 'fuel-cell) + (a3-3 #x70004000) + ) + (t9-8 + (the-as fuel-cell a0-14) + self + a2-6 + (the-as pointer a3-3) + ) + ) + ((the-as + (function object object object object object) + run-function-in-process + ) + s5-0 + fuel-cell-init-as-clone + (process->handle self) + (-> self entity extra perm task) + ) + (-> s5-0 ppointer) + ) + ) + ) + ) + (close-specific-task! + (-> self entity extra perm task) + (task-status need-reminder) + ) + (set! (-> self movie-start) (the-as uint (-> *display* base-frame-counter))) + (let* ((a0-20 *art-control*) + (t9-11 (method-of-object a0-20 spool-push)) + (a1-9 "lrocklrg-falling") + (a2-11 0) + (t0-2 -1.0) + ) + (t9-11 a0-20 a1-9 a2-11 self t0-2) + ) + (ja-play-spooled-anim + (new 'static 'spool-anim + :name "lrocklrg-falling" + :index 4 + :parts 4 + :command-list + '( + ((the binteger -150) + blackout + (the binteger 100) + ) + ((the binteger -116) blackout 0) + ) + ) + (the-as art-joint-anim (-> self draw art-group data 2)) + (the-as art-joint-anim (-> self draw art-group data 3)) + (the-as (function process-drawable symbol) false-func) + ) + (let ((t9-13 process-entity-status!) + (a1-11 64) + (a2-13 #t) + ) + (t9-13 self (the-as entity-perm-status a1-11) a2-13) + ) + (cond + ((handle->process gp-2) + (deactivate (-> gp-2 process 0)) + ) + (else + ) + ) + (let ((a0-28 (handle->process s5-1))) + (when a0-28 + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) self) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'stop-cloning) + (send-event-function a0-28 a1-14) + ) + ) + ) + ) + (until v1-49 + (suspend) + (set! v1-49 (or (not *target*) (process-release? *target*))) + ) + (set! (-> self draw bounds w) 20480.0) + (go-virtual fallen) + (none) + ) + :post + (the-as (function none :behavior beach-rock) transform-post) + ) + +;; failed to figure out what this is: +(defstate fallen (beach-rock) + :virtual #t + :code + (behavior () + (level-hint-spawn + (game-text-id beach-seagulls-avalanche) + "sksp0025" + #f + *entity-pool* + 0 + ) + (let ((v1-2 (-> self skel root-channel 0))) + (set! + (-> v1-2 frame-group) + (the-as art-joint-anim (-> self draw art-group data 3)) + ) + ) + (TODO-RENAME-9 (-> self align)) + (let ((v1-6 (first-transform (-> self align)))) + (set! (-> self root-override trans quad) (-> self entity extra trans quad)) + (+! (-> self root-override trans y) (-> v1-6 trans y)) + ) + (suspend) + (dummy-47 (-> self root-override)) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + (none) + ) + :post + (the-as (function none :behavior beach-rock) ja-post) + ) + +;; definition for method 11 of type beach-rock +(defmethod copy-defaults! beach-rock ((obj beach-rock) (arg0 res-lump)) + (set! (-> obj link) (new 'process 'actor-link-info obj)) + (set! (-> obj align) (new 'process 'align-control obj)) + (set! (-> obj trigger) #f) + (logclear! (-> obj mask) (process-mask actor-pause)) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 553) obj) + ) + (set! + (-> obj part-falling) + (create-launch-control (-> *part-group-id-table* 554) obj) + ) + (set! + (-> obj part-landing) + (create-launch-control (-> *part-group-id-table* 555) obj) + ) + (set! (-> obj prev-frame) -1000.0) + (set! (-> obj draw origin-joint-index) (the-as uint 4)) + (case (get-task-status (-> obj entity extra perm task)) + (((task-status invalid)) + (go (method-of-object obj fallen)) + ) + (((task-status need-resolution)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (ja-post) + (vector<-cspace! s5-0 (-> obj node-list data 8)) + (birth-pickup-at-point + s5-0 + 6 + (the float (the-as int (-> obj entity extra perm task))) + #f + obj + #f + ) + ) + (go (method-of-object obj fallen)) + ) + (else + (go (method-of-object obj idle)) + ) + ) + (none) + ) + +;; definition of type lrocklrg +(deftype lrocklrg (beach-rock) + () + :heap-base #x60 + :method-count-assert 24 + :size-assert #xcc + :flag-assert #x18006000cc + ) + +;; definition for method 3 of type lrocklrg +(defmethod inspect lrocklrg ((obj lrocklrg)) + (let ((t9-0 (method-of-type beach-rock inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for method 11 of type lrocklrg +(defmethod copy-defaults! lrocklrg ((obj lrocklrg) (arg0 res-lump)) + (stack-size-set! (-> obj main-thread) 512) + (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 + ((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 1)) + (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 0.0 0.0 24576.0) + ) + (dummy-46 s4-0) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (dummy-50 s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (dummy-14 obj *lrocklrg-sg* '()) + ((method-of-type beach-rock copy-defaults!) obj arg0) + (none) + ) + + + + diff --git a/goal_src/levels/common/dark-eco-pool.gc b/goal_src/levels/common/dark-eco-pool.gc index 1916b6c2aa..fb85c42a6c 100644 --- a/goal_src/levels/common/dark-eco-pool.gc +++ b/goal_src/levels/common/dark-eco-pool.gc @@ -5,3 +5,1218 @@ ;; name in dgo: dark-eco-pool ;; dgos: GAME, COMMON, L1 +;; definition of type dark-eco-pool +(deftype dark-eco-pool (water-anim) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for symbol ripple-for-misty-dark-eco-pool, type ripple-wave-set +(define + ripple-for-misty-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 3.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 15.0 :xdiv -2 :zdiv 2 :speed 2.0) + (new 'static 'ripple-wave :scale 3.0 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-maincave-dark-eco-pool, type ripple-wave-set +(define + ripple-for-maincave-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 8.57 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 14.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 5.25 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 0.7 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-finalboss-dark-eco-pool, type ripple-wave-set +(define + ripple-for-finalboss-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 4.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 25.0 :xdiv 2 :speed -2.0) + (new 'static 'ripple-wave :scale 15.0 :xdiv -2 :zdiv 2 :speed 3.0) + (new 'static 'ripple-wave :scale 4.0 :xdiv 5 :zdiv 3 :speed 4.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-dark-eco-pool, type ripple-wave-set +(define + ripple-for-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 3.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 15.0 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 2.0 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-sunken-dark-eco-helix-room, type ripple-wave-set +(define + ripple-for-sunken-dark-eco-helix-room + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 8.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 15.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 5.625 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 0.75 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 25 of type dark-eco-pool +(defmethod TODO-RENAME-25 dark-eco-pool ((obj dark-eco-pool)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-25))) + (t9-0 obj) + ) + (set! (-> obj flags) (logand -8388609 (-> obj flags))) + (set! (-> obj flags) (logior #x1000000 (-> obj flags))) + (let + ((v0-1 + ((the-as + (function res-lump symbol symbol float structure (pointer res-tag) pointer object) + (method-of-type res-lump get-property-struct) + ) + (-> obj entity) + 'attack-event + 'interp + -1000000000.0 + 'dark-eco-pool + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> obj attack-event) (the-as basic v0-1)) + v0-1 + ) + ) + +;; definition for method 22 of type dark-eco-pool +(defmethod TODO-RENAME-22 dark-eco-pool ((obj dark-eco-pool)) + (local-vars (v0-3 ripple-wave-set)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-22))) + (t9-0 obj) + ) + (let ((gp-0 (new 'process 'ripple-control))) + (set! (-> obj draw ripple) gp-0) + (set! (-> gp-0 global-scale) 3072.0) + (set! (-> gp-0 close-fade-dist) 163840.0) + (set! (-> gp-0 far-fade-dist) 245760.0) + (set! (-> gp-0 waveform) ripple-for-dark-eco-pool) + (set! (-> gp-0 query) (new 'process 'ripple-merc-query 100)) + (case (-> obj look) + ((32) + (set! v0-3 ripple-for-misty-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((15 16 17 18 19 20) + (set! v0-3 ripple-for-maincave-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((40) + (set! v0-3 ripple-for-sunken-dark-eco-helix-room) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((41) + (set! v0-3 ripple-for-finalboss-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 444) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags #x1 + :name "group-dark-eco-nasty" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (new 'static 'sparticle-group-item + :launcher #x7e4 + :fade-after (meters 50.0) + ) + ) + :bounds (new 'static 'sphere :w 32768.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2020) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45800000 + :random-range #x46800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x44800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x44400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x1 + :initial-value -1057635697 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1068708659 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 10 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value 15 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x33 + :flags #x6 + :initial-value #x7e5 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2021) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 5 + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1079781622 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 445) + (new 'static 'sparticle-launch-group + :length 19 + :duration #x258 + :linger-duration #x258 + :flags #x1 + :name "group-dark-eco-pool-nasty" + :launcher + (new 'static 'inline-array sparticle-group-item 19 + (new 'static 'sparticle-group-item + :launcher #x808 + :fade-after (meters 100.0) + :period #x258 + :length #x5 + ) + (new 'static 'sparticle-group-item + :launcher #x809 + :fade-after (meters 100.0) + :period #x258 + :length #x5 + :binding #x804 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x80a + :fade-after (meters 100.0) + :period #x258 + :length #x5 + :binding #x806 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + ) + :bounds (new 'static 'sphere :w 49152.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2056) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1075179870 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 54 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2057) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 14 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x4323d70a + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f70a3d7 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x46c71c72 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2052) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 21 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xc + :flags #x1 + :initial-value #x4499999a + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x18 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :initial-value #x42da740e + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1066512368 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x2 + :initial-value -1034259442 + :random-range 1 + :random-mult #x42da740e + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1098348407 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1102669812 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range #xb3 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x408c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2053) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1071495275 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1130624575 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1093552360 + :random-range -1088599726 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-range #xef + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x33 :flags #x6 :initial-value #xc6) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2058) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 14 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x4323d70a + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f70a3d7 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x46c71c72 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2054) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 21 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xc + :flags #x1 + :initial-value #x4499999a + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x18 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :initial-value #x42da740e + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1066512368 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x2 + :initial-value -1034259442 + :random-range 1 + :random-mult #x42da740e + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1098348407 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1102669812 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range #xb3 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x408c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2055) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1071495275 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1130624575 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1093552360 + :random-range -1088599726 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-range #xef + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x33 :flags #x6 :initial-value #xc6) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(defstate water-vol-idle (dark-eco-pool) + :virtual #t + :trans + (behavior () + (let ((t9-0 (-> (method-of-type water-anim water-vol-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (let* ((gp-0 (-> self draw ripple)) + (f0-1 (the float (logand (-> *display* base-frame-counter) #xffff))) + (f0-3 (cos (* 5.0 f0-1))) + (f30-0 (* f0-3 f0-3)) + ) + (let ((s5-0 (-> self draw ripple query))) + (set! (-> self draw ripple send-query) #t) + (set! (-> s5-0 start-vertex) (rand-vu-int-range 0 255)) + (set! (-> s5-0 vertex-skip) 256) + (when (zero? (rand-vu-int-range 0 15)) + (when + (and + (nonzero? (-> s5-0 vertex-count)) + (< #x32000 (memory-free *nk-dead-pool*)) + ) + (let ((s3-0 (rand-vu-int-range 0 (+ (-> s5-0 vertex-count) -1))) + (s4-1 (get-process *default-dead-pool* part-tracker #x4000)) + ) + (when s4-1 + (let ((t9-7 (method-of-type part-tracker activate))) + (t9-7 + (the-as part-tracker s4-1) + *entity-pool* + 'part-tracker + (the-as pointer #x70004000) + ) + ) + (run-function-in-process + s4-1 + part-tracker-init + (-> *part-group-id-table* 445) + -1 + #f + #f + #f + (+ (+ (* s3-0 16) 28) (the-as int s5-0)) + ) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + (case (-> self look) + ((32) + (set! (-> gp-0 global-scale) (* 4096.0 (* 1.5 (+ 1.0 f30-0)))) + (set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))) + ) + (else + (set! (-> gp-0 global-scale) (* 4096.0 (* 3.0 (+ 1.0 f30-0)))) + (set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))) + ) + ) + ) + (none) + ) + ) + + + + diff --git a/goal_src/levels/common/water-anim.gc b/goal_src/levels/common/water-anim.gc index 06d7382fc5..f4f992dcd6 100644 --- a/goal_src/levels/common/water-anim.gc +++ b/goal_src/levels/common/water-anim.gc @@ -1780,21 +1780,24 @@ :virtual #t :event (behavior ((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 - ) - ) + (let ((v1-0 arg2)) + (the-as object (when (= v1-0 '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 + ) + ) + ) ) ) :trans @@ -1836,11 +1839,13 @@ ) ;; definition for method 25 of type water-anim +;; INFO: Return type mismatch quaternion vs object. ;; Used lq/sq (defmethod TODO-RENAME-25 water-anim ((obj water-anim)) (local-vars (sv-16 res-tag)) (set! (-> obj play-ambient-sound?) #t) - (set! (-> obj look) + (set! + (-> obj look) (res-lump-value (-> obj entity) 'look int :default (the-as uint128 -1)) ) (set! sv-16 (new 'static 'res-tag)) @@ -1862,8 +1867,13 @@ ) ) (let ((f0-6 (res-lump-float (-> obj entity) 'rotoffset))) - (if (!= f0-6 0.0) - (quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6) + (the-as object (if (!= f0-6 0.0) + (quaternion-rotate-y! + (-> obj root quat) + (-> obj root quat) + f0-6 + ) + ) ) ) ) @@ -1913,4 +1923,4 @@ ) ) (the-as ripple-wave-set (ja-post)) - ) \ No newline at end of file + ) diff --git a/goal_src/levels/village1/assistant.gc b/goal_src/levels/village1/assistant.gc index 776e3f5b7d..66753f818b 100644 --- a/goal_src/levels/village1/assistant.gc +++ b/goal_src/levels/village1/assistant.gc @@ -5,14 +5,1257 @@ ;; name in dgo: assistant ;; dgos: L1, VI1 -;; TODO - for sage (define-extern *assistant-sg* skeleton-group) +;; definition of type assistant (deftype assistant (process-taskable) ((sound-id sound-id :offset-assert 380) ) + :heap-base #x110 :method-count-assert 53 :size-assert #x180 - :heap-base #x110 :flag-assert #x3501100180 ) + +;; failed to figure out what this is: +(let + ((v1-1 + (new 'static 'skeleton-group + :art-group-name "assistant" + :bounds (new 'static 'vector :w 8192.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-1 jgeo) 0) + (set! (-> v1-1 janim) 3) + (set! (-> v1-1 mgeo 0) (the-as uint 1)) + (set! (-> v1-1 lod-dist 0) 4095996000.0) + (set! *assistant-sg* v1-1) + ) + +;; definition for method 52 of type assistant +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 assistant ((obj assistant)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type assistant +(defmethod draw-shadow assistant ((obj assistant)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for method 32 of type assistant +(defmethod play-anim! assistant ((obj assistant) (arg0 symbol)) + (with-pp + (case (current-status (-> obj tasks)) + ((2 3) + (case (current-task (-> obj tasks)) + ((2) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + (a1-3 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-3 from) pp) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'pickup)) + (set! (-> a1-3 param 1) (the-as uint 6)) + (s4-0 + s5-1 + (the int (the-as float (send-event-function *target* a1-3))) + 1 + ) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name + "assistant-introduction-blue-eco-switch" + :index 10 + :parts 11 + :command-list + '( + (0 + want-levels + village1 + beach + ) + ((the binteger 128) + joint + "cameraB" + ) + ((the binteger 312) + joint + "camera" + ) + ((the binteger 492) + joint + "cameraB" + ) + ((the binteger 537) + joint + "camera" + ) + ((the binteger 734) + display-level + beach + movie + ) + ((the binteger 734) + want-force-vis + beach + #t + ) + ((the binteger 735) + alive + "ecovent-48" + ) + ((the binteger 742) + blackout + (the binteger 10) + ) + ((the binteger 743) + joint + "cameraB" + ) + ((the binteger 745) + blackout + 0 + ) + ((the binteger 839) + alive + "ecovent-200" + ) + ((the binteger 841) + joint + "camera" + ) + ((the binteger 842) + dead + "ecovent-48" + ) + ((the binteger 942) + blackout + (the binteger 10) + ) + ((the binteger 944) + joint + "cameraB" + ) + ((the binteger 945) + blackout + 0 + ) + ((the binteger 945) + dead + "ecovent-200" + ) + ((the binteger 945) + display-level + beach + #f + ) + ((the binteger 1049) + blackout + (the binteger 10) + ) + ((the binteger 1051) + joint + "camera" + ) + ((the binteger 1052) + blackout + 0 + ) + ((the binteger 1135) + blackout + (the binteger 10) + ) + ((the binteger 1137) + joint + "cameraB" + ) + ((the binteger 1138) + blackout + 0 + ) + ((the binteger 1216) joint "camera") + ) + ) + ) + (else + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "assistant-introduction-race-bike" + :index 12 + :parts 6 + :command-list + '( + (0 + want-levels + village1 + beach + ) + ((the binteger 129) + joint + "cameraB" + ) + ((the binteger 319) + joint + "camera" + ) + ((the binteger 505) joint "cameraB") + ) + ) + ) + ) + ) + ((5 4) + (set! (-> obj skippable) #t) + (cond + ((zero? (current-task (-> obj tasks))) + (new 'static 'spool-anim + :name "assistant-reminder-1-generic" + :index 14 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task jungle-eggtop) + (task-status need-resolution) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-race-bike" + :index 13 + :parts 3 + :command-list '() + ) + ) + ((or + (closed? + (-> obj tasks) + (game-task misty-bike) + (task-status need-resolution) + ) + (not + (closed? + (-> obj tasks) + (game-task misty-bike) + (task-status need-introduction) + ) + ) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-blue-eco-switch" + :index 11 + :parts 3 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 2)) + (if arg0 + (save-reminder (-> obj tasks) 1 2) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-race-bike" + :index 13 + :parts 3 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 2) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-blue-eco-switch" + :index 11 + :parts 3 + :command-list '() + ) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string + (the-as task-status (current-status (-> obj tasks))) + ) + ) + ) + (-> obj draw art-group data 3) + ) + ) + ) + ) + +;; definition for method 31 of type assistant +(defmethod get-art-elem assistant ((obj assistant)) + (-> obj draw art-group data 3) + ) + +;; definition for method 43 of type assistant +(defmethod TODO-RENAME-43 assistant ((obj assistant)) + (let + ((s5-0 + (TODO-RENAME-10 + (-> obj ambient) + (new 'stack-no-clear 'vector) + 9000 + 122880.0 + obj + ) + ) + ) + (when s5-0 + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f0-2 (+ -1.0 (the-as float v1-3))) + ) + (cond + ((< 16384.0 (-> s5-0 y)) + ) + ((< 0.8 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP01" #f (-> obj root trans)) + ) + ((< 0.6 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP04" #f (-> obj root trans)) + ) + ((< 0.4 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP05" #f (-> obj root trans)) + ) + ((< 0.2 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP02" #f (-> obj root trans)) + ) + (else + (dummy-11 (-> obj ambient) "ASSTLP03" #f (-> obj root trans)) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (assistant) + :virtual #t + :code + (behavior () + (if (!= (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + (-> self draw art-group data 3) + ) + (ja-channel-push! 1 60) + ) + (while #t + (TODO-RENAME-43 self) + (let ((v1-9 (-> self skel root-channel 0))) + (set! + (-> v1-9 frame-group) + (the-as art-joint-anim (-> self draw art-group data 3)) + ) + ) + (let* ((v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (countdown (gp-0 (+ (the int (+ -1.0 (the-as float v1-12))) 2)) + (let ((a0-12 (-> self skel root-channel 0))) + (set! (-> a0-12 frame-group) (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + ) + (set! + (-> a0-12 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-12 param 1) 1.0) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! + a0-12 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-13 (-> self skel root-channel 0))) + (set! + (-> a0-13 param 0) + (the float (+ (-> a0-13 frame-group data 0 length) -1)) + ) + (set! (-> a0-13 param 1) 1.0) + (joint-control-channel-group-eval! + a0-13 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (let* ((v1-46 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-47 (the-as number (logior #x3f800000 v1-46))) + ) + (cond + ((< (+ -1.0 (the-as float v1-47)) 0.66) + (let ((a0-17 (-> self skel root-channel 0))) + (set! + (-> a0-17 frame-group) + (the-as art-joint-anim (-> self draw art-group data 8)) + ) + (set! + (-> a0-17 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 8)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-17 param 1) 1.0) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! + a0-17 + (the-as art-joint-anim (-> self draw art-group data 8)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-18 (-> self skel root-channel 0))) + (set! + (-> a0-18 param 0) + (the float (+ (-> a0-18 frame-group data 0 length) -1)) + ) + (set! (-> a0-18 param 1) 1.0) + (joint-control-channel-group-eval! + a0-18 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (sound-play-by-name + (static-sound-name "welding-loop") + (-> self sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (target-pos 0) + ) + (let ((v1-74 (-> self skel root-channel 0))) + (set! + (-> v1-74 frame-group) + (the-as art-joint-anim (-> self draw art-group data 9)) + ) + ) + (let* ((f30-0 4.0) + (v1-76 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-77 (the-as number (logior #x3f800000 v1-76))) + ) + (countdown + (gp-2 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-77)))) 4)) + (let ((a0-28 (-> self skel root-channel 0))) + (set! (-> a0-28 frame-group) (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + ) + (set! + (-> a0-28 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-28 param 1) 1.0) + (set! (-> a0-28 frame-num) 0.0) + (joint-control-channel-group! + a0-28 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (dummy-11 + (-> self part) + (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> self node-list data 30) + ) + ) + (suspend) + (let ((a0-31 (-> self skel root-channel 0))) + (set! + (-> a0-31 param 0) + (the float (+ (-> a0-31 frame-group data 0 length) -1)) + ) + (set! (-> a0-31 param 1) 1.0) + (joint-control-channel-group-eval! + a0-31 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let ((a0-33 (-> self skel root-channel 0))) + (set! (-> a0-33 frame-group) (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + ) + (set! (-> a0-33 param 0) 0.0) + (set! (-> a0-33 param 1) 1.0) + (set! + (-> a0-33 frame-num) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (joint-control-channel-group! + a0-33 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (dummy-11 + (-> self part) + (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> self node-list data 30) + ) + ) + (suspend) + (let ((a0-36 (-> self skel root-channel 0))) + (set! (-> a0-36 param 0) 0.0) + (set! (-> a0-36 param 1) 1.0) + (joint-control-channel-group-eval! + a0-36 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (sound-stop (-> self sound-id)) + (let ((a0-39 (-> self skel root-channel 0))) + (set! + (-> a0-39 frame-group) + (the-as art-joint-anim (-> self draw art-group data 8)) + ) + (set! (-> a0-39 param 0) 0.0) + (set! (-> a0-39 param 1) 1.0) + (set! + (-> a0-39 frame-num) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 8)) + data + 0 + length + ) + -1 + ) + ) + ) + (joint-control-channel-group! + a0-39 + (the-as art-joint-anim (-> self draw art-group data 8)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-40 (-> self skel root-channel 0))) + (set! (-> a0-40 param 0) 0.0) + (set! (-> a0-40 param 1) 1.0) + (joint-control-channel-group-eval! + a0-40 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let* ((v1-159 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-160 (the-as number (logior #x3f800000 v1-159))) + ) + (when (< (+ -1.0 (the-as float v1-160)) 0.66) + (let ((a0-44 (-> self skel root-channel 0))) + (set! + (-> a0-44 frame-group) + (the-as art-joint-anim (-> self draw art-group data 7)) + ) + (set! + (-> a0-44 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 7)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-44 param 1) 1.0) + (set! (-> a0-44 frame-num) 0.0) + (joint-control-channel-group! + a0-44 + (the-as art-joint-anim (-> self draw art-group data 7)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-45 (-> self skel root-channel 0))) + (set! + (-> a0-45 param 0) + (the float (+ (-> a0-45 frame-group data 0 length) -1)) + ) + (set! (-> a0-45 param 1) 1.0) + (joint-control-channel-group-eval! + a0-45 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + ) + (else + (let ((a0-47 (-> self skel root-channel 0))) + (set! + (-> a0-47 frame-group) + (the-as art-joint-anim (-> self draw art-group data 4)) + ) + (set! + (-> a0-47 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 4)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-47 param 1) 1.0) + (set! (-> a0-47 frame-num) 0.0) + (joint-control-channel-group! + a0-47 + (the-as art-joint-anim (-> self draw art-group data 4)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-48 (-> self skel root-channel 0))) + (set! + (-> a0-48 param 0) + (the float (+ (-> a0-48 frame-group data 0 length) -1)) + ) + (set! (-> a0-48 param 1) 1.0) + (joint-control-channel-group-eval! + a0-48 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let* ((v1-208 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-209 (the-as number (logior #x3f800000 v1-208))) + ) + (countdown (gp-3 (+ (the int (+ -1.0 (the-as float v1-209))) 1)) + (let ((a0-52 (-> self skel root-channel 0))) + (set! + (-> a0-52 frame-group) + (the-as art-joint-anim (-> self draw art-group data 5)) + ) + (set! + (-> a0-52 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 5)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-52 param 1) 1.0) + (set! (-> a0-52 frame-num) 0.0) + (joint-control-channel-group! + a0-52 + (the-as art-joint-anim (-> self draw art-group data 5)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-53 (-> self skel root-channel 0))) + (set! + (-> a0-53 param 0) + (the float (+ (-> a0-53 frame-group data 0 length) -1)) + ) + (set! (-> a0-53 param 1) 1.0) + (joint-control-channel-group-eval! + a0-53 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (let ((a0-55 (-> self skel root-channel 0))) + (set! + (-> a0-55 frame-group) + (the-as art-joint-anim (-> self draw art-group data 6)) + ) + (set! + (-> a0-55 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 6)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-55 param 1) 1.0) + (set! (-> a0-55 frame-num) 0.0) + (joint-control-channel-group! + a0-55 + (the-as art-joint-anim (-> self draw art-group data 6)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-56 (-> self skel root-channel 0))) + (set! + (-> a0-56 param 0) + (the float (+ (-> a0-56 frame-group data 0 length) -1)) + ) + (set! (-> a0-56 param 1) 1.0) + (joint-control-channel-group-eval! + a0-56 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 122) + (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :name "group-assistant-torch" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (new 'static 'sparticle-group-item + :launcher #x16d + :fade-after (meters 30.0) + :falloff-to (meters 30.0) + ) + (new 'static 'sparticle-group-item + :launcher #x16e + :fade-after (meters 60.0) + :falloff-to (meters 80.0) + ) + ) + :bounds (new 'static 'sphere :w 61440.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 365) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3dcccccd + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45800000 + :random-range #x46400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42c80000 + :random-range #x41e00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c80000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1060320051 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 10 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 12 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 366) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 22 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3dcccccd + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x425a740e + :random-range #x43a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1087454402 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1102263091 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1102263091 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1056763281 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f6e147b + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x4b0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x30 + :flags #x1 + :initial-value #x48090000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x31 + :flags #x5 + :func 'check-drop-level-assistant + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :initial-value #x46000000 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 367) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x4399999a + :random-range #x4399999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x423f258c + :random-range #x415a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1084591090 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1087454402 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x12c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x460e38e4 + :random-range #x45aaaaab + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition for function check-drop-level-assistant +(defun + check-drop-level-assistant + ((arg0 assistant) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (< (-> arg2 y) (-> arg1 user-float)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle (the-as sparticle-system arg0) arg1) + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + ) + (if (< (+ -1.0 (the-as float v1-2)) 0.25) + (sound-play-by-name + (static-sound-name "water-drop") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + ) + (set-vector! gp-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (sp-launch-particles-var + *sp-particle-system-2d* + (-> *part-id-table* 367) + gp-0 + #f + #f + 1.0 + ) + ) + ) + (none) + ) + +;; definition for method 11 of type assistant +(defmethod copy-defaults! assistant ((obj assistant) (arg0 res-lump)) + (dummy-40 obj arg0 *assistant-sg* 3 31 (new 'static 'vector :w 4096.0) 5) + (set! (-> obj bounce-away) #f) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 122) obj) + ) + (set! (-> obj tasks) (get-task-control (game-task jungle-eggtop))) + (set! (-> obj sound-id) (new-sound-id)) + (set! (-> obj draw light-index) (the-as uint 1)) + (case (get-task-status (game-task firecanyon-assistant)) + (((task-status unknown)) + (go (method-of-object obj idle)) + ) + (else + (dummy-18 obj) + (deactivate obj) + ) + ) + (none) + ) diff --git a/goal_src/levels/village3/miners.gc b/goal_src/levels/village3/miners.gc index d6f3a3676e..7c5a0c39c0 100644 --- a/goal_src/levels/village3/miners.gc +++ b/goal_src/levels/village3/miners.gc @@ -5,3 +5,1337 @@ ;; name in dgo: miners ;; dgos: L1, VI3 +(define-extern *cavegem-sg* skeleton-group) +(define-extern *minershort-sg* skeleton-group) +(define-extern *minertall-sg* skeleton-group) + +;; definition of type minertall +(deftype minertall (process-taskable) + () + :heap-base #x110 + :method-count-assert 53 + :size-assert #x17c + :flag-assert #x350110017c + ) + +;; I reordered this! +;; definition of type minershort +(deftype minershort (process-taskable) + ((other-miner minertall :offset-assert 380) + ) + :heap-base #x110 + :method-count-assert 53 + :size-assert #x180 + :flag-assert #x3501100180 + ) + +;; definition for function miners-anim-loop +(defbehavior miners-anim-loop minershort () + (when (!= (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + (get-art-elem self) + ) + (ja-channel-push! 1 60) + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 frame-group) (the-as art-joint-anim (get-art-elem self))) + ) + ) + (while #t + (suspend) + (let ((a0-8 (-> self skel root-channel 0))) + (set! (-> a0-8 param 0) 2.0) + (joint-control-channel-group-eval! + a0-8 + (the-as art-joint-anim #f) + num-func-loop! + ) + ) + (if (= (-> self next-state name) 'idle) + (TODO-RENAME-43 self) + ) + ) + (the-as none 0) + (none) + ) + +;; failed to figure out what this is: +(let + ((v1-2 + (new 'static 'skeleton-group + :art-group-name "minertall" + :bounds (new 'static 'vector :w 10240.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-2 jgeo) 0) + (set! (-> v1-2 janim) 3) + (set! (-> v1-2 mgeo 0) (the-as uint 1)) + (set! (-> v1-2 lod-dist 0) 4095996000.0) + (set! *minertall-sg* v1-2) + ) + +;; definition for method 52 of type minertall +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 minertall ((obj minertall)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type minertall +(defmethod draw-shadow minertall ((obj minertall)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for method 32 of type minertall +;; INFO: Return type mismatch art-element vs basic. +(defmethod play-anim! minertall ((obj minertall) (arg0 symbol)) + (set! (-> obj talk-message) (the-as uint 260)) + (current-status (-> obj tasks)) + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (the-as task-status (current-status (-> obj tasks)))) + ) + ) + (the-as basic (-> obj draw art-group data 3)) + ) + +;; definition for method 31 of type minertall +(defmethod get-art-elem minertall ((obj minertall)) + (-> obj draw art-group data 3) + ) + +;; failed to figure out what this is: +(defstate idle (minertall) + :virtual #t + :trans + (behavior () + (set! (-> self will-talk) #f) + ((-> (method-of-type process-taskable idle) trans)) + (none) + ) + :code + (the-as (function none :behavior minertall) miners-anim-loop) + ) + +;; definition for method 11 of type minertall +(defmethod copy-defaults! minertall ((obj minertall) (arg0 res-lump)) + (dummy-40 obj arg0 *minertall-sg* 32 47 (new 'static 'vector :w 4096.0) 5) + (set! (-> obj tasks) (get-task-control (game-task village3-miner-money1))) + (set! (-> obj draw light-index) (the-as uint 1)) + (dummy-42 obj) + (none) + ) + +;; failed to figure out what this is: +(let + ((v1-7 + (new 'static 'skeleton-group + :art-group-name "minershort" + :bounds (new 'static 'vector :w 10240.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-7 jgeo) 0) + (set! (-> v1-7 janim) 3) + (set! (-> v1-7 mgeo 0) (the-as uint 1)) + (set! (-> v1-7 lod-dist 0) 4095996000.0) + (set! *minershort-sg* v1-7) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 566) + (new 'static 'sparticle-launch-group + :length 3 + :duration #xbb8 + :linger-duration #x5dc + :name "group-minershort-candle" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item + :launcher #x93c + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + (new 'static 'sparticle-group-item + :launcher #x93d + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + (new 'static 'sparticle-group-item + :launcher #x93e + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + ) + :bounds (new 'static 'sphere :w 61440.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2366) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 25 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x4399999a + :random-range #x4399999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43000000 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :random-range #x3faec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x4003126f + :random-range #x4083126f + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1104672127 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3e0bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x186 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x434ccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2364) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -1012672758 + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x444ccccd + :random-range #x444ccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1b + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1059425266 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1086977183 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3f8bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range 29 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2365) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 20 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -1029449974 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1b + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1059425266 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1086977183 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1074412913 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3f8bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 20 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 12 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition for method 52 of type minershort +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 minershort ((obj minershort)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type minershort +(defmethod draw-shadow minershort ((obj minershort)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for function minershort-trans-hook +(defbehavior minershort-trans-hook minershort () + (dummy-11 + (-> self part) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 14)) + ) + (none) + ) + +;; definition for method 32 of type minershort +(defmethod play-anim! minershort ((obj minershort) (arg0 symbol)) + (with-pp + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + ((2 3) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + ((96) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + (a1-3 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-3 from) pp) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'pickup)) + (set! (-> a1-3 param 1) (the-as uint 6)) + (s4-0 + s5-1 + (the int (the-as float (send-event-function *target* a1-3))) + 1 + ) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) pp) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'clone) + (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-5) + ) + (close-specific-task! + (game-task village3-miner-money1) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money2) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money3) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money4) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "minershort-introduction-orbs" + :index 4 + :parts 16 + :command-list + '( + ((the binteger 171) + joint + "cameraB" + ) + ((the binteger 206) + joint + "camera" + ) + ((the binteger 423) + joint + "cameraB" + ) + ((the binteger 591) + joint + "camera" + ) + ((the binteger 692) + joint + "cameraB" + ) + ((the binteger 918) + joint + "camera" + ) + ((the binteger 1122) + joint + "cameraB" + ) + ((the binteger 1122) + shadow + self + #f + ) + ((the binteger 1241) + joint + "camera" + ) + ((the binteger 1241) shadow self #t) + ) + ) + ) + ((78) + (when arg0 + (let* ((s5-2 (-> obj tasks)) + (s4-1 (method-of-object s5-2 save-reminder)) + (a1-10 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-10 from) pp) + (set! (-> a1-10 num-params) 2) + (set! (-> a1-10 message) 'query) + (set! (-> a1-10 param 0) (the-as uint 'pickup)) + (set! (-> a1-10 param 1) (the-as uint 6)) + (s4-1 + s5-2 + (the int (the-as float (send-event-function *target* a1-10))) + 1 + ) + ) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) pp) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'clone) + (set! (-> a1-12 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-12) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "minershort-introduction-gnawers" + :index 9 + :parts 8 + :command-list + '( + (0 + want-levels + village3 + maincave + ) + ((the binteger 149) + joint + "cameraB" + ) + ((the binteger 158) + display-level + maincave + movie + ) + ((the binteger 158) + want-force-vis + maincave + #t + ) + ((the binteger 435) + display-level + maincave + #f + ) + ((the binteger 435) + joint + "camera" + ) + ((the binteger 680) + joint + "cameraB" + ) + ((the binteger 719) joint "camera") + ) + ) + ) + (else + (when arg0 + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) pp) + (set! (-> a1-14 num-params) 1) + (set! (-> a1-14 message) 'clone) + (set! (-> a1-14 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-14) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "minershort-introduction-switch" + :index 11 + :parts 7 + :command-list + '( + ((the binteger 2) + shadow + "minertall-1" + #f + ) + ((the binteger 835) shadow "minertall-1" #t) + ) + ) + ) + ) + ) + ((5) + (set! (-> obj skippable) #t) + (let ((s4-2 (+ (get-reminder (-> obj tasks) 0) 1))) + (if (< (the-as uint 3) (the-as uint s4-2)) + (set! s4-2 0) + ) + (countdown (s3-0 4) + (let ((v1-59 s4-2)) + (cond + ((zero? v1-59) + (if + (not + (or + (= + (get-task-status (game-task village3-miner-money1)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money2)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money3)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money4)) + (task-status need-reminder) + ) + ) + ) + (set! s4-2 1) + ) + ) + ((= v1-59 1) + (if (!= (get-task-status (game-task cave-gnawers)) 5) + (set! s4-2 2) + ) + ) + ((= v1-59 2) + (if + (not + (or + (= + (get-task-status (game-task village3-miner-money1)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money2)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money3)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money4)) + (task-status need-reminder) + ) + ) + ) + (set! s4-2 3) + ) + ) + (else + (if (!= (get-task-status (game-task snow-eggtop)) 5) + (set! s4-2 0) + ) + ) + ) + ) + ) + (if arg0 + (save-reminder (-> obj tasks) s4-2 0) + ) + (cond + ((zero? s4-2) + (new 'static 'spool-anim + :name "minershort-reminder-1-orbs" + :index 5 + :parts 3 + :command-list '() + ) + ) + ((= s4-2 1) + (when arg0 + (let ((a1-18 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-18 from) pp) + (set! (-> a1-18 num-params) 1) + (set! (-> a1-18 message) 'clone) + (set! (-> a1-18 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-18) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-1-gnawers" + :index 10 + :parts 3 + :command-list '() + ) + ) + ((= s4-2 2) + (when arg0 + (let ((a1-19 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-19 from) pp) + (set! (-> a1-19 num-params) 1) + (set! (-> a1-19 message) 'clone) + (set! (-> a1-19 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-19) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-2-orbs" + :index 6 + :parts 2 + :command-list '() + ) + ) + (else + (when arg0 + (let ((a1-20 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-20 from) pp) + (set! (-> a1-20 num-params) 1) + (set! (-> a1-20 message) 'clone) + (set! (-> a1-20 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-20) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-1-switch" + :index 12 + :parts 5 + :command-list + '( + ((the binteger 2) + shadow + "minertall-1" + #f + ) + ((the binteger 500) shadow "minertall-1" #t) + ) + ) + ) + ) + ) + ) + ((6) + (let ((s4-3 (get-reminder (-> obj tasks) 2))) + (cond + (arg0 + (let ((a1-22 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-22 from) pp) + (set! (-> a1-22 num-params) 1) + (set! (-> a1-22 message) 'clone) + (set! (-> a1-22 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-22) + ) + (set! + (-> obj cell-for-task) + (the-as game-task (current-task (-> obj tasks))) + ) + (close-current! (-> obj tasks)) + (let ((a1-23 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-23 from) pp) + (set! (-> a1-23 num-params) 2) + (set! (-> a1-23 message) 'get-pickup) + (set! (-> a1-23 param 0) (the-as uint 5)) + (set! + (-> a1-23 param 1) + (the-as uint (- (-> *GAME-bank* money-task-inc))) + ) + (send-event-function *target* a1-23) + ) + (save-reminder (-> obj tasks) (+ s4-3 1) 2) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 282)) + ) + ) + (if (< (the-as uint s4-3) (the-as uint 3)) + (new 'static 'spool-anim + :name "minershort-resolution-1-orbs" + :index 7 + :parts 2 + :command-list '() + ) + (new 'static 'spool-anim + :name "minershort-resolution-2-orbs" + :index 8 + :parts 6 + :command-list + '( + ((the binteger 154) + joint + "cameraB" + ) + ((the binteger 461) joint "camera") + ) + ) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string + (the-as task-status (current-status (-> obj tasks))) + ) + ) + ) + (-> obj draw art-group data 3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate play-anim (minershort) + :virtual #t + :exit + (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) self) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'end-mode) + (send-event-function (-> self other-miner ppointer 3) a1-0) + ) + ((-> (method-of-type process-taskable play-anim) exit)) + (none) + ) + ) + +;; definition for method 31 of type minershort +(defmethod get-art-elem minershort ((obj minershort)) + (-> obj draw art-group data 3) + ) + +;; definition for method 43 of type minershort +(defmethod TODO-RENAME-43 minershort ((obj minershort)) + (when + (TODO-RENAME-10 + (-> obj ambient) + (new 'stack-no-clear 'vector) + 9000 + 122880.0 + obj + ) + (let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + (f0-2 (+ -1.0 (the-as float v1-4))) + ) + (cond + ((< 0.9655172 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO01" #f (-> obj root trans)) + ) + ((< 0.9310345 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO03" #f (-> obj root trans)) + ) + ((< 0.8965517 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO04" #f (-> obj root trans)) + ) + ((< 0.86206895 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO05" #f (-> obj root trans)) + ) + ((< 0.82758623 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO06" #f (-> obj root trans)) + ) + ((< 0.79310346 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM01" #f (-> obj root trans)) + ) + ((< 0.7586207 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM02" #f (-> obj root trans)) + ) + ((< 0.7241379 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM03" #f (-> obj root trans)) + ) + ((< 0.6896552 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM04" #f (-> obj root trans)) + ) + ((< 0.6551724 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM05" #f (-> obj root trans)) + ) + ((< 0.62068963 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM06" #f (-> obj root trans)) + ) + ((< 0.5862069 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM07" #f (-> obj root trans)) + ) + ((< 0.55172414 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM08" #f (-> obj root trans)) + ) + ((< 0.51724136 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM09" #f (-> obj root trans)) + ) + ((< 0.4827586 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM10" #f (-> obj root trans)) + ) + ((< 0.44827586 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM11" #f (-> obj root trans)) + ) + ((< 0.41379312 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM12" #f (-> obj root trans)) + ) + ((< 0.37931034 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM1A" #f (-> obj root trans)) + ) + ((< 0.3448276 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM2A" #f (-> obj root trans)) + ) + ((< 0.31034482 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM3A" #f (-> obj root trans)) + ) + ((< 0.27586207 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM01" #f (-> obj root trans)) + ) + ((< 0.2413793 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM02" #f (-> obj root trans)) + ) + ((< 0.20689656 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM03" #f (-> obj root trans)) + ) + ((< 0.1724138 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM04" #f (-> obj root trans)) + ) + ((< 0.13793103 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM05" #f (-> obj root trans)) + ) + ((< 0.10344828 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM06" #f (-> obj root trans)) + ) + ((< 0.06896552 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM07" #f (-> obj root trans)) + ) + ((< 0.03448276 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM08" #f (-> obj root trans)) + ) + (else + (dummy-11 (-> obj ambient) "MTA-AM09" #f (-> obj root trans)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (minershort) + :virtual #t + :code + miners-anim-loop + ) + +;; definition for method 11 of type minershort +(defmethod copy-defaults! minershort ((obj minershort) (arg0 res-lump)) + (dummy-40 obj arg0 *minershort-sg* 34 46 (new 'static 'vector :w 4096.0) 5) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 566) obj) + ) + (set! (-> obj tasks) (get-task-control (game-task village3-miner-money1))) + (set! + (-> obj other-miner) + (the-as minertall (entity-actor-lookup arg0 'alt-actor 0)) + ) + (set! (-> obj cur-trans-hook) minershort-trans-hook) + (set! (-> obj sound-flava) (the-as uint 14)) + (set! (-> obj draw light-index) (the-as uint 1)) + (dummy-42 obj) + (none) + ) + +;; definition of type cavegem +(deftype cavegem (process-drawable) + () + :heap-base #x40 + :method-count-assert 21 + :size-assert #xb0 + :flag-assert #x15004000b0 + (:methods + (idle () _type_ :state 20) + ) + ) + +;; definition for method 3 of type cavegem +(defmethod inspect cavegem ((obj cavegem)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-18 + (new 'static 'skeleton-group + :art-group-name "cavegem" + :bounds (new 'static 'vector :w 36864.0) + :version #x6 + ) + ) + ) + (set! (-> v1-18 jgeo) 0) + (set! (-> v1-18 janim) 2) + (set! (-> v1-18 mgeo 0) (the-as uint 1)) + (set! (-> v1-18 lod-dist 0) 4095996000.0) + (set! *cavegem-sg* v1-18) + ) + +;; failed to figure out what this is: +(defstate idle (cavegem) + :virtual #t + :code + (behavior () + (while #t + (let ((a0-0 (-> self skel root-channel 0))) + (set! (-> a0-0 frame-group) (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + ) + (set! + (-> a0-0 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-0 param 1) 1.0) + (set! (-> a0-0 frame-num) 0.0) + (joint-control-channel-group! a0-0 (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-1 (-> self skel root-channel 0))) + (set! + (-> a0-1 param 0) + (the float (+ (-> a0-1 frame-group data 0 length) -1)) + ) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group-eval! + a0-1 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + (none) + ) + :post + (the-as (function none :behavior cavegem) ja-post) + ) + +;; definition for method 11 of type cavegem +(defmethod copy-defaults! cavegem ((obj cavegem) (arg0 res-lump)) + (set! (-> obj root) (new 'process 'trsqv)) + (process-drawable-from-entity! obj arg0) + (dummy-14 obj *cavegem-sg* '()) + (go (method-of-object obj idle)) + (none) + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/merc/merc-h_REF.gc b/test/decompiler/reference/engine/gfx/merc/merc-h_REF.gc index e3c01641ed..07de463221 100644 --- a/test/decompiler/reference/engine/gfx/merc/merc-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/merc/merc-h_REF.gc @@ -665,15 +665,15 @@ ;; definition of type ripple-control (deftype ripple-control (basic) - ((global-scale float :offset-assert 4) - (last-frame-scale float :offset-assert 8) - (close-fade-dist float :offset-assert 12) - (far-fade-dist float :offset-assert 16) - (faded-scale float :offset-assert 20) - (individual-normal-scale float :offset-assert 24) - (waveform ripple-wave-set :offset-assert 28) - (send-query basic :offset-assert 32) - (query basic :offset-assert 36) + ((global-scale float :offset-assert 4) + (last-frame-scale float :offset-assert 8) + (close-fade-dist float :offset-assert 12) + (far-fade-dist float :offset-assert 16) + (faded-scale float :offset-assert 20) + (individual-normal-scale float :offset-assert 24) + (waveform ripple-wave-set :offset-assert 28) + (send-query symbol :offset-assert 32) + (query ripple-merc-query :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 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 d9ab7eecc8..160077d1b7 100644 --- a/test/decompiler/reference/engine/gfx/water/water-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/water/water-h_REF.gc @@ -154,7 +154,7 @@ (TODO-RENAME-22 (_type_) ripple-wave-set 22) (dummy-23 () none 23) (dummy-24 () none 24) - (TODO-RENAME-25 (_type_) quaternion 25) + (TODO-RENAME-25 (_type_) object 25) (dummy-26 () none 26) (dummy-27 () none 27) (get-ripple-height (_type_ vector) float 28) diff --git a/test/decompiler/reference/levels/beach/beach-rocks_REF.gc b/test/decompiler/reference/levels/beach/beach-rocks_REF.gc new file mode 100644 index 0000000000..3719562cdd --- /dev/null +++ b/test/decompiler/reference/levels/beach/beach-rocks_REF.gc @@ -0,0 +1,1602 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(let + ((v1-0 + (new 'static 'skeleton-group + :art-group-name "lrocklrg" + :bounds (new 'static 'vector :w 20480.0) + :longest-edge (meters 11.0) + :version #x6 + ) + ) + ) + (set! (-> v1-0 jgeo) 0) + (set! (-> v1-0 janim) 2) + (set! (-> v1-0 mgeo 0) (the-as uint 1)) + (set! (-> v1-0 lod-dist 0) 4095996000.0) + (set! *lrocklrg-sg* v1-0) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 553) + (new 'static 'sparticle-launch-group + :length 3 + :duration #x384 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-start" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item :launcher #x924 :period #x4b :length #xa) + (new 'static 'sparticle-group-item :launcher #x925 :period #x4b :length #xa) + (new 'static 'sparticle-group-item :launcher #x8f1 :period #x4b :length #xa) + ) + :bounds (new 'static 'sphere :w 262144.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2341) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 22 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201d00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44800000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x44800000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1053184142 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f7851ec + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x46638e39 + :random-range #x470e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2340) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 23 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201700) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x41000000 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42800000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1112620226 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f6e147b + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x46638e39 + :random-range #x470e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2289) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x46c00000 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x435a740e + :random-range #x435a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x4323d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1121008834 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1115998039 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1121008834 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1123872145 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f733333 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 554) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-fall" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (new 'static 'sparticle-group-item :launcher #x8f2 :period #xf :length #x5) + ) + :bounds (new 'static 'sphere :w 32768.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2290) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x46e00000 + :random-range #x47100000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x425a740e + :random-range #x41da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x42da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f7ae148 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 555) + (new 'static 'sparticle-launch-group + :length 3 + :duration #x384 + :linger-duration #x5dc + :flags #x1 + :name "group-beach-rocks-land" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item + :launcher #x926 + :period #x384 + :length #x28 + ) + (new 'static 'sparticle-group-item + :launcher #x927 + :period #x384 + :length #x28 + ) + (new 'static 'sparticle-group-item + :launcher #x8f3 + :period #x384 + :length #x28 + ) + ) + :bounds (new 'static 'sphere :w 262144.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2343) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -968884224 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x48000000 + :random-range #x47200000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x1 + :initial-value #x465a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1068708659 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2342) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 23 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201700) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x45000000 + :random-range #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x43da740e + :random-range #x445a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1017482226 + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1112620226 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-range -1056047454 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f733333 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x462aaaab + :random-range #x45638e39 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2291) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 26 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range -964689920 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x47000000 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x43da740e + :random-range #x44a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x43088889 + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1105394838 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1109756914 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1073540497 + :random-range -1057993610 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f59999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x5dc + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x468e38e4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x46000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition of type beach-rock +(deftype beach-rock (process-drawable) + ((root-override collide-shape-moving :offset 112) + (trigger basic :offset-assert 176) + (movie-start uint64 :offset-assert 184) + (part-falling sparticle-launch-control :offset-assert 192) + (part-landing sparticle-launch-control :offset-assert 196) + (prev-frame float :offset-assert 200) + ) + :heap-base #x60 + :method-count-assert 24 + :size-assert #xcc + :flag-assert #x18006000cc + (:methods + (idle () _type_ :state 20) + (loading () _type_ :state 21) + (falling () _type_ :state 22) + (fallen () _type_ :state 23) + ) + ) + +;; definition for method 3 of type beach-rock +(defmethod inspect beach-rock ((obj beach-rock)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~T~Ttrigger: ~A~%" (-> obj trigger)) + (format #t "~T~Tmovie-start: ~D~%" (-> obj movie-start)) + (format #t "~T~Tpart-falling: ~A~%" (-> obj part-falling)) + (format #t "~T~Tpart-landing: ~A~%" (-> obj part-landing)) + (format #t "~T~Tprev-frame: ~f~%" (-> obj prev-frame)) + obj + ) + +;; definition for method 7 of type beach-rock +;; INFO: Return type mismatch none vs beach-rock. +(defmethod relocate beach-rock ((obj beach-rock) (arg0 int)) + (if (nonzero? (-> obj part-falling)) + (set! + (-> obj part-falling) + (the-as + sparticle-launch-control + (+ (the-as int (-> obj part-falling)) arg0) + ) + ) + ) + (if (nonzero? (-> obj part-landing)) + (set! + (-> obj part-landing) + (the-as + sparticle-launch-control + (+ (the-as int (-> obj part-landing)) arg0) + ) + ) + ) + (the-as + beach-rock + ((the-as + (function process-drawable int none) + (find-parent-method beach-rock 7) + ) + obj + arg0 + ) + ) + ) + +;; definition for method 10 of type beach-rock +(defmethod deactivate beach-rock ((obj beach-rock)) + (if (nonzero? (-> obj part-falling)) + (deactivate (-> obj part-falling)) + ) + (if (nonzero? (-> obj part-landing)) + (deactivate (-> obj part-landing)) + ) + ((the-as (function process-drawable none) (find-parent-method beach-rock 10)) + obj + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (beach-rock) + :virtual #t + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'trigger) + (set! (-> self trigger) #t) + (go-virtual falling) + ) + ((= v1-0 'loading) + (go-virtual loading) + ) + ) + ) + ) + ) + :code + (behavior () + (if (-> self trigger) + (go-virtual falling) + ) + (ja-channel-set! 0) + (ja-post) + (while #t + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate loading (beach-rock) + :virtual #t + :event + (-> (the-as state (method-of-type beach-rock idle)) event) + :code + (behavior () + (while #t + (let* ((a0-0 *art-control*) + (t9-0 (method-of-object a0-0 spool-push)) + (a1-0 "lrocklrg-falling") + (a2-0 0) + (t0-0 -1.0) + ) + (t9-0 a0-0 a1-0 a2-0 self t0-0) + ) + (suspend) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate falling (beach-rock) + :virtual #t + :trans + (behavior () + (set! (-> self draw bounds w) 819200.0) + (let ((f30-0 (ja-aframe-num 0))) + (when (and (< -50.0 f30-0) (< f30-0 158.0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root-override trans quad)) + (dummy-11 (-> self part) gp-0) + (set! (-> gp-0 x) (+ 122880.0 (-> gp-0 x))) + (set! (-> gp-0 z) (+ 102400.0 (-> gp-0 z))) + (dummy-11 (-> self part) gp-0) + ) + ) + (if (and (< 200.0 f30-0) (< f30-0 275.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 3)) + ) + ) + (if (and (< 270.0 f30-0) (< f30-0 333.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)) + ) + ) + (if (and (< (-> self prev-frame) 333.0) (>= f30-0 333.0)) + (dummy-11 + (-> self part-landing) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)) + ) + ) + (if (and (< 169.0 f30-0) (< f30-0 202.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 5)) + ) + ) + (if (and (< 240.0 f30-0) (< f30-0 270.0)) + (dummy-11 + (-> self part-falling) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 6)) + ) + ) + (set! (-> self prev-frame) f30-0) + ) + (none) + ) + :code + (behavior () + (local-vars (v1-3 symbol) (v1-49 symbol)) + (until v1-3 + (let* ((a0-0 *art-control*) + (t9-0 (method-of-object a0-0 spool-push)) + (a1-0 "lrocklrg-falling") + (a2-0 0) + (t0-0 -1.0) + ) + (t9-0 a0-0 a1-0 a2-0 self t0-0) + ) + (suspend) + (set! v1-3 (or (not *target*) (process-grab? *target*))) + ) + (set! (-> self draw status) (logand -3 (-> self draw status))) + (ja-channel-set! 1) + (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) + ) + (let* ((gp-1 (get-process *default-dead-pool* othercam #x4000)) + (gp-2 (ppointer->handle (when gp-1 + (let + ((t9-5 (method-of-type othercam activate)) + (a0-8 gp-1) + (a2-3 'othercam) + (a3-1 #x70004000) + ) + (t9-5 + (the-as othercam a0-8) + self + a2-3 + (the-as pointer a3-1) + ) + ) + (let + ((t9-6 + (the-as function run-function-in-process) + ) + (a0-9 gp-1) + (a1-4 othercam-init-by-other) + (a3-2 7) + (t0-1 #f) + ) + #t + ((the-as + (function object object object object object object) + t9-6 + ) + a0-9 + a1-4 + self + a3-2 + t0-1 + ) + ) + (-> gp-1 ppointer) + ) + ) + ) + (s5-0 (get-process *default-dead-pool* fuel-cell #x4000)) + (s5-1 (ppointer->handle (when s5-0 + (let + ((t9-8 (method-of-type fuel-cell activate)) + (a0-14 s5-0) + (a2-6 'fuel-cell) + (a3-3 #x70004000) + ) + (t9-8 + (the-as fuel-cell a0-14) + self + a2-6 + (the-as pointer a3-3) + ) + ) + ((the-as + (function object object object object object) + run-function-in-process + ) + s5-0 + fuel-cell-init-as-clone + (process->handle self) + (-> self entity extra perm task) + ) + (-> s5-0 ppointer) + ) + ) + ) + ) + (close-specific-task! + (-> self entity extra perm task) + (task-status need-reminder) + ) + (set! (-> self movie-start) (the-as uint (-> *display* base-frame-counter))) + (let* ((a0-20 *art-control*) + (t9-11 (method-of-object a0-20 spool-push)) + (a1-9 "lrocklrg-falling") + (a2-11 0) + (t0-2 -1.0) + ) + (t9-11 a0-20 a1-9 a2-11 self t0-2) + ) + (ja-play-spooled-anim + (new 'static 'spool-anim + :name "lrocklrg-falling" + :index 4 + :parts 4 + :command-list + '( + ((the binteger -150) + blackout + (the binteger 100) + ) + ((the binteger -116) blackout 0) + ) + ) + (the-as art-joint-anim (-> self draw art-group data 2)) + (the-as art-joint-anim (-> self draw art-group data 3)) + (the-as (function process-drawable symbol) false-func) + ) + (let ((t9-13 process-entity-status!) + (a1-11 64) + (a2-13 #t) + ) + (t9-13 self (the-as entity-perm-status a1-11) a2-13) + ) + (cond + ((handle->process gp-2) + (deactivate (-> gp-2 process 0)) + ) + (else + ) + ) + (let ((a0-28 (handle->process s5-1))) + (when a0-28 + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) self) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'stop-cloning) + (send-event-function a0-28 a1-14) + ) + ) + ) + ) + (until v1-49 + (suspend) + (set! v1-49 (or (not *target*) (process-release? *target*))) + ) + (set! (-> self draw bounds w) 20480.0) + (go-virtual fallen) + (none) + ) + :post + (the-as (function none :behavior beach-rock) transform-post) + ) + +;; failed to figure out what this is: +(defstate fallen (beach-rock) + :virtual #t + :code + (behavior () + (level-hint-spawn + (game-text-id beach-seagulls-avalanche) + "sksp0025" + #f + *entity-pool* + 0 + ) + (let ((v1-2 (-> self skel root-channel 0))) + (set! + (-> v1-2 frame-group) + (the-as art-joint-anim (-> self draw art-group data 3)) + ) + ) + (TODO-RENAME-9 (-> self align)) + (let ((v1-6 (first-transform (-> self align)))) + (set! (-> self root-override trans quad) (-> self entity extra trans quad)) + (+! (-> self root-override trans y) (-> v1-6 trans y)) + ) + (suspend) + (dummy-47 (-> self root-override)) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + (none) + ) + :post + (the-as (function none :behavior beach-rock) ja-post) + ) + +;; definition for method 11 of type beach-rock +(defmethod copy-defaults! beach-rock ((obj beach-rock) (arg0 res-lump)) + (set! (-> obj link) (new 'process 'actor-link-info obj)) + (set! (-> obj align) (new 'process 'align-control obj)) + (set! (-> obj trigger) #f) + (logclear! (-> obj mask) (process-mask actor-pause)) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 553) obj) + ) + (set! + (-> obj part-falling) + (create-launch-control (-> *part-group-id-table* 554) obj) + ) + (set! + (-> obj part-landing) + (create-launch-control (-> *part-group-id-table* 555) obj) + ) + (set! (-> obj prev-frame) -1000.0) + (set! (-> obj draw origin-joint-index) (the-as uint 4)) + (case (get-task-status (-> obj entity extra perm task)) + (((task-status invalid)) + (go (method-of-object obj fallen)) + ) + (((task-status need-resolution)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (ja-post) + (vector<-cspace! s5-0 (-> obj node-list data 8)) + (birth-pickup-at-point + s5-0 + 6 + (the float (the-as int (-> obj entity extra perm task))) + #f + obj + #f + ) + ) + (go (method-of-object obj fallen)) + ) + (else + (go (method-of-object obj idle)) + ) + ) + (none) + ) + +;; definition of type lrocklrg +(deftype lrocklrg (beach-rock) + () + :heap-base #x60 + :method-count-assert 24 + :size-assert #xcc + :flag-assert #x18006000cc + ) + +;; definition for method 3 of type lrocklrg +(defmethod inspect lrocklrg ((obj lrocklrg)) + (let ((t9-0 (method-of-type beach-rock inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for method 11 of type lrocklrg +(defmethod copy-defaults! lrocklrg ((obj lrocklrg) (arg0 res-lump)) + (stack-size-set! (-> obj main-thread) 512) + (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 + ((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 1)) + (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 0.0 0.0 24576.0) + ) + (dummy-46 s4-0) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (dummy-50 s4-0) + (set! (-> obj root-override) s4-0) + ) + (process-drawable-from-entity! obj arg0) + (dummy-14 obj *lrocklrg-sg* '()) + ((method-of-type beach-rock copy-defaults!) obj arg0) + (none) + ) + + + + diff --git a/test/decompiler/reference/levels/common/dark-eco-pool_REF.gc b/test/decompiler/reference/levels/common/dark-eco-pool_REF.gc new file mode 100644 index 0000000000..425eddfa41 --- /dev/null +++ b/test/decompiler/reference/levels/common/dark-eco-pool_REF.gc @@ -0,0 +1,1226 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type dark-eco-pool +(deftype dark-eco-pool (water-anim) + () + :heap-base #x70 + :method-count-assert 30 + :size-assert #xdc + :flag-assert #x1e007000dc + ) + +;; definition for method 3 of type dark-eco-pool +(defmethod inspect dark-eco-pool ((obj dark-eco-pool)) + (let ((t9-0 (method-of-type water-anim inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for symbol ripple-for-misty-dark-eco-pool, type ripple-wave-set +(define + ripple-for-misty-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 3.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 2 :speed 0.5) + (new 'static 'ripple-wave :scale 15.0 :xdiv -2 :zdiv 2 :speed 2.0) + (new 'static 'ripple-wave :scale 3.0 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-maincave-dark-eco-pool, type ripple-wave-set +(define + ripple-for-maincave-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 8.57 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 14.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 5.25 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 0.7 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-finalboss-dark-eco-pool, type ripple-wave-set +(define + ripple-for-finalboss-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 4.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 25.0 :xdiv 2 :speed -2.0) + (new 'static 'ripple-wave :scale 15.0 :xdiv -2 :zdiv 2 :speed 3.0) + (new 'static 'ripple-wave :scale 4.0 :xdiv 5 :zdiv 3 :speed 4.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-dark-eco-pool, type ripple-wave-set +(define + ripple-for-dark-eco-pool + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 3.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 15.0 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 2.0 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for symbol ripple-for-sunken-dark-eco-helix-room, type ripple-wave-set +(define + ripple-for-sunken-dark-eco-helix-room + (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 8.0 + :wave + (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 15.0 :xdiv 1 :speed 1.0) + (new 'static 'ripple-wave :scale 5.625 :xdiv -1 :zdiv 1 :speed 4.0) + (new 'static 'ripple-wave :scale 0.75 :xdiv 5 :zdiv 3 :speed 2.0) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 25 of type dark-eco-pool +(defmethod TODO-RENAME-25 dark-eco-pool ((obj dark-eco-pool)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-25))) + (t9-0 obj) + ) + (set! (-> obj flags) (logand -8388609 (-> obj flags))) + (set! (-> obj flags) (logior #x1000000 (-> obj flags))) + (let + ((v0-1 + ((the-as + (function res-lump symbol symbol float structure (pointer res-tag) pointer object) + (method-of-type res-lump get-property-struct) + ) + (-> obj entity) + 'attack-event + 'interp + -1000000000.0 + 'dark-eco-pool + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> obj attack-event) (the-as basic v0-1)) + v0-1 + ) + ) + +;; definition for method 22 of type dark-eco-pool +(defmethod TODO-RENAME-22 dark-eco-pool ((obj dark-eco-pool)) + (local-vars (v0-3 ripple-wave-set)) + (let ((t9-0 (method-of-type water-anim TODO-RENAME-22))) + (t9-0 obj) + ) + (let ((gp-0 (new 'process 'ripple-control))) + (set! (-> obj draw ripple) gp-0) + (set! (-> gp-0 global-scale) 3072.0) + (set! (-> gp-0 close-fade-dist) 163840.0) + (set! (-> gp-0 far-fade-dist) 245760.0) + (set! (-> gp-0 waveform) ripple-for-dark-eco-pool) + (set! (-> gp-0 query) (new 'process 'ripple-merc-query 100)) + (case (-> obj look) + ((32) + (set! v0-3 ripple-for-misty-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((15 16 17 18 19 20) + (set! v0-3 ripple-for-maincave-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((40) + (set! v0-3 ripple-for-sunken-dark-eco-helix-room) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ((41) + (set! v0-3 ripple-for-finalboss-dark-eco-pool) + (set! (-> gp-0 waveform) v0-3) + v0-3 + ) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 444) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags #x1 + :name "group-dark-eco-nasty" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (new 'static 'sparticle-group-item + :launcher #x7e4 + :fade-after (meters 50.0) + ) + ) + :bounds (new 'static 'sphere :w 32768.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2020) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45800000 + :random-range #x46800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x1 + :initial-value #x44800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42c00000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x44400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x1 + :initial-value -1057635697 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1068708659 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 10 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value 15 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x33 + :flags #x6 + :initial-value #x7e5 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2021) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 5 + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x437f0000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1079781622 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 445) + (new 'static 'sparticle-launch-group + :length 19 + :duration #x258 + :linger-duration #x258 + :flags #x1 + :name "group-dark-eco-pool-nasty" + :launcher + (new 'static 'inline-array sparticle-group-item 19 + (new 'static 'sparticle-group-item + :launcher #x808 + :fade-after (meters 100.0) + :period #x258 + :length #x5 + ) + (new 'static 'sparticle-group-item + :launcher #x809 + :fade-after (meters 100.0) + :period #x258 + :length #x5 + :binding #x804 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x804 + :flags #xc + :binding #x805 + ) + (new 'static 'sparticle-group-item + :launcher #x805 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x80a + :fade-after (meters 100.0) + :period #x258 + :length #x5 + :binding #x806 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + (new 'static 'sparticle-group-item + :launcher #x806 + :flags #xc + :binding #x807 + ) + (new 'static 'sparticle-group-item + :launcher #x807 + :fade-after (meters 80.0) + :falloff-to (meters 100.0) + :flags #x4 + ) + ) + :bounds (new 'static 'sphere :w 49152.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2056) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1075179870 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 54 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2057) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 14 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x4323d70a + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f70a3d7 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x46c71c72 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2052) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 21 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xc + :flags #x1 + :initial-value #x4499999a + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x18 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :initial-value #x42da740e + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1066512368 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x2 + :initial-value -1034259442 + :random-range 1 + :random-mult #x42da740e + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1098348407 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1102669812 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range #xb3 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x408c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2053) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1071495275 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1130624575 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1093552360 + :random-range -1088599726 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-range #xef + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x33 :flags #x6 :initial-value #xc6) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2058) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 14 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value #x45800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x4323d70a + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1067813874 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f70a3d7 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x46c71c72 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2054) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 21 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xc + :flags #x1 + :initial-value #x4499999a + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x4499999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x18 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :initial-value #x42da740e + :random-range #x43da740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1066512368 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x2 + :initial-value -1034259442 + :random-range 1 + :random-mult #x42da740e + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1098348407 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1102669812 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range #xb3 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x408c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2055) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x44cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43400000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1071495275 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1130624575 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1093552360 + :random-range -1088599726 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 30 + :random-range #xef + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x400c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x32 + :initial-value #xf0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x33 :flags #x6 :initial-value #xc6) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(defstate water-vol-idle (dark-eco-pool) + :virtual #t + :trans + (behavior () + (let ((t9-0 (-> (method-of-type water-anim water-vol-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (let* ((gp-0 (-> self draw ripple)) + (f0-1 (the float (logand (-> *display* base-frame-counter) #xffff))) + (f0-3 (cos (* 5.0 f0-1))) + (f30-0 (* f0-3 f0-3)) + ) + (let ((s5-0 (-> self draw ripple query))) + (set! (-> self draw ripple send-query) #t) + (set! (-> s5-0 start-vertex) (rand-vu-int-range 0 255)) + (set! (-> s5-0 vertex-skip) 256) + (when (zero? (rand-vu-int-range 0 15)) + (when + (and + (nonzero? (-> s5-0 vertex-count)) + (< #x32000 (memory-free *nk-dead-pool*)) + ) + (let ((s3-0 (rand-vu-int-range 0 (+ (-> s5-0 vertex-count) -1))) + (s4-1 (get-process *default-dead-pool* part-tracker #x4000)) + ) + (when s4-1 + (let ((t9-7 (method-of-type part-tracker activate))) + (t9-7 + (the-as part-tracker s4-1) + *entity-pool* + 'part-tracker + (the-as pointer #x70004000) + ) + ) + (run-function-in-process + s4-1 + part-tracker-init + (-> *part-group-id-table* 445) + -1 + #f + #f + #f + (+ (+ (* s3-0 16) 28) (the-as int s5-0)) + ) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + (case (-> self look) + ((32) + (set! (-> gp-0 global-scale) (* 4096.0 (* 1.5 (+ 1.0 f30-0)))) + (set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))) + ) + (else + (set! (-> gp-0 global-scale) (* 4096.0 (* 3.0 (+ 1.0 f30-0)))) + (set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))) + ) + ) + ) + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/levels/common/water-anim_REF.gc b/test/decompiler/reference/levels/common/water-anim_REF.gc index faa2281c36..5285d2db8a 100644 --- a/test/decompiler/reference/levels/common/water-anim_REF.gc +++ b/test/decompiler/reference/levels/common/water-anim_REF.gc @@ -1845,6 +1845,7 @@ ) ;; definition for method 25 of type water-anim +;; INFO: Return type mismatch quaternion vs object. ;; Used lq/sq (defmethod TODO-RENAME-25 water-anim ((obj water-anim)) (local-vars (sv-16 res-tag)) @@ -1872,8 +1873,13 @@ ) ) (let ((f0-6 (res-lump-float (-> obj entity) 'rotoffset))) - (if (!= f0-6 0.0) - (quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6) + (the-as object (if (!= f0-6 0.0) + (quaternion-rotate-y! + (-> obj root quat) + (-> obj root quat) + f0-6 + ) + ) ) ) ) diff --git a/test/decompiler/reference/levels/village1/assistant_REF.gc b/test/decompiler/reference/levels/village1/assistant_REF.gc new file mode 100644 index 0000000000..0560e8e4a2 --- /dev/null +++ b/test/decompiler/reference/levels/village1/assistant_REF.gc @@ -0,0 +1,1268 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type assistant +(deftype assistant (process-taskable) + ((sound-id sound-id :offset-assert 380) + ) + :heap-base #x110 + :method-count-assert 53 + :size-assert #x180 + :flag-assert #x3501100180 + ) + +;; definition for method 3 of type assistant +(defmethod inspect assistant ((obj assistant)) + (let ((t9-0 (method-of-type process-taskable inspect))) + (t9-0 obj) + ) + (format #t "~T~Tsound-id: ~D~%" (-> obj sound-id)) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-1 + (new 'static 'skeleton-group + :art-group-name "assistant" + :bounds (new 'static 'vector :w 8192.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-1 jgeo) 0) + (set! (-> v1-1 janim) 3) + (set! (-> v1-1 mgeo 0) (the-as uint 1)) + (set! (-> v1-1 lod-dist 0) 4095996000.0) + (set! *assistant-sg* v1-1) + ) + +;; definition for method 52 of type assistant +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 assistant ((obj assistant)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type assistant +(defmethod draw-shadow assistant ((obj assistant)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for method 32 of type assistant +(defmethod play-anim! assistant ((obj assistant) (arg0 symbol)) + (with-pp + (case (current-status (-> obj tasks)) + ((2 3) + (case (current-task (-> obj tasks)) + ((2) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + (a1-3 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-3 from) pp) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'pickup)) + (set! (-> a1-3 param 1) (the-as uint 6)) + (s4-0 + s5-1 + (the int (the-as float (send-event-function *target* a1-3))) + 1 + ) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name + "assistant-introduction-blue-eco-switch" + :index 10 + :parts 11 + :command-list + '( + (0 + want-levels + village1 + beach + ) + ((the binteger 128) + joint + "cameraB" + ) + ((the binteger 312) + joint + "camera" + ) + ((the binteger 492) + joint + "cameraB" + ) + ((the binteger 537) + joint + "camera" + ) + ((the binteger 734) + display-level + beach + movie + ) + ((the binteger 734) + want-force-vis + beach + #t + ) + ((the binteger 735) + alive + "ecovent-48" + ) + ((the binteger 742) + blackout + (the binteger 10) + ) + ((the binteger 743) + joint + "cameraB" + ) + ((the binteger 745) + blackout + 0 + ) + ((the binteger 839) + alive + "ecovent-200" + ) + ((the binteger 841) + joint + "camera" + ) + ((the binteger 842) + dead + "ecovent-48" + ) + ((the binteger 942) + blackout + (the binteger 10) + ) + ((the binteger 944) + joint + "cameraB" + ) + ((the binteger 945) + blackout + 0 + ) + ((the binteger 945) + dead + "ecovent-200" + ) + ((the binteger 945) + display-level + beach + #f + ) + ((the binteger 1049) + blackout + (the binteger 10) + ) + ((the binteger 1051) + joint + "camera" + ) + ((the binteger 1052) + blackout + 0 + ) + ((the binteger 1135) + blackout + (the binteger 10) + ) + ((the binteger 1137) + joint + "cameraB" + ) + ((the binteger 1138) + blackout + 0 + ) + ((the binteger 1216) joint "camera") + ) + ) + ) + (else + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "assistant-introduction-race-bike" + :index 12 + :parts 6 + :command-list + '( + (0 + want-levels + village1 + beach + ) + ((the binteger 129) + joint + "cameraB" + ) + ((the binteger 319) + joint + "camera" + ) + ((the binteger 505) joint "cameraB") + ) + ) + ) + ) + ) + ((5 4) + (set! (-> obj skippable) #t) + (cond + ((zero? (current-task (-> obj tasks))) + (new 'static 'spool-anim + :name "assistant-reminder-1-generic" + :index 14 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task jungle-eggtop) + (task-status need-resolution) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-race-bike" + :index 13 + :parts 3 + :command-list '() + ) + ) + ((or + (closed? + (-> obj tasks) + (game-task misty-bike) + (task-status need-resolution) + ) + (not + (closed? + (-> obj tasks) + (game-task misty-bike) + (task-status need-introduction) + ) + ) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-blue-eco-switch" + :index 11 + :parts 3 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 2)) + (if arg0 + (save-reminder (-> obj tasks) 1 2) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-race-bike" + :index 13 + :parts 3 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 2) + ) + (new 'static 'spool-anim + :name "assistant-reminder-1-blue-eco-switch" + :index 11 + :parts 3 + :command-list '() + ) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string + (the-as task-status (current-status (-> obj tasks))) + ) + ) + ) + (-> obj draw art-group data 3) + ) + ) + ) + ) + +;; definition for method 31 of type assistant +(defmethod get-art-elem assistant ((obj assistant)) + (-> obj draw art-group data 3) + ) + +;; definition for method 43 of type assistant +(defmethod TODO-RENAME-43 assistant ((obj assistant)) + (let + ((s5-0 + (TODO-RENAME-10 + (-> obj ambient) + (new 'stack-no-clear 'vector) + 9000 + 122880.0 + obj + ) + ) + ) + (when s5-0 + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f0-2 (+ -1.0 (the-as float v1-3))) + ) + (cond + ((< 16384.0 (-> s5-0 y)) + ) + ((< 0.8 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP01" #f (-> obj root trans)) + ) + ((< 0.6 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP04" #f (-> obj root trans)) + ) + ((< 0.4 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP05" #f (-> obj root trans)) + ) + ((< 0.2 f0-2) + (dummy-11 (-> obj ambient) "ASSTLP02" #f (-> obj root trans)) + ) + (else + (dummy-11 (-> obj ambient) "ASSTLP03" #f (-> obj root trans)) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (assistant) + :virtual #t + :code + (behavior () + (if (!= (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + (-> self draw art-group data 3) + ) + (ja-channel-push! 1 60) + ) + (while #t + (TODO-RENAME-43 self) + (let ((v1-9 (-> self skel root-channel 0))) + (set! + (-> v1-9 frame-group) + (the-as art-joint-anim (-> self draw art-group data 3)) + ) + ) + (let* ((v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (countdown (gp-0 (+ (the int (+ -1.0 (the-as float v1-12))) 2)) + (let ((a0-12 (-> self skel root-channel 0))) + (set! (-> a0-12 frame-group) (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + ) + (set! + (-> a0-12 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-12 param 1) 1.0) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! + a0-12 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-13 (-> self skel root-channel 0))) + (set! + (-> a0-13 param 0) + (the float (+ (-> a0-13 frame-group data 0 length) -1)) + ) + (set! (-> a0-13 param 1) 1.0) + (joint-control-channel-group-eval! + a0-13 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (let* ((v1-46 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-47 (the-as number (logior #x3f800000 v1-46))) + ) + (cond + ((< (+ -1.0 (the-as float v1-47)) 0.66) + (let ((a0-17 (-> self skel root-channel 0))) + (set! + (-> a0-17 frame-group) + (the-as art-joint-anim (-> self draw art-group data 8)) + ) + (set! + (-> a0-17 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 8)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-17 param 1) 1.0) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! + a0-17 + (the-as art-joint-anim (-> self draw art-group data 8)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-18 (-> self skel root-channel 0))) + (set! + (-> a0-18 param 0) + (the float (+ (-> a0-18 frame-group data 0 length) -1)) + ) + (set! (-> a0-18 param 1) 1.0) + (joint-control-channel-group-eval! + a0-18 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (sound-play-by-name + (static-sound-name "welding-loop") + (-> self sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (target-pos 0) + ) + (let ((v1-74 (-> self skel root-channel 0))) + (set! + (-> v1-74 frame-group) + (the-as art-joint-anim (-> self draw art-group data 9)) + ) + ) + (let* ((f30-0 4.0) + (v1-76 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-77 (the-as number (logior #x3f800000 v1-76))) + ) + (countdown + (gp-2 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-77)))) 4)) + (let ((a0-28 (-> self skel root-channel 0))) + (set! (-> a0-28 frame-group) (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + ) + (set! + (-> a0-28 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-28 param 1) 1.0) + (set! (-> a0-28 frame-num) 0.0) + (joint-control-channel-group! + a0-28 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (dummy-11 + (-> self part) + (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> self node-list data 30) + ) + ) + (suspend) + (let ((a0-31 (-> self skel root-channel 0))) + (set! + (-> a0-31 param 0) + (the float (+ (-> a0-31 frame-group data 0 length) -1)) + ) + (set! (-> a0-31 param 1) 1.0) + (joint-control-channel-group-eval! + a0-31 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let ((a0-33 (-> self skel root-channel 0))) + (set! (-> a0-33 frame-group) (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + ) + (set! (-> a0-33 param 0) 0.0) + (set! (-> a0-33 param 1) 1.0) + (set! + (-> a0-33 frame-num) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (joint-control-channel-group! + a0-33 + (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (dummy-11 + (-> self part) + (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> self node-list data 30) + ) + ) + (suspend) + (let ((a0-36 (-> self skel root-channel 0))) + (set! (-> a0-36 param 0) 0.0) + (set! (-> a0-36 param 1) 1.0) + (joint-control-channel-group-eval! + a0-36 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (sound-stop (-> self sound-id)) + (let ((a0-39 (-> self skel root-channel 0))) + (set! + (-> a0-39 frame-group) + (the-as art-joint-anim (-> self draw art-group data 8)) + ) + (set! (-> a0-39 param 0) 0.0) + (set! (-> a0-39 param 1) 1.0) + (set! + (-> a0-39 frame-num) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 8)) + data + 0 + length + ) + -1 + ) + ) + ) + (joint-control-channel-group! + a0-39 + (the-as art-joint-anim (-> self draw art-group data 8)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-40 (-> self skel root-channel 0))) + (set! (-> a0-40 param 0) 0.0) + (set! (-> a0-40 param 1) 1.0) + (joint-control-channel-group-eval! + a0-40 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let* ((v1-159 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-160 (the-as number (logior #x3f800000 v1-159))) + ) + (when (< (+ -1.0 (the-as float v1-160)) 0.66) + (let ((a0-44 (-> self skel root-channel 0))) + (set! + (-> a0-44 frame-group) + (the-as art-joint-anim (-> self draw art-group data 7)) + ) + (set! + (-> a0-44 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 7)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-44 param 1) 1.0) + (set! (-> a0-44 frame-num) 0.0) + (joint-control-channel-group! + a0-44 + (the-as art-joint-anim (-> self draw art-group data 7)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-45 (-> self skel root-channel 0))) + (set! + (-> a0-45 param 0) + (the float (+ (-> a0-45 frame-group data 0 length) -1)) + ) + (set! (-> a0-45 param 1) 1.0) + (joint-control-channel-group-eval! + a0-45 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + ) + (else + (let ((a0-47 (-> self skel root-channel 0))) + (set! + (-> a0-47 frame-group) + (the-as art-joint-anim (-> self draw art-group data 4)) + ) + (set! + (-> a0-47 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 4)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-47 param 1) 1.0) + (set! (-> a0-47 frame-num) 0.0) + (joint-control-channel-group! + a0-47 + (the-as art-joint-anim (-> self draw art-group data 4)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-48 (-> self skel root-channel 0))) + (set! + (-> a0-48 param 0) + (the float (+ (-> a0-48 frame-group data 0 length) -1)) + ) + (set! (-> a0-48 param 1) 1.0) + (joint-control-channel-group-eval! + a0-48 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + (let* ((v1-208 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-209 (the-as number (logior #x3f800000 v1-208))) + ) + (countdown (gp-3 (+ (the int (+ -1.0 (the-as float v1-209))) 1)) + (let ((a0-52 (-> self skel root-channel 0))) + (set! + (-> a0-52 frame-group) + (the-as art-joint-anim (-> self draw art-group data 5)) + ) + (set! + (-> a0-52 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 5)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-52 param 1) 1.0) + (set! (-> a0-52 frame-num) 0.0) + (joint-control-channel-group! + a0-52 + (the-as art-joint-anim (-> self draw art-group data 5)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-53 (-> self skel root-channel 0))) + (set! + (-> a0-53 param 0) + (the float (+ (-> a0-53 frame-group data 0 length) -1)) + ) + (set! (-> a0-53 param 1) 1.0) + (joint-control-channel-group-eval! + a0-53 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + (let ((a0-55 (-> self skel root-channel 0))) + (set! + (-> a0-55 frame-group) + (the-as art-joint-anim (-> self draw art-group data 6)) + ) + (set! + (-> a0-55 param 0) + (the + float + (+ + (-> + (the-as art-joint-anim (-> self draw art-group data 6)) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-55 param 1) 1.0) + (set! (-> a0-55 frame-num) 0.0) + (joint-control-channel-group! + a0-55 + (the-as art-joint-anim (-> self draw art-group data 6)) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-56 (-> self skel root-channel 0))) + (set! + (-> a0-56 param 0) + (the float (+ (-> a0-56 frame-group data 0 length) -1)) + ) + (set! (-> a0-56 param 1) 1.0) + (joint-control-channel-group-eval! + a0-56 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 122) + (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :name "group-assistant-torch" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (new 'static 'sparticle-group-item + :launcher #x16d + :fade-after (meters 30.0) + :falloff-to (meters 30.0) + ) + (new 'static 'sparticle-group-item + :launcher #x16e + :fade-after (meters 60.0) + :falloff-to (meters 80.0) + ) + ) + :bounds (new 'static 'sphere :w 61440.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 365) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3dcccccd + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45800000 + :random-range #x46400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x42c80000 + :random-range #x41e00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c80000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42a00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1060320051 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 10 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 12 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 366) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 22 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3dcccccd + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x43cccccd + :random-range #x43cccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x425a740e + :random-range #x43a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1087454402 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1102263091 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1102263091 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1056763281 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2d + :flags #x1 + :initial-value #x3f6e147b + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x4b0 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x30 + :flags #x1 + :initial-value #x48090000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x31 + :flags #x5 + :func 'check-drop-level-assistant + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :initial-value #x46000000 + :random-range #x47000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 367) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-range #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x4399999a + :random-range #x4399999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42c00000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :initial-value #x423f258c + :random-range #x415a740e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1084591090 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value -1087454402 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x12c + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :initial-value #x460e38e4 + :random-range #x45aaaaab + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition for function check-drop-level-assistant +(defun + check-drop-level-assistant + ((arg0 assistant) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (< (-> arg2 y) (-> arg1 user-float)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle (the-as sparticle-system arg0) arg1) + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + ) + (if (< (+ -1.0 (the-as float v1-2)) 0.25) + (sound-play-by-name + (static-sound-name "water-drop") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + ) + (set-vector! gp-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (sp-launch-particles-var + *sp-particle-system-2d* + (-> *part-id-table* 367) + gp-0 + #f + #f + 1.0 + ) + ) + ) + (none) + ) + +;; definition for method 11 of type assistant +(defmethod copy-defaults! assistant ((obj assistant) (arg0 res-lump)) + (dummy-40 obj arg0 *assistant-sg* 3 31 (new 'static 'vector :w 4096.0) 5) + (set! (-> obj bounce-away) #f) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 122) obj) + ) + (set! (-> obj tasks) (get-task-control (game-task jungle-eggtop))) + (set! (-> obj sound-id) (new-sound-id)) + (set! (-> obj draw light-index) (the-as uint 1)) + (case (get-task-status (game-task firecanyon-assistant)) + (((task-status unknown)) + (go (method-of-object obj idle)) + ) + (else + (dummy-18 obj) + (deactivate obj) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/levels/village1/sage_REF.gc b/test/decompiler/reference/levels/village1/sage_REF.gc index 272c195e34..9b3df66b39 100644 --- a/test/decompiler/reference/levels/village1/sage_REF.gc +++ b/test/decompiler/reference/levels/village1/sage_REF.gc @@ -1398,3 +1398,7 @@ (dummy-42 obj) (none) ) + + + + diff --git a/test/decompiler/reference/levels/village3/miners_REF.gc b/test/decompiler/reference/levels/village3/miners_REF.gc new file mode 100644 index 0000000000..9343963645 --- /dev/null +++ b/test/decompiler/reference/levels/village3/miners_REF.gc @@ -0,0 +1,1349 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function miners-anim-loop +(defbehavior miners-anim-loop minershort () + (when (!= (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + (get-art-elem self) + ) + (ja-channel-push! 1 60) + (let ((gp-0 (-> self skel root-channel 0))) + (set! (-> gp-0 frame-group) (the-as art-joint-anim (get-art-elem self))) + ) + ) + (while #t + (suspend) + (let ((a0-8 (-> self skel root-channel 0))) + (set! (-> a0-8 param 0) 2.0) + (joint-control-channel-group-eval! + a0-8 + (the-as art-joint-anim #f) + num-func-loop! + ) + ) + (if (= (-> self next-state name) 'idle) + (TODO-RENAME-43 self) + ) + ) + (the-as none 0) + (none) + ) + +;; definition of type minertall +(deftype minertall (process-taskable) + () + :heap-base #x110 + :method-count-assert 53 + :size-assert #x17c + :flag-assert #x350110017c + ) + +;; definition for method 3 of type minertall +(defmethod inspect minertall ((obj minertall)) + (let ((t9-0 (method-of-type process-taskable inspect))) + (t9-0 obj) + ) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-2 + (new 'static 'skeleton-group + :art-group-name "minertall" + :bounds (new 'static 'vector :w 10240.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-2 jgeo) 0) + (set! (-> v1-2 janim) 3) + (set! (-> v1-2 mgeo 0) (the-as uint 1)) + (set! (-> v1-2 lod-dist 0) 4095996000.0) + (set! *minertall-sg* v1-2) + ) + +;; definition for method 52 of type minertall +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 minertall ((obj minertall)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type minertall +(defmethod draw-shadow minertall ((obj minertall)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for method 32 of type minertall +;; INFO: Return type mismatch art-element vs basic. +(defmethod play-anim! minertall ((obj minertall) (arg0 symbol)) + (set! (-> obj talk-message) (the-as uint 260)) + (current-status (-> obj tasks)) + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (the-as task-status (current-status (-> obj tasks)))) + ) + ) + (the-as basic (-> obj draw art-group data 3)) + ) + +;; definition for method 31 of type minertall +(defmethod get-art-elem minertall ((obj minertall)) + (-> obj draw art-group data 3) + ) + +;; failed to figure out what this is: +(defstate idle (minertall) + :virtual #t + :trans + (behavior () + (set! (-> self will-talk) #f) + ((-> (method-of-type process-taskable idle) trans)) + (none) + ) + :code + (the-as (function none :behavior minertall) miners-anim-loop) + ) + +;; definition for method 11 of type minertall +(defmethod copy-defaults! minertall ((obj minertall) (arg0 res-lump)) + (dummy-40 obj arg0 *minertall-sg* 32 47 (new 'static 'vector :w 4096.0) 5) + (set! (-> obj tasks) (get-task-control (game-task village3-miner-money1))) + (set! (-> obj draw light-index) (the-as uint 1)) + (dummy-42 obj) + (none) + ) + +;; definition of type minershort +(deftype minershort (process-taskable) + ((other-miner minertall :offset-assert 380) + ) + :heap-base #x110 + :method-count-assert 53 + :size-assert #x180 + :flag-assert #x3501100180 + ) + +;; definition for method 3 of type minershort +(defmethod inspect minershort ((obj minershort)) + (let ((t9-0 (method-of-type process-taskable inspect))) + (t9-0 obj) + ) + (format #t "~T~Tother-miner: ~A~%" (-> obj other-miner)) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-7 + (new 'static 'skeleton-group + :art-group-name "minershort" + :bounds (new 'static 'vector :w 10240.0) + :version #x6 + :shadow 2 + ) + ) + ) + (set! (-> v1-7 jgeo) 0) + (set! (-> v1-7 janim) 3) + (set! (-> v1-7 mgeo 0) (the-as uint 1)) + (set! (-> v1-7 lod-dist 0) 4095996000.0) + (set! *minershort-sg* v1-7) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 566) + (new 'static 'sparticle-launch-group + :length 3 + :duration #xbb8 + :linger-duration #x5dc + :name "group-minershort-candle" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (new 'static 'sparticle-group-item + :launcher #x93c + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + (new 'static 'sparticle-group-item + :launcher #x93d + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + (new 'static 'sparticle-group-item + :launcher #x93e + :fade-after (meters 60.0) + :falloff-to (meters 60.0) + ) + ) + :bounds (new 'static 'sphere :w 61440.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2366) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 25 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-range #x40000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x4399999a + :random-range #x4399999a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x43000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :initial-value #x43000000 + :random-range #x41800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1a + :flags #x1 + :random-range #x3faec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value #x4003126f + :random-range #x4083126f + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1f + :flags #x1 + :initial-value -1039031628 + :random-range #x4291a2b4 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x21 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x23 + :flags #x1 + :initial-value -1096283519 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1104672127 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3e0bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value #x186 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value #x5004 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x3a + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3b + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x3e + :flags #x1 + :random-range #x434ccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2364) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x200f00) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x40400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -1012672758 + :random-range #x42a3d70a + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x444ccccd + :random-range #x444ccccd + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x42000000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1b + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1059425266 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1086977183 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3f8bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 60 + :random-range 29 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 8 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2365) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 20 + (new 'static 'sp-field-init-spec :field #x1 :initial-value #x201200) + (new 'static 'sp-field-init-spec + :field #x6 + :flags #x1 + :initial-value #x3f800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xb + :flags #x1 + :initial-value -1029449974 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #xd + :flags #x1 + :initial-value #x45000000 + :random-range #x45400000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x10 + :flags #x1 + :random-range #x47800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x11 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x12 + :flags #x1 + :initial-value #x43000000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x13 + :flags #x1 + :initial-value #x42800000 + :random-range #x42800000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x14 + :flags #x1 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x15 + :flags #x1 + :initial-value #x41800000 + :random-range #x42000000 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x19 + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1b + :flags #x1 + :random-range #x3f2ec33e + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x1c + :flags #x1 + :initial-value -1059425266 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x20 + :flags #x3 + :initial-value -4 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x22 + :flags #x1 + :initial-value -1086977183 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x24 + :flags #x1 + :initial-value -1074412913 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x26 + :flags #x1 + :initial-value #x3f8bcf65 + :random-range #x3e8bcf65 + :random-mult #x3f800000 + ) + (new 'static 'sp-field-init-spec + :field #x2e + :initial-value 20 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec + :field #x2f + :initial-value 12 + :random-mult 1 + ) + (new 'static 'sp-field-init-spec :field #x43) + ) + ) + ) + +;; definition for method 52 of type minershort +;; INFO: Return type mismatch int vs none. +(defmethod dummy-52 minershort ((obj minershort)) + (let ((v1-1 (-> obj draw shadow-ctrl))) + (when v1-1 + (let ((f0-0 (-> obj root trans y))) + (let ((a0-2 v1-1)) + (set! (-> a0-2 settings bot-plane w) (- (+ -4096.0 f0-0))) + ) + 0 + (let ((a0-4 v1-1)) + (set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0))) + ) + ) + 0 + (set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags))) + ) + ) + (none) + ) + +;; definition for method 48 of type minershort +(defmethod draw-shadow minershort ((obj minershort)) + (-> obj draw shadow-ctrl) + (cond + ((and + (-> obj draw shadow) + (zero? (-> obj draw cur-lod)) + (logtest? (-> obj draw status) 8) + ) + (let ((v1-9 (-> obj draw shadow-ctrl))) + (set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags))) + ) + 0 + ((method-of-object (-> obj draw shadow-ctrl) dummy-14)) + ) + (else + (let ((v1-14 (-> obj draw shadow-ctrl))) + (logior! (-> v1-14 settings flags) 32) + ) + 0 + ) + ) + (none) + ) + +;; definition for function minershort-trans-hook +(defbehavior minershort-trans-hook minershort () + (dummy-11 + (-> self part) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 14)) + ) + (none) + ) + +;; definition for method 32 of type minershort +(defmethod play-anim! minershort ((obj minershort) (arg0 symbol)) + (with-pp + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + ((2 3) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + ((96) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + (a1-3 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-3 from) pp) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'pickup)) + (set! (-> a1-3 param 1) (the-as uint 6)) + (s4-0 + s5-1 + (the int (the-as float (send-event-function *target* a1-3))) + 1 + ) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) pp) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'clone) + (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-5) + ) + (close-specific-task! + (game-task village3-miner-money1) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money2) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money3) + (task-status need-introduction) + ) + (close-specific-task! + (game-task village3-miner-money4) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "minershort-introduction-orbs" + :index 4 + :parts 16 + :command-list + '( + ((the binteger 171) + joint + "cameraB" + ) + ((the binteger 206) + joint + "camera" + ) + ((the binteger 423) + joint + "cameraB" + ) + ((the binteger 591) + joint + "camera" + ) + ((the binteger 692) + joint + "cameraB" + ) + ((the binteger 918) + joint + "camera" + ) + ((the binteger 1122) + joint + "cameraB" + ) + ((the binteger 1122) + shadow + self + #f + ) + ((the binteger 1241) + joint + "camera" + ) + ((the binteger 1241) shadow self #t) + ) + ) + ) + ((78) + (when arg0 + (let* ((s5-2 (-> obj tasks)) + (s4-1 (method-of-object s5-2 save-reminder)) + (a1-10 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-10 from) pp) + (set! (-> a1-10 num-params) 2) + (set! (-> a1-10 message) 'query) + (set! (-> a1-10 param 0) (the-as uint 'pickup)) + (set! (-> a1-10 param 1) (the-as uint 6)) + (s4-1 + s5-2 + (the int (the-as float (send-event-function *target* a1-10))) + 1 + ) + ) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) pp) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'clone) + (set! (-> a1-12 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-12) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "minershort-introduction-gnawers" + :index 9 + :parts 8 + :command-list + '( + (0 + want-levels + village3 + maincave + ) + ((the binteger 149) + joint + "cameraB" + ) + ((the binteger 158) + display-level + maincave + movie + ) + ((the binteger 158) + want-force-vis + maincave + #t + ) + ((the binteger 435) + display-level + maincave + #f + ) + ((the binteger 435) + joint + "camera" + ) + ((the binteger 680) + joint + "cameraB" + ) + ((the binteger 719) joint "camera") + ) + ) + ) + (else + (when arg0 + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) pp) + (set! (-> a1-14 num-params) 1) + (set! (-> a1-14 message) 'clone) + (set! (-> a1-14 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-14) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "minershort-introduction-switch" + :index 11 + :parts 7 + :command-list + '( + ((the binteger 2) + shadow + "minertall-1" + #f + ) + ((the binteger 835) shadow "minertall-1" #t) + ) + ) + ) + ) + ) + ((5) + (set! (-> obj skippable) #t) + (let ((s4-2 (+ (get-reminder (-> obj tasks) 0) 1))) + (if (< (the-as uint 3) (the-as uint s4-2)) + (set! s4-2 0) + ) + (countdown (s3-0 4) + (let ((v1-59 s4-2)) + (cond + ((zero? v1-59) + (if + (not + (or + (= + (get-task-status (game-task village3-miner-money1)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money2)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money3)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money4)) + (task-status need-reminder) + ) + ) + ) + (set! s4-2 1) + ) + ) + ((= v1-59 1) + (if (!= (get-task-status (game-task cave-gnawers)) 5) + (set! s4-2 2) + ) + ) + ((= v1-59 2) + (if + (not + (or + (= + (get-task-status (game-task village3-miner-money1)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money2)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money3)) + (task-status need-reminder) + ) + (= + (get-task-status (game-task village3-miner-money4)) + (task-status need-reminder) + ) + ) + ) + (set! s4-2 3) + ) + ) + (else + (if (!= (get-task-status (game-task snow-eggtop)) 5) + (set! s4-2 0) + ) + ) + ) + ) + ) + (if arg0 + (save-reminder (-> obj tasks) s4-2 0) + ) + (cond + ((zero? s4-2) + (new 'static 'spool-anim + :name "minershort-reminder-1-orbs" + :index 5 + :parts 3 + :command-list '() + ) + ) + ((= s4-2 1) + (when arg0 + (let ((a1-18 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-18 from) pp) + (set! (-> a1-18 num-params) 1) + (set! (-> a1-18 message) 'clone) + (set! (-> a1-18 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-18) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-1-gnawers" + :index 10 + :parts 3 + :command-list '() + ) + ) + ((= s4-2 2) + (when arg0 + (let ((a1-19 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-19 from) pp) + (set! (-> a1-19 num-params) 1) + (set! (-> a1-19 message) 'clone) + (set! (-> a1-19 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-19) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-2-orbs" + :index 6 + :parts 2 + :command-list '() + ) + ) + (else + (when arg0 + (let ((a1-20 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-20 from) pp) + (set! (-> a1-20 num-params) 1) + (set! (-> a1-20 message) 'clone) + (set! (-> a1-20 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-20) + ) + ) + (new 'static 'spool-anim + :name "minershort-reminder-1-switch" + :index 12 + :parts 5 + :command-list + '( + ((the binteger 2) + shadow + "minertall-1" + #f + ) + ((the binteger 500) shadow "minertall-1" #t) + ) + ) + ) + ) + ) + ) + ((6) + (let ((s4-3 (get-reminder (-> obj tasks) 2))) + (cond + (arg0 + (let ((a1-22 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-22 from) pp) + (set! (-> a1-22 num-params) 1) + (set! (-> a1-22 message) 'clone) + (set! (-> a1-22 param 0) (the-as uint (process->handle obj))) + (send-event-function (-> obj other-miner ppointer 3) a1-22) + ) + (set! + (-> obj cell-for-task) + (the-as game-task (current-task (-> obj tasks))) + ) + (close-current! (-> obj tasks)) + (let ((a1-23 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-23 from) pp) + (set! (-> a1-23 num-params) 2) + (set! (-> a1-23 message) 'get-pickup) + (set! (-> a1-23 param 0) (the-as uint 5)) + (set! + (-> a1-23 param 1) + (the-as uint (- (-> *GAME-bank* money-task-inc))) + ) + (send-event-function *target* a1-23) + ) + (save-reminder (-> obj tasks) (+ s4-3 1) 2) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 282)) + ) + ) + (if (< (the-as uint s4-3) (the-as uint 3)) + (new 'static 'spool-anim + :name "minershort-resolution-1-orbs" + :index 7 + :parts 2 + :command-list '() + ) + (new 'static 'spool-anim + :name "minershort-resolution-2-orbs" + :index 8 + :parts 6 + :command-list + '( + ((the binteger 154) + joint + "cameraB" + ) + ((the binteger 461) joint "camera") + ) + ) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string + (the-as task-status (current-status (-> obj tasks))) + ) + ) + ) + (-> obj draw art-group data 3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate play-anim (minershort) + :virtual #t + :exit + (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) self) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'end-mode) + (send-event-function (-> self other-miner ppointer 3) a1-0) + ) + ((-> (method-of-type process-taskable play-anim) exit)) + (none) + ) + ) + +;; definition for method 31 of type minershort +(defmethod get-art-elem minershort ((obj minershort)) + (-> obj draw art-group data 3) + ) + +;; definition for method 43 of type minershort +(defmethod TODO-RENAME-43 minershort ((obj minershort)) + (when + (TODO-RENAME-10 + (-> obj ambient) + (new 'stack-no-clear 'vector) + 9000 + 122880.0 + obj + ) + (let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + (f0-2 (+ -1.0 (the-as float v1-4))) + ) + (cond + ((< 0.9655172 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO01" #f (-> obj root trans)) + ) + ((< 0.9310345 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO03" #f (-> obj root trans)) + ) + ((< 0.8965517 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO04" #f (-> obj root trans)) + ) + ((< 0.86206895 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO05" #f (-> obj root trans)) + ) + ((< 0.82758623 f0-2) + (dummy-11 (-> obj ambient) "MIN-LO06" #f (-> obj root trans)) + ) + ((< 0.79310346 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM01" #f (-> obj root trans)) + ) + ((< 0.7586207 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM02" #f (-> obj root trans)) + ) + ((< 0.7241379 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM03" #f (-> obj root trans)) + ) + ((< 0.6896552 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM04" #f (-> obj root trans)) + ) + ((< 0.6551724 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM05" #f (-> obj root trans)) + ) + ((< 0.62068963 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM06" #f (-> obj root trans)) + ) + ((< 0.5862069 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM07" #f (-> obj root trans)) + ) + ((< 0.55172414 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM08" #f (-> obj root trans)) + ) + ((< 0.51724136 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM09" #f (-> obj root trans)) + ) + ((< 0.4827586 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM10" #f (-> obj root trans)) + ) + ((< 0.44827586 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM11" #f (-> obj root trans)) + ) + ((< 0.41379312 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM12" #f (-> obj root trans)) + ) + ((< 0.37931034 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM1A" #f (-> obj root trans)) + ) + ((< 0.3448276 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM2A" #f (-> obj root trans)) + ) + ((< 0.31034482 f0-2) + (dummy-11 (-> obj ambient) "MSH-AM3A" #f (-> obj root trans)) + ) + ((< 0.27586207 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM01" #f (-> obj root trans)) + ) + ((< 0.2413793 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM02" #f (-> obj root trans)) + ) + ((< 0.20689656 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM03" #f (-> obj root trans)) + ) + ((< 0.1724138 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM04" #f (-> obj root trans)) + ) + ((< 0.13793103 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM05" #f (-> obj root trans)) + ) + ((< 0.10344828 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM06" #f (-> obj root trans)) + ) + ((< 0.06896552 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM07" #f (-> obj root trans)) + ) + ((< 0.03448276 f0-2) + (dummy-11 (-> obj ambient) "MTA-AM08" #f (-> obj root trans)) + ) + (else + (dummy-11 (-> obj ambient) "MTA-AM09" #f (-> obj root trans)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (minershort) + :virtual #t + :code + miners-anim-loop + ) + +;; definition for method 11 of type minershort +(defmethod copy-defaults! minershort ((obj minershort) (arg0 res-lump)) + (dummy-40 obj arg0 *minershort-sg* 34 46 (new 'static 'vector :w 4096.0) 5) + (set! + (-> obj part) + (create-launch-control (-> *part-group-id-table* 566) obj) + ) + (set! (-> obj tasks) (get-task-control (game-task village3-miner-money1))) + (set! + (-> obj other-miner) + (the-as minertall (entity-actor-lookup arg0 'alt-actor 0)) + ) + (set! (-> obj cur-trans-hook) minershort-trans-hook) + (set! (-> obj sound-flava) (the-as uint 14)) + (set! (-> obj draw light-index) (the-as uint 1)) + (dummy-42 obj) + (none) + ) + +;; definition of type cavegem +(deftype cavegem (process-drawable) + () + :heap-base #x40 + :method-count-assert 21 + :size-assert #xb0 + :flag-assert #x15004000b0 + (:methods + (idle () _type_ :state 20) + ) + ) + +;; definition for method 3 of type cavegem +(defmethod inspect cavegem ((obj cavegem)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + obj + ) + +;; failed to figure out what this is: +(let + ((v1-18 + (new 'static 'skeleton-group + :art-group-name "cavegem" + :bounds (new 'static 'vector :w 36864.0) + :version #x6 + ) + ) + ) + (set! (-> v1-18 jgeo) 0) + (set! (-> v1-18 janim) 2) + (set! (-> v1-18 mgeo 0) (the-as uint 1)) + (set! (-> v1-18 lod-dist 0) 4095996000.0) + (set! *cavegem-sg* v1-18) + ) + +;; failed to figure out what this is: +(defstate idle (cavegem) + :virtual #t + :code + (behavior () + (while #t + (let ((a0-0 (-> self skel root-channel 0))) + (set! (-> a0-0 frame-group) (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + ) + (set! + (-> a0-0 param 0) + (the float (+ (-> (if (> (-> self skel active-channels) 0) + (-> self skel root-channel 0 frame-group) + ) + data + 0 + length + ) + -1 + ) + ) + ) + (set! (-> a0-0 param 1) 1.0) + (set! (-> a0-0 frame-num) 0.0) + (joint-control-channel-group! a0-0 (if (> (-> self skel active-channels) 0) + (-> + self + skel + root-channel + 0 + frame-group + ) + ) + num-func-seek! + ) + ) + (until (ja-done? 0) + (suspend) + (let ((a0-1 (-> self skel root-channel 0))) + (set! + (-> a0-1 param 0) + (the float (+ (-> a0-1 frame-group data 0 length) -1)) + ) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group-eval! + a0-1 + (the-as art-joint-anim #f) + num-func-seek! + ) + ) + ) + ) + (none) + ) + :post + (the-as (function none :behavior cavegem) ja-post) + ) + +;; definition for method 11 of type cavegem +(defmethod copy-defaults! cavegem ((obj cavegem) (arg0 res-lump)) + (set! (-> obj root) (new 'process 'trsqv)) + (process-drawable-from-entity! obj arg0) + (dummy-14 obj *cavegem-sg* '()) + (go (method-of-object obj idle)) + (none) + ) + + + + diff --git a/test/offline/offline_test_main.cpp b/test/offline/offline_test_main.cpp index e587048da7..f1a7791413 100644 --- a/test/offline/offline_test_main.cpp +++ b/test/offline/offline_test_main.cpp @@ -288,7 +288,8 @@ class OfflineDecompilation : public ::testing::Test { config->generate_symbol_definition_map = false; std::vector dgos = {"CGO/KERNEL.CGO", "CGO/ENGINE.CGO", "CGO/GAME.CGO", - "DGO/BEA.DGO", "CGO/L1.CGO", "DGO/INT.DGO"}; + "DGO/BEA.DGO", "CGO/L1.CGO", "DGO/INT.DGO", + "DGO/VI1.DGO"}; std::vector dgo_paths; if (g_iso_data_path.empty()) { for (auto& x : dgos) {