decomp: easy batch number 2 (#824)

* decomp: finish `jungle-elevator`

* decomp: finish `bouncer`

* decomp: finish `hopper`

* decomp: finish `junglefish`

* decomp: finish `blocking-plane`

* decomp: finish `sidekick-human`

* decomp: finish `assistant-firecanyon`

* decomp: finish `sage-bluehut`

* decomp: finish `flutflut-bluehut`

* fix arg type
This commit is contained in:
Tyler Wilding
2021-09-06 14:29:06 -04:00
committed by GitHub
parent a96eb800c4
commit 7c25b721f1
35 changed files with 21874 additions and 560 deletions
+3
View File
@@ -61,3 +61,6 @@ tasks:
- python ./scripts/next-decomp-file.py --file "{{.FILE}}"
- task: decomp
- python ./scripts/find-label-types.py --file "{{.FILE}}"
type-test:
cmds:
- ./out/build/Release/bin/goalc-test.exe --gtest_brief=0 --gtest_filter="*TypeConsistency*"
+140 -510
View File
@@ -867,6 +867,8 @@
(MISSING-orb-hint #x233)
(firecanyon-not-enough-cells #x24f)
(beach-gimmie #x262)
(beach-sentinel #x263)
(jungle-canyon-end #x264)
@@ -878,6 +880,8 @@
(misty-teetertotter-bonk-dax-tutorial #x2a4)
(firecanyon-collect-cells-text #x2b3)
(village2-gambler-money #x300)
(village2-geologist-money #x301)
(village2-warrior-money #x302)
@@ -16581,7 +16585,7 @@
(initialize-collision (_type_ int) none 41)
(dummy-42 (_type_) none 42)
(TODO-RENAME-43 (_type_) none 43)
(dummy-44 (_type_) none 44)
(play-reminder (_type_) symbol 44)
(dummy-45 (_type_) none 45)
(dummy-46 (_type_) none 46)
(target-above-threshold? (_type_) symbol 47)
@@ -18772,8 +18776,8 @@
(define-extern ambient-hint-init-by-other (function none))
(define-extern level-hint-process-cmd function)
(define-extern task-known? (function game-task symbol))
(define-extern can-grab-display? function)
(define-extern level-hint-displayed? function)
(define-extern can-grab-display? (function process-taskable symbol)) ;; unconfirmed, see assistant-firecanyon
(define-extern level-hint-displayed? (function symbol)) ;; unconfirmed, see assistant-firecanyon
(define-extern ambient-inspect function)
;; - Unknowns
@@ -20384,8 +20388,8 @@
(define-extern othercam-calc function)
(define-extern vector-for-ambient (function process-drawable vector vector))
(define-extern hide-hud function)
(define-extern hud-hidden? function)
(define-extern hide-hud (function none)) ;; unconfirmed, see assistant-firecanyon
(define-extern hud-hidden? (function symbol)) ;; unconfirmed, see assistant-firecanyon
(define-extern process-taskable-clean-up-after-talking function)
(define-extern process-taskable-hide-exit function)
(define-extern process-taskable-play-anim-code function)
@@ -22852,16 +22856,16 @@
:flag-assert #x21008000f0
;; inherited inspect of process-drawable
(:methods
(plat-button-at-end () none 20) ;; state
(plat-button-at-end () _type_ :state 20) ;; state
(dummy-21 () none 21)
(plat-button-pressed () _type_ :state 22)
(plat-button-move-downward () _type_ :state 23)
(plat-button-move-upward () _type_ :state 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(can-activate? (_type_) symbol 26)
(TODO-RENAME-27 (_type_) none 27)
(dummy-28 () none 28)
(TODO-RENAME-29 (_type_) float 29)
(can-target-move? (_type_) symbol 29)
(should-teleport? (_type_) symbol 30)
(TODO-RENAME-31 (_type_) none 31) ;; TODO - need to know super::14
(dummy-32 () none 32)
@@ -29073,43 +29077,16 @@
;; - Types
; (deftype jungle-elevator (plat-button)
; ((bottom-height float :offset-assert 240)
; (teleport-if-below-y float :offset-assert 244)
; (teleport-if-above-y float :offset-assert 248)
; )
; :method-count-assert 33
; :size-assert #xfc
; :heap-base #x90
; :flag-assert #x21009000fc
; ;; inherited inspect of plat-button
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; )
; )
(deftype jungle-elevator (plat-button)
((bottom-height float :offset-assert 240)
(teleport-if-below-y float :offset-assert 244)
(teleport-if-above-y float :offset-assert 248)
)
:method-count-assert 33
:size-assert #xfc
:heap-base #x90
:flag-assert #x21009000fc
)
;; ----------------------
@@ -29134,9 +29111,9 @@
;; - Unknowns
(define-extern *bouncer-sg* skeleton-group)
;;(define-extern bouncer-wait object) ;; unknown type
;;(define-extern bouncer-fire object) ;; unknown type
;;(define-extern bouncer-smush object) ;; unknown type
(define-extern bouncer-wait (state springbox)) ;; unknown type
(define-extern bouncer-fire (state springbox)) ;; unknown type
(define-extern bouncer-smush (state springbox)) ;; unknown type
;; ----------------------
@@ -29159,9 +29136,9 @@
;; - Functions
(define-extern hopper-do-jump function)
(define-extern hopper-jump-to function)
(define-extern hopper-find-ground function)
(define-extern hopper-do-jump (function none :behavior hopper))
(define-extern hopper-jump-to (function vector none :behavior hopper))
(define-extern hopper-find-ground (function vector object :behavior hopper))
;; - Unknowns
@@ -29869,83 +29846,13 @@
;; - Types
; (deftype junglefish (nav-enemy)
; ()
; :method-count-assert 76
; :size-assert #x190
; :heap-base #x120
; :flag-assert #x4c01200190
; ;; not enough basic ops
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; (dummy-53 () none 53)
; (dummy-54 () none 54)
; (dummy-55 () none 55)
; (dummy-56 () none 56)
; (dummy-57 () none 57)
; (dummy-58 () none 58)
; (dummy-59 () none 59)
; (dummy-60 () none 60)
; (dummy-61 () none 61)
; (dummy-62 () none 62)
; (dummy-63 () none 63)
; (dummy-64 () none 64)
; (dummy-65 () none 65)
; (dummy-66 () none 66)
; (dummy-67 () none 67)
; (dummy-68 () none 68)
; (dummy-69 () none 69)
; (dummy-70 () none 70)
; (dummy-71 () none 71)
; (dummy-72 () none 72)
; (dummy-73 () none 73)
; (dummy-74 () none 74)
; (dummy-75 () none 75)
; )
; )
(deftype junglefish (nav-enemy)
()
:method-count-assert 76
:size-assert #x190
:heap-base #x120
:flag-assert #x4c01200190
)
;; - Unknowns
@@ -30798,9 +30705,9 @@
;; - Functions
(define-extern blocking-plane-spawn function)
(define-extern blocking-plane-spawn (function curve-control none))
(define-extern racer-effect function)
(define-extern blocking-plane-destroy function)
(define-extern blocking-plane-destroy (function none))
;; - Unknowns
@@ -30923,36 +30830,22 @@
;; - Types
; (deftype blocking-plane (process-drawable)
; ()
; :method-count-assert 20
; :size-assert #xb0
; :heap-base #x40
; :flag-assert #x14004000b0
; ;; 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)
; )
; )
(deftype blocking-plane (process-drawable)
()
:method-count-assert 20
:size-assert #xb0
:heap-base #x40
:flag-assert #x14004000b0
)
;; - Functions
(define-extern blocking-plane-init-by-other function)
(define-extern blocking-plane-init-by-other (function curve-control int none :behavior blocking-plane))
;; - Unknowns
(define-extern *ef-plane-sg* skeleton-group)
;;(define-extern blocking-plane-idle object) ;; unknown type
(define-extern blocking-plane-idle (state blocking-plane)) ;; unknown type
;; ----------------------
@@ -32841,84 +32734,14 @@
;; - Types
; (deftype bonelurker (nav-enemy)
; ((bump-player-time uint64 :offset-assert 400)
; )
; :method-count-assert 76
; :size-assert #x198
; :heap-base #x130
; :flag-assert #x4c01300198
; ;; inherited inspect of nav-enemy
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; (dummy-53 () none 53)
; (dummy-54 () none 54)
; (dummy-55 () none 55)
; (dummy-56 () none 56)
; (dummy-57 () none 57)
; (dummy-58 () none 58)
; (dummy-59 () none 59)
; (dummy-60 () none 60)
; (dummy-61 () none 61)
; (dummy-62 () none 62)
; (dummy-63 () none 63)
; (dummy-64 () none 64)
; (dummy-65 () none 65)
; (dummy-66 () none 66)
; (dummy-67 () none 67)
; (dummy-68 () none 68)
; (dummy-69 () none 69)
; (dummy-70 () none 70)
; (dummy-71 () none 71)
; (dummy-72 () none 72)
; (dummy-73 () none 73)
; (dummy-74 () none 74)
; (dummy-75 () none 75)
; )
; )
(deftype bonelurker (nav-enemy)
((bump-player-time uint64 :offset-assert 400)
)
:method-count-assert 76
:size-assert #x198
:heap-base #x130
:flag-assert #x4c01300198
)
;; - Functions
@@ -33235,51 +33058,60 @@
;; - Types
; (deftype sequenceA (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; bad get label
; )
(deftype sequenceA (process-hidden)
()
:method-count-assert 15
:size-assert #x70
:flag-assert #xf00000070
)
; (deftype sequenceB (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; unrecognized get op: (set! v1 process-taskable) parent was UNKNOWN
; )
(deftype sequenceB (process-taskable)
((bonelurker handle :offset-assert 384) ;; bonelurker
(evilbro handle :offset-assert 392) ;; evilbro
(evilsis handle :offset-assert 400) ;; evilsis
(lurker-army handle 9 :offset-assert 408) ;; babak?
)
:heap-base #x170
:method-count-assert 53
:size-assert #x1e0
:flag-assert #x35017001e0
)
; (deftype sequenceC (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; unrecognized get op: (set! v1 process-taskable) parent was UNKNOWN
; )
(deftype sequenceC (process-taskable)
((bonelurker handle :offset-assert 384) ;; bonelurker likely
(darkecocan handle :offset-assert 392) ;; darkecobarrel-base likely
(darkecocan-glowing-look lod-set :inline :offset-assert 400)
)
:heap-base #x150
:method-count-assert 53
:size-assert #x1b1
:flag-assert #x35015001b1
)
; (deftype army-info (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; bad get label
; )
(deftype army-info (structure)
((pos vector :offset-assert 0)
(rot float :offset-assert 4)
(start-frame float :offset-assert 8)
(skel symbol :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; - Functions
(define-extern sequenceC-trans-hook function)
(define-extern sequenceC-can-trans-hook function)
(define-extern sequenceC-can-trans-hook-2 function)
(define-extern evilsib-trans-hook-wait function)
(define-extern evilsib-trans-hook-hover function)
(define-extern sequenceC-trans-hook (function none :behavior sequenceC))
(define-extern sequenceC-can-trans-hook (function none :behavior sequenceC))
(define-extern sequenceC-can-trans-hook-2 (function none :behavior sequenceC))
(define-extern evilsib-trans-hook-wait (function none :behavior evilbro))
(define-extern evilsib-trans-hook-hover (function none :behavior evilbro))
;; - Unknowns
(define-extern *darkecocan-sg* skeleton-group)
(define-extern *darkecocan-glow-sg* skeleton-group)
;;(define-extern *lurker-army* object) ;; unknown type
(define-extern *lurker-army* (array army-info)) ;; unknown type
(define-extern *evilbro-sg* skeleton-group)
(define-extern *evilsis-sg* skeleton-group)
@@ -33324,60 +33156,13 @@
;; - Types
; (deftype assistant-firecanyon (process-taskable)
; ()
; :method-count-assert 53
; :size-assert #x17c
; :heap-base #x110
; :flag-assert #x350110017c
; ;; not enough basic ops
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; )
; )
(deftype assistant-firecanyon (process-taskable)
()
:method-count-assert 53
:size-assert #x17c
:heap-base #x110
:flag-assert #x350110017c
)
;; - Unknowns
@@ -33994,121 +33779,27 @@
;; - Types
; (deftype assistant-bluehut (process-taskable)
; ((sound-id sound-id :offset-assert 380)
; (jaws uint64 :offset-assert 384)
; (sage basic :offset-assert 392)
; (im-talking basic :offset-assert 396)
; )
; :method-count-assert 53
; :size-assert #x190
; :heap-base #x120
; :flag-assert #x3501200190
; ;; inherited inspect of process-taskable
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; )
; )
(deftype assistant-bluehut (process-taskable)
((sound-id sound-id :offset-assert 380)
(jaws uint64 :offset-assert 384)
(sage entity-actor :offset-assert 392)
(im-talking symbol :offset-assert 396)
)
:method-count-assert 53
:size-assert #x190
:heap-base #x120
:flag-assert #x3501200190
)
; (deftype sage-bluehut (process-taskable)
; ((reminder-played basic :offset-assert 380)
; (assistant basic :offset-assert 384)
; )
; :method-count-assert 53
; :size-assert #x184
; :heap-base #x120
; :flag-assert #x3501200184
; ;; inherited inspect of process-taskable
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; )
; )
(deftype sage-bluehut (process-taskable)
((reminder-played symbol :offset-assert 380)
(assistant entity-actor :offset-assert 384)
)
:method-count-assert 53
:size-assert #x184
:heap-base #x120
:flag-assert #x3501200184
)
;; - Unknowns
@@ -34123,60 +33814,13 @@
;; - Types
; (deftype flutflut-bluehut (process-taskable)
; ()
; :method-count-assert 53
; :size-assert #x17c
; :heap-base #x110
; :flag-assert #x350110017c
; ;; not enough basic ops
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; )
; )
(deftype flutflut-bluehut (process-taskable)
()
:method-count-assert 53
:size-assert #x17c
:heap-base #x110
:flag-assert #x350110017c
)
;; - Unknowns
@@ -41761,29 +41405,15 @@
; :flag-assert #x900000014
; )
; (deftype darkecobarrel-base (process-drawable)
; ((speed float :offset-assert 176)
; (sync uint64 :offset-assert 184)
; )
; :method-count-assert 20
; :size-assert #xc0
; :heap-base #x50
; :flag-assert #x14005000c0
; ;; 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)
; )
; )
(deftype darkecobarrel-base (process-drawable)
((speed float :offset-assert 176)
(sync uint64 :offset-assert 184)
)
:method-count-assert 20
:size-assert #xc0
:heap-base #x50
:flag-assert #x14005000c0
)
; (deftype darkecobarrel-mover (darkecobarrel-base)
; ((start-time uint64 :offset-assert 192)
@@ -698,5 +698,11 @@
[27, "(function projectile int)"]
],
"sidekick-human": [
[7, "(function sparticle-launch-control :behavior sequenceC)"],
[15, "(function sparticle-launch-control :behavior sequenceB)"],
[16, "(function sparticle-launch-control :behavior sequenceB)"]
],
"placeholder-do-not-add-below": []
}
@@ -456,6 +456,41 @@
["L150", "attack-info"]
],
"blocking-plane": [
["L18", "vector"],
["L19", "vector"],
["L20", "vector"]
],
"sidekick-human": [
["L131", "vector"],
["L350", "vector"],
["L940", "float", true],
["L941", "float", true],
["L942", "float", true],
["L943", "float", true],
["L944", "float", true],
["L945", "float", true],
["L946", "float", true],
["L990", "float", true],
["L991", "uint64", true],
["L992", "uint64", true],
["L993", "uint64", true],
["L994", "uint64", true]
],
"assistant-firecanyon": [
["L71", "vector"]
],
"sage-bluehut": [
["L82", "vector"]
],
"flutflut-bluehut": [
["L34", "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": []
}
@@ -1526,5 +1526,81 @@
[32, "vector"]
],
"(enter plat-button-move-downward jungle-elevator)": [
[16, "event-message-block"]
],
"(trans plat-button-move-downward jungle-elevator)": [
[16, "vector"],
[32, "vector"],
[48, "event-message-block"]
],
"(method 29 jungle-elevator)": [
[16, "vector"]
],
"(event bouncer-wait)": [
[16, "event-message-block"]
],
"hopper-find-ground": [
[16, "vector"],
[32, "bone"]
],
"blocking-plane-init-by-other": [
[16, "matrix"]
],
"evilsib-trans-hook-wait": [
[16, "event-message-block"]
],
"(method 32 sequenceB)": [
[16, "event-message-block"]
],
"(event play-anim sequenceB)": [
[16, "event-message-block"]
],
"(exit play-anim sequenceB)": [
[16, "event-message-block"]
],
"sequenceC-can-trans-hook-2": [
[16, "vector"],
[32, "event-message-block"]
],
"sequenceC-can-trans-hook": [
[16, "event-message-block"]
],
"(method 32 sequenceC)": [
[16, "event-message-block"]
],
"sequenceC-trans-hook": [
[16, "vector"]
],
"(trans hidden assistant-firecanyon)": [
[16, "font-context"]
],
"(method 32 sage-bluehut)": [
[16, "event-message-block"]
],
"(exit play-anim sage-bluehut)": [
[16, "event-message-block"]
],
"(method 43 sage-bluehut)": [
[16, "vector"]
],
"placeholder-do-not-add-below!": []
}
@@ -2619,5 +2619,123 @@
[70, "v1", "process-mask"]
],
"(trans plat-button-move-downward jungle-elevator)": [
[11, "v0", "(state plat-button)"]
],
"(code plat-button-at-end jungle-elevator)": [
[43, "t9", "(function none :behavior plat-button)"]
],
"(code bouncer-fire)": [
[17, "v1", "art-joint-anim"]
],
"(method 39 hopper)": [
[16, "t9", "(function nav-enemy none)"]
],
"(code nav-enemy-idle hopper)": [
[16, "v1", "art-joint-anim"],
[70, "v1", "art-joint-anim"]
],
"(code nav-enemy-patrol hopper)": [
[34, "v1", "art-joint-anim"],
[105, "v1", "art-joint-anim"]
],
"(code nav-enemy-chase hopper)": [
[34, "v1", "art-joint-anim"],
[105, "v1", "art-joint-anim"]
],
"(method 39 junglefish)": [
[12, "t9", "(function nav-enemy none)"]
],
"(code nav-enemy-patrol junglefish)": [
[27, "v1", "art-joint-anim"],
[107, "v1", "art-joint-anim"],
[169, "v1", "art-joint-anim"],
[251, "v1", "art-joint-anim"]
],
"(code nav-enemy-attack junglefish)": [
[14, "v1", "art-joint-anim"]
],
"(code nav-enemy-victory junglefish)": [
[14, "v1", "art-joint-anim"],
[64, "v1", "art-joint-anim"]
],
"(method 32 sequenceB)": [
[177, "s3", "babak"],
[186, "s3", "babak"],
[236, "s3", "babak"],
[245, "s3", "babak"]
],
"(event play-anim sequenceB)": [
[98, "gp", "evilbro"],
[107, "gp", "evilbro"],
[289, "gp", "evilsis"],
[298, "gp", "evilsis"]
],
"sequenceC-can-trans-hook": [
[12, "v1", "process-taskable"]
],
"(anon-function 7 sidekick-human)": [
[2, "v1", "process-taskable"],
[10, "v1", "process-taskable"]
],
"(code idle assistant-firecanyon)": [
[33, "v1", "float"],
[55, "v1", "float"],
[139, "v1", "float"],
[157, "v1", "art-joint-anim"],
[213, "v1", "float"],
[295, "v1", "art-joint-anim"],
[343, "v1", "float"],
[424, "v1", "float"],
[446, "v1", "float"],
[530, "v1", "float"],
[548, "v1", "art-joint-anim"],
[604, "v1", "float"],
[686, "v1", "art-joint-anim"],
[734, "v1", "float"],
[756, "v1", "float"]
],
"(method 32 sage-bluehut)": [
[44, "v1", "float"],
[63, "s5", "assistant-bluehut"]
],
"(method 47 sage-bluehut)": [
[18, "gp", "assistant-bluehut"],
[23, "gp", "assistant-bluehut"]
],
"(method 43 sage-bluehut)": [
[19, "v1", "float"]
],
"(code idle sage-bluehut)": [
[34, "v1", "float"],
[137, "v1", "art-joint-anim"]
],
"(code idle flutflut-bluehut)": [
[33, "v1", "float"],
[187, "v1", "art-joint-anim"],
[243, "v1", "float"],
[329, "v1", "art-joint-anim"]
],
"placeholder-do-not-add-below": []
}
+5 -1
View File
@@ -8,4 +8,8 @@
(defmethod birth-ambient! entity-ambient ((obj entity-ambient))
;; TODO stub
(none)
)
)
;; TODO - for assistant-firecanyon
(define-extern level-hint-displayed? (function symbol))
(define-extern can-grab-display? (function process-taskable symbol))
+2
View File
@@ -24,3 +24,5 @@
(define-extern ja-eval (function int))
;; TODO - for basebutton
(define-extern anim-loop (function symbol))
;; TODO - for bouncer
(define-extern ja-min? (function int symbol))
+1 -1
View File
@@ -156,7 +156,7 @@
(initialize-collision (_type_ int) none 41)
(dummy-42 (_type_) none 42)
(TODO-RENAME-43 (_type_) none 43)
(dummy-44 (_type_) none 44)
(play-reminder (_type_) symbol 44)
(dummy-45 (_type_) none 45)
(dummy-46 (_type_) none 46)
(target-above-threshold? (_type_) symbol 47)
+3
View File
@@ -5,3 +5,6 @@
;; name in dgo: hud-classes
;; dgos: GAME, ENGINE
;; TODO - for assistant-firecanyon
(define-extern hide-hud (function none))
(define-extern hud-hidden? (function symbol))
+39 -35
View File
@@ -32,12 +32,12 @@
(game-options #x127)
(graphic-options #x128)
(sound-options #x129)
(hidden-power-cell #x12f) ;; why is this here??
(saving-data #x136)
(do-not-remove-mem-card #x138)
(continue-without-saving #x13f)
(back #x13e)
(load-game #x14b)
@@ -73,19 +73,21 @@
(misty-return-to-pool #x215) ;; task name??
(misty-find-transpad #x216) ;; task name?
(misty-balloon-lurkers #x217)
(village1-level-name #x220)
(beach-level-name #x221)
(jungle-level-name #x222)
(misty-level-name #x223)
(beach-seagull-get #x22e)
(jungle-lurkerm-unblock #x22f)
(jungle-lurkerm-return #x230)
(MISSING-orb-hint #x233)
(firecanyon-not-enough-cells #x24f)
(beach-gimmie #x262)
(beach-sentinel #x263)
(jungle-canyon-end #x264)
@@ -96,24 +98,26 @@
(beach-seagulls-avalanche #x273)
(misty-teetertotter-bonk-dax-tutorial #x2a4)
(firecanyon-collect-cells-text #x2b3)
(village2-gambler-money #x300)
(village2-geologist-money #x301)
(village2-warrior-money #x302)
(village2-oracle-money #x303)
(swamp-tether #x304)
(swamp-flutflut #x307)
(swamp-billy #x309)
(sunken-elevator-raise #x30a)
(sunken-elevator-get-to-roof #x30b)
(sunken-pipe #x30c)
(sunken-climb-tube #x30d) ;; task name?
(sunken-pool #x30e) ;; task name?
(sunken-platforms #x30f)
(rolling-moles #x310)
(rolling-moles-return #x311)
(rolling-robbers #x312)
@@ -121,22 +125,22 @@
(rolling-race-return #x314)
(rolling-lake #x315)
(rolling-plants #x316)
(unknown-buzzers #x317)
(village2-level-name #x319)
(rolling-level-name #x31b)
(swamp-level-name #x31c)
(sunken-level-name #x31d)
(ogre-level-name #x31e)
(swamp-battle #x321)
(sunken-bottom #x322) ;; task name?
(reach-center #x323) ;; task name?
(rolling-ring-chase-1 #x324)
(rolling-ring-chase-2 #x325)
(village3-miner-money #x400)
(village3-oracle-money #x401)
(snow-ram-3-left #x402)
@@ -145,58 +149,58 @@
(snow-fort #x405)
(snow-bunnies #x406)
(snow-open-door #x408) ;; task name?
(cave-robot-climb #x40e)
(cave-dark-climb #x40f) ;; destroy crystals
(cave-gnawers #x410)
(cave-dark-crystals #x411)
(village3-buzzer #x413)
(village3-level-name #x415)
(snowy-level-name #x417)
(cave-level-name #x419)
(lavatube-level-name #x41b)
(snow-eggtop #x421)
(cave-spider-tunnel #x423)
(cave-platforms #x424)
(cave-swing-poles #x426)
(snow-frozen-crate #x42b) ;; task name?
(snow-bumpers #x42c)
(fire-canyon-end #x500)
(fire-canyon-buzzer #x501)
(fire-canyon-level-name #x50c)
(ogre-end #x600)
(ogre-buzzer #x601)
(ogre-boss #x603)
(lavatube-end #x700)
(lavatube-buzzer #x701)
(citadel-buzzer #x800)
(citadel-level-name #x801)
(citadel-sage-blue #x802)
(citadel-sage-red #x803)
(citadel-sage-yellow #x804)
(citadel-sage-green #x805)
(training-gimmie-task-name #x91b)
(training-buzzer-task-name #x91c)
(training-door-task-name #x91d)
(training-climb-task-name #x91e)
(training-level-name #x91f)
(inc #xf10)
(europe #xf11)
)
+11
View File
@@ -5,3 +5,14 @@
;; name in dgo: babak
;; dgos: GAME, COMMON, L1
(define-extern *babak-sg* skeleton-group)
;; TODO - for sidekick-human
(deftype babak (nav-enemy)
()
:method-count-assert 76
:size-assert #x190
:heap-base #x120
:flag-assert #x4c01200190
;; not enough basic ops
)
+172
View File
@@ -5,3 +5,175 @@
;; name in dgo: blocking-plane
;; dgos: L1, FIC, LAV, MIS, OGR, RACERP, ROL, SNO, SWA
(define-extern *ef-plane-sg* skeleton-group)
;; definition of type blocking-plane
(deftype blocking-plane (process-drawable)
()
:heap-base #x40
:method-count-assert 20
:size-assert #xb0
:flag-assert #x14004000b0
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "ef-plane"
:bounds (new 'static 'vector :w 122880.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *ef-plane-sg* v1-1)
)
;; failed to figure out what this is:
(defstate blocking-plane-idle (blocking-plane)
:code
(behavior ()
(transform-post)
(while #t
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
(none)
)
)
;; definition for function blocking-plane-init-by-other
;; Used lq/sq
(defbehavior
blocking-plane-init-by-other blocking-plane
((arg0 curve-control) (arg1 int))
(if (or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))
(deactivate self)
)
(let ((s5-0 (new 'static 'vector))
(gp-0 (new 'static 'vector))
)
0.0
(eval-path-curve-div! arg0 s5-0 (the float arg1) 'exact)
(eval-path-curve-div! arg0 gp-0 (+ 1.0 (the float arg1)) 'exact)
(let ((f30-1 (* 0.5 (vector-vector-distance s5-0 gp-0)))
(s4-1
(new
'process
'collide-shape
self
(collide-list-enum usually-hit-by-player)
)
)
)
(let
((s3-1
(new
'process
'collide-shape-prim-mesh
s4-1
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s3-1 prim-core collide-as) (the-as uint 512))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 0.0 0.0 0.0 (fmax 122880.0 f30-1))
)
(dummy-46 s4-1)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(dummy-50 s4-1)
(set! (-> self root) s4-1)
)
(let ((s4-2 (new-stack-matrix0)))
(vector+! (-> self root trans) s5-0 gp-0)
(vector-float*! (-> self root trans) (-> self root trans) 0.5)
(set! (-> self root trans y) (+ 61440.0 (-> self root trans y)))
(vector-! (the-as vector (-> s4-2 vector)) gp-0 s5-0)
(set!
(-> self root scale x)
(*
0.00024414062
(vector-normalize-ret-len! (the-as vector (-> s4-2 vector)) 1.0)
)
)
(set! (-> self root scale y) 30.0)
(set! (-> self root scale z) 0.0)
(set! (-> s4-2 vector 1 quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad))
(vector-cross!
(-> s4-2 vector 2)
(the-as vector (-> s4-2 vector))
(-> s4-2 vector 1)
)
(vector-normalize! (-> s4-2 vector 2) 1.0)
(matrix->quaternion (-> self root quat) s4-2)
)
)
(dummy-14 self *ef-plane-sg* '())
(logior! (-> self draw status) 32)
(go blocking-plane-idle)
(none)
)
;; definition for function blocking-plane-spawn
;; INFO: Return type mismatch int vs none.
(defun blocking-plane-spawn ((arg0 curve-control))
(with-pp
(cond
((or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))
)
(else
(let ((s5-0 (the int (the float (+ (-> arg0 curve num-cverts) -1))))
(s4-0 0)
)
(while (< s4-0 s5-0)
(let ((s3-0 (get-process *default-dead-pool* blocking-plane #x4000)))
(when s3-0
(let ((t9-1 (method-of-type blocking-plane activate)))
(t9-1
(the-as blocking-plane s3-0)
pp
'blocking-plane
(the-as pointer #x70004000)
)
)
(run-now-in-process s3-0 blocking-plane-init-by-other arg0 s4-0)
(-> s3-0 ppointer)
)
)
(+! s4-0 2)
)
)
)
)
0
(none)
)
)
;; definition for function blocking-plane-destroy
;; INFO: Return type mismatch int vs none.
(defun blocking-plane-destroy ()
(with-pp
(let ((gp-0 (-> pp child)))
(while gp-0
(let ((s5-0 (ppointer->process gp-0)))
(set! gp-0 (-> gp-0 0 brother))
(if (type-type? (-> s5-0 type) blocking-plane)
(deactivate s5-0)
)
)
)
)
0
(none)
)
)
+3 -3
View File
@@ -24,16 +24,16 @@
:flag-assert #x21008000f0
;; inherited inspect of process-drawable
(:methods
(plat-button-at-end () none 20) ;; state
(plat-button-at-end () _type_ :state 20) ;; state
(dummy-21 () none 21)
(plat-button-pressed () _type_ :state 22)
(plat-button-move-downward () _type_ :state 23)
(plat-button-move-upward () _type_ :state 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(can-activate? (_type_) symbol 26)
(TODO-RENAME-27 (_type_) none 27)
(dummy-28 () none 28)
(TODO-RENAME-29 (_type_) float 29)
(can-target-move? (_type_) symbol 29)
(should-teleport? (_type_) symbol 30)
(TODO-RENAME-31 (_type_) none 31) ;; TODO - need to know super::14
(dummy-32 () none 32)
@@ -5,3 +5,867 @@
;; name in dgo: assistant-firecanyon
;; dgos: L1, FIC
(define-extern *assistant-firecanyon-sg* skeleton-group)
;; definition of type assistant-firecanyon
(deftype assistant-firecanyon (process-taskable)
()
:heap-base #x110
:method-count-assert 53
:size-assert #x17c
:flag-assert #x350110017c
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "assistant-firecanyon"
:bounds (new 'static 'vector :w 16384.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-firecanyon-sg* v1-1)
)
;; definition for method 32 of type assistant-firecanyon
(defmethod
play-anim!
assistant-firecanyon
((obj assistant-firecanyon) (arg0 symbol))
(case (current-status (-> obj tasks))
((6)
(if arg0
(close-current! (-> obj tasks))
)
(new 'static 'spool-anim
:name "assistant-firecanyon-resolution"
:index 13
:parts 11
:command-list
'(
(0
want-levels
village1
firecanyon
)
((the binteger 151)
joint
"cameraB"
)
((the binteger 346)
joint
"camera"
)
((the binteger 346)
shadow
self
#f
)
((the binteger 461)
joint
"cameraB"
)
((the binteger 546)
joint
"camera"
)
((the binteger 636)
joint
"cameraB"
)
((the binteger 695)
alive
"balloon-12"
)
((the binteger 696)
joint
"camera"
)
((the binteger 821)
alive
"balloon-16"
)
((the binteger 822)
joint
"cameraB"
)
((the binteger 962) joint "camera") ((the binteger 1268) shadow self #t)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~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-firecanyon
(defmethod get-art-elem assistant-firecanyon ((obj assistant-firecanyon))
(if (zero? (current-status (-> obj tasks)))
(-> obj draw art-group data 8)
(-> obj draw art-group data 3)
)
)
;; failed to figure out what this is:
(defstate hidden (assistant-firecanyon)
:virtual #t
:trans
(behavior ()
((-> (method-of-type process-taskable hidden) trans))
(when (and (cond
((and
*target*
(>=
61440.0
(vector-vector-distance
(-> self root trans)
(-> *target* control trans)
)
)
)
#t
)
(else
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
#f
)
)
(and
(not
(closed?
(-> self tasks)
(game-task firecanyon-assistant)
(task-status need-reward-speech)
)
)
(not (movie?))
(not (level-hint-displayed?))
(not
(and
*cheat-mode*
(logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3))
)
)
(<
(-
(-> *display* base-frame-counter)
(the-as int (-> self state-time))
)
3000
)
)
)
(hide-hud)
(kill-current-level-hint '() '(sidekick voicebox) 'exit)
(when
(and
(seen-text? *game-info* (game-text-id firecanyon-not-enough-cells))
(hud-hidden?)
(can-grab-display? self)
(not (-> *setting-control* current hint))
)
(let
((gp-0
(new
'stack
'font-context
*font-default-matrix*
32
160
0.0
(font-color default)
(font-flags shadow kerning)
)
)
)
(let ((v1-26 gp-0))
(set! (-> v1-26 width) (the float 448))
)
(let ((v1-27 gp-0))
(set! (-> v1-27 height) (the float 80))
)
(let ((v1-28 gp-0))
(set! (-> v1-28 scale) 0.8)
)
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
(print-game-text
(lookup-text!
*common-text*
(game-text-id firecanyon-collect-cells-text)
#f
)
gp-0
#f
128
22
)
)
)
(level-hint-spawn
(game-text-id firecanyon-not-enough-cells)
"asstvb09"
#f
*entity-pool*
0
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (assistant-firecanyon)
:virtual #t
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
)
(while #t
(let ((gp-0 #t))
(cond
((zero? (current-status (-> self tasks)))
(let* ((v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-9 (the-as number (logior #x3f800000 v1-8)))
)
(when (< (+ -1.0 (the-as float v1-9)) 0.5)
(let ((v1-14 (-> self skel root-channel 0)))
(set!
(-> v1-14 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
)
(let* ((f30-0 2.0)
(v1-16
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-17 (the-as number (logior #x3f800000 v1-16)))
)
(countdown
(gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-17)))) 3))
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-15 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(set! gp-0 #f)
)
)
(when
(or
gp-0
(let*
((v1-53 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-54 (the-as number (logior #x3f800000 v1-53)))
)
(< (+ -1.0 (the-as float v1-54)) 0.5)
)
)
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 frame-group)
(the-as art-joint-anim (-> self draw art-group data 9))
)
(set!
(-> a0-20 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 9))
data
0
length
)
-1
)
)
)
(set! (-> a0-20 param 1) 1.0)
(set! (-> a0-20 frame-num) 0.0)
(joint-control-channel-group!
a0-20
(the-as art-joint-anim (-> self draw art-group data 9))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set!
(-> a0-21 param 0)
(the float (+ (-> a0-21 frame-group data 0 length) -1))
)
(set! (-> a0-21 param 1) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-81 (-> self skel root-channel 0)))
(set!
(-> v1-81 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
)
(let* ((f30-1 2.0)
(v1-83 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-84 (the-as number (logior #x3f800000 v1-83)))
)
(countdown
(gp-2 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-84)))) 3))
(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)
(suspend)
(let ((a0-29 (-> self skel root-channel 0)))
(set!
(-> a0-29 param 0)
(the float (+ (-> a0-29 frame-group data 0 length) -1))
)
(set! (-> a0-29 param 1) 1.0)
(joint-control-channel-group-eval!
a0-29
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-31 (-> self skel root-channel 0)))
(set!
(-> a0-31 frame-group)
(the-as art-joint-anim (-> self draw art-group data 11))
)
(set!
(-> a0-31 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 11))
data
0
length
)
-1
)
)
)
(set! (-> a0-31 param 1) 1.0)
(set! (-> a0-31 frame-num) 0.0)
(joint-control-channel-group!
a0-31
(the-as art-joint-anim (-> self draw art-group data 11))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-32 (-> self skel root-channel 0)))
(set!
(-> a0-32 param 0)
(the float (+ (-> a0-32 frame-group data 0 length) -1))
)
(set! (-> a0-32 param 1) 1.0)
(joint-control-channel-group-eval!
a0-32
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let* ((v1-140 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-141 (the-as number (logior #x3f800000 v1-140)))
)
(when (< (+ -1.0 (the-as float v1-141)) 0.25)
(let ((v1-146 (-> self skel root-channel 0)))
(set!
(-> v1-146 frame-group)
(the-as art-joint-anim (-> self draw art-group data 12))
)
)
(let ((a0-39 (-> self skel root-channel 0)))
(set! (-> a0-39 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set!
(-> a0-39 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-39 param 1) 1.0)
(set! (-> a0-39 frame-num) 0.0)
(joint-control-channel-group!
a0-39
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-40 (-> self skel root-channel 0)))
(set!
(-> a0-40 param 0)
(the float (+ (-> a0-40 frame-group data 0 length) -1))
)
(set! (-> a0-40 param 1) 1.0)
(joint-control-channel-group-eval!
a0-40
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(else
(let* ((v1-176 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-177 (the-as number (logior #x3f800000 v1-176)))
)
(when (< (+ -1.0 (the-as float v1-177)) 0.8)
(let ((v1-182 (-> self skel root-channel 0)))
(set!
(-> v1-182 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
)
(let* ((f30-2 4.0)
(v1-184
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-185 (the-as number (logior #x3f800000 v1-184)))
)
(countdown
(gp-3 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-185)))) 8))
(let ((a0-49 (-> self skel root-channel 0)))
(set!
(-> a0-49 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-49 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-49 param 1) 1.0)
(set! (-> a0-49 frame-num) 0.0)
(joint-control-channel-group!
a0-49
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-50 (-> self skel root-channel 0)))
(set!
(-> a0-50 param 0)
(the float (+ (-> a0-50 frame-group data 0 length) -1))
)
(set! (-> a0-50 param 1) 1.0)
(joint-control-channel-group-eval!
a0-50
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(set! gp-0 #f)
)
)
(when
(or
gp-0
(let*
((v1-221 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-222 (the-as number (logior #x3f800000 v1-221)))
)
(< (+ -1.0 (the-as float v1-222)) 0.5)
)
)
(let ((a0-54 (-> self skel root-channel 0)))
(set!
(-> a0-54 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-54 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-54 param 1) 1.0)
(set! (-> a0-54 frame-num) 0.0)
(joint-control-channel-group!
a0-54
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-55 (-> self skel root-channel 0)))
(set!
(-> a0-55 param 0)
(the float (+ (-> a0-55 frame-group data 0 length) -1))
)
(set! (-> a0-55 param 1) 1.0)
(joint-control-channel-group-eval!
a0-55
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-249 (-> self skel root-channel 0)))
(set!
(-> v1-249 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let* ((f30-3 2.0)
(v1-251
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-252 (the-as number (logior #x3f800000 v1-251)))
)
(countdown
(gp-4 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-252)))) 3))
(let ((a0-62 (-> self skel root-channel 0)))
(set! (-> a0-62 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set!
(-> a0-62 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-62 param 1) 1.0)
(set! (-> a0-62 frame-num) 0.0)
(joint-control-channel-group!
a0-62
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-63 (-> self skel root-channel 0)))
(set!
(-> a0-63 param 0)
(the float (+ (-> a0-63 frame-group data 0 length) -1))
)
(set! (-> a0-63 param 1) 1.0)
(joint-control-channel-group-eval!
a0-63
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-65 (-> self skel root-channel 0)))
(set!
(-> a0-65 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-65 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-65 param 1) 1.0)
(set! (-> a0-65 frame-num) 0.0)
(joint-control-channel-group!
a0-65
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-66 (-> self skel root-channel 0)))
(set!
(-> a0-66 param 0)
(the float (+ (-> a0-66 frame-group data 0 length) -1))
)
(set! (-> a0-66 param 1) 1.0)
(joint-control-channel-group-eval!
a0-66
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let* ((v1-308 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-309 (the-as number (logior #x3f800000 v1-308)))
)
(when (< (+ -1.0 (the-as float v1-309)) 0.5)
(let ((v1-314 (-> self skel root-channel 0)))
(set!
(-> v1-314 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
)
(let* ((f30-4 2.0)
(v1-316
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-317 (the-as number (logior #x3f800000 v1-316)))
)
(countdown
(gp-5 (+ (the int (* f30-4 (+ -1.0 (the-as float v1-317)))) 3))
(let ((a0-75 (-> self skel root-channel 0)))
(set!
(-> a0-75 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-75 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-75 param 1) 1.0)
(set! (-> a0-75 frame-num) 0.0)
(joint-control-channel-group!
a0-75
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-76 (-> self skel root-channel 0)))
(set!
(-> a0-76 param 0)
(the float (+ (-> a0-76 frame-group data 0 length) -1))
)
(set! (-> a0-76 param 1) 1.0)
(joint-control-channel-group-eval!
a0-76
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
)
)
)
)
)
(none)
)
)
;; definition for method 39 of type assistant-firecanyon
(defmethod should-display? assistant-firecanyon ((obj assistant-firecanyon))
(first-any (-> obj tasks) #t)
(= (current-status (-> obj tasks)) 6)
)
;; definition for method 11 of type assistant-firecanyon
(defmethod
copy-defaults!
assistant-firecanyon
((obj assistant-firecanyon) (arg0 res-lump))
(dummy-40
obj
arg0
*assistant-firecanyon-sg*
3
29
(new 'static 'vector :w 4096.0)
5
)
(set! (-> obj tasks) (get-task-control (game-task firecanyon-assistant)))
(first-any (-> obj tasks) #t)
(dummy-42 obj)
(none)
)
+299
View File
@@ -5,3 +5,302 @@
;; name in dgo: bouncer
;; dgos: JUN, JUNGLE, L1
(define-extern *bouncer-sg* skeleton-group)
(declare-type springbox process-drawable)
(define-extern bouncer-wait (state springbox)) ;; unknown type
(define-extern bouncer-fire (state springbox)) ;; unknown type
(define-extern bouncer-smush (state springbox)) ;; unknown type
;; definition of type springbox
(deftype springbox (process-drawable)
((spring-height meters :offset-assert 176)
(smush float :offset-assert 180)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xb8
:flag-assert #x14005000b8
)
;; failed to figure out what this is:
(method-set! springbox 12 (method-of-type process run-logic?))
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "bounceytarp"
:bounds (new 'static 'vector :w 16384.0)
:version #x6
)
)
)
(set! (-> v1-2 jgeo) 0)
(set! (-> v1-2 janim) 2)
(set! (-> v1-2 mgeo 0) (the-as uint 1))
(set! (-> v1-2 lod-dist 0) 4095996000.0)
(set! *bouncer-sg* v1-2)
)
;; failed to figure out what this is:
(defstate bouncer-wait (springbox)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'bonk)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 3)
(set! (-> a1-3 message) 'jump)
(set!
(-> a1-3 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-3 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-3 param 2) (the-as uint #f))
(when (send-event-function arg0 a1-3)
(sound-play-by-name
(static-sound-name "trampoline")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go bouncer-fire)
)
)
)
((= v1-0 'touch)
(if
(not
(or
(= (-> self next-state name) 'bouncer-smush)
(= (-> self next-state name) 'bouncer-fire)
)
)
(go bouncer-smush)
)
)
((= v1-0 'attack)
(when
(and
(= (-> arg3 param 1) 'flop)
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-10 from) self)
(set! (-> a1-10 num-params) 3)
(set! (-> a1-10 message) 'jump)
(set!
(-> a1-10 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-10 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-10 param 2) (the-as uint #f))
(send-event-function arg0 a1-10)
)
)
(go bouncer-fire)
#f
)
)
)
)
)
)
:code
(behavior ()
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(transform-post)
(while #t
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
(none)
)
)
;; failed to figure out what this is:
(defstate bouncer-smush (springbox)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('touch)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
#f
)
(else
((-> bouncer-wait event) arg0 arg1 arg2 arg3)
)
)
)
:code
(behavior ()
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(set! (-> self smush) 0.0)
(while #t
(cond
((>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 param 0) 0.0)
(set! (-> a0-1 param 1) 0.1)
(joint-control-channel-group-eval!
a0-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(else
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 param 0)
(lerp-scale
(ja-aframe 6.0 0)
(ja-aframe 2.0 0)
(vector-vector-xz-distance (target-pos 0) (-> self root trans))
0.0
4096.0
)
)
(set! (-> gp-0 param 1) 0.2)
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(suspend)
(if (ja-min? 0)
(go bouncer-wait)
)
)
(none)
)
:post
(the-as (function none :behavior springbox) transform-post)
)
;; failed to figure out what this is:
(defstate bouncer-fire (springbox)
:code
(behavior ()
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 30)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) (ja-aframe 6.0 0))
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 param 0)
(the float (+ (-> a0-3 frame-group data 0 length) -1))
)
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go bouncer-wait)
(none)
)
:post
(the-as (function none :behavior springbox) transform-post)
)
;; definition for method 11 of type springbox
(defmethod copy-defaults! springbox ((obj springbox) (arg0 res-lump))
(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 128))
(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) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 3072.0 0.0 6963.2)
)
(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) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *bouncer-sg* '())
(nav-mesh-connect obj (-> obj root) (the-as nav-control #f))
(set!
(-> obj spring-height)
(res-lump-float arg0 'spring-height :default 45056.0)
)
(go bouncer-wait)
(none)
)
+736
View File
@@ -5,3 +5,739 @@
;; name in dgo: hopper
;; dgos: JUN, JUNGLE, L1
(define-extern *hopper-sg* skeleton-group)
;; definition of type hopper
(deftype hopper (nav-enemy)
((jump-length float :offset-assert 400)
(shadow-min-y float :offset-assert 404)
)
:heap-base #x130
:method-count-assert 76
:size-assert #x198
:flag-assert #x4c01300198
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "hopper"
:bounds (new 'static 'vector :w 12288.0)
:max-lod 2
:longest-edge (meters 1.0)
:version #x6
:shadow 4
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 5)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *hopper-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; definition for method 39 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-39 hopper ((obj hopper))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(set!
(-> v1-1 settings bot-plane w)
(- (- (-> obj shadow-min-y) (-> obj collide-info trans y)))
)
)
0
((the-as (function nav-enemy none) (find-parent-method hopper 39)) obj)
0
(none)
)
;; definition for function hopper-find-ground
;; INFO: Return type mismatch int vs object.
;; Used lq/sq
(defbehavior hopper-find-ground hopper ((arg0 vector))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(let ((t1-0 (new 'stack-no-clear 'bone))
(f30-0 61440.0)
)
(set! (-> s5-0 quad) (-> arg0 quad))
(set! (-> s5-0 y) (+ 20480.0 (-> s5-0 y)))
(let
((f0-2
(dummy-12
*collide-cache*
s5-0
f30-0
(the-as uint 1)
self
t1-0
(the-as uint 1)
)
)
)
(if (< f0-2 0.0)
(return (the-as object #f))
)
(set! (-> s5-0 y) (- (-> s5-0 y) (* f0-2 f30-0)))
)
)
(set! (-> arg0 quad) (-> s5-0 quad))
)
0
)
;; definition for function hopper-jump-to
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior hopper-jump-to hopper ((arg0 vector))
(set! (-> self jump-dest quad) (-> arg0 quad))
(hopper-find-ground (-> self jump-dest))
(set!
(-> self shadow-min-y)
(+
(fmin (-> self collide-info trans y) (-> self jump-dest y))
(-> self nav-info shadow-min-y)
)
)
(nav-enemy-initialize-custom-jump
(-> self jump-dest)
#f
(-> self nav-info jump-height-min)
(-> self nav-info jump-height-factor)
-409600.0
)
(set! (-> self nav-enemy-flags) (logand -513 (-> self nav-enemy-flags)))
(set! (-> self nav-enemy-flags) (logand -1025 (-> self nav-enemy-flags)))
(logior! (-> self nav-enemy-flags) 16)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(when (not (nav-enemy-facing-point? (-> self jump-dest) 5461.3335))
(ja-channel-push! 1 60)
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(nav-enemy-execute-jump)
(set!
(-> self shadow-min-y)
(+ (-> self collide-info trans y) (-> self nav-info shadow-min-y))
)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(nav-enemy-jump-land-anim)
0
(none)
)
;; definition for function hopper-do-jump
;; INFO: Return type mismatch int vs none.
(defbehavior hopper-do-jump hopper ()
(dummy-11 (-> self nav) (-> self nav target-pos))
(if (< (-> self jump-length) (vector-length (-> self nav travel)))
(vector-normalize! (-> self nav travel) (-> self jump-length))
)
(vector+!
(-> self jump-dest)
(-> self collide-info trans)
(-> self nav travel)
)
(hopper-jump-to (-> self jump-dest))
0
(none)
)
;; failed to figure out what this is:
(defstate nav-enemy-idle (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 22)
(while #t
(dotimes (gp-0 3)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 1.0)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) 1.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-patrol (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-jump-event-handler
)
:trans
(behavior ()
(if (zero? (logand (-> self nav-enemy-flags) 8))
((-> (method-of-type nav-enemy nav-enemy-patrol) trans))
)
(none)
)
:code
(behavior ()
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 16384.0)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(while #t
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 7)
)
(ja-channel-push! 1 20)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 9)
)
(ja-channel-push! 1 30)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-15 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
(else
(ja-channel-push! 1 22)
)
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(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 5))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
150
)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set! (-> a0-21 param 0) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(when
(or
(logtest? (nav-control-flags bit19) (-> self nav flags))
(< 2.0 (-> self nav block-count))
)
(set! (-> self nav block-count) 0.0)
(logior! (-> self nav flags) (nav-control-flags bit10))
(nav-enemy-get-new-patrol-point)
(set! (-> self nav target-pos quad) (-> self nav destination-pos quad))
)
(hopper-do-jump)
)
(none)
)
:post
(the-as (function none :behavior hopper) nav-enemy-jump-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-notice (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-jump-event-handler
)
:trans
(behavior ()
(if (zero? (logand (-> self nav-enemy-flags) 8))
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
)
(none)
)
:code
(behavior ()
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 32768.0)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(while #t
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 7)
)
(ja-channel-push! 1 20)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 9)
)
(ja-channel-push! 1 30)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-15 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
(else
(ja-channel-push! 1 22)
)
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(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 5))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set! (-> a0-21 param 0) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(set! (-> self nav target-pos quad) (-> (target-pos 0) quad))
(hopper-do-jump)
)
(none)
)
:post
(the-as (function none :behavior hopper) nav-enemy-jump-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-stop-chase (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-stare)
(none)
)
)
;; definition for symbol *hopper-nav-enemy-info*, type nav-enemy-info
(define
*hopper-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 5
:walk-anim 5
:turn-anim 9
:notice-anim 5
:run-anim 5
:jump-anim 7
:jump-land-anim 8
:victory-anim 6
:taunt-anim 6
:die-anim 11
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 10.0)
:run-rotate-speed (degrees 7999.9995)
:run-acceleration (meters 1.0)
:run-turn-time #x1e
:walk-travel-speed (meters 6.0)
:walk-rotate-speed (degrees 7999.9995)
:walk-acceleration (meters 1.0)
:walk-turn-time #x1e
:attack-shove-back (meters 3.0)
:attack-shove-up (meters 2.0)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 1.0)
:nav-nearest-y-threshold (meters 10.0)
:notice-distance (meters 30.0)
:stop-chase-distance (meters 40.0)
:frustration-distance (meters 8.0)
:frustration-time #x4b0
:die-anim-hold-frame 10000000000.0
:jump-anim-start-frame 3.0
:jump-land-anim-end-frame 10000000000.0
:jump-height-min (meters 3.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 1.0)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #t
:draw-shadow #t
:move-to-ground #t
:hover-if-no-ground #f
:use-momentum #f
:use-flee #t
:use-proximity-notice #f
:use-jump-blocked #f
:use-jump-patrol #f
:gnd-collide-with #x1
:debug-draw-neck #f
:debug-draw-jump #t
)
)
;; definition for method 47 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 hopper ((obj hopper))
(let
((s5-0
(new
'process
'collide-shape-moving
obj
(collide-list-enum usually-hit-by-player)
)
)
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 10240.0)
(dummy-46 s5-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(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) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 4096.0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 1)
(set-vector! (-> s3-1 local-sphere) 0.0 6963.2 0.0 4096.0)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) 6144.0)
(dummy-50 s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)
0
(none)
)
;; definition for method 48 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 hopper ((obj hopper))
(dummy-14 obj *hopper-sg* '())
(TODO-RENAME-45 obj *hopper-nav-enemy-info*)
(set!
(-> obj shadow-min-y)
(+ (-> obj collide-info trans y) (-> obj nav-info shadow-min-y))
)
0
(none)
)
+213
View File
@@ -5,3 +5,216 @@
;; name in dgo: jungle-elevator
;; dgos: JUN, JUNGLE, L1
(define-extern *plat-button-sg* skeleton-group)
;; definition of type jungle-elevator
(deftype jungle-elevator (plat-button)
((bottom-height float :offset-assert 240)
(teleport-if-below-y float :offset-assert 244)
(teleport-if-above-y float :offset-assert 248)
)
:heap-base #x90
:method-count-assert 33
:size-assert #xfc
:flag-assert #x21009000fc
)
;; definition for method 26 of type jungle-elevator
(defmethod can-activate? jungle-elevator ((obj jungle-elevator))
(and
((method-of-type plat-button can-activate?) obj)
(task-complete? *game-info* (game-task jungle-tower))
)
)
;; failed to figure out what this is:
(defstate plat-button-move-downward (jungle-elevator)
:virtual #t
:enter
(behavior ()
(let
((t9-0 (-> (method-of-type plat-button plat-button-move-downward) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self draw light-index) (the-as uint 255))
(set! (-> self bottom-height) (-> jungle bottom-height))
(set! (-> jungle bottom-height) (-> jungleb bottom-height))
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) self)
(set! (-> a1-0 num-params) 1)
(set! (-> a1-0 message) 'reset-pickup)
(set! (-> a1-0 param 0) (the-as uint 'eco))
(send-event-function *target* a1-0)
)
(none)
)
:exit
(behavior ()
(set! (-> jungle bottom-height) (-> self bottom-height))
(let
((t9-0 (-> (method-of-type plat-button plat-button-move-downward) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:trans
(behavior ()
(let ((s5-0 (new 'stack-no-clear 'vector))
(gp-0 (new 'stack-no-clear 'vector))
)
(set! (-> s5-0 quad) (-> self root-override trans quad))
(let
((t9-1
(->
(the-as (state plat-button) (find-parent-method jungle-elevator 23))
trans
)
)
)
(if t9-1
(t9-1)
)
)
(vector-! gp-0 (-> self root-override trans) s5-0)
)
(when (< (-> self path-pos) 0.9)
(TODO-RENAME-28 (-> *target* control))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 0)
(set! (-> a1-2 message) 'reset-height)
(send-event-function *target* a1-2)
)
)
(if
(and
(>= (-> self path-pos) 0.2)
(<
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
)
(load-commands-set! *level* (load-command-get-index *level* 'jungle 0))
)
(none)
)
)
;; failed to figure out what this is:
(defstate plat-button-move-upward (jungle-elevator)
:virtual #t
:enter
(behavior ()
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self draw light-index) (the-as uint 255))
(set! (-> self bottom-height) (-> jungle bottom-height))
(set! (-> jungle bottom-height) (-> jungleb bottom-height))
(set! (-> self grab-player?) (process-grab? *target*))
(none)
)
:exit
(behavior ()
(set! (-> jungle bottom-height) (-> self bottom-height))
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:trans
(behavior ()
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) trans)))
(if t9-0
(t9-0)
)
)
(if
(and
(< (-> self path-pos) 0.8)
(<
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
)
(load-commands-set! *level* (load-command-get-index *level* 'jungle 1))
)
(none)
)
)
;; failed to figure out what this is:
(defstate plat-button-at-end (jungle-elevator)
:virtual #t
:code
(behavior ()
(cond
((!= (-> self path-pos) 0.0)
(set! (-> self draw light-index) (the-as uint 1))
(let ((a1-1 (res-lump-struct (-> self entity) 'continue-name structure)))
(when a1-1
(let ((v1-4 (set-continue! *game-info* (the-as basic a1-1))))
(load-commands-set! *level* (-> v1-4 load-commands))
)
)
)
)
(else
(set! (-> self draw light-index) (the-as uint 255))
(load-commands-set! *level* '())
)
)
(let ((t9-4 (-> (method-of-type plat-button plat-button-at-end) code)))
(if t9-4
((the-as (function none :behavior plat-button) t9-4))
)
)
(none)
)
)
;; definition for method 30 of type jungle-elevator
(defmethod should-teleport? jungle-elevator ((obj jungle-elevator))
(let ((f0-0 (-> (camera-pos) y)))
(case (-> obj path-pos)
((0.0)
(when (< f0-0 (-> obj teleport-if-below-y))
(set! (-> obj draw light-index) (the-as uint 1))
(return #t)
)
)
((1.0)
(when (< (-> obj teleport-if-above-y) f0-0)
(set! (-> obj draw light-index) (the-as uint 255))
(return #t)
)
)
)
)
#f
)
;; definition for method 29 of type jungle-elevator
(defmethod can-target-move? jungle-elevator ((obj jungle-elevator))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
(set! (-> obj teleport-if-above-y) (-> s5-0 y))
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(set! (-> obj teleport-if-below-y) (-> s5-0 y))
)
(set! (-> obj draw light-index) (the-as uint 255))
(set! (-> obj bidirectional?) #f)
(let ((v0-2 #t))
(set! (-> obj should-grab-player?) v0-2)
v0-2
)
)
+644
View File
@@ -5,3 +5,647 @@
;; name in dgo: junglefish
;; dgos: JUN, JUNGLE, L1
(define-extern *junglefish-sg* skeleton-group)
;; definition of type junglefish
(deftype junglefish (nav-enemy)
()
:heap-base #x120
:method-count-assert 76
:size-assert #x190
:flag-assert #x4c01200190
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "junglefish"
:bounds
(new 'static 'vector :y 4096.0 :w 6144.0)
:max-lod 2
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 4)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *junglefish-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; definition for method 39 of type junglefish
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-39 junglefish ((obj junglefish))
((method-of-object (-> obj water) dummy-10))
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
0
(none)
)
;; failed to figure out what this is:
(defstate nav-enemy-patrol (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:exit
(behavior ()
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
(none)
)
:code
(behavior ()
(ja-channel-push! 1 60)
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(while #t
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) f30-0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 param 0)
(the float (+ (-> a0-3 frame-group data 0 length) -1))
)
(set! (-> a0-3 param 1) f30-0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(when (nav-enemy-rnd-go-idle? 0.2)
(let ((a0-6 (-> self skel root-channel 0)))
(set! (-> a0-6 param 0) 1.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 180)
(set! (-> self target-speed) 0.0)
(let ((a0-8 (-> self skel root-channel 0)))
(set!
(-> a0-8 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
)
(set!
(-> a0-8 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-8 param 1) f30-0)
(set! (-> a0-8 frame-num) 0.0)
(joint-control-channel-group!
a0-8
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(let ((a0-9 (-> self skel root-channel 0)))
(set!
(-> a0-9 param 0)
(the float (+ (-> a0-9 frame-group data 0 length) -1))
)
(set! (-> a0-9 param 1) f30-0)
(joint-control-channel-group-eval!
a0-9
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(until (not (nav-enemy-rnd-go-idle? 0.2))
(let ((a0-11 (-> self skel root-channel 0)))
(set!
(-> a0-11 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
)
(set!
(-> a0-11 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-11 param 1) f30-0)
(set! (-> a0-11 frame-num) 0.0)
(joint-control-channel-group!
a0-11
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 param 0)
(the float (+ (-> a0-12 frame-group data 0 length) -1))
)
(set! (-> a0-12 param 1) f30-0)
(joint-control-channel-group-eval!
a0-12
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
(let ((a0-15 (-> self skel root-channel 0)))
(set! (-> a0-15 param 0) 1.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 180)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
)
(set!
(-> a0-17 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-17 param 1) f30-0)
(set! (-> a0-17 frame-num) 0.0)
(joint-control-channel-group!
a0-17
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(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) f30-0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-notice (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:trans
(behavior ()
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
(if
(and
*target*
(>=
8192.0
(vector-vector-distance
(-> self collide-info trans)
(-> *target* control trans)
)
)
)
(go-virtual nav-enemy-attack)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stop-chase (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-attack (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 30)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-chase)
(none)
)
:post
(the-as (function none :behavior junglefish) nav-enemy-chase-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-victory (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 22)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 2.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 2.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 2.0)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) 2.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; definition for symbol *junglefish-nav-enemy-info*, type nav-enemy-info
(define
*junglefish-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 4
:walk-anim 4
:turn-anim -1
:notice-anim 4
:run-anim 4
:jump-anim -1
:jump-land-anim -1
:victory-anim 4
:taunt-anim 4
:die-anim 6
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 5.5)
:run-rotate-speed (degrees 720.0)
:run-acceleration (meters 6.0)
:run-turn-time #x2d
:walk-travel-speed (meters 4.0)
:walk-rotate-speed (degrees 720.0)
:walk-acceleration (meters 6.0)
:walk-turn-time #x2d
:attack-shove-back (meters 1.0)
:attack-shove-up (meters 0.5)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 1.0)
:nav-nearest-y-threshold (meters 10.0)
:notice-distance (meters 25.0)
:stop-chase-distance (meters 35.0)
:frustration-distance (meters 8.0)
:frustration-time #x4b0
:die-anim-hold-frame 10000000000.0
:jump-land-anim-end-frame 10000000000.0
:jump-height-min (meters 1.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 1.0)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #f
:draw-shadow #f
:move-to-ground #f
:hover-if-no-ground #f
:use-momentum #t
:use-flee #f
:use-proximity-notice #f
:use-jump-blocked #f
:use-jump-patrol #f
:gnd-collide-with #x1
:debug-draw-neck #f
:debug-draw-jump #f
)
)
;; definition for method 11 of type junglefish
(defmethod copy-defaults! junglefish ((obj junglefish) (arg0 res-lump))
(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-sphere s4-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(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) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 3276.8 0.0 2457.6)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(set! (-> obj collide-info) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *junglefish-sg* '())
(TODO-RENAME-45 obj *junglefish-nav-enemy-info*)
(set! (-> obj water) (new 'process 'water-control obj 7 0.0 8192.0 2048.0))
(set! (-> obj water flags) (the-as uint 2))
(set! (-> obj water height) (res-lump-float (-> obj entity) 'water-height))
(set! (-> obj water ripple-size) 5734.4)
(set! (-> obj collide-info trans y) (+ -4096.0 (-> obj water height)))
(go (method-of-object obj nav-enemy-idle))
(none)
)
+2
View File
@@ -5,3 +5,5 @@
;; name in dgo: bonelurker
;; dgos: L1, MIS
;; TODO - for sidekick-human
(define-extern *bonelurker-sg* skeleton-group)
File diff suppressed because it is too large Load Diff
@@ -5,3 +5,351 @@
;; name in dgo: flutflut-bluehut
;; dgos: L1, VI2
(define-extern *flutflut-bluehut-sg* skeleton-group)
;; definition of type flutflut-bluehut
(deftype flutflut-bluehut (process-taskable)
()
:heap-base #x110
:method-count-assert 53
:size-assert #x17c
:flag-assert #x350110017c
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "flutflut-bluehut"
:bounds (new 'static 'vector :w 13312.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *flutflut-bluehut-sg* v1-1)
)
;; definition for method 32 of type flutflut-bluehut
;; INFO: Return type mismatch art-element vs basic.
(defmethod play-anim! flutflut-bluehut ((obj flutflut-bluehut) (arg0 symbol))
(current-status (-> obj tasks))
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string (the-as task-status (current-status (-> obj tasks))))
)
)
(the-as basic (get-art-elem obj))
)
;; definition for method 31 of type flutflut-bluehut
(defmethod get-art-elem flutflut-bluehut ((obj flutflut-bluehut))
(-> obj draw art-group data 2)
)
;; definition for method 39 of type flutflut-bluehut
(defmethod should-display? flutflut-bluehut ((obj flutflut-bluehut))
(and
(closed?
(-> obj tasks)
(game-task village2-levitator)
(task-status need-introduction)
)
(task-closed? (game-task beach-flutflut) (task-status need-resolution))
)
)
;; failed to figure out what this is:
(defstate idle (flutflut-bluehut)
:virtual #t
:trans
(behavior ()
(set! (-> self will-talk) #f)
((-> (method-of-type process-taskable idle) trans))
(none)
)
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
)
(while #t
(let ((v1-6 (-> self skel root-channel 0)))
(set!
(-> v1-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
)
(let* ((f30-0 2.0)
(v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-9 (the-as number (logior #x3f800000 v1-8)))
)
(countdown (gp-0 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-9)))) 1))
(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 ((s5-0 (-> *display* base-frame-counter)))
(while (< (+ (-> *display* base-frame-counter) -150) s5-0)
(suspend)
)
)
(let ((a0-15 (-> self skel root-channel 0)))
(set! (-> a0-15 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set! (-> a0-15 param 0) 0.0)
(set! (-> a0-15 param 1) 1.0)
(set!
(-> a0-15 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-15
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set! (-> a0-16 param 0) 0.0)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((s5-1 (-> *display* base-frame-counter)))
(while (< (+ (-> *display* base-frame-counter) -150) s5-1)
(suspend)
)
)
)
)
(let ((a0-18 (-> self skel root-channel 0)))
(set!
(-> a0-18 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set!
(-> a0-18 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(set! (-> a0-18 param 1) 1.0)
(set! (-> a0-18 frame-num) 0.0)
(joint-control-channel-group!
a0-18
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-19 (-> self skel root-channel 0)))
(set!
(-> a0-19 param 0)
(the float (+ (-> a0-19 frame-group data 0 length) -1))
)
(set! (-> a0-19 param 1) 1.0)
(joint-control-channel-group-eval!
a0-19
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-100 (-> self skel root-channel 0)))
(set!
(-> v1-100 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
)
(let* ((f30-1 2.0)
(v1-102 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-103 (the-as number (logior #x3f800000 v1-102)))
)
(countdown (gp-1 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-103)))) 6))
(let ((a0-26 (-> self skel root-channel 0)))
(set! (-> a0-26 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-26 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-26 param 1) 1.0)
(set! (-> a0-26 frame-num) 0.0)
(joint-control-channel-group!
a0-26
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-27 (-> self skel root-channel 0)))
(set!
(-> a0-27 param 0)
(the float (+ (-> a0-27 frame-group data 0 length) -1))
)
(set! (-> a0-27 param 1) 1.0)
(joint-control-channel-group-eval!
a0-27
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-29 (-> self skel root-channel 0)))
(set!
(-> a0-29 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set! (-> a0-29 param 0) 0.0)
(set! (-> a0-29 param 1) 1.0)
(set!
(-> a0-29 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-29
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-30 (-> self skel root-channel 0)))
(set! (-> a0-30 param 0) 0.0)
(set! (-> a0-30 param 1) 1.0)
(joint-control-channel-group-eval!
a0-30
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; definition for method 11 of type flutflut-bluehut
(defmethod
copy-defaults!
flutflut-bluehut
((obj flutflut-bluehut) (arg0 res-lump))
(dummy-40
obj
arg0
*flutflut-bluehut-sg*
3
0
(new 'static 'vector :w 4096.0)
27
)
(set! (-> obj tasks) (get-task-control (game-task village2-levitator)))
(set! (-> obj draw light-index) (the-as uint 1))
(dummy-42 obj)
(none)
)
+601
View File
@@ -5,3 +5,604 @@
;; name in dgo: sage-bluehut
;; dgos: L1, VI2
(define-extern *sage-bluehut-sg* skeleton-group)
;; definition of type assistant-bluehut
(deftype assistant-bluehut (process-taskable)
((sound-id sound-id :offset-assert 380)
(jaws uint64 :offset-assert 384)
(sage entity-actor :offset-assert 392)
(im-talking symbol :offset-assert 396)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x190
:flag-assert #x3501200190
)
;; definition of type sage-bluehut
(deftype sage-bluehut (process-taskable)
((reminder-played symbol :offset-assert 380)
(assistant entity-actor :offset-assert 384)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x184
:flag-assert #x3501200184
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "sage-bluehut"
: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! *sage-bluehut-sg* v1-2)
)
;; definition for method 32 of type sage-bluehut
(defmethod play-anim! sage-bluehut ((obj sage-bluehut) (arg0 symbol))
(with-pp
(set! (-> obj talk-message) (the-as uint 291))
(case (current-status (-> obj tasks))
((2 3)
(if (not arg0)
(set! (-> obj will-talk) #t)
)
(case (current-task (-> obj tasks))
((55)
(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))
(let ((s5-2 (-> obj assistant extra process)))
(when (and s5-2 (should-display? (the-as assistant-bluehut s5-2)))
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-6 from) pp)
(set! (-> a1-6 num-params) 1)
(set! (-> a1-6 message) 'clone)
(set! (-> a1-6 param 0) (the-as uint (process->handle obj)))
(send-event-function s5-2 a1-6)
)
)
)
(set! (-> obj draw bounds w) 40960.0)
)
(new 'static 'spool-anim
:name
"sage-bluehut-introduction-crop-dusting"
:index 8
:parts 12
:command-list
'(
((the binteger 678)
joint
"cameraB"
)
((the binteger 1166)
joint
"camera"
)
((the binteger 1258) joint "cameraB")
)
)
)
(else
(when arg0
(close-status! (-> obj tasks) (task-status need-introduction))
(close-specific-task!
(game-task swamp-tether-1)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-2)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-3)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-4)
(task-status need-introduction)
)
)
(new 'static 'spool-anim
:name "sage-bluehut-introduction-prec-arm"
:index 6
:parts 8
:command-list
'(
((the binteger 141)
joint
"cameraB"
)
((the binteger 214)
joint
"camera"
)
((the binteger 308)
joint
"cameraB"
)
((the binteger 686)
joint
"camera"
)
((the binteger 786)
joint
"cameraB"
)
((the binteger 843) joint "camera")
)
)
)
)
)
((5)
(set! (-> obj skippable) #t)
(if arg0
(set! (-> obj reminder-played) #t)
)
(cond
((zero? (get-reminder (-> obj tasks) 0))
(new 'static 'spool-anim
:name "sage-bluehut-reminder-1-crop-dusting"
:index 9
:parts 3
:command-list '()
)
)
(else
(if arg0
(set! (-> obj draw bounds w) 40960.0)
)
(new 'static 'spool-anim
:name "sage-bluehut-reminder-1-prec-arm"
:index 7
:parts 4
:command-list
'(
((the binteger 90)
joint
"cameraB"
)
((the binteger 259)
joint
"camera"
)
((the binteger 352) joint "cameraB")
)
)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string
(the-as task-status (current-status (-> obj tasks)))
)
)
)
(get-art-elem obj)
)
)
)
)
;; definition for method 45 of type sage-bluehut
;; INFO: Return type mismatch symbol vs none.
(defmethod dummy-45 sage-bluehut ((obj sage-bluehut))
(cond
((= (current-status (-> obj tasks)) 1)
)
((zero? (current-status (-> obj tasks)))
)
((and
(closed?
(-> obj tasks)
(game-task rolling-plants)
(task-status need-reminder)
)
(= (get-reminder (-> obj tasks) 0) 0)
)
#t
)
((and
(closed? (-> obj tasks) (game-task swamp-arm) (task-status need-reminder))
(= (get-reminder (-> obj tasks) 0) 1)
)
#t
)
((and
(-> obj reminder-played)
(< 81920.0 (vector-vector-distance (-> obj root trans) (camera-pos)))
)
#t
)
(else
)
)
(none)
)
;; definition for method 31 of type sage-bluehut
(defmethod get-art-elem sage-bluehut ((obj sage-bluehut))
(cond
((and
(= (current-task (-> obj tasks)) 55)
(or
(= (current-status (-> obj tasks)) 2)
(= (current-status (-> obj tasks)) 3)
)
)
(save-reminder (-> obj tasks) 0 0)
)
((and
(= (current-task (-> obj tasks)) 104)
(or
(= (current-status (-> obj tasks)) 2)
(= (current-status (-> obj tasks)) 3)
)
)
(save-reminder (-> obj tasks) 1 0)
)
((dummy-45 obj)
(set! (-> obj reminder-played) #f)
(cond
((closed?
(-> obj tasks)
(game-task rolling-plants)
(task-status need-reminder)
)
(save-reminder (-> obj tasks) 1 0)
)
((or
(closed?
(-> obj tasks)
(game-task swamp-arm)
(task-status need-reminder)
)
(not
(closed?
(-> obj tasks)
(game-task swamp-arm)
(task-status need-introduction)
)
)
)
(save-reminder (-> obj tasks) 0 0)
)
((zero? (get-reminder (-> obj tasks) 0))
(save-reminder (-> obj tasks) 1 0)
)
(else
(save-reminder (-> obj tasks) 0 0)
)
)
)
)
(if (zero? (get-reminder (-> obj tasks) 0))
(-> obj draw art-group data 4)
(-> obj draw art-group data 5)
)
)
;; failed to figure out what this is:
(defstate play-anim (sage-bluehut)
: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 assistant extra process) a1-0)
)
(set! (-> self draw bounds w) 10240.0)
((-> (method-of-type process-taskable play-anim) exit))
(none)
)
)
;; definition for method 39 of type sage-bluehut
(defmethod should-display? sage-bluehut ((obj sage-bluehut))
(and
(task-closed? (game-task village2-levitator) (task-status need-introduction))
(not (sages-kidnapped?))
)
)
;; definition for method 44 of type sage-bluehut
;; INFO: Return type mismatch basic vs symbol.
(defmethod play-reminder sage-bluehut ((obj sage-bluehut))
(the-as
symbol
(and
(-> obj will-talk)
*target*
(< -6365184.0 (-> (target-pos 0) z))
(< (-> (target-pos 0) x) 1612800.0)
)
)
)
;; definition for method 47 of type sage-bluehut
(defmethod target-above-threshold? sage-bluehut ((obj sage-bluehut))
(local-vars (v0-1 symbol))
(if (not (play-reminder obj))
(return #f)
)
(let ((gp-1 (-> obj assistant extra process)))
(if (not gp-1)
(return #t)
)
(target-above-threshold? (the-as assistant-bluehut gp-1))
(return (not (-> (the-as assistant-bluehut gp-1) im-talking)))
)
v0-1
)
;; definition for method 43 of type sage-bluehut
(defmethod TODO-RENAME-43 sage-bluehut ((obj sage-bluehut))
(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.8 f0-2)
(dummy-11 (-> obj ambient) "SAGELP20" #f (-> obj root trans))
)
((< 0.6 f0-2)
(dummy-11 (-> obj ambient) "SAGELP21" #f (-> obj root trans))
)
((< 0.4 f0-2)
(dummy-11 (-> obj ambient) "SAGELP22" #f (-> obj root trans))
)
((< 0.2 f0-2)
(dummy-11 (-> obj ambient) "SAGELP23" #f (-> obj root trans))
)
((nonzero? (get-task-status (game-task citadel-sage-blue)))
(dummy-11 (-> obj ambient) "SAGELP24" #f (-> obj root trans))
)
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate idle (sage-bluehut)
:virtual #t
:code
(behavior ()
(while #t
(let ((gp-0 (get-art-elem self)))
(cond
((= gp-0 (-> self draw art-group data 4))
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
gp-0
)
(ja-channel-push! 1 60)
)
(set!
(-> self skel root-channel 0 frame-group)
(the-as art-joint-anim gp-0)
)
(let* ((f30-0 3.0)
(v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-16 (the-as number (logior #x3f800000 v1-15)))
)
(countdown
(gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-16)))) 5))
(TODO-RENAME-43 self)
(let ((a0-5 (-> self skel root-channel 0)))
(set! (-> a0-5 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-5 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-5 param 1) 1.0)
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(ja-channel-push! 1 60)
(let ((a0-10 (-> self skel root-channel 0)))
(set!
(-> a0-10 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set!
(-> a0-10 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(set! (-> a0-10 param 1) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group!
a0-10
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 param 0)
(the float (+ (-> a0-12 frame-group data 0 length) -1))
)
(set! (-> a0-12 param 1) 1.0)
(joint-control-channel-group-eval!
a0-12
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(TODO-RENAME-43 self)
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
gp-0
)
(ja-channel-push! 1 60)
)
(set!
(-> self skel root-channel 0 frame-group)
(the-as art-joint-anim gp-0)
)
(let ((a0-16 (-> self skel root-channel 0)))
(set! (-> a0-16 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-16 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-16 param 1) 1.0)
(set! (-> a0-16 frame-num) 0.0)
(joint-control-channel-group!
a0-16
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(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!
)
)
)
)
)
)
)
(none)
)
)
;; definition for method 11 of type sage-bluehut
(defmethod copy-defaults! sage-bluehut ((obj sage-bluehut) (arg0 res-lump))
(dummy-40 obj arg0 *sage-bluehut-sg* 3 40 (new 'static 'vector :w 4505.6) 5)
(set! (-> obj tasks) (get-task-control (game-task rolling-plants)))
(set! (-> obj reminder-played) #f)
(set! (-> obj assistant) (entity-actor-lookup arg0 'alt-actor 0))
(set! (-> obj draw light-index) (the-as uint 1))
(set! (-> obj sound-flava) (the-as uint 5))
(dummy-42 obj)
(none)
)
+6 -6
View File
@@ -5,6 +5,8 @@
;; name in dgo: sunken-elevator
;; dgos: L1, VI2
(define-extern *sunken-elevator-sg* skeleton-group)
;; definition of type sunken-elevator
(deftype sunken-elevator (plat-button)
((play-at-top-going-up-camera? symbol :offset-assert 240)
@@ -17,9 +19,6 @@
:flag-assert #x21009000fc
)
(define-extern *sunken-elevator-sg* skeleton-group)
;; failed to figure out what this is:
(let
((v1-1
@@ -236,7 +235,8 @@
)
;; definition for method 29 of type sunken-elevator
(defmethod TODO-RENAME-29 sunken-elevator ((obj sunken-elevator))
;; INFO: Return type mismatch float vs symbol.
(defmethod can-target-move? sunken-elevator ((obj sunken-elevator))
(set! (-> obj play-at-top-going-up-camera?) #f)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
@@ -244,7 +244,7 @@
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(let ((f0-1 (-> s5-0 y)))
(set! (-> obj teleport-if-below-y) f0-1)
f0-1
(the-as symbol f0-1)
)
)
)
@@ -253,7 +253,7 @@
(defmethod TODO-RENAME-27 sunken-elevator ((obj sunken-elevator))
(ja-channel-set! 1)
(cond
(((method-of-object obj dummy-26))
((can-activate? obj)
(let ((s5-0 (-> obj skel root-channel 0)))
(joint-control-channel-group-eval!
s5-0
@@ -144,7 +144,7 @@
(initialize-collision (_type_ int) none 41)
(dummy-42 (_type_) none 42)
(TODO-RENAME-43 (_type_) none 43)
(dummy-44 (_type_) none 44)
(play-reminder (_type_) symbol 44)
(dummy-45 (_type_) none 45)
(dummy-46 (_type_) none 46)
(target-above-threshold? (_type_) symbol 47)
@@ -0,0 +1,185 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type blocking-plane
(deftype blocking-plane (process-drawable)
()
:heap-base #x40
:method-count-assert 20
:size-assert #xb0
:flag-assert #x14004000b0
)
;; definition for method 3 of type blocking-plane
(defmethod inspect blocking-plane ((obj blocking-plane))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "ef-plane"
:bounds (new 'static 'vector :w 122880.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *ef-plane-sg* v1-1)
)
;; failed to figure out what this is:
(defstate blocking-plane-idle (blocking-plane)
:code
(behavior ()
(transform-post)
(while #t
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
(none)
)
)
;; definition for function blocking-plane-init-by-other
;; Used lq/sq
(defbehavior
blocking-plane-init-by-other blocking-plane
((arg0 curve-control) (arg1 int))
(if (or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))
(deactivate self)
)
(let ((s5-0 (new 'static 'vector))
(gp-0 (new 'static 'vector))
)
0.0
(eval-path-curve-div! arg0 s5-0 (the float arg1) 'exact)
(eval-path-curve-div! arg0 gp-0 (+ 1.0 (the float arg1)) 'exact)
(let ((f30-1 (* 0.5 (vector-vector-distance s5-0 gp-0)))
(s4-1
(new
'process
'collide-shape
self
(collide-list-enum usually-hit-by-player)
)
)
)
(let
((s3-1
(new
'process
'collide-shape-prim-mesh
s4-1
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s3-1 prim-core collide-as) (the-as uint 512))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 0.0 0.0 0.0 (fmax 122880.0 f30-1))
)
(dummy-46 s4-1)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(dummy-50 s4-1)
(set! (-> self root) s4-1)
)
(let ((s4-2 (new-stack-matrix0)))
(vector+! (-> self root trans) s5-0 gp-0)
(vector-float*! (-> self root trans) (-> self root trans) 0.5)
(set! (-> self root trans y) (+ 61440.0 (-> self root trans y)))
(vector-! (the-as vector (-> s4-2 vector)) gp-0 s5-0)
(set!
(-> self root scale x)
(*
0.00024414062
(vector-normalize-ret-len! (the-as vector (-> s4-2 vector)) 1.0)
)
)
(set! (-> self root scale y) 30.0)
(set! (-> self root scale z) 0.0)
(set! (-> s4-2 vector 1 quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad))
(vector-cross!
(-> s4-2 vector 2)
(the-as vector (-> s4-2 vector))
(-> s4-2 vector 1)
)
(vector-normalize! (-> s4-2 vector 2) 1.0)
(matrix->quaternion (-> self root quat) s4-2)
)
)
(dummy-14 self *ef-plane-sg* '())
(logior! (-> self draw status) 32)
(go blocking-plane-idle)
(none)
)
;; definition for function blocking-plane-spawn
;; INFO: Return type mismatch int vs none.
(defun blocking-plane-spawn ((arg0 curve-control))
(with-pp
(cond
((or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))
)
(else
(let ((s5-0 (the int (the float (+ (-> arg0 curve num-cverts) -1))))
(s4-0 0)
)
(while (< s4-0 s5-0)
(let ((s3-0 (get-process *default-dead-pool* blocking-plane #x4000)))
(when s3-0
(let ((t9-1 (method-of-type blocking-plane activate)))
(t9-1
(the-as blocking-plane s3-0)
pp
'blocking-plane
(the-as pointer #x70004000)
)
)
(run-now-in-process s3-0 blocking-plane-init-by-other arg0 s4-0)
(-> s3-0 ppointer)
)
)
(+! s4-0 2)
)
)
)
)
0
(none)
)
)
;; definition for function blocking-plane-destroy
;; INFO: Return type mismatch int vs none.
(defun blocking-plane-destroy ()
(with-pp
(let ((gp-0 (-> pp child)))
(while gp-0
(let ((s5-0 (ppointer->process gp-0)))
(set! gp-0 (-> gp-0 0 brother))
(if (type-type? (-> s5-0 type) blocking-plane)
(deactivate s5-0)
)
)
)
)
0
(none)
)
)
@@ -0,0 +1,877 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type assistant-firecanyon
(deftype assistant-firecanyon (process-taskable)
()
:heap-base #x110
:method-count-assert 53
:size-assert #x17c
:flag-assert #x350110017c
)
;; definition for method 3 of type assistant-firecanyon
(defmethod inspect assistant-firecanyon ((obj assistant-firecanyon))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "assistant-firecanyon"
:bounds (new 'static 'vector :w 16384.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-firecanyon-sg* v1-1)
)
;; definition for method 32 of type assistant-firecanyon
(defmethod
play-anim!
assistant-firecanyon
((obj assistant-firecanyon) (arg0 symbol))
(case (current-status (-> obj tasks))
((6)
(if arg0
(close-current! (-> obj tasks))
)
(new 'static 'spool-anim
:name "assistant-firecanyon-resolution"
:index 13
:parts 11
:command-list
'(
(0
want-levels
village1
firecanyon
)
((the binteger 151)
joint
"cameraB"
)
((the binteger 346)
joint
"camera"
)
((the binteger 346)
shadow
self
#f
)
((the binteger 461)
joint
"cameraB"
)
((the binteger 546)
joint
"camera"
)
((the binteger 636)
joint
"cameraB"
)
((the binteger 695)
alive
"balloon-12"
)
((the binteger 696)
joint
"camera"
)
((the binteger 821)
alive
"balloon-16"
)
((the binteger 822)
joint
"cameraB"
)
((the binteger 962) joint "camera") ((the binteger 1268) shadow self #t)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~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-firecanyon
(defmethod get-art-elem assistant-firecanyon ((obj assistant-firecanyon))
(if (zero? (current-status (-> obj tasks)))
(-> obj draw art-group data 8)
(-> obj draw art-group data 3)
)
)
;; failed to figure out what this is:
(defstate hidden (assistant-firecanyon)
:virtual #t
:trans
(behavior ()
((-> (method-of-type process-taskable hidden) trans))
(when (and (cond
((and
*target*
(>=
61440.0
(vector-vector-distance
(-> self root trans)
(-> *target* control trans)
)
)
)
#t
)
(else
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
#f
)
)
(and
(not
(closed?
(-> self tasks)
(game-task firecanyon-assistant)
(task-status need-reward-speech)
)
)
(not (movie?))
(not (level-hint-displayed?))
(not
(and
*cheat-mode*
(logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3))
)
)
(<
(-
(-> *display* base-frame-counter)
(the-as int (-> self state-time))
)
3000
)
)
)
(hide-hud)
(kill-current-level-hint '() '(sidekick voicebox) 'exit)
(when
(and
(seen-text? *game-info* (game-text-id firecanyon-not-enough-cells))
(hud-hidden?)
(can-grab-display? self)
(not (-> *setting-control* current hint))
)
(let
((gp-0
(new
'stack
'font-context
*font-default-matrix*
32
160
0.0
(font-color default)
(font-flags shadow kerning)
)
)
)
(let ((v1-26 gp-0))
(set! (-> v1-26 width) (the float 448))
)
(let ((v1-27 gp-0))
(set! (-> v1-27 height) (the float 80))
)
(let ((v1-28 gp-0))
(set! (-> v1-28 scale) 0.8)
)
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
(print-game-text
(lookup-text!
*common-text*
(game-text-id firecanyon-collect-cells-text)
#f
)
gp-0
#f
128
22
)
)
)
(level-hint-spawn
(game-text-id firecanyon-not-enough-cells)
"asstvb09"
#f
*entity-pool*
0
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (assistant-firecanyon)
:virtual #t
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
)
(while #t
(let ((gp-0 #t))
(cond
((zero? (current-status (-> self tasks)))
(let* ((v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-9 (the-as number (logior #x3f800000 v1-8)))
)
(when (< (+ -1.0 (the-as float v1-9)) 0.5)
(let ((v1-14 (-> self skel root-channel 0)))
(set!
(-> v1-14 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
)
(let* ((f30-0 2.0)
(v1-16
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-17 (the-as number (logior #x3f800000 v1-16)))
)
(countdown
(gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-17)))) 3))
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-15 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(set! gp-0 #f)
)
)
(when
(or
gp-0
(let*
((v1-53 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-54 (the-as number (logior #x3f800000 v1-53)))
)
(< (+ -1.0 (the-as float v1-54)) 0.5)
)
)
(let ((a0-20 (-> self skel root-channel 0)))
(set!
(-> a0-20 frame-group)
(the-as art-joint-anim (-> self draw art-group data 9))
)
(set!
(-> a0-20 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 9))
data
0
length
)
-1
)
)
)
(set! (-> a0-20 param 1) 1.0)
(set! (-> a0-20 frame-num) 0.0)
(joint-control-channel-group!
a0-20
(the-as art-joint-anim (-> self draw art-group data 9))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set!
(-> a0-21 param 0)
(the float (+ (-> a0-21 frame-group data 0 length) -1))
)
(set! (-> a0-21 param 1) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-81 (-> self skel root-channel 0)))
(set!
(-> v1-81 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
)
(let* ((f30-1 2.0)
(v1-83 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-84 (the-as number (logior #x3f800000 v1-83)))
)
(countdown
(gp-2 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-84)))) 3))
(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)
(suspend)
(let ((a0-29 (-> self skel root-channel 0)))
(set!
(-> a0-29 param 0)
(the float (+ (-> a0-29 frame-group data 0 length) -1))
)
(set! (-> a0-29 param 1) 1.0)
(joint-control-channel-group-eval!
a0-29
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-31 (-> self skel root-channel 0)))
(set!
(-> a0-31 frame-group)
(the-as art-joint-anim (-> self draw art-group data 11))
)
(set!
(-> a0-31 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 11))
data
0
length
)
-1
)
)
)
(set! (-> a0-31 param 1) 1.0)
(set! (-> a0-31 frame-num) 0.0)
(joint-control-channel-group!
a0-31
(the-as art-joint-anim (-> self draw art-group data 11))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-32 (-> self skel root-channel 0)))
(set!
(-> a0-32 param 0)
(the float (+ (-> a0-32 frame-group data 0 length) -1))
)
(set! (-> a0-32 param 1) 1.0)
(joint-control-channel-group-eval!
a0-32
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let* ((v1-140 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-141 (the-as number (logior #x3f800000 v1-140)))
)
(when (< (+ -1.0 (the-as float v1-141)) 0.25)
(let ((v1-146 (-> self skel root-channel 0)))
(set!
(-> v1-146 frame-group)
(the-as art-joint-anim (-> self draw art-group data 12))
)
)
(let ((a0-39 (-> self skel root-channel 0)))
(set! (-> a0-39 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set!
(-> a0-39 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-39 param 1) 1.0)
(set! (-> a0-39 frame-num) 0.0)
(joint-control-channel-group!
a0-39
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-40 (-> self skel root-channel 0)))
(set!
(-> a0-40 param 0)
(the float (+ (-> a0-40 frame-group data 0 length) -1))
)
(set! (-> a0-40 param 1) 1.0)
(joint-control-channel-group-eval!
a0-40
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(else
(let* ((v1-176 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-177 (the-as number (logior #x3f800000 v1-176)))
)
(when (< (+ -1.0 (the-as float v1-177)) 0.8)
(let ((v1-182 (-> self skel root-channel 0)))
(set!
(-> v1-182 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
)
(let* ((f30-2 4.0)
(v1-184
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-185 (the-as number (logior #x3f800000 v1-184)))
)
(countdown
(gp-3 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-185)))) 8))
(let ((a0-49 (-> self skel root-channel 0)))
(set!
(-> a0-49 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-49 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-49 param 1) 1.0)
(set! (-> a0-49 frame-num) 0.0)
(joint-control-channel-group!
a0-49
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-50 (-> self skel root-channel 0)))
(set!
(-> a0-50 param 0)
(the float (+ (-> a0-50 frame-group data 0 length) -1))
)
(set! (-> a0-50 param 1) 1.0)
(joint-control-channel-group-eval!
a0-50
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(set! gp-0 #f)
)
)
(when
(or
gp-0
(let*
((v1-221 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-222 (the-as number (logior #x3f800000 v1-221)))
)
(< (+ -1.0 (the-as float v1-222)) 0.5)
)
)
(let ((a0-54 (-> self skel root-channel 0)))
(set!
(-> a0-54 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-54 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-54 param 1) 1.0)
(set! (-> a0-54 frame-num) 0.0)
(joint-control-channel-group!
a0-54
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-55 (-> self skel root-channel 0)))
(set!
(-> a0-55 param 0)
(the float (+ (-> a0-55 frame-group data 0 length) -1))
)
(set! (-> a0-55 param 1) 1.0)
(joint-control-channel-group-eval!
a0-55
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-249 (-> self skel root-channel 0)))
(set!
(-> v1-249 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let* ((f30-3 2.0)
(v1-251
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-252 (the-as number (logior #x3f800000 v1-251)))
)
(countdown
(gp-4 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-252)))) 3))
(let ((a0-62 (-> self skel root-channel 0)))
(set! (-> a0-62 frame-group) (if (> (-> self skel active-channels) 0)
(->
self
skel
root-channel
0
frame-group
)
)
)
(set!
(-> a0-62 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-62 param 1) 1.0)
(set! (-> a0-62 frame-num) 0.0)
(joint-control-channel-group!
a0-62
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-63 (-> self skel root-channel 0)))
(set!
(-> a0-63 param 0)
(the float (+ (-> a0-63 frame-group data 0 length) -1))
)
(set! (-> a0-63 param 1) 1.0)
(joint-control-channel-group-eval!
a0-63
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-65 (-> self skel root-channel 0)))
(set!
(-> a0-65 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-65 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-65 param 1) 1.0)
(set! (-> a0-65 frame-num) 0.0)
(joint-control-channel-group!
a0-65
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-66 (-> self skel root-channel 0)))
(set!
(-> a0-66 param 0)
(the float (+ (-> a0-66 frame-group data 0 length) -1))
)
(set! (-> a0-66 param 1) 1.0)
(joint-control-channel-group-eval!
a0-66
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let* ((v1-308 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-309 (the-as number (logior #x3f800000 v1-308)))
)
(when (< (+ -1.0 (the-as float v1-309)) 0.5)
(let ((v1-314 (-> self skel root-channel 0)))
(set!
(-> v1-314 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
)
(let* ((f30-4 2.0)
(v1-316
(/ (the-as int (rand-uint31-gen *random-generator*)) 256)
)
(v1-317 (the-as number (logior #x3f800000 v1-316)))
)
(countdown
(gp-5 (+ (the int (* f30-4 (+ -1.0 (the-as float v1-317)))) 3))
(let ((a0-75 (-> self skel root-channel 0)))
(set!
(-> a0-75 frame-group)
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-75 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-75 param 1) 1.0)
(set! (-> a0-75 frame-num) 0.0)
(joint-control-channel-group!
a0-75
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-76 (-> self skel root-channel 0)))
(set!
(-> a0-76 param 0)
(the float (+ (-> a0-76 frame-group data 0 length) -1))
)
(set! (-> a0-76 param 1) 1.0)
(joint-control-channel-group-eval!
a0-76
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
)
)
)
)
)
(none)
)
)
;; definition for method 39 of type assistant-firecanyon
(defmethod should-display? assistant-firecanyon ((obj assistant-firecanyon))
(first-any (-> obj tasks) #t)
(= (current-status (-> obj tasks)) 6)
)
;; definition for method 11 of type assistant-firecanyon
(defmethod
copy-defaults!
assistant-firecanyon
((obj assistant-firecanyon) (arg0 res-lump))
(dummy-40
obj
arg0
*assistant-firecanyon-sg*
3
29
(new 'static 'vector :w 4096.0)
5
)
(set! (-> obj tasks) (get-task-control (game-task firecanyon-assistant)))
(first-any (-> obj tasks) #t)
(dummy-42 obj)
(none)
)
+310
View File
@@ -0,0 +1,310 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type springbox
(deftype springbox (process-drawable)
((spring-height meters :offset-assert 176)
(smush float :offset-assert 180)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xb8
:flag-assert #x14005000b8
)
;; definition for method 3 of type springbox
(defmethod inspect springbox ((obj springbox))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tspring-height: (meters ~m)~%" (-> obj spring-height))
(format #t "~T~Tsmush: ~f~%" (-> obj smush))
obj
)
;; failed to figure out what this is:
(method-set! springbox 12 (method-of-type process run-logic?))
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "bounceytarp"
:bounds (new 'static 'vector :w 16384.0)
:version #x6
)
)
)
(set! (-> v1-2 jgeo) 0)
(set! (-> v1-2 janim) 2)
(set! (-> v1-2 mgeo 0) (the-as uint 1))
(set! (-> v1-2 lod-dist 0) 4095996000.0)
(set! *bouncer-sg* v1-2)
)
;; failed to figure out what this is:
(defstate bouncer-wait (springbox)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'bonk)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 3)
(set! (-> a1-3 message) 'jump)
(set!
(-> a1-3 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-3 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-3 param 2) (the-as uint #f))
(when (send-event-function arg0 a1-3)
(sound-play-by-name
(static-sound-name "trampoline")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go bouncer-fire)
)
)
)
((= v1-0 'touch)
(if
(not
(or
(= (-> self next-state name) 'bouncer-smush)
(= (-> self next-state name) 'bouncer-fire)
)
)
(go bouncer-smush)
)
)
((= v1-0 'attack)
(when
(and
(= (-> arg3 param 1) 'flop)
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-10 from) self)
(set! (-> a1-10 num-params) 3)
(set! (-> a1-10 message) 'jump)
(set!
(-> a1-10 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-10 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-10 param 2) (the-as uint #f))
(send-event-function arg0 a1-10)
)
)
(go bouncer-fire)
#f
)
)
)
)
)
)
:code
(behavior ()
(let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(transform-post)
(while #t
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
(none)
)
)
;; failed to figure out what this is:
(defstate bouncer-smush (springbox)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('touch)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
#f
)
(else
((-> bouncer-wait event) arg0 arg1 arg2 arg3)
)
)
)
:code
(behavior ()
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(set! (-> self smush) 0.0)
(while #t
(cond
((>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 param 0) 0.0)
(set! (-> a0-1 param 1) 0.1)
(joint-control-channel-group-eval!
a0-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(else
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 param 0)
(lerp-scale
(ja-aframe 6.0 0)
(ja-aframe 2.0 0)
(vector-vector-xz-distance (target-pos 0) (-> self root trans))
0.0
4096.0
)
)
(set! (-> gp-0 param 1) 0.2)
(joint-control-channel-group-eval!
gp-0
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(suspend)
(if (ja-min? 0)
(go bouncer-wait)
)
)
(none)
)
:post
(the-as (function none :behavior springbox) transform-post)
)
;; failed to figure out what this is:
(defstate bouncer-fire (springbox)
:code
(behavior ()
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 30)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) (ja-aframe 6.0 0))
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 param 0)
(the float (+ (-> a0-3 frame-group data 0 length) -1))
)
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go bouncer-wait)
(none)
)
:post
(the-as (function none :behavior springbox) transform-post)
)
;; definition for method 11 of type springbox
(defmethod copy-defaults! springbox ((obj springbox) (arg0 res-lump))
(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 128))
(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) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 3072.0 0.0 6963.2)
)
(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) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *bouncer-sg* '())
(nav-mesh-connect obj (-> obj root) (the-as nav-control #f))
(set!
(-> obj spring-height)
(res-lump-float arg0 'spring-height :default 45056.0)
)
(go bouncer-wait)
(none)
)
+750
View File
@@ -0,0 +1,750 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type hopper
(deftype hopper (nav-enemy)
((jump-length float :offset-assert 400)
(shadow-min-y float :offset-assert 404)
)
:heap-base #x130
:method-count-assert 76
:size-assert #x198
:flag-assert #x4c01300198
)
;; definition for method 3 of type hopper
(defmethod inspect hopper ((obj hopper))
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
(format #t "~T~Tjump-length: ~f~%" (-> obj jump-length))
(format #t "~T~Tshadow-min-y: ~f~%" (-> obj shadow-min-y))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "hopper"
:bounds (new 'static 'vector :w 12288.0)
:max-lod 2
:longest-edge (meters 1.0)
:version #x6
:shadow 4
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 5)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *hopper-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; definition for method 39 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-39 hopper ((obj hopper))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(set!
(-> v1-1 settings bot-plane w)
(- (- (-> obj shadow-min-y) (-> obj collide-info trans y)))
)
)
0
((the-as (function nav-enemy none) (find-parent-method hopper 39)) obj)
0
(none)
)
;; definition for function hopper-find-ground
;; INFO: Return type mismatch int vs object.
;; Used lq/sq
(defbehavior hopper-find-ground hopper ((arg0 vector))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(let ((t1-0 (new 'stack-no-clear 'bone))
(f30-0 61440.0)
)
(set! (-> s5-0 quad) (-> arg0 quad))
(set! (-> s5-0 y) (+ 20480.0 (-> s5-0 y)))
(let
((f0-2
(dummy-12
*collide-cache*
s5-0
f30-0
(the-as uint 1)
self
t1-0
(the-as uint 1)
)
)
)
(if (< f0-2 0.0)
(return (the-as object #f))
)
(set! (-> s5-0 y) (- (-> s5-0 y) (* f0-2 f30-0)))
)
)
(set! (-> arg0 quad) (-> s5-0 quad))
)
0
)
;; definition for function hopper-jump-to
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior hopper-jump-to hopper ((arg0 vector))
(set! (-> self jump-dest quad) (-> arg0 quad))
(hopper-find-ground (-> self jump-dest))
(set!
(-> self shadow-min-y)
(+
(fmin (-> self collide-info trans y) (-> self jump-dest y))
(-> self nav-info shadow-min-y)
)
)
(nav-enemy-initialize-custom-jump
(-> self jump-dest)
#f
(-> self nav-info jump-height-min)
(-> self nav-info jump-height-factor)
-409600.0
)
(set! (-> self nav-enemy-flags) (logand -513 (-> self nav-enemy-flags)))
(set! (-> self nav-enemy-flags) (logand -1025 (-> self nav-enemy-flags)))
(logior! (-> self nav-enemy-flags) 16)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(when (not (nav-enemy-facing-point? (-> self jump-dest) 5461.3335))
(ja-channel-push! 1 60)
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(nav-enemy-execute-jump)
(set!
(-> self shadow-min-y)
(+ (-> self collide-info trans y) (-> self nav-info shadow-min-y))
)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(nav-enemy-jump-land-anim)
0
(none)
)
;; definition for function hopper-do-jump
;; INFO: Return type mismatch int vs none.
(defbehavior hopper-do-jump hopper ()
(dummy-11 (-> self nav) (-> self nav target-pos))
(if (< (-> self jump-length) (vector-length (-> self nav travel)))
(vector-normalize! (-> self nav travel) (-> self jump-length))
)
(vector+!
(-> self jump-dest)
(-> self collide-info trans)
(-> self nav travel)
)
(hopper-jump-to (-> self jump-dest))
0
(none)
)
;; failed to figure out what this is:
(defstate nav-enemy-idle (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 22)
(while #t
(dotimes (gp-0 3)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 1.0)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) 1.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-patrol (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-jump-event-handler
)
:trans
(behavior ()
(if (zero? (logand (-> self nav-enemy-flags) 8))
((-> (method-of-type nav-enemy nav-enemy-patrol) trans))
)
(none)
)
:code
(behavior ()
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 16384.0)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(while #t
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 7)
)
(ja-channel-push! 1 20)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 9)
)
(ja-channel-push! 1 30)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-15 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
(else
(ja-channel-push! 1 22)
)
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(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 5))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
150
)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set! (-> a0-21 param 0) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(when
(or
(logtest? (nav-control-flags bit19) (-> self nav flags))
(< 2.0 (-> self nav block-count))
)
(set! (-> self nav block-count) 0.0)
(logior! (-> self nav flags) (nav-control-flags bit10))
(nav-enemy-get-new-patrol-point)
(set! (-> self nav target-pos quad) (-> self nav destination-pos quad))
)
(hopper-do-jump)
)
(none)
)
:post
(the-as (function none :behavior hopper) nav-enemy-jump-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-notice (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-jump-event-handler
)
:trans
(behavior ()
(if (zero? (logand (-> self nav-enemy-flags) 8))
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
)
(none)
)
:code
(behavior ()
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 32768.0)
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
(while #t
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 7)
)
(ja-channel-push! 1 20)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 9)
)
(ja-channel-push! 1 30)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-15 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set!
(-> a0-16 param 0)
(the float (+ (-> a0-16 frame-group data 0 length) -1))
)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
)
(else
(ja-channel-push! 1 22)
)
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(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 5))
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set! (-> a0-21 param 0) 1.0)
(joint-control-channel-group-eval!
a0-21
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(set! (-> self nav target-pos quad) (-> (target-pos 0) quad))
(hopper-do-jump)
)
(none)
)
:post
(the-as (function none :behavior hopper) nav-enemy-jump-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-stop-chase (hopper)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior hopper)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-stare)
(none)
)
)
;; definition for symbol *hopper-nav-enemy-info*, type nav-enemy-info
(define
*hopper-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 5
:walk-anim 5
:turn-anim 9
:notice-anim 5
:run-anim 5
:jump-anim 7
:jump-land-anim 8
:victory-anim 6
:taunt-anim 6
:die-anim 11
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 10.0)
:run-rotate-speed (degrees 7999.9995)
:run-acceleration (meters 1.0)
:run-turn-time #x1e
:walk-travel-speed (meters 6.0)
:walk-rotate-speed (degrees 7999.9995)
:walk-acceleration (meters 1.0)
:walk-turn-time #x1e
:attack-shove-back (meters 3.0)
:attack-shove-up (meters 2.0)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 1.0)
:nav-nearest-y-threshold (meters 10.0)
:notice-distance (meters 30.0)
:stop-chase-distance (meters 40.0)
:frustration-distance (meters 8.0)
:frustration-time #x4b0
:die-anim-hold-frame 10000000000.0
:jump-anim-start-frame 3.0
:jump-land-anim-end-frame 10000000000.0
:jump-height-min (meters 3.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 1.0)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #t
:draw-shadow #t
:move-to-ground #t
:hover-if-no-ground #f
:use-momentum #f
:use-flee #t
:use-proximity-notice #f
:use-jump-blocked #f
:use-jump-patrol #f
:gnd-collide-with #x1
:debug-draw-neck #f
:debug-draw-jump #t
)
)
;; definition for method 47 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 hopper ((obj hopper))
(let
((s5-0
(new
'process
'collide-shape-moving
obj
(collide-list-enum usually-hit-by-player)
)
)
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 10240.0)
(dummy-46 s5-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(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) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 4096.0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 1)
(set-vector! (-> s3-1 local-sphere) 0.0 6963.2 0.0 4096.0)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) 6144.0)
(dummy-50 s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)
0
(none)
)
;; definition for method 48 of type hopper
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 hopper ((obj hopper))
(dummy-14 obj *hopper-sg* '())
(TODO-RENAME-45 obj *hopper-nav-enemy-info*)
(set!
(-> obj shadow-min-y)
(+ (-> obj collide-info trans y) (-> obj nav-info shadow-min-y))
)
0
(none)
)
@@ -0,0 +1,228 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type jungle-elevator
(deftype jungle-elevator (plat-button)
((bottom-height float :offset-assert 240)
(teleport-if-below-y float :offset-assert 244)
(teleport-if-above-y float :offset-assert 248)
)
:heap-base #x90
:method-count-assert 33
:size-assert #xfc
:flag-assert #x21009000fc
)
;; definition for method 3 of type jungle-elevator
(defmethod inspect jungle-elevator ((obj jungle-elevator))
(let ((t9-0 (method-of-type plat-button inspect)))
(t9-0 obj)
)
(format #t "~T~Tbottom-height: ~f~%" (-> obj bottom-height))
(format #t "~T~Tteleport-if-below-y: ~f~%" (-> obj teleport-if-below-y))
(format #t "~T~Tteleport-if-above-y: ~f~%" (-> obj teleport-if-above-y))
obj
)
;; definition for method 26 of type jungle-elevator
(defmethod can-activate? jungle-elevator ((obj jungle-elevator))
(and
((method-of-type plat-button can-activate?) obj)
(task-complete? *game-info* (game-task jungle-tower))
)
)
;; failed to figure out what this is:
(defstate plat-button-move-downward (jungle-elevator)
:virtual #t
:enter
(behavior ()
(let
((t9-0 (-> (method-of-type plat-button plat-button-move-downward) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self draw light-index) (the-as uint 255))
(set! (-> self bottom-height) (-> jungle bottom-height))
(set! (-> jungle bottom-height) (-> jungleb bottom-height))
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) self)
(set! (-> a1-0 num-params) 1)
(set! (-> a1-0 message) 'reset-pickup)
(set! (-> a1-0 param 0) (the-as uint 'eco))
(send-event-function *target* a1-0)
)
(none)
)
:exit
(behavior ()
(set! (-> jungle bottom-height) (-> self bottom-height))
(let
((t9-0 (-> (method-of-type plat-button plat-button-move-downward) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:trans
(behavior ()
(let ((s5-0 (new 'stack-no-clear 'vector))
(gp-0 (new 'stack-no-clear 'vector))
)
(set! (-> s5-0 quad) (-> self root-override trans quad))
(let
((t9-1
(->
(the-as (state plat-button) (find-parent-method jungle-elevator 23))
trans
)
)
)
(if t9-1
(t9-1)
)
)
(vector-! gp-0 (-> self root-override trans) s5-0)
)
(when (< (-> self path-pos) 0.9)
(TODO-RENAME-28 (-> *target* control))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 0)
(set! (-> a1-2 message) 'reset-height)
(send-event-function *target* a1-2)
)
)
(if
(and
(>= (-> self path-pos) 0.2)
(<
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
)
(load-commands-set! *level* (load-command-get-index *level* 'jungle 0))
)
(none)
)
)
;; failed to figure out what this is:
(defstate plat-button-move-upward (jungle-elevator)
:virtual #t
:enter
(behavior ()
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self draw light-index) (the-as uint 255))
(set! (-> self bottom-height) (-> jungle bottom-height))
(set! (-> jungle bottom-height) (-> jungleb bottom-height))
(set! (-> self grab-player?) (process-grab? *target*))
(none)
)
:exit
(behavior ()
(set! (-> jungle bottom-height) (-> self bottom-height))
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:trans
(behavior ()
(let ((t9-0 (-> (method-of-type plat-button plat-button-move-upward) trans)))
(if t9-0
(t9-0)
)
)
(if
(and
(< (-> self path-pos) 0.8)
(<
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
)
(load-commands-set! *level* (load-command-get-index *level* 'jungle 1))
)
(none)
)
)
;; failed to figure out what this is:
(defstate plat-button-at-end (jungle-elevator)
:virtual #t
:code
(behavior ()
(cond
((!= (-> self path-pos) 0.0)
(set! (-> self draw light-index) (the-as uint 1))
(let ((a1-1 (res-lump-struct (-> self entity) 'continue-name structure)))
(when a1-1
(let ((v1-4 (set-continue! *game-info* (the-as basic a1-1))))
(load-commands-set! *level* (-> v1-4 load-commands))
)
)
)
)
(else
(set! (-> self draw light-index) (the-as uint 255))
(load-commands-set! *level* '())
)
)
(let ((t9-4 (-> (method-of-type plat-button plat-button-at-end) code)))
(if t9-4
((the-as (function none :behavior plat-button) t9-4))
)
)
(none)
)
)
;; definition for method 30 of type jungle-elevator
(defmethod should-teleport? jungle-elevator ((obj jungle-elevator))
(let ((f0-0 (-> (camera-pos) y)))
(case (-> obj path-pos)
((0.0)
(when (< f0-0 (-> obj teleport-if-below-y))
(set! (-> obj draw light-index) (the-as uint 1))
(return #t)
)
)
((1.0)
(when (< (-> obj teleport-if-above-y) f0-0)
(set! (-> obj draw light-index) (the-as uint 255))
(return #t)
)
)
)
)
#f
)
;; definition for method 29 of type jungle-elevator
(defmethod can-target-move? jungle-elevator ((obj jungle-elevator))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
(set! (-> obj teleport-if-above-y) (-> s5-0 y))
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(set! (-> obj teleport-if-below-y) (-> s5-0 y))
)
(set! (-> obj draw light-index) (the-as uint 255))
(set! (-> obj bidirectional?) #f)
(let ((v0-2 #t))
(set! (-> obj should-grab-player?) v0-2)
v0-2
)
)
@@ -0,0 +1,657 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type junglefish
(deftype junglefish (nav-enemy)
()
:heap-base #x120
:method-count-assert 76
:size-assert #x190
:flag-assert #x4c01200190
)
;; definition for method 3 of type junglefish
(defmethod inspect junglefish ((obj junglefish))
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "junglefish"
:bounds
(new 'static 'vector :y 4096.0 :w 6144.0)
:max-lod 2
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 4)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *junglefish-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; definition for method 39 of type junglefish
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-39 junglefish ((obj junglefish))
((method-of-object (-> obj water) dummy-10))
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
0
(none)
)
;; failed to figure out what this is:
(defstate nav-enemy-patrol (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:exit
(behavior ()
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
(none)
)
:code
(behavior ()
(ja-channel-push! 1 60)
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(while #t
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) f30-0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 param 0)
(the float (+ (-> a0-3 frame-group data 0 length) -1))
)
(set! (-> a0-3 param 1) f30-0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(when (nav-enemy-rnd-go-idle? 0.2)
(let ((a0-6 (-> self skel root-channel 0)))
(set! (-> a0-6 param 0) 1.0)
(joint-control-channel-group!
a0-6
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 180)
(set! (-> self target-speed) 0.0)
(let ((a0-8 (-> self skel root-channel 0)))
(set!
(-> a0-8 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
)
(set!
(-> a0-8 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-8 param 1) f30-0)
(set! (-> a0-8 frame-num) 0.0)
(joint-control-channel-group!
a0-8
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(let ((a0-9 (-> self skel root-channel 0)))
(set!
(-> a0-9 param 0)
(the float (+ (-> a0-9 frame-group data 0 length) -1))
)
(set! (-> a0-9 param 1) f30-0)
(joint-control-channel-group-eval!
a0-9
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(until (not (nav-enemy-rnd-go-idle? 0.2))
(let ((a0-11 (-> self skel root-channel 0)))
(set!
(-> a0-11 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
)
(set!
(-> a0-11 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-11 param 1) f30-0)
(set! (-> a0-11 frame-num) 0.0)
(joint-control-channel-group!
a0-11
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info idle-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 param 0)
(the float (+ (-> a0-12 frame-group data 0 length) -1))
)
(set! (-> a0-12 param 1) f30-0)
(joint-control-channel-group-eval!
a0-12
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
(let ((a0-15 (-> self skel root-channel 0)))
(set! (-> a0-15 param 0) 1.0)
(joint-control-channel-group!
a0-15
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 180)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
)
(set!
(-> a0-17 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
data
0
length
)
-1
)
)
)
(set! (-> a0-17 param 1) f30-0)
(set! (-> a0-17 frame-num) 0.0)
(joint-control-channel-group!
a0-17
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info walk-anim))
)
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(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) f30-0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-notice (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:trans
(behavior ()
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
(if
(and
*target*
(>=
8192.0
(vector-vector-distance
(-> self collide-info trans)
(-> *target* control trans)
)
)
)
(go-virtual nav-enemy-attack)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stop-chase (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-attack (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 30)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-chase)
(none)
)
:post
(the-as (function none :behavior junglefish) nav-enemy-chase-post)
)
;; failed to figure out what this is:
(defstate nav-enemy-victory (junglefish)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior junglefish)
nav-enemy-default-event-handler
)
:code
(behavior ()
(ja-channel-push! 1 22)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 2.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 2.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 2.0)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-5 (-> self skel root-channel 0)))
(set!
(-> a0-5 param 0)
(the float (+ (-> a0-5 frame-group data 0 length) -1))
)
(set! (-> a0-5 param 1) 2.0)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; definition for symbol *junglefish-nav-enemy-info*, type nav-enemy-info
(define
*junglefish-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 4
:walk-anim 4
:turn-anim -1
:notice-anim 4
:run-anim 4
:jump-anim -1
:jump-land-anim -1
:victory-anim 4
:taunt-anim 4
:die-anim 6
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 5.5)
:run-rotate-speed (degrees 720.0)
:run-acceleration (meters 6.0)
:run-turn-time #x2d
:walk-travel-speed (meters 4.0)
:walk-rotate-speed (degrees 720.0)
:walk-acceleration (meters 6.0)
:walk-turn-time #x2d
:attack-shove-back (meters 1.0)
:attack-shove-up (meters 0.5)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 1.0)
:nav-nearest-y-threshold (meters 10.0)
:notice-distance (meters 25.0)
:stop-chase-distance (meters 35.0)
:frustration-distance (meters 8.0)
:frustration-time #x4b0
:die-anim-hold-frame 10000000000.0
:jump-land-anim-end-frame 10000000000.0
:jump-height-min (meters 1.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 1.0)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #f
:draw-shadow #f
:move-to-ground #f
:hover-if-no-ground #f
:use-momentum #t
:use-flee #f
:use-proximity-notice #f
:use-jump-blocked #f
:use-jump-patrol #f
:gnd-collide-with #x1
:debug-draw-neck #f
:debug-draw-jump #f
)
)
;; definition for method 11 of type junglefish
(defmethod copy-defaults! junglefish ((obj junglefish) (arg0 res-lump))
(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-sphere s4-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(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) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 3276.8 0.0 2457.6)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(set! (-> obj collide-info) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *junglefish-sg* '())
(TODO-RENAME-45 obj *junglefish-nav-enemy-info*)
(set! (-> obj water) (new 'process 'water-control obj 7 0.0 8192.0 2048.0))
(set! (-> obj water flags) (the-as uint 2))
(set! (-> obj water height) (res-lump-float (-> obj entity) 'water-height))
(set! (-> obj water ripple-size) 5734.4)
(set! (-> obj collide-info trans y) (+ -4096.0 (-> obj water height)))
(go (method-of-object obj nav-enemy-idle))
(none)
)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,361 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type flutflut-bluehut
(deftype flutflut-bluehut (process-taskable)
()
:heap-base #x110
:method-count-assert 53
:size-assert #x17c
:flag-assert #x350110017c
)
;; definition for method 3 of type flutflut-bluehut
(defmethod inspect flutflut-bluehut ((obj flutflut-bluehut))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "flutflut-bluehut"
:bounds (new 'static 'vector :w 13312.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *flutflut-bluehut-sg* v1-1)
)
;; definition for method 32 of type flutflut-bluehut
;; INFO: Return type mismatch art-element vs basic.
(defmethod play-anim! flutflut-bluehut ((obj flutflut-bluehut) (arg0 symbol))
(current-status (-> obj tasks))
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string (the-as task-status (current-status (-> obj tasks))))
)
)
(the-as basic (get-art-elem obj))
)
;; definition for method 31 of type flutflut-bluehut
(defmethod get-art-elem flutflut-bluehut ((obj flutflut-bluehut))
(-> obj draw art-group data 2)
)
;; definition for method 39 of type flutflut-bluehut
(defmethod should-display? flutflut-bluehut ((obj flutflut-bluehut))
(and
(closed?
(-> obj tasks)
(game-task village2-levitator)
(task-status need-introduction)
)
(task-closed? (game-task beach-flutflut) (task-status need-resolution))
)
)
;; failed to figure out what this is:
(defstate idle (flutflut-bluehut)
:virtual #t
:trans
(behavior ()
(set! (-> self will-talk) #f)
((-> (method-of-type process-taskable idle) trans))
(none)
)
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
)
(while #t
(let ((v1-6 (-> self skel root-channel 0)))
(set!
(-> v1-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
)
(let* ((f30-0 2.0)
(v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-9 (the-as number (logior #x3f800000 v1-8)))
)
(countdown (gp-0 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-9)))) 1))
(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 ((s5-0 (-> *display* base-frame-counter)))
(while (< (+ (-> *display* base-frame-counter) -150) s5-0)
(suspend)
)
)
(let ((a0-15 (-> self skel root-channel 0)))
(set! (-> a0-15 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set! (-> a0-15 param 0) 0.0)
(set! (-> a0-15 param 1) 1.0)
(set!
(-> a0-15 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-15
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-16 (-> self skel root-channel 0)))
(set! (-> a0-16 param 0) 0.0)
(set! (-> a0-16 param 1) 1.0)
(joint-control-channel-group-eval!
a0-16
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((s5-1 (-> *display* base-frame-counter)))
(while (< (+ (-> *display* base-frame-counter) -150) s5-1)
(suspend)
)
)
)
)
(let ((a0-18 (-> self skel root-channel 0)))
(set!
(-> a0-18 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set!
(-> a0-18 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(set! (-> a0-18 param 1) 1.0)
(set! (-> a0-18 frame-num) 0.0)
(joint-control-channel-group!
a0-18
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-19 (-> self skel root-channel 0)))
(set!
(-> a0-19 param 0)
(the float (+ (-> a0-19 frame-group data 0 length) -1))
)
(set! (-> a0-19 param 1) 1.0)
(joint-control-channel-group-eval!
a0-19
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((v1-100 (-> self skel root-channel 0)))
(set!
(-> v1-100 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
)
(let* ((f30-1 2.0)
(v1-102 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-103 (the-as number (logior #x3f800000 v1-102)))
)
(countdown (gp-1 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-103)))) 6))
(let ((a0-26 (-> self skel root-channel 0)))
(set! (-> a0-26 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-26 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-26 param 1) 1.0)
(set! (-> a0-26 frame-num) 0.0)
(joint-control-channel-group!
a0-26
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-27 (-> self skel root-channel 0)))
(set!
(-> a0-27 param 0)
(the float (+ (-> a0-27 frame-group data 0 length) -1))
)
(set! (-> a0-27 param 1) 1.0)
(joint-control-channel-group-eval!
a0-27
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(let ((a0-29 (-> self skel root-channel 0)))
(set!
(-> a0-29 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set! (-> a0-29 param 0) 0.0)
(set! (-> a0-29 param 1) 1.0)
(set!
(-> a0-29 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-29
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-30 (-> self skel root-channel 0)))
(set! (-> a0-30 param 0) 0.0)
(set! (-> a0-30 param 1) 1.0)
(joint-control-channel-group-eval!
a0-30
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; definition for method 11 of type flutflut-bluehut
(defmethod
copy-defaults!
flutflut-bluehut
((obj flutflut-bluehut) (arg0 res-lump))
(dummy-40
obj
arg0
*flutflut-bluehut-sg*
3
0
(new 'static 'vector :w 4096.0)
27
)
(set! (-> obj tasks) (get-task-control (game-task village2-levitator)))
(set! (-> obj draw light-index) (the-as uint 1))
(dummy-42 obj)
(none)
)
@@ -0,0 +1,628 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type assistant-bluehut
(deftype assistant-bluehut (process-taskable)
((sound-id sound-id :offset-assert 380)
(jaws uint64 :offset-assert 384)
(sage entity-actor :offset-assert 392)
(im-talking symbol :offset-assert 396)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x190
:flag-assert #x3501200190
)
;; definition for method 3 of type assistant-bluehut
(defmethod inspect assistant-bluehut ((obj assistant-bluehut))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
(format #t "~T~Tsound-id: ~D~%" (-> obj sound-id))
(format #t "~T~Tjaws: ~D~%" (-> obj jaws))
(format #t "~T~Tsage: ~A~%" (-> obj sage))
(format #t "~T~Tim-talking: ~A~%" (-> obj im-talking))
obj
)
;; definition of type sage-bluehut
(deftype sage-bluehut (process-taskable)
((reminder-played symbol :offset-assert 380)
(assistant entity-actor :offset-assert 384)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x184
:flag-assert #x3501200184
)
;; definition for method 3 of type sage-bluehut
(defmethod inspect sage-bluehut ((obj sage-bluehut))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
(format #t "~T~Treminder-played: ~A~%" (-> obj reminder-played))
(format #t "~T~Tassistant: ~A~%" (-> obj assistant))
obj
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "sage-bluehut"
: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! *sage-bluehut-sg* v1-2)
)
;; definition for method 32 of type sage-bluehut
(defmethod play-anim! sage-bluehut ((obj sage-bluehut) (arg0 symbol))
(with-pp
(set! (-> obj talk-message) (the-as uint 291))
(case (current-status (-> obj tasks))
((2 3)
(if (not arg0)
(set! (-> obj will-talk) #t)
)
(case (current-task (-> obj tasks))
((55)
(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))
(let ((s5-2 (-> obj assistant extra process)))
(when (and s5-2 (should-display? (the-as assistant-bluehut s5-2)))
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-6 from) pp)
(set! (-> a1-6 num-params) 1)
(set! (-> a1-6 message) 'clone)
(set! (-> a1-6 param 0) (the-as uint (process->handle obj)))
(send-event-function s5-2 a1-6)
)
)
)
(set! (-> obj draw bounds w) 40960.0)
)
(new 'static 'spool-anim
:name
"sage-bluehut-introduction-crop-dusting"
:index 8
:parts 12
:command-list
'(
((the binteger 678)
joint
"cameraB"
)
((the binteger 1166)
joint
"camera"
)
((the binteger 1258) joint "cameraB")
)
)
)
(else
(when arg0
(close-status! (-> obj tasks) (task-status need-introduction))
(close-specific-task!
(game-task swamp-tether-1)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-2)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-3)
(task-status need-introduction)
)
(close-specific-task!
(game-task swamp-tether-4)
(task-status need-introduction)
)
)
(new 'static 'spool-anim
:name "sage-bluehut-introduction-prec-arm"
:index 6
:parts 8
:command-list
'(
((the binteger 141)
joint
"cameraB"
)
((the binteger 214)
joint
"camera"
)
((the binteger 308)
joint
"cameraB"
)
((the binteger 686)
joint
"camera"
)
((the binteger 786)
joint
"cameraB"
)
((the binteger 843) joint "camera")
)
)
)
)
)
((5)
(set! (-> obj skippable) #t)
(if arg0
(set! (-> obj reminder-played) #t)
)
(cond
((zero? (get-reminder (-> obj tasks) 0))
(new 'static 'spool-anim
:name "sage-bluehut-reminder-1-crop-dusting"
:index 9
:parts 3
:command-list '()
)
)
(else
(if arg0
(set! (-> obj draw bounds w) 40960.0)
)
(new 'static 'spool-anim
:name "sage-bluehut-reminder-1-prec-arm"
:index 7
:parts 4
:command-list
'(
((the binteger 90)
joint
"cameraB"
)
((the binteger 259)
joint
"camera"
)
((the binteger 352) joint "cameraB")
)
)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string
(the-as task-status (current-status (-> obj tasks)))
)
)
)
(get-art-elem obj)
)
)
)
)
;; definition for method 45 of type sage-bluehut
;; INFO: Return type mismatch symbol vs none.
(defmethod dummy-45 sage-bluehut ((obj sage-bluehut))
(cond
((= (current-status (-> obj tasks)) 1)
)
((zero? (current-status (-> obj tasks)))
)
((and
(closed?
(-> obj tasks)
(game-task rolling-plants)
(task-status need-reminder)
)
(= (get-reminder (-> obj tasks) 0) 0)
)
#t
)
((and
(closed? (-> obj tasks) (game-task swamp-arm) (task-status need-reminder))
(= (get-reminder (-> obj tasks) 0) 1)
)
#t
)
((and
(-> obj reminder-played)
(< 81920.0 (vector-vector-distance (-> obj root trans) (camera-pos)))
)
#t
)
(else
)
)
(none)
)
;; definition for method 31 of type sage-bluehut
(defmethod get-art-elem sage-bluehut ((obj sage-bluehut))
(cond
((and
(= (current-task (-> obj tasks)) 55)
(or
(= (current-status (-> obj tasks)) 2)
(= (current-status (-> obj tasks)) 3)
)
)
(save-reminder (-> obj tasks) 0 0)
)
((and
(= (current-task (-> obj tasks)) 104)
(or
(= (current-status (-> obj tasks)) 2)
(= (current-status (-> obj tasks)) 3)
)
)
(save-reminder (-> obj tasks) 1 0)
)
((dummy-45 obj)
(set! (-> obj reminder-played) #f)
(cond
((closed?
(-> obj tasks)
(game-task rolling-plants)
(task-status need-reminder)
)
(save-reminder (-> obj tasks) 1 0)
)
((or
(closed?
(-> obj tasks)
(game-task swamp-arm)
(task-status need-reminder)
)
(not
(closed?
(-> obj tasks)
(game-task swamp-arm)
(task-status need-introduction)
)
)
)
(save-reminder (-> obj tasks) 0 0)
)
((zero? (get-reminder (-> obj tasks) 0))
(save-reminder (-> obj tasks) 1 0)
)
(else
(save-reminder (-> obj tasks) 0 0)
)
)
)
)
(if (zero? (get-reminder (-> obj tasks) 0))
(-> obj draw art-group data 4)
(-> obj draw art-group data 5)
)
)
;; failed to figure out what this is:
(defstate play-anim (sage-bluehut)
: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 assistant extra process) a1-0)
)
(set! (-> self draw bounds w) 10240.0)
((-> (method-of-type process-taskable play-anim) exit))
(none)
)
)
;; definition for method 39 of type sage-bluehut
(defmethod should-display? sage-bluehut ((obj sage-bluehut))
(and
(task-closed? (game-task village2-levitator) (task-status need-introduction))
(not (sages-kidnapped?))
)
)
;; definition for method 44 of type sage-bluehut
;; INFO: Return type mismatch basic vs symbol.
(defmethod play-reminder sage-bluehut ((obj sage-bluehut))
(the-as
symbol
(and
(-> obj will-talk)
*target*
(< -6365184.0 (-> (target-pos 0) z))
(< (-> (target-pos 0) x) 1612800.0)
)
)
)
;; definition for method 47 of type sage-bluehut
(defmethod target-above-threshold? sage-bluehut ((obj sage-bluehut))
(local-vars (v0-1 symbol))
(if (not (play-reminder obj))
(return #f)
)
(let ((gp-1 (-> obj assistant extra process)))
(if (not gp-1)
(return #t)
)
(target-above-threshold? (the-as assistant-bluehut gp-1))
(return (not (-> (the-as assistant-bluehut gp-1) im-talking)))
)
v0-1
)
;; definition for method 43 of type sage-bluehut
(defmethod TODO-RENAME-43 sage-bluehut ((obj sage-bluehut))
(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.8 f0-2)
(dummy-11 (-> obj ambient) "SAGELP20" #f (-> obj root trans))
)
((< 0.6 f0-2)
(dummy-11 (-> obj ambient) "SAGELP21" #f (-> obj root trans))
)
((< 0.4 f0-2)
(dummy-11 (-> obj ambient) "SAGELP22" #f (-> obj root trans))
)
((< 0.2 f0-2)
(dummy-11 (-> obj ambient) "SAGELP23" #f (-> obj root trans))
)
((nonzero? (get-task-status (game-task citadel-sage-blue)))
(dummy-11 (-> obj ambient) "SAGELP24" #f (-> obj root trans))
)
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate idle (sage-bluehut)
:virtual #t
:code
(behavior ()
(while #t
(let ((gp-0 (get-art-elem self)))
(cond
((= gp-0 (-> self draw art-group data 4))
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
gp-0
)
(ja-channel-push! 1 60)
)
(set!
(-> self skel root-channel 0 frame-group)
(the-as art-joint-anim gp-0)
)
(let* ((f30-0 3.0)
(v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-16 (the-as number (logior #x3f800000 v1-15)))
)
(countdown
(gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-16)))) 5))
(TODO-RENAME-43 self)
(let ((a0-5 (-> self skel root-channel 0)))
(set! (-> a0-5 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-5 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-5 param 1) 1.0)
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 param 0)
(the float (+ (-> a0-7 frame-group data 0 length) -1))
)
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(ja-channel-push! 1 60)
(let ((a0-10 (-> self skel root-channel 0)))
(set!
(-> a0-10 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
(set!
(-> a0-10 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 3))
data
0
length
)
-1
)
)
)
(set! (-> a0-10 param 1) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group!
a0-10
(the-as art-joint-anim (-> self draw art-group data 3))
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 param 0)
(the float (+ (-> a0-12 frame-group data 0 length) -1))
)
(set! (-> a0-12 param 1) 1.0)
(joint-control-channel-group-eval!
a0-12
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(TODO-RENAME-43 self)
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
gp-0
)
(ja-channel-push! 1 60)
)
(set!
(-> self skel root-channel 0 frame-group)
(the-as art-joint-anim gp-0)
)
(let ((a0-16 (-> self skel root-channel 0)))
(set! (-> a0-16 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-16 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-16 param 1) 1.0)
(set! (-> a0-16 frame-num) 0.0)
(joint-control-channel-group!
a0-16
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(if (dummy-45 self)
(go-virtual idle)
)
(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!
)
)
)
)
)
)
)
(none)
)
)
;; definition for method 11 of type sage-bluehut
(defmethod copy-defaults! sage-bluehut ((obj sage-bluehut) (arg0 res-lump))
(dummy-40 obj arg0 *sage-bluehut-sg* 3 40 (new 'static 'vector :w 4505.6) 5)
(set! (-> obj tasks) (get-task-control (game-task rolling-plants)))
(set! (-> obj reminder-played) #f)
(set! (-> obj assistant) (entity-actor-lookup arg0 'alt-actor 0))
(set! (-> obj draw light-index) (the-as uint 1))
(set! (-> obj sound-flava) (the-as uint 5))
(dummy-42 obj)
(none)
)
@@ -244,7 +244,8 @@
)
;; definition for method 29 of type sunken-elevator
(defmethod TODO-RENAME-29 sunken-elevator ((obj sunken-elevator))
;; INFO: Return type mismatch float vs symbol.
(defmethod can-target-move? sunken-elevator ((obj sunken-elevator))
(set! (-> obj play-at-top-going-up-camera?) #f)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
@@ -252,7 +253,7 @@
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(let ((f0-1 (-> s5-0 y)))
(set! (-> obj teleport-if-below-y) f0-1)
f0-1
(the-as symbol f0-1)
)
)
)
@@ -261,7 +262,7 @@
(defmethod TODO-RENAME-27 sunken-elevator ((obj sunken-elevator))
(ja-channel-set! 1)
(cond
(((method-of-object obj dummy-26))
((can-activate? obj)
(let ((s5-0 (-> obj skel root-channel 0)))
(joint-control-channel-group-eval!
s5-0