decomp: another batch of easy files (#823)

* decomp: finish `sharkey`

* decomp: finish `lurkercrab`

* decomp: finish `lurkerpuppy`

* decomp: finish `assistant-citadel`

* decomp: finish `static-screen`

* decomp: finish `robotboss-h`

* decomp: finish `final-door`

* decomp: finish `aphid`

* addressed review
This commit is contained in:
Tyler Wilding
2021-09-06 15:34:31 -04:00
committed by GitHub
parent b95ec1062e
commit d1f16b34ff
37 changed files with 12019 additions and 342 deletions
+1
View File
@@ -64,3 +64,4 @@ tasks:
type-test:
cmds:
- ./out/build/Release/bin/goalc-test.exe --gtest_brief=0 --gtest_filter="*TypeConsistency*"
+149 -307
View File
@@ -10879,7 +10879,7 @@
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_ uint) collide-shape-prim 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
@@ -10966,7 +10966,7 @@
(dummy-31 () none 31)
(dummy-32 () none 32)
(dummy-33 (_type_ vector uint) none 33)
(dummy-34 () none 34)
(dummy-34 (_type_ uint) collide-shape-prim 34)
(dummy-35 (_type_) none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
@@ -10987,7 +10987,7 @@
(dummy-52 () none 52)
(dummy-53 (_type_ int int int) none 53)
(dummy-54 (_type_ int int) none 54)
(dummy-55 () none 55)
(dummy-55 (_type_ process uint float float float) none 55)
)
)
@@ -14624,7 +14624,7 @@
(dummy-13 () none 13)
(dummy-14 (_type_) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) symbol 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
@@ -17888,10 +17888,10 @@
(:methods
(new (symbol type process int float float float) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_) none 10)
(dummy-11 () none 11)
(distance-from-surface (_type_) float 12)
(dummy-13 () none 13)
(dummy-13 (_type_ float vector int vector) none 13)
(display-water-marks? (_type_) symbol 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
@@ -19301,7 +19301,7 @@
;;(define-extern target-hit object) ;; unknown type
;;(define-extern target-eco-powerup object) ;; unknown type
;;(define-extern target-load-wait object) ;; unknown type
;;(define-extern target-grab object) ;; unknown type
(define-extern target-grab (state target)) ;; unknown type
;;(define-extern target-look-around object) ;; unknown type
;;(define-extern target-billy-game object) ;; unknown type
;;(define-extern target-racing-start object) ;; unknown type
@@ -19310,7 +19310,7 @@
;;(define-extern target-tube-start object) ;; unknown type
;;(define-extern target-periscope object) ;; unknown type
;;(define-extern target-fishing object) ;; unknown type
;;(define-extern target-final-door object) ;; unknown type
(define-extern target-final-door (state basic handle target)) ;; unknown type
;;(define-extern target-play-anim object) ;; unknown type
;;(define-extern target-clone-anim object) ;; unknown type
;;(define-extern target-edge-grab object) ;; unknown type
@@ -19338,7 +19338,7 @@
;; - Unknowns
;;(define-extern target-hit-ground object) ;; unknown type
;;(define-extern target-stance object) ;; unknown type
(define-extern target-stance (state target)) ;; unknown type
;;(define-extern target-high-jump object) ;; unknown type
;;(define-extern target-attack-air object) ;; unknown type
;;(define-extern target-wheel-flip object) ;; unknown type
@@ -19447,7 +19447,7 @@
;;(define-extern *smack-mods* object) ;; unknown type
;;(define-extern *smack-up-mods* object) ;; unknown type
;;(define-extern target-title object) ;; unknown type
;;(define-extern target-demo object) ;; unknown type
(define-extern target-demo (state target)) ;; unknown type
;;(define-extern target-warp-in object) ;; unknown type
;;(define-extern *auto-continue* object) ;; unknown type
@@ -22727,11 +22727,11 @@
;; - Functions
(define-extern sharkey-get-player-position function)
(define-extern sharkey-follow-trajectory function)
(define-extern sharkey-reset-position function)
(define-extern sharkey-notice-player? function)
(define-extern sharkey-move-to-attack-position function)
(define-extern sharkey-get-player-position (function vector none))
(define-extern sharkey-follow-trajectory (function float quaternion :behavior sharkey))
(define-extern sharkey-reset-position (function none :behavior sharkey))
(define-extern sharkey-notice-player? (function symbol :behavior sharkey))
(define-extern sharkey-move-to-attack-position (function float :behavior sharkey))
;; - Unknowns
@@ -23930,14 +23930,14 @@
;; - Functions
(define-extern lurkercrab-vulnerable function)
(define-extern lurkercrab-invulnerable function)
(define-extern lurkercrab-vulnerable (function int :behavior lurkercrab))
(define-extern lurkercrab-invulnerable (function int :behavior lurkercrab))
;; - Unknowns
(define-extern *lurkercrab-sg* skeleton-group)
(define-extern *lurkercrab-nav-enemy-info* nav-enemy-info)
;;(define-extern lurkercrab-pushed object) ;; unknown type
(define-extern lurkercrab-pushed (state lurkercrab)) ;; unknown type
;; ----------------------
@@ -26476,60 +26476,13 @@
;; - Types
; (deftype assistant-lavatube-end (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-lavatube-end (process-taskable)
()
:method-count-assert 53
:size-assert #x17c
:heap-base #x110
:flag-assert #x350110017c
)
;; - Unknowns
@@ -27139,7 +27092,7 @@
;; - Functions
(define-extern static-screen-spawn function)
(define-extern static-screen-spawn (function int int int int int symbol target (pointer process))) ;; target may differ
;; ----------------------
@@ -27258,28 +27211,22 @@
;; - Types
; (deftype static-screen (process)
; ((part UNKNOWN 1 :offset-assert 112)
; (state-time uint64 :offset-assert 120)
; )
; :method-count-assert 15
; :size-assert #x80
; :heap-base #x10
; :flag-assert #xf00100080
; ;; inherited inspect of process
; (: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)
; )
; )
(deftype static-screen (process)
((part sparticle-launch-control 1 :offset-assert 112)
(state-time uint64 :offset-assert 120)
)
:method-count-assert 15
:size-assert #x80
:heap-base #x10
:flag-assert #xf00100080
(:methods
(idle (int int symbol) _type_ :state 14)
)
)
;; - Functions
(define-extern static-screen-init-by-other function)
(define-extern static-screen-init-by-other (function int int int int int symbol none :behavior static-screen))
;; ----------------------
@@ -27317,25 +27264,69 @@
;; - Types
; (deftype robotboss-dda (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; bad get label
; )
;; definition of type robotboss-dda
(deftype robotboss-dda (structure)
((blue-bomb-time float :offset-assert 0)
(num-blobs int32 :offset-assert 4)
(green-bomb-time float :offset-assert 8)
(red-shots-min int32 :offset-assert 12)
(red-shots-rnd int32 :offset-assert 16)
(red-shot-time-min float :offset-assert 20)
(red-shot-time-rnd float :offset-assert 24)
(red-bomb-time float :offset-assert 28)
(yellow-shot-time-min float :offset-assert 32)
(yellow-shot-time-rnd float :offset-assert 36)
(yellow-gun-hits int32 :offset-assert 40)
(yellow-bomb-time float :offset-assert 44)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
; (deftype robotboss (UNKNOWN)
; ()
; :method-count-assert 0
; :size-assert #x0
; :flag-assert #x0
; ;; unrecognized get op: (set! v1 process-drawable) parent was UNKNOWN
; )
(deftype robotboss (process-drawable)
((alts entity-actor 13 :offset-assert 176)
(desired-loc vector :inline :offset-assert 240)
(old-loc vector :inline :offset-assert 256)
(loc-t float :offset-assert 272)
(loc-t-start seconds :offset-assert 280)
(loc-t-duration seconds :offset-assert 288)
(hits-to-go int32 :offset-assert 296)
(took-hit symbol :offset-assert 300)
(children-spawned int32 :offset-assert 304)
(vulnerable seconds :offset-assert 312)
(till-next-shot seconds :offset-assert 320)
(shot-attractor uint64 :offset-assert 328)
(desired-pool-y float :offset-assert 336)
(particle sparticle-launch-control 7 :offset-assert 340)
(blue-smoke basic :offset-assert 368)
(red-smoke basic :offset-assert 372)
(yellow-smoke basic :offset-assert 376)
(white-eco handle :offset-assert 384)
(des-cam-entity basic :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
)
:heap-base #x16
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
(:methods
(dummy-20 () none 20)
)
)
;; - Functions
(define-extern target-has-all-the-cells? function)
(define-extern target-has-all-the-cells? (function symbol))
;; ----------------------
@@ -27994,46 +27985,12 @@
;; - Types
; (deftype fin-door (process-hidden)
; ((name basic :offset-assert 4)
; (mask uint32 :offset-assert 8)
; (parent uint32 :offset-assert 12)
; (brother uint32 :offset-assert 16)
; (child uint32 :offset-assert 20)
; (ppointer uint32 :offset-assert 24)
; (self basic :offset-assert 28)
; (pool basic :offset-assert 32)
; (status basic :offset-assert 36)
; (pid int32 :offset-assert 40)
; (main-thread basic :offset-assert 44)
; (top-thread basic :offset-assert 48)
; (entity basic :offset-assert 52)
; (state basic :offset-assert 56)
; (trans-hook basic :offset-assert 60)
; (post-hook basic :offset-assert 64)
; (event-hook basic :offset-assert 68)
; (allocated-length int32 :offset-assert 72)
; (next-state basic :offset-assert 76)
; (heap-base uint32 :offset-assert 80)
; (heap-top uint32 :offset-assert 84)
; (heap-cur uint32 :offset-assert 88)
; (stack-frame-top basic :offset-assert 92)
; (heap kheap :inline :offset-assert 80)
; (connection-list 'connectable :inline :offset-assert 96)
; (stack UNKNOWN :dynamic :offset-assert 112)
; )
; :method-count-assert 15
; :size-assert #x70
; :flag-assert #xf00000070
; (: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)
; )
; )
(deftype fin-door (process-hidden)
()
:method-count-assert 15
:size-assert #x70
:flag-assert #xf00000070
)
(deftype final-door (process-drawable)
()
@@ -28043,93 +28000,48 @@
:flag-assert #x17004000b0
;; not enough basic ops
(:methods
(idle () none 20) ;; state
(dummy-21 () none 21)
(dummy-22 () none 22)
(idle () _type_ :state 20) ;; state
(dummy-21 (_type_) none 21)
(open () _type_ :state 22)
)
)
; (deftype power-left (final-door)
; ()
; :method-count-assert 23
; :size-assert #xb0
; :heap-base #x40
; :flag-assert #x17004000b0
; ;; 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)
; )
; )
(deftype power-left (final-door)
()
:method-count-assert 23
:size-assert #xb0
:heap-base #x40
:flag-assert #x17004000b0
)
; (deftype power-right (final-door)
; ()
; :method-count-assert 23
; :size-assert #xb0
; :heap-base #x40
; :flag-assert #x17004000b0
; ;; 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)
; )
; )
(deftype power-right (final-door)
()
:method-count-assert 23
:size-assert #xb0
:heap-base #x40
:flag-assert #x17004000b0
)
; (deftype powercellalt (process-drawable)
; ((jump-pos vector :inline :offset-assert 176)
; (base vector :inline :offset-assert 192)
; (index int32 :offset-assert 208)
; )
; :method-count-assert 23
; :size-assert #xd4
; :heap-base #x70
; :flag-assert #x17007000d4
; ;; inherited inspect of process-drawable
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; )
; )
(deftype powercellalt (process-drawable)
((root-override collide-shape-moving :score 100 :offset 112)
(jump-pos vector :inline :offset-assert 176)
(base vector :inline :offset-assert 192)
(index int32 :offset-assert 208)
)
:method-count-assert 23
:size-assert #xd4
:heap-base #x70
:flag-assert #x17007000d4
(:methods
(dummy-20 () none 20)
(jump () _type_ :state 21)
(idle () _type_ :state 22)
)
)
;; - Functions
(define-extern powercellalt-init-by-other function)
(define-extern powercellalt-init-by-other (function entity vector vector int none :behavior powercellalt))
;; - Unknowns
@@ -28742,90 +28654,20 @@
;; - Types
; (deftype aphid (nav-enemy)
; ((try int32 :offset-assert 400)
; )
; :method-count-assert 76
; :size-assert #x194
; :heap-base #x130
; :flag-assert #x4c01300194
; ;; 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 aphid (nav-enemy)
((try int32 :offset-assert 400)
)
:method-count-assert 76
:size-assert #x194
:heap-base #x130
:flag-assert #x4c01300194
)
;; - Functions
(define-extern aphid-invulnerable function)
(define-extern aphid-vulnerable function)
(define-extern aphid-init-by-other function)
(define-extern aphid-invulnerable (function none :behavior aphid))
(define-extern aphid-vulnerable (function none :behavior aphid))
(define-extern aphid-init-by-other (function nav-enemy vector vector none :behavior aphid))
;; - Unknowns
@@ -704,5 +704,14 @@
[16, "(function sparticle-launch-control :behavior sequenceB)"]
],
"demo-obs": [
[1, "(function target)"]
],
"final-door": [
[11, "(function final-door symbol)"],
[12, "(function final-door symbol)"]
],
"placeholder-do-not-add-below": []
}
@@ -491,6 +491,25 @@
["L34", "vector"]
],
"sharkey": [
["L101", "attack-info"]
],
"assistant-citadel": [
["L28", "vector"]
],
"robotboss-h": [
["L67", "float", true],
["L68", "uint64", true],
["L69", "uint64", true]
],
"final-door": [
["L59", "vector"],
["L60", "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": []
}
@@ -1602,5 +1602,82 @@
[16, "vector"]
],
"(method 37 sharkey)": [
[16, "vector"]
],
"(method 39 sharkey)": [
[16, "vector"]
],
"sharkey-notice-player?": [
[16, "event-message-block"]
],
"sharkey-move-to-attack-position": [
[16, "vector"],
[32, "vector"],
[48, "vector"]
],
"(code nav-enemy-attack sharkey)": [
[16, "vector"],
[32, "vector"],
[48, "event-message-block"]
],
"(trans nav-enemy-chase sharkey)": [
[16, "event-message-block"]
],
"(method 43 lurkercrab)": [
[16, "vector"],
[32, "vector"]
],
"(enter idle assistant-lavatube-end)": [
[16, "event-message-block"]
],
"target-has-all-the-cells?": [
[16, "event-message-block"]
],
"(code idle power-left)": [
[16, "event-message-block"]
],
"(code jump powercellalt)": [
[16, "trajectory"]
],
"(enter target-final-door)": [
[16, "event-message-block"]
],
"(exit target-final-door)": [
[16, "event-message-block"]
],
"(code target-final-door)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "event-message-block"]
],
"(method 43 aphid)": [
[16, "event-message-block"]
],
"(code nav-enemy-give-up aphid)": [
[16, "vector"]
],
"aphid-init-by-other": [
[16, "vector"],
[32, "event-message-block"]
],
"placeholder-do-not-add-below!": []
}
@@ -2737,5 +2737,144 @@
[329, "v1", "art-joint-anim"]
],
"(method 39 sharkey)": [
[71, "t9", "(function nav-enemy none)"]
],
"(code nav-enemy-patrol sharkey)": [
[27, "v1", "art-joint-anim"]
],
"(code nav-enemy-attack sharkey)": [
[144, "v1", "art-joint-anim"]
],
"(code nav-enemy-chase sharkey)": [
[40, "v1", "art-joint-anim"]
],
"(code nav-enemy-stop-chase sharkey)": [
[22, "v1", "art-joint-anim"]
],
"(code nav-enemy-victory sharkey)": [
[24, "v1", "art-joint-anim"]
],
"(code nav-enemy-chase lurkercrab)": [
[17, "v1", "art-joint-anim"],
[338, "v1", "art-joint-anim"],
[388, "v1", "art-joint-anim"]
],
"(code nav-enemy-patrol lurkercrab)": [
[21, "v1", "art-joint-anim"],
[77, "v1", "art-joint-anim"],
[191, "v1", "art-joint-anim"]
],
"(code nav-enemy-notice lurkerpuppy)": [
[24, "v1", "art-joint-anim"]
],
"(code nav-enemy-victory lurkerpuppy)": [
[20, "v1", "art-joint-anim"]
],
"(code nav-enemy-give-up lurkerpuppy)": [
[18, "v1", "art-joint-anim"],
[76, "v1", "art-joint-anim"]
],
"(code nav-enemy-chase lurkerpuppy)": [
[25, "v1", "art-joint-anim"],
[111, "v1", "art-joint-anim"]
],
"static-screen-init-by-other": [
[32, "s3", "sparticle-launch-group"],
[35, "s3", "sparticle-launch-group"]
],
"(code target-demo)": [
[66, "v1", "handle"],
[69, "v1", "handle"],
[96, "v1", "handle"],
[99, "v1", "handle"],
[126, "v1", "handle"],
[163, "v1", "handle"],
[196, "v1", "handle"],
[229, "v1", "handle"],
[262, "v1", "handle"],
[293, "v1", "handle"],
[323, "v1", "handle"],
[357, "v1", "handle"],
[390, "v1", "handle"],
[423, "v1", "handle"],
[456, "v1", "handle"],
[487, "v1", "handle"],
[518, "v1", "handle"],
[548, "v1", "handle"],
[578, "v1", "handle"],
[129, "v1", "handle"],
[166, "v1", "handle"],
[199, "v1", "handle"],
[232, "v1", "handle"],
[261, "v1", "handle"],
[265, "v1", "handle"],
[296, "v1", "handle"],
[298, "v1", "handle"],
[326, "v1", "handle"],
[360, "v1", "handle"],
[393, "v1", "handle"],
[426, "v1", "handle"],
[459, "v1", "handle"],
[490, "v1", "handle"],
[521, "v1", "handle"],
[551, "v1", "handle"],
[581, "v1", "handle"]
],
"target-has-all-the-cells?": [
[17, "v1", "float"]
],
"(code open final-door)": [
[13, "v1", "art-joint-anim"],
[66, "v1", "art-joint-anim"]
],
"(code idle powercellalt)": [
[8, "a1", "process-drawable"]
],
"(code target-final-door)": [
[85, "gp", "handle"],
[105, "gp", "handle"],
[117, "gp", "handle"],
[133, "s1", "process-drawable"],
[200, "s1", "process-drawable"]
],
"(event open final-door)": [
[4, "v1", "float"],
[6, "v1", "float"]
],
"(code nav-enemy-chase aphid)": [
[42, "v1", "art-joint-anim"],
[168, "v1", "art-joint-anim"]
],
"(code nav-enemy-stare aphid)": [
[34, "v1", "art-joint-anim"],
[160, "v1", "art-joint-anim"]
],
"(code nav-enemy-give-up aphid)": [
[43, "v1", "art-joint-anim"],
[101, "v1", "art-joint-anim"]
],
"placeholder-do-not-add-below": []
}
+3 -3
View File
@@ -155,7 +155,7 @@
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_ uint) collide-shape-prim 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
@@ -255,7 +255,7 @@
(dummy-31 () none 31)
(dummy-32 () none 32)
(dummy-33 (_type_ vector uint) none 33)
(dummy-34 () none 34)
(dummy-34 (_type_ uint) collide-shape-prim 34)
(dummy-35 (_type_) none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
@@ -276,7 +276,7 @@
(dummy-52 () none 52)
(dummy-53 (_type_ int int int) none 53)
(dummy-54 (_type_ int int) none 54)
(dummy-55 () none 55)
(dummy-55 (_type_ process uint float float float) none 55)
)
)
+2 -2
View File
@@ -47,10 +47,10 @@
(:methods
(new (symbol type process int float float float) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_) none 10)
(dummy-11 () none 11)
(distance-from-surface (_type_) float 12)
(dummy-13 () none 13)
(dummy-13 (_type_ float vector int vector) none 13)
(display-water-marks? (_type_) symbol 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
+1 -1
View File
@@ -244,7 +244,7 @@
(dummy-13 () none 13)
(dummy-14 (_type_) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) symbol 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
@@ -11,3 +11,6 @@
;; TODO - for particle related code
(define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher vector symbol symbol float none))
;; TODO - for static-screen
(define-extern lookup-part-group-by-name (function string basic))
+2
View File
@@ -5,3 +5,5 @@
;; name in dgo: target
;; dgos: GAME, ENGINE
;; TODO - for final-door
(define-extern target-stance (state target))
+2
View File
@@ -5,3 +5,5 @@
;; name in dgo: target2
;; dgos: GAME, ENGINE
;; TODO - for final-door
(define-extern target-grab (state target))
+2
View File
@@ -8,3 +8,5 @@
;; TODO - for assistant-firecanyon
(define-extern hide-hud (function none))
(define-extern hud-hidden? (function symbol))
;; TODO - for static-screen
(define-extern hide-hud-quick (function none))
File diff suppressed because it is too large Load Diff
+639
View File
@@ -5,3 +5,642 @@
;; name in dgo: lurkerpuppy
;; dgos: BEA, L1
(define-extern *lurkerpuppy-sg* skeleton-group)
;; definition of type lurkerpuppy
(deftype lurkerpuppy (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 "lurkerpuppy"
:bounds (new 'static 'vector :w 8192.0)
:max-lod 2
: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! *lurkerpuppy-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; failed to figure out what this is:
(defstate nav-enemy-notice (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(let ((a0-0 (-> self skel root-channel 0)))
(set! (-> a0-0 param 0) 1.0)
(joint-control-channel-group!
a0-0
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 51)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(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-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 10)
)
(ja-channel-push! 1 51)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) (ja-aframe 4.0 0))
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 7))
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!
)
)
)
)
(else
(ja-channel-push! 1 51)
)
)
(let ((f30-0 (rand-vu-float-range 0.9 1.1)))
(while #t
(if (rand-vu-percent? 0.25)
(sound-play-by-name
(static-sound-name "puppy-bark")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
)
(let ((a0-14 (-> self skel root-channel 0)))
(set!
(-> a0-14 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> a0-14 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
data
0
length
)
-1
)
)
)
(set! (-> a0-14 param 1) f30-0)
(set! (-> a0-14 frame-num) 0.0)
(joint-control-channel-group!
a0-14
(the-as art-joint-anim (-> self draw art-group data 7))
num-func-seek!
)
)
(until (ja-done? 0)
(if (logtest? (-> self nav-enemy-flags) 256)
(go-virtual nav-enemy-attack)
)
(suspend)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 param 0)
(the float (+ (-> a0-15 frame-group data 0 length) -1))
)
(set! (-> a0-15 param 1) f30-0)
(joint-control-channel-group-eval!
a0-15
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(set! (-> self rotate-speed) 1456355.5)
(set! (-> self turn-time) 30)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
(while #t
(logior! (-> self nav-enemy-flags) 16)
(ja-channel-push! 1 30)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set! (-> gp-0 param 0) (ja-aframe 12.0 0))
(set! (-> gp-0 param 1) f30-0)
(set! (-> gp-0 frame-num) 0.0)
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(let ((f0-3 (ja-aframe-num 0)))
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(if (and (>= f0-3 2.5) (>= 7.5 f0-3))
(logior! (-> self nav-enemy-flags) 16)
)
)
(suspend)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 param 0) (ja-aframe 12.0 0))
(set! (-> gp-1 param 1) f30-0)
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(let ((a0-11 (-> self skel root-channel 0)))
(set! (-> a0-11 param 0) 1.0)
(joint-control-channel-group!
a0-11
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 30)
(let ((v1-31 (-> self skel root-channel 0)))
(set!
(-> v1-31 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let ((v1-34 (-> self skel root-channel 0)))
(set! (-> v1-34 num-func) num-func-identity)
(set! (-> v1-34 frame-num) 0.0)
)
(let ((gp-2 (rand-vu-int-range 750 900))
(s5-0 (-> *display* base-frame-counter))
)
(until (>= (- (-> *display* base-frame-counter) s5-0) gp-2)
(let ((a0-18 (-> self skel root-channel 0)))
(set! (-> a0-18 param 0) 1.0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-blend-eval)
(suspend)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(set! (-> self rotate-speed) 218453.33)
(set! (-> self turn-time) 150)
(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 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!
)
)
)
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
(nav-enemy-get-new-patrol-point)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-7 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-7 param 1) 1.4)
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self collide-info)
(-> self nav destination-pos)
(-> self rotate-speed)
(-> self turn-time)
)
(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) 1.4)
(joint-control-channel-group-eval!
a0-9
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-attack (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(sound-play-by-name
(static-sound-name "head-butt")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual nav-enemy-victory)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-victory (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:exit
(behavior ()
(logior! (-> self nav-enemy-flags) 16)
(none)
)
:code
(behavior ()
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(ja-channel-push! 1 22)
(dotimes (gp-0 4)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(let ((f0-4 (ja-aframe-num 0)))
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(if (and (>= f0-4 2.5) (>= 7.5 f0-4))
(logior! (-> self nav-enemy-flags) 16)
)
)
(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!
)
)
)
)
(go-virtual nav-enemy-chase)
(none)
)
:post
(the-as (function none :behavior lurkerpuppy) nav-enemy-face-player-post)
)
;; definition for symbol *lurkerpuppy-nav-enemy-info*, type nav-enemy-info
(define
*lurkerpuppy-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 5
:walk-anim 6
:turn-anim 6
:notice-anim 8
:run-anim 7
:jump-anim 9
:jump-land-anim 10
:victory-anim 8
:taunt-anim 8
:die-anim 11
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 5.0)
:run-rotate-speed (degrees 3999.9998)
:run-acceleration (meters 1.0)
:run-turn-time #x2d
:walk-travel-speed (meters 2.0)
:walk-rotate-speed (degrees 1999.9999)
: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 6.0
:jump-anim-start-frame 3.5
:jump-land-anim-end-frame 14.0
:jump-height-min (meters 1.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 0.5)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #f
:draw-shadow #t
:move-to-ground #t
:hover-if-no-ground #f
:use-momentum #f
: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 47 of type lurkerpuppy
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 lurkerpuppy ((obj lurkerpuppy))
(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-sphere s5-0 (the-as uint 3))))
(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! (-> s4-0 prim-core offense) 2)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) 2048.0)
(dummy-50 s5-0)
(set! (-> obj collide-info) s5-0)
)
0
(none)
)
;; definition for method 48 of type lurkerpuppy
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 lurkerpuppy ((obj lurkerpuppy))
(dummy-14 obj *lurkerpuppy-sg* '())
(TODO-RENAME-45 obj *lurkerpuppy-nav-enemy-info*)
(when (nonzero? (-> obj neck))
(set! (-> obj neck up) (the-as uint 0))
(set! (-> obj neck nose) (the-as uint 1))
(set! (-> obj neck ear) (the-as uint 2))
)
0
(none)
)
@@ -5,3 +5,270 @@
;; name in dgo: assistant-citadel
;; dgos: CIT, L1
(define-extern *assistant-lavatube-end-sg* skeleton-group)
;; definition of type assistant-lavatube-end
(deftype assistant-lavatube-end (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-lavatube-end"
: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-lavatube-end-sg* v1-1)
)
;; definition for method 32 of type assistant-lavatube-end
(defmethod
play-anim!
assistant-lavatube-end
((obj assistant-lavatube-end) (arg0 symbol))
(case (current-status (-> obj tasks))
((1 2)
(new 'static 'spool-anim
:name "assistant-lavatube-end-resolution"
:index 4
:parts 11
:command-list '()
)
)
((6)
(if arg0
(close-current! (-> obj tasks))
)
(new 'static 'spool-anim
:name "assistant-lavatube-end-resolution"
:index 4
:parts 11
:command-list
'(
((the binteger 61)
joint
"cameraB"
)
((the binteger 151)
joint
"camera"
)
((the binteger 226)
joint
"cameraB"
)
((the binteger 273)
joint
"camera"
)
((the binteger 316)
joint
"cameraB"
)
((the binteger 451)
joint
"camera"
)
((the binteger 651)
joint
"cameraB"
)
((the binteger 786)
joint
"camera"
)
((the binteger 888)
joint
"cameraB"
)
((the binteger 1011)
joint
"camera"
)
((the binteger 1011)
shadow
target
#f
)
((the binteger 1140)
shadow
target
#t
)
((the binteger 1191) 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 31 of type assistant-lavatube-end
(defmethod get-art-elem assistant-lavatube-end ((obj assistant-lavatube-end))
(-> obj draw art-group data 3)
)
;; failed to figure out what this is:
(defstate hidden (assistant-lavatube-end)
:virtual #t
:trans
(behavior ()
(dummy-33 self)
((-> (method-of-type process-taskable hidden) trans))
(when
(and
(and
*target*
(>=
61440.0
(vector-vector-distance (-> self root trans) (-> *target* control trans))
)
)
(not
(closed?
(-> self tasks)
(game-task village4-button)
(task-status need-reward-speech)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (assistant-lavatube-end)
:virtual #t
:enter
(behavior ()
((-> (method-of-type process-taskable idle) enter))
(case (get-task-status (game-task village4-button))
(((task-status need-reward-speech))
(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) 'play-anim)
(send-event-function self a1-0)
)
)
)
(none)
)
:code
(behavior ()
(while #t
(when (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
(let ((v1-5 (-> self skel root-channel 0)))
(set!
(-> v1-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
)
)
(let ((a0-10 (-> self skel root-channel 0)))
(set! (-> a0-10 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-10 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-10 param 1) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group!
a0-10
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-11 (-> self skel root-channel 0)))
(set!
(-> a0-11 param 0)
(the float (+ (-> a0-11 frame-group data 0 length) -1))
)
(set! (-> a0-11 param 1) 1.0)
(joint-control-channel-group-eval!
a0-11
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; definition for method 39 of type assistant-lavatube-end
(defmethod should-display? assistant-lavatube-end ((obj assistant-lavatube-end))
(first-any (-> obj tasks) #t)
(let ((v1-3 (current-status (-> obj tasks))))
(and
(or (= v1-3 6) (= v1-3 0))
(not (task-closed? (game-task citadel-sage-green) (task-status need-hint)))
)
)
)
;; definition for method 11 of type assistant-lavatube-end
(defmethod
copy-defaults!
assistant-lavatube-end
((obj assistant-lavatube-end) (arg0 res-lump))
(dummy-40
obj
arg0
*assistant-lavatube-end-sg*
3
29
(new 'static 'vector :w 4096.0)
5
)
(set! (-> obj tasks) (get-task-control (game-task village4-button)))
(first-any (-> obj tasks) #t)
(dummy-42 obj)
(none)
)
+13 -8
View File
@@ -771,17 +771,22 @@ nav-enemy-default-event-handler
)
;; definition for function nav-enemy-test-nav-mesh-intersection-xz?
;; INFO: Return type mismatch nav-poly vs symbol.
(defbehavior nav-enemy-test-nav-mesh-intersection-xz? nav-enemy ((arg0 vector))
(dummy-16 (-> self nav) arg0)
(the-as symbol (dummy-16 (-> self nav) arg0))
)
;; definition for function nav-enemy-test-point-in-nav-mesh?
;; INFO: Return type mismatch structure vs symbol.
(defbehavior nav-enemy-test-point-in-nav-mesh? nav-enemy ((arg0 vector))
(and
(dummy-16 (-> self nav) arg0)
(<
(-> arg0 y)
(+ (-> self collide-info trans y) (-> self enemy-info notice-top))
(the-as
symbol
(and
(dummy-16 (-> self nav) arg0)
(<
(-> arg0 y)
(+ (-> self collide-info trans y) (-> self enemy-info notice-top))
)
)
)
)
@@ -2775,8 +2780,8 @@ nav-enemy-default-event-handler
:code
(behavior ()
(nav-enemy-execute-jump)
(let ((a1-0 (the-as structure (-> self nav user-poly))))
(if (not (the-as nav-poly a1-0))
(let ((a1-0 (-> self nav user-poly)))
(if (not a1-0)
(set! a1-0 (dummy-16 (-> self nav) (-> self jump-dest)))
)
(if a1-0
File diff suppressed because it is too large Load Diff
+406
View File
@@ -5,3 +5,409 @@
;; name in dgo: static-screen
;; dgos: DEM, L1, TIT
;; definition of type static-screen
(deftype static-screen (process)
((part sparticle-launch-control 1 :offset-assert 112)
(state-time uint64 :offset-assert 120)
)
:heap-base #x10
:method-count-assert 15
:size-assert #x80
:flag-assert #xf00100080
(:methods
(idle (int int symbol) _type_ :state 14)
)
)
;; definition for method 7 of type static-screen
;; INFO: Return type mismatch process vs static-screen.
(defmethod relocate static-screen ((obj static-screen) (arg0 int))
(let ((v1-0 *kernel-context*))
(set! (-> v1-0 relocating-process) obj)
(set! (-> v1-0 relocating-min) (the-as int (&-> obj type)))
(set!
(-> v1-0 relocating-max)
(the-as
int
(+ (+ (-> obj allocated-length) -4 (-> process size)) (the-as int obj))
)
)
(set! (-> v1-0 relocating-offset) arg0)
)
(dotimes (v1-2 1)
(if (nonzero? (-> obj part v1-2))
(&+! (-> obj part v1-2) arg0)
)
)
(the-as static-screen ((method-of-type process relocate) obj arg0))
)
;; definition for method 10 of type static-screen
(defmethod deactivate static-screen ((obj static-screen))
(dotimes (s5-0 1)
(if (nonzero? (-> obj part s5-0))
(deactivate (-> obj part s5-0))
)
)
((method-of-type process deactivate) obj)
(none)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2966)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600000)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value #x45970a3d
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x46d00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2967)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600100)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value -979252543
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x46500000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2968)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600200)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value -971056873
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x45d00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-group-id-table* 707)
(new 'static 'sparticle-launch-group
:length 3
:duration #xbb8
:linger-duration #x5dc
:flags #x4
:name "group-part-screen1"
:launcher
(new 'static 'inline-array sparticle-group-item 3
(new 'static 'sparticle-group-item :launcher #xb96 :flags #x8)
(new 'static 'sparticle-group-item :launcher #xb97 :flags #x8)
(new 'static 'sparticle-group-item :launcher #xb98 :flags #x8)
)
:bounds (new 'static 'sphere :w 4096.0)
)
)
;; failed to figure out what this is:
(defstate idle (static-screen)
:virtual #t
:enter
(behavior ((arg0 int) (arg1 int) (arg2 symbol))
(set! (-> *setting-control* current bg-a) 1.0)
(set! (-> *setting-control* default bg-a) 0.0)
(push-setting!
*setting-control*
self
(the-as (function object object object object object) 'common-page)
'set
0.0
(ash 1 (+ arg0 1))
)
(none)
)
:trans
(behavior ()
(hide-hud-quick)
(dummy-11 (-> self part 0) *zero-vector*)
0
(none)
)
:code
(behavior ((arg0 int) (arg1 int) (arg2 symbol))
(local-vars (v1-6 symbol))
(set! (-> self state-time) (the-as uint (-> *display* base-frame-counter)))
(until v1-6
(suspend)
(set!
v1-6
(or
(and
(> arg1 0)
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
arg1
)
)
(and
arg2
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(logtest?
(-> *cpad-list* cpads 0 button0-rel 0)
(pad-buttons select start triangle circle x square)
)
)
)
)
)
(set! (-> *setting-control* default bg-a) 1.0)
(while
(!= (-> *setting-control* current bg-a) (-> *setting-control* default bg-a))
(suspend)
)
(clear-pending-settings-from-process *setting-control* self 'common-page)
(suspend)
0
(none)
)
)
;; definition for function static-screen-init-by-other
;; INFO: Return type mismatch int vs none.
(defbehavior
static-screen-init-by-other static-screen
((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 symbol))
(let ((s3-0 (lookup-part-group-by-name "group-part-screen1")))
(when
(and
s3-0
(nonzero? s3-0)
(type-type? (-> s3-0 type) sparticle-launch-group)
)
(set! (-> *part-id-table* 2966 init-specs 0 initial-value) arg1)
(set! (-> *part-id-table* 2967 init-specs 0 initial-value) arg2)
(set! (-> *part-id-table* 2968 init-specs 0 initial-value) arg3)
(set!
(-> self part 0)
(create-launch-control (the-as sparticle-launch-group s3-0) self)
)
(go-virtual idle arg0 arg4 arg5)
)
)
0
(none)
)
;; definition for function static-screen-spawn
;; Used lq/sq
(defun
static-screen-spawn
((arg0 int)
(arg1 int)
(arg2 int)
(arg3 int)
(arg4 int)
(arg5 symbol)
(arg6 target)
)
(local-vars (sv-16 process))
(set! sv-16 (get-process *default-dead-pool* static-screen #x4000))
(when sv-16
(let ((t9-1 (method-of-type static-screen activate)))
(t9-1
(the-as static-screen sv-16)
arg6
'static-screen
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-16
static-screen-init-by-other
arg0
arg1
arg2
arg3
arg4
arg5
)
(-> sv-16 ppointer)
)
)
+759
View File
@@ -5,3 +5,762 @@
;; name in dgo: final-door
;; dgos: FIN, L1
(declare-type final-door process-drawable)
(declare-type power-left final-door)
(define-extern *powercellalt-sg* skeleton-group)
(define-extern *power-right-sg* skeleton-group)
(define-extern *power-left-sg* skeleton-group)
;; definition of type fin-door
(deftype fin-door (process-hidden)
()
:method-count-assert 15
:size-assert #x70
:flag-assert #xf00000070
)
;; definition of type final-door
(deftype final-door (process-drawable)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
(:methods
(idle () _type_ :state 20)
(dummy-21 (_type_) none 21)
(open () _type_ :state 22)
)
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "power-left"
:bounds
(new 'static 'vector :y 45056.0 :w 49152.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! *power-left-sg* v1-2)
)
;; failed to figure out what this is:
(let
((v1-3
(new 'static 'skeleton-group
:art-group-name "power-right"
:bounds
(new 'static 'vector :y 45056.0 :w 49152.0)
:version #x6
)
)
)
(set! (-> v1-3 jgeo) 0)
(set! (-> v1-3 janim) 2)
(set! (-> v1-3 mgeo 0) (the-as uint 1))
(set! (-> v1-3 lod-dist 0) 4095996000.0)
(set! *power-right-sg* v1-3)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'skeleton-group
:art-group-name "powercellalt"
:bounds (new 'static 'vector :w 8192.0)
:version #x6
)
)
)
(set! (-> v1-4 jgeo) 0)
(set! (-> v1-4 janim) 2)
(set! (-> v1-4 mgeo 0) (the-as uint 1))
(set! (-> v1-4 lod-dist 0) 4095996000.0)
(set! *powercellalt-sg* v1-4)
)
;; failed to figure out what this is:
(defstate idle (final-door)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'open)
enter-state
(go-virtual open)
)
)
)
)
:code
(behavior ()
(transform-post)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
)
;; failed to figure out what this is:
(defstate open (final-door)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'brightness)
(let ((f0-0 (the-as float (-> arg3 param 0)))
(f1-0 (the-as float (-> arg3 param 1)))
)
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
(let ((v0-0 (-> self draw color-emissive)))
(set! (-> v0-0 x) f1-0)
(set! (-> v0-0 y) f1-0)
(set! (-> v0-0 z) f1-0)
(set! (-> v0-0 w) f1-0)
v0-0
)
)
)
)
)
)
:code
(behavior ()
(case (-> self type)
((power-left)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 0.353)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(transform-post)
(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) 0.353)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 0.353)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(transform-post)
(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) 0.353)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(transform-post)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
)
;; definition for method 11 of type final-door
(defmethod copy-defaults! final-door ((obj final-door) (arg0 res-lump))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))
)
)
(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 512))
(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) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 45056.0 0.0 49152.0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-21 obj)
(go (method-of-object obj idle))
(none)
)
;; definition of type power-left
(deftype power-left (final-door)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
)
;; definition of type power-right
(deftype power-right (final-door)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
)
;; failed to figure out what this is:
(defstate idle (power-left)
:virtual #t
:code
(behavior ()
(ja-post)
(while #t
(if
(and
(and
*target*
(>=
61440.0
(vector-vector-distance
(-> self root trans)
(-> *target* control trans)
)
)
)
(and
(zero? (logand (-> *target* state-flags) 256))
(and
(>= (-> *game-info* fuel) 100.0)
(not
(and
(-> self entity)
(logtest?
(-> self entity extra perm status)
(entity-perm-status complete)
)
)
)
(=
(get-task-status (game-task finalboss-movies))
(task-status need-reward-speech)
)
(let ((gp-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> gp-0 from) self)
(set! (-> gp-0 num-params) 3)
(set! (-> gp-0 message) 'change-mode)
(set! (-> gp-0 param 0) (the-as uint 'final-door))
(set!
(-> gp-0 param 1)
(the-as
uint
(search-process-tree *active-pool* (lambda ((arg0 final-door))
(= (-> arg0 type) power-right)
)
)
)
)
(set!
(-> gp-0 param 2)
(the-as
uint
(search-process-tree *active-pool* (lambda ((arg0 final-door))
(= (-> arg0 type) power-left)
)
)
)
)
(send-event-function *target* gp-0)
)
)
)
)
(process-entity-status! self (entity-perm-status complete) #t)
)
(suspend)
)
(none)
)
)
;; definition for method 21 of type power-left
;; INFO: Return type mismatch int vs none.
(defmethod dummy-21 power-left ((obj power-left))
(dummy-14 obj *power-left-sg* '())
0
(none)
)
;; definition for method 21 of type power-right
;; INFO: Return type mismatch int vs none.
(defmethod dummy-21 power-right ((obj power-right))
(dummy-14 obj *power-right-sg* '())
0
(none)
)
;; definition of type powercellalt
(deftype powercellalt (process-drawable)
((root-override collide-shape-moving :offset 112)
(jump-pos vector :inline :offset-assert 176)
(base vector :inline :offset-assert 192)
(index int32 :offset-assert 208)
)
:heap-base #x70
:method-count-assert 23
:size-assert #xd4
:flag-assert #x17007000d4
(:methods
(dummy-20 () none 20)
(jump () _type_ :state 21)
(idle () _type_ :state 22)
)
)
;; failed to figure out what this is:
(defstate jump (powercellalt)
:virtual #t
:code
(behavior ()
(sound-play-by-name
(static-sound-name "cell-prize")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((gp-1 (new 'stack 'trajectory)))
(set! (-> self base y) (-> self jump-pos y))
(setup-from-to-duration!
gp-1
(-> self root-override trans)
(-> self jump-pos)
300.0
-2.2755556
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(let
((f0-2
(the
float
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
)
)
)
(eval-position! gp-1 f0-2 (-> self root-override trans))
)
(transform-post)
(dummy-11
(-> self part)
(the-as vector (-> self root-override root-prim prim-core))
)
(suspend)
(when (nonzero? (-> self skel))
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) 0.5)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
)
(set! (-> self root-override trans quad) (-> self jump-pos quad))
(set! (-> self base quad) (-> self root-override trans quad))
(transform-post)
(sound-play-by-name
(static-sound-name "land-pcmetal")
(new-sound-id)
1024
3048
0
(the-as uint 1)
(the-as vector #t)
)
(let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-3
(let ((t9-12 (method-of-type part-tracker activate)))
(t9-12
(the-as part-tracker gp-3)
*entity-pool*
'part-tracker
(the-as pointer #x70004000)
)
)
(run-now-in-process
gp-3
part-tracker-init
(-> *part-group-id-table* 4)
-1
#f
#f
#f
(-> self root-override root-prim prim-core)
)
(-> gp-3 ppointer)
)
)
(go-virtual idle)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (powercellalt)
:virtual #t
:code
(behavior ()
(while #t
(vector<-cspace!
(-> self root-override trans)
(->
(the-as process-drawable (-> self parent 0))
node-list
data
(-> self index)
)
)
(transform-post)
(suspend)
)
(none)
)
)
;; definition for function powercellalt-init-by-other
;; Used lq/sq
(defbehavior
powercellalt-init-by-other powercellalt
((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int))
(set! (-> self entity) arg0)
(let
((s3-0
(new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))
)
)
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction) default-collision-reaction)
(set! (-> s3-0 no-reaction) nothing)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s3-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 64))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 4915.2)
)
(dummy-46 s3-0)
(set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w)))
(dummy-50 s3-0)
(set! (-> self root-override) s3-0)
)
(set! (-> self root-override trans quad) (-> arg1 quad))
(set! (-> self jump-pos quad) (-> arg2 quad))
(set-vector! (-> self root-override scale) 0.5 0.5 0.5 1.0)
(set! (-> self index) arg3)
(dummy-14 self *powercellalt-sg* '())
(set!
(-> self part)
(create-launch-control (-> *part-group-id-table* 63) self)
)
enter-state
(-> self root-override trans)
(-> self jump-pos)
(go-virtual jump)
(none)
)
;; failed to figure out what this is:
(defstate target-final-door (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
((-> target-grab event) arg0 arg1 arg2 arg3)
)
:enter
(behavior ((arg0 basic) (arg1 handle))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 1)
(set! (-> a1-1 message) 'change-to-entity-by-name)
(set! (-> a1-1 param 0) (the-as uint "camera-403"))
(send-event-function *camera* a1-1)
)
(set! (-> self control unknown-surface00) *empty-mods*)
(logior! (-> self state-flags) 272)
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
(none)
)
:exit
(behavior ()
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) self)
(set! (-> a1-0 num-params) 2)
(set! (-> a1-0 message) 'change-state)
(set! (-> a1-0 param 0) (the-as uint *camera-base-mode*))
(set! (-> a1-0 param 1) (the-as uint 60))
(send-event-function *camera* a1-0)
)
(set! (-> self state-flags) (logand -273 (-> self state-flags)))
(target-exit)
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
(none)
)
:trans
(behavior ()
(set-letterbox-frames 5)
(none)
)
:code
(behavior ((arg0 basic) (arg1 handle))
(local-vars
(sv-144 process)
(sv-160 vector)
(sv-176 process)
(sv-192 vector)
)
(let ((a0-2 (get-task-control (game-task finalboss-movies))))
(save-reminder a0-2 (logior (get-reminder a0-2 0) 2) 0)
)
(TODO-RENAME-30
(-> self control)
(new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0)
)
(set-quaternion!
(-> self control)
(the-as quaternion (new 'static 'vector :y -0.8472 :w 0.5312))
)
(rot->dir-targ! (-> self control))
(transform-post)
(ja-channel-push! 1 60)
(let ((s4-1 (-> self skel root-channel 0)))
(set!
(-> s4-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 88))
)
(set! (-> s4-1 param 0) (ja-aframe 18.0 0))
(set! (-> s4-1 param 1) 1.0)
(set! (-> s4-1 frame-num) 0.0)
(joint-control-channel-group!
s4-1
(the-as art-joint-anim (-> self draw art-group data 88))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s4-2 (-> self skel root-channel 0)))
(set! (-> s4-2 param 0) (ja-aframe 18.0 0))
(set! (-> s4-2 param 1) 1.0)
(joint-control-channel-group-eval!
s4-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((s4-3 (-> (handle->process (the-as handle arg0)) entity))
(s3-1
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> self node-list data 7)
)
)
)
(dotimes (s2-0 50)
(when (handle->process (the-as handle arg0))
(let ((s1-0 (handle->process (the-as handle arg0)))
(s0-0 (+ s2-0 4))
)
(set!
sv-160
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> (the-as process-drawable s1-0) node-list data s0-0)
)
)
(set! sv-144 (get-process *default-dead-pool* powercellalt #x4000))
(when sv-144
(let ((t9-16 (method-of-type powercellalt activate)))
(t9-16
(the-as powercellalt sv-144)
s1-0
'powercellalt
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-144
powercellalt-init-by-other
s4-3
s3-1
sv-160
s0-0
)
(-> sv-144 ppointer)
)
)
)
(let ((s1-1 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) s1-1) 30)
(suspend)
)
)
(when (handle->process arg1)
(let ((s1-2 (handle->process arg1))
(s0-1 (+ s2-0 4))
)
(set!
sv-192
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> (the-as process-drawable s1-2) node-list data s0-1)
)
)
(set! sv-176 (get-process *default-dead-pool* powercellalt #x4000))
(when sv-176
(let ((t9-20 (method-of-type powercellalt activate)))
(t9-20
(the-as powercellalt sv-176)
s1-2
'powercellalt
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-176
powercellalt-init-by-other
s4-3
s3-1
sv-192
s0-1
)
(-> sv-176 ppointer)
)
)
)
(let ((s1-3 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) s1-3) 30)
(suspend)
)
)
)
)
(let ((gp-1 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) gp-1) 600)
(suspend)
)
)
(let ((v0-22 (entity-by-name "sage-finalboss-1"))
(a1-26 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-26 from) self)
(set! (-> a1-26 num-params) 0)
(set! (-> a1-26 message) 'play-anim)
(let ((v1-70 v0-22))
(send-event-function (if v1-70
(-> v1-70 extra process)
)
a1-26
)
)
)
(go target-stance)
(none)
)
:post
target-no-stick-post
)
+142
View File
@@ -5,3 +5,145 @@
;; name in dgo: robotboss-h
;; dgos: FIN, L1
(define-extern *robotboss-sg* skeleton-group)
;; definition of type robotboss-dda
(deftype robotboss-dda (structure)
((blue-bomb-time float :offset-assert 0)
(num-blobs int32 :offset-assert 4)
(green-bomb-time float :offset-assert 8)
(red-shots-min int32 :offset-assert 12)
(red-shots-rnd int32 :offset-assert 16)
(red-shot-time-min float :offset-assert 20)
(red-shot-time-rnd float :offset-assert 24)
(red-bomb-time float :offset-assert 28)
(yellow-shot-time-min float :offset-assert 32)
(yellow-shot-time-rnd float :offset-assert 36)
(yellow-gun-hits int32 :offset-assert 40)
(yellow-bomb-time float :offset-assert 44)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
;; definition of type robotboss
(deftype robotboss (process-drawable)
((alts entity-actor 13 :offset-assert 176)
(desired-loc vector :inline :offset-assert 240)
(old-loc vector :inline :offset-assert 256)
(loc-t float :offset-assert 272)
(loc-t-start seconds :offset-assert 280)
(loc-t-duration seconds :offset-assert 288)
(hits-to-go int32 :offset-assert 296)
(took-hit symbol :offset-assert 300)
(children-spawned int32 :offset-assert 304)
(vulnerable seconds :offset-assert 312)
(till-next-shot seconds :offset-assert 320)
(shot-attractor uint64 :offset-assert 328)
(desired-pool-y float :offset-assert 336)
(particle sparticle-launch-control 7 :offset-assert 340)
(blue-smoke basic :offset-assert 368)
(red-smoke basic :offset-assert 372)
(yellow-smoke basic :offset-assert 376)
(white-eco handle :offset-assert 384)
(des-cam-entity basic :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
)
:heap-base #x16
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
(:methods
(dummy-20 () none 20)
)
)
;; definition for method 7 of type robotboss
;; INFO: Return type mismatch process-drawable vs robotboss.
(defmethod relocate robotboss ((obj robotboss) (arg0 int))
(dotimes (v1-0 7)
(if (nonzero? (-> obj particle v1-0))
(&+! (-> obj particle v1-0) arg0)
)
)
(dotimes (v1-3 4)
(if (nonzero? (-> obj looping-sound v1-3))
(&+! (-> obj looping-sound v1-3) arg0)
)
)
(if (nonzero? (-> obj yellow-gun))
(&+! (-> obj yellow-gun) arg0)
)
(the-as robotboss ((method-of-type process-drawable relocate) obj arg0))
)
;; definition for method 10 of type robotboss
(defmethod deactivate robotboss ((obj robotboss))
(dotimes (s5-0 7)
(let ((a0-1 (-> obj particle s5-0)))
(if (nonzero? a0-1)
(deactivate a0-1)
)
)
)
(dotimes (s5-1 4)
(let ((a0-2 (-> obj looping-sound s5-1)))
(if (nonzero? a0-2)
(stop! a0-2)
)
)
)
((method-of-type process-drawable deactivate) obj)
(none)
)
;; definition for function target-has-all-the-cells?
;; INFO: Return type mismatch basic vs symbol.
(defun target-has-all-the-cells? ()
(with-pp
(the-as
symbol
(and *target* (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) pp)
(set! (-> a1-0 num-params) 2)
(set! (-> a1-0 message) 'query)
(set! (-> a1-0 param 0) (the-as uint 'pickup))
(set! (-> a1-0 param 1) (the-as uint 6))
(>=
(the int (the-as float (send-event-function *target* a1-0)))
100
)
)
)
)
)
)
;; failed to figure out what this is:
(let
((v0-6
(new 'static 'skeleton-group
:art-group-name "robotboss"
:bounds
(new 'static 'vector :y -40960.0 :w 327680.0)
:longest-edge (meters 19.9)
:version #x6
)
)
)
(set! (-> v0-6 jgeo) 0)
(set! (-> v0-6 janim) 2)
(set! (-> v0-6 mgeo 0) (the-as uint 1))
(set! (-> v0-6 lod-dist 0) 4095996000.0)
(set! *robotboss-sg* v0-6)
)
+1 -1
View File
@@ -45,7 +45,7 @@ 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))
(dummy-10 (-> obj water))
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
0
(none)
+676
View File
@@ -5,3 +5,679 @@
;; name in dgo: aphid
;; dgos: JUB, L1
(define-extern *aphid-sg* skeleton-group)
;; definition of type aphid
(deftype aphid (nav-enemy)
((try int32 :offset-assert 400)
)
:heap-base #x130
:method-count-assert 76
:size-assert #x194
:flag-assert #x4c01300194
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "aphid-lurker"
:bounds
(new 'static 'vector :y 8192.0 :w 8192.0)
:version #x6
:shadow 2
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) -1)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *aphid-sg* v1-1)
)
;; definition for function aphid-invulnerable
(defbehavior aphid-invulnerable aphid ()
(set! (-> self nav-enemy-flags) (logand -33 (-> self nav-enemy-flags)))
(dummy-54 (-> self collide-info) 2 4)
(none)
)
;; definition for function aphid-vulnerable
(defbehavior aphid-vulnerable aphid ()
(logior! (-> self nav-enemy-flags) 32)
(dummy-54 (-> self collide-info) 2 1)
(none)
)
;; definition for method 43 of type aphid
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block))
(with-pp
(the-as object (cond
((or
(logtest? (-> obj nav-enemy-flags) 32)
(= arg0 (ppointer->process (-> obj parent)))
)
(let ((v1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> v1-5 from) pp)
(set! (-> v1-5 num-params) 1)
(set! (-> v1-5 message) 'get-attack-count)
(set! (-> v1-5 param 0) (the-as uint 1))
(send-event-function arg0 v1-5)
)
(logclear!
(-> obj mask)
(process-mask actor-pause attackable)
)
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (aphid)
:virtual #t
:exit
aphid-vulnerable
:code
(behavior ()
(let ((gp-0 (cond
((>= (-> self try) 15)
450
)
((>= (-> self try) 10)
300
)
((>= (-> self try) 5)
150
)
(else
0
)
)
)
)
(while #t
(ja-channel-push! 1 15)
(sound-play-by-name
(static-sound-name "aphid-spike-out")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-3 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-3 param 1) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group!
a0-3
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) 1.0)
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(aphid-invulnerable)
(ja-channel-push! 1 30)
(let ((v1-28 (-> self skel root-channel 0)))
(set!
(-> v1-28 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let ((v1-31 (-> self skel root-channel 0)))
(set! (-> v1-31 num-func) num-func-identity)
(set! (-> v1-31 frame-num) 0.0)
)
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1))
(s5-1 (-> *display* base-frame-counter))
(s4-1 (- (the int (nav-enemy-rnd-float-range 900.0 1440.0)) gp-0))
)
(until (>= (- (-> *display* base-frame-counter) s5-1) s4-1)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set! (-> a0-13 param 0) f30-0)
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
(aphid-vulnerable)
(ja-channel-push! 1 15)
(sound-play-by-name
(static-sound-name "aphid-spike-in")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set! (-> a0-17 param 0) 0.0)
(set! (-> a0-17 param 1) 1.0)
(set!
(-> a0-17 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-17
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-18 (-> self skel root-channel 0)))
(set! (-> a0-18 param 0) 0.0)
(set! (-> a0-18 param 1) 1.0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
(let ((v1-63 (-> self skel root-channel 0)))
(set!
(-> v1-63 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info run-anim))
)
)
)
(let ((v1-66 (-> self skel root-channel 0)))
(set! (-> v1-66 num-func) num-func-identity)
(set! (-> v1-66 frame-num) 0.0)
)
(let ((f30-1 (nav-enemy-rnd-float-range 0.9 1.1))
(s5-3 (-> *display* base-frame-counter))
(s4-3 (+ (the int (nav-enemy-rnd-float-range 660.0 900.0)) gp-0))
)
(until (>= (- (-> *display* base-frame-counter) s5-3) s4-3)
(suspend)
(let ((a0-29 (-> self skel root-channel 0)))
(set! (-> a0-29 param 0) f30-1)
(joint-control-channel-group-eval!
a0-29
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (aphid)
:virtual #t
:code
(behavior ()
(set! (-> self turn-time) 60)
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
(when
(or
(logtest? (-> self nav-enemy-flags) 256)
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
)
(ja-channel-push! 1 30)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-3 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-3 param 1) f30-0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group!
a0-3
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) f30-0)
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(while #t
(when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) 16)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) 1.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 60)
(let ((v1-35 (-> self skel root-channel 0)))
(set!
(-> v1-35 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
)
(let ((v1-38 (-> self skel root-channel 0)))
(set! (-> v1-38 num-func) num-func-identity)
(set! (-> v1-38 frame-num) 0.0)
)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set! (-> a0-13 param 0) 0.75)
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
)
(when (nav-enemy-rnd-percent? 0.3)
(if (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 10)
)
)
(ja-channel-push! 1 30)
)
(let ((a0-22 (-> self skel root-channel 0)))
(set!
(-> a0-22 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-22 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-22 param 1) f30-0)
(set! (-> a0-22 frame-num) 0.0)
(joint-control-channel-group!
a0-22
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-23 (-> self skel root-channel 0)))
(set!
(-> a0-23 param 0)
(the float (+ (-> a0-23 frame-group data 0 length) -1))
)
(set! (-> a0-23 param 1) f30-0)
(joint-control-channel-group-eval!
a0-23
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (aphid)
:virtual #t
:code
(behavior ()
(set! (-> self rotate-speed) 218453.33)
(set! (-> self turn-time) 150)
(ja-channel-push! 1 45)
(let ((s4-0 (-> self collide-info))
(s5-0 (target-pos 0))
)
(when
(<
(fabs
(deg-diff
(y-angle s4-0)
(vector-y-angle
(vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans))
)
)
)
12743.111
)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
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 7))
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!
)
)
)
)
)
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
(nav-enemy-get-new-patrol-point)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-12 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group!
a0-12
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self collide-info)
(-> self nav destination-pos)
(-> self rotate-speed)
(-> self turn-time)
)
(suspend)
(let ((a0-14 (-> self skel root-channel 0)))
(set!
(-> a0-14 param 0)
(the float (+ (-> a0-14 frame-group data 0 length) -1))
)
(set! (-> a0-14 param 1) 1.0)
(joint-control-channel-group-eval!
a0-14
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; definition for symbol *aphid-nav-enemy-info*, type nav-enemy-info
(define
*aphid-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 3
:walk-anim 4
:turn-anim 9
:notice-anim 3
:run-anim 4
:jump-anim -1
:jump-land-anim -1
:victory-anim 10
:taunt-anim 10
:die-anim 11
:neck-joint 10
:player-look-at-joint 5
:run-travel-speed (meters 5.0)
:run-rotate-speed (degrees 2880.0)
:run-acceleration (meters 1.0)
:run-turn-time #x1e
:walk-travel-speed (meters 3.0)
:walk-rotate-speed (degrees 720.0)
:walk-acceleration (meters 1.0)
:walk-turn-time #x96
:attack-shove-back (meters 3.0)
:attack-shove-up (meters 2.0)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 2.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 24.0
:jump-anim-start-frame 10.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 0.25)
:shadow-min-y (meters -0.25)
:shadow-locus-dist (meters 150.0)
:use-align #f
: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 #f
)
)
;; definition for method 47 of type aphid
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 aphid ((obj aphid))
(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-sphere s5-0 (the-as uint 3))))
(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! (-> s4-0 prim-core offense) 1)
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 4096.0)
)
(dummy-46 s5-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 aphid
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 aphid ((obj aphid))
(dummy-14 obj *aphid-sg* '())
(TODO-RENAME-45 obj *aphid-nav-enemy-info*)
(set! (-> obj neck up) (the-as uint 0))
(set! (-> obj neck nose) (the-as uint 1))
(set! (-> obj neck ear) (the-as uint 2))
0
(none)
)
;; definition for function aphid-init-by-other
;; Used lq/sq
(defbehavior
aphid-init-by-other aphid
((arg0 nav-enemy) (arg1 vector) (arg2 vector))
(TODO-RENAME-47 self)
(logior! (-> self mask) (process-mask actor-pause))
(set! (-> self collide-info trans quad) (-> arg1 quad))
(set! (-> self event-param-point quad) (-> arg2 quad))
(let ((s3-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1)))
(set! (-> s3-1 y) 0.0)
(vector-normalize! s3-1 1.0)
(forward-up->quaternion (-> self collide-info quat) s3-1 *up-vector*)
)
(vector-identity! (-> self collide-info scale))
(set! (-> self entity) (-> arg0 entity))
(TODO-RENAME-48 self)
(set! (-> self nav-enemy-flags) (logand -4097 (-> self nav-enemy-flags)))
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 0)
(set! (-> a1-3 message) 'try)
(set!
(-> self try)
(the-as int (send-event-function (ppointer->process (-> self parent)) a1-3))
)
)
(go-virtual nav-enemy-chase)
(none)
)
@@ -242,7 +242,7 @@
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_ uint) collide-shape-prim 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
@@ -412,7 +412,7 @@
(dummy-31 () none 31)
(dummy-32 () none 32)
(dummy-33 (_type_ vector uint) none 33)
(dummy-34 () none 34)
(dummy-34 (_type_ uint) collide-shape-prim 34)
(dummy-35 (_type_) none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
@@ -433,7 +433,7 @@
(dummy-52 () none 52)
(dummy-53 (_type_ int int int) none 53)
(dummy-54 (_type_ int int) none 54)
(dummy-55 () none 55)
(dummy-55 (_type_ process uint float float float) none 55)
)
)
+2 -2
View File
@@ -44,10 +44,10 @@
(:methods
(new (symbol type process int float float float) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-10 (_type_) none 10)
(dummy-11 () none 11)
(distance-from-surface (_type_) float 12)
(dummy-13 () none 13)
(dummy-13 (_type_ float vector int vector) none 13)
(display-water-marks? (_type_) symbol 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
+1 -1
View File
@@ -386,7 +386,7 @@
(dummy-13 () none 13)
(dummy-14 (_type_) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) symbol 16)
(dummy-16 (_type_ vector) nav-poly 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,652 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type lurkerpuppy
(deftype lurkerpuppy (nav-enemy)
()
:heap-base #x120
:method-count-assert 76
:size-assert #x190
:flag-assert #x4c01200190
)
;; definition for method 3 of type lurkerpuppy
(defmethod inspect lurkerpuppy ((obj lurkerpuppy))
(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 "lurkerpuppy"
:bounds (new 'static 'vector :w 8192.0)
:max-lod 2
: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! *lurkerpuppy-sg* v1-1)
)
;; failed to figure out what this is:
nav-enemy-default-event-handler
;; failed to figure out what this is:
(defstate nav-enemy-notice (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(let ((a0-0 (-> self skel root-channel 0)))
(set! (-> a0-0 param 0) 1.0)
(joint-control-channel-group!
a0-0
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 51)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(ja-blend-eval)
(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-virtual nav-enemy-chase)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 10)
)
(ja-channel-push! 1 51)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> gp-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
data
0
length
)
-1
)
)
)
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) (ja-aframe 4.0 0))
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 7))
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!
)
)
)
)
(else
(ja-channel-push! 1 51)
)
)
(let ((f30-0 (rand-vu-float-range 0.9 1.1)))
(while #t
(if (rand-vu-percent? 0.25)
(sound-play-by-name
(static-sound-name "puppy-bark")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
)
(let ((a0-14 (-> self skel root-channel 0)))
(set!
(-> a0-14 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> a0-14 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
data
0
length
)
-1
)
)
)
(set! (-> a0-14 param 1) f30-0)
(set! (-> a0-14 frame-num) 0.0)
(joint-control-channel-group!
a0-14
(the-as art-joint-anim (-> self draw art-group data 7))
num-func-seek!
)
)
(until (ja-done? 0)
(if (logtest? (-> self nav-enemy-flags) 256)
(go-virtual nav-enemy-attack)
)
(suspend)
(let ((a0-15 (-> self skel root-channel 0)))
(set!
(-> a0-15 param 0)
(the float (+ (-> a0-15 frame-group data 0 length) -1))
)
(set! (-> a0-15 param 1) f30-0)
(joint-control-channel-group-eval!
a0-15
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(set! (-> self rotate-speed) 1456355.5)
(set! (-> self turn-time) 30)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
(while #t
(logior! (-> self nav-enemy-flags) 16)
(ja-channel-push! 1 30)
(let ((gp-0 (-> self skel root-channel 0)))
(set!
(-> gp-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set! (-> gp-0 param 0) (ja-aframe 12.0 0))
(set! (-> gp-0 param 1) f30-0)
(set! (-> gp-0 frame-num) 0.0)
(joint-control-channel-group!
gp-0
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(let ((f0-3 (ja-aframe-num 0)))
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(if (and (>= f0-3 2.5) (>= 7.5 f0-3))
(logior! (-> self nav-enemy-flags) 16)
)
)
(suspend)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 param 0) (ja-aframe 12.0 0))
(set! (-> gp-1 param 1) f30-0)
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(let ((a0-11 (-> self skel root-channel 0)))
(set! (-> a0-11 param 0) 1.0)
(joint-control-channel-group!
a0-11
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 30)
(let ((v1-31 (-> self skel root-channel 0)))
(set!
(-> v1-31 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let ((v1-34 (-> self skel root-channel 0)))
(set! (-> v1-34 num-func) num-func-identity)
(set! (-> v1-34 frame-num) 0.0)
)
(let ((gp-2 (rand-vu-int-range 750 900))
(s5-0 (-> *display* base-frame-counter))
)
(until (>= (- (-> *display* base-frame-counter) s5-0) gp-2)
(let ((a0-18 (-> self skel root-channel 0)))
(set! (-> a0-18 param 0) 1.0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-blend-eval)
(suspend)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(set! (-> self rotate-speed) 218453.33)
(set! (-> self turn-time) 150)
(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 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!
)
)
)
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
(nav-enemy-get-new-patrol-point)
(let ((a0-7 (-> self skel root-channel 0)))
(set!
(-> a0-7 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
(set!
(-> a0-7 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 5))
data
0
length
)
-1
)
)
)
(set! (-> a0-7 param 1) 1.4)
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim (-> self draw art-group data 5))
num-func-seek!
)
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self collide-info)
(-> self nav destination-pos)
(-> self rotate-speed)
(-> self turn-time)
)
(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) 1.4)
(joint-control-channel-group-eval!
a0-9
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-attack (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:code
(behavior ()
(sound-play-by-name
(static-sound-name "head-butt")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual nav-enemy-victory)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-victory (lurkerpuppy)
:virtual #t
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerpuppy)
nav-enemy-default-event-handler
)
:exit
(behavior ()
(logior! (-> self nav-enemy-flags) 16)
(none)
)
:code
(behavior ()
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(ja-channel-push! 1 22)
(dotimes (gp-0 4)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-2 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(let ((f0-4 (ja-aframe-num 0)))
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
(if (and (>= f0-4 2.5) (>= 7.5 f0-4))
(logior! (-> self nav-enemy-flags) 16)
)
)
(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!
)
)
)
)
(go-virtual nav-enemy-chase)
(none)
)
:post
(the-as (function none :behavior lurkerpuppy) nav-enemy-face-player-post)
)
;; definition for symbol *lurkerpuppy-nav-enemy-info*, type nav-enemy-info
(define
*lurkerpuppy-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 5
:walk-anim 6
:turn-anim 6
:notice-anim 8
:run-anim 7
:jump-anim 9
:jump-land-anim 10
:victory-anim 8
:taunt-anim 8
:die-anim 11
:neck-joint -1
:player-look-at-joint 5
:run-travel-speed (meters 5.0)
:run-rotate-speed (degrees 3999.9998)
:run-acceleration (meters 1.0)
:run-turn-time #x2d
:walk-travel-speed (meters 2.0)
:walk-rotate-speed (degrees 1999.9999)
: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 6.0
:jump-anim-start-frame 3.5
:jump-land-anim-end-frame 14.0
:jump-height-min (meters 1.0)
:jump-height-factor 0.5
:jump-start-anim-speed 1.0
:shadow-max-y (meters 0.5)
:shadow-min-y (meters -1.0)
:shadow-locus-dist (meters 150.0)
:use-align #f
:draw-shadow #t
:move-to-ground #t
:hover-if-no-ground #f
:use-momentum #f
: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 47 of type lurkerpuppy
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 lurkerpuppy ((obj lurkerpuppy))
(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-sphere s5-0 (the-as uint 3))))
(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! (-> s4-0 prim-core offense) 2)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) 2048.0)
(dummy-50 s5-0)
(set! (-> obj collide-info) s5-0)
)
0
(none)
)
;; definition for method 48 of type lurkerpuppy
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 lurkerpuppy ((obj lurkerpuppy))
(dummy-14 obj *lurkerpuppy-sg* '())
(TODO-RENAME-45 obj *lurkerpuppy-nav-enemy-info*)
(when (nonzero? (-> obj neck))
(set! (-> obj neck up) (the-as uint 0))
(set! (-> obj neck nose) (the-as uint 1))
(set! (-> obj neck ear) (the-as uint 2))
)
0
(none)
)
@@ -0,0 +1,280 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type assistant-lavatube-end
(deftype assistant-lavatube-end (process-taskable)
()
:heap-base #x110
:method-count-assert 53
:size-assert #x17c
:flag-assert #x350110017c
)
;; definition for method 3 of type assistant-lavatube-end
(defmethod inspect assistant-lavatube-end ((obj assistant-lavatube-end))
(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-lavatube-end"
: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-lavatube-end-sg* v1-1)
)
;; definition for method 32 of type assistant-lavatube-end
(defmethod
play-anim!
assistant-lavatube-end
((obj assistant-lavatube-end) (arg0 symbol))
(case (current-status (-> obj tasks))
((1 2)
(new 'static 'spool-anim
:name "assistant-lavatube-end-resolution"
:index 4
:parts 11
:command-list '()
)
)
((6)
(if arg0
(close-current! (-> obj tasks))
)
(new 'static 'spool-anim
:name "assistant-lavatube-end-resolution"
:index 4
:parts 11
:command-list
'(
((the binteger 61)
joint
"cameraB"
)
((the binteger 151)
joint
"camera"
)
((the binteger 226)
joint
"cameraB"
)
((the binteger 273)
joint
"camera"
)
((the binteger 316)
joint
"cameraB"
)
((the binteger 451)
joint
"camera"
)
((the binteger 651)
joint
"cameraB"
)
((the binteger 786)
joint
"camera"
)
((the binteger 888)
joint
"cameraB"
)
((the binteger 1011)
joint
"camera"
)
((the binteger 1011)
shadow
target
#f
)
((the binteger 1140)
shadow
target
#t
)
((the binteger 1191) 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 31 of type assistant-lavatube-end
(defmethod get-art-elem assistant-lavatube-end ((obj assistant-lavatube-end))
(-> obj draw art-group data 3)
)
;; failed to figure out what this is:
(defstate hidden (assistant-lavatube-end)
:virtual #t
:trans
(behavior ()
(dummy-33 self)
((-> (method-of-type process-taskable hidden) trans))
(when
(and
(and
*target*
(>=
61440.0
(vector-vector-distance (-> self root trans) (-> *target* control trans))
)
)
(not
(closed?
(-> self tasks)
(game-task village4-button)
(task-status need-reward-speech)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (assistant-lavatube-end)
:virtual #t
:enter
(behavior ()
((-> (method-of-type process-taskable idle) enter))
(case (get-task-status (game-task village4-button))
(((task-status need-reward-speech))
(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) 'play-anim)
(send-event-function self a1-0)
)
)
)
(none)
)
:code
(behavior ()
(while #t
(when (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 15)
(let ((v1-5 (-> self skel root-channel 0)))
(set!
(-> v1-5 frame-group)
(the-as art-joint-anim (-> self draw art-group data 3))
)
)
)
(let ((a0-10 (-> self skel root-channel 0)))
(set! (-> a0-10 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set!
(-> a0-10 param 0)
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-10 param 1) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group!
a0-10
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-11 (-> self skel root-channel 0)))
(set!
(-> a0-11 param 0)
(the float (+ (-> a0-11 frame-group data 0 length) -1))
)
(set! (-> a0-11 param 1) 1.0)
(joint-control-channel-group-eval!
a0-11
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(none)
)
)
;; definition for method 39 of type assistant-lavatube-end
(defmethod should-display? assistant-lavatube-end ((obj assistant-lavatube-end))
(first-any (-> obj tasks) #t)
(let ((v1-3 (current-status (-> obj tasks))))
(and
(or (= v1-3 6) (= v1-3 0))
(not (task-closed? (game-task citadel-sage-green) (task-status need-hint)))
)
)
)
;; definition for method 11 of type assistant-lavatube-end
(defmethod
copy-defaults!
assistant-lavatube-end
((obj assistant-lavatube-end) (arg0 res-lump))
(dummy-40
obj
arg0
*assistant-lavatube-end-sg*
3
29
(new 'static 'vector :w 4096.0)
5
)
(set! (-> obj tasks) (get-task-control (game-task village4-button)))
(first-any (-> obj tasks) #t)
(dummy-42 obj)
(none)
)
+13 -8
View File
@@ -767,17 +767,22 @@ nav-enemy-default-event-handler
)
;; definition for function nav-enemy-test-nav-mesh-intersection-xz?
;; INFO: Return type mismatch nav-poly vs symbol.
(defbehavior nav-enemy-test-nav-mesh-intersection-xz? nav-enemy ((arg0 vector))
(dummy-16 (-> self nav) arg0)
(the-as symbol (dummy-16 (-> self nav) arg0))
)
;; definition for function nav-enemy-test-point-in-nav-mesh?
;; INFO: Return type mismatch structure vs symbol.
(defbehavior nav-enemy-test-point-in-nav-mesh? nav-enemy ((arg0 vector))
(and
(dummy-16 (-> self nav) arg0)
(<
(-> arg0 y)
(+ (-> self collide-info trans y) (-> self enemy-info notice-top))
(the-as
symbol
(and
(dummy-16 (-> self nav) arg0)
(<
(-> arg0 y)
(+ (-> self collide-info trans y) (-> self enemy-info notice-top))
)
)
)
)
@@ -2771,8 +2776,8 @@ nav-enemy-default-event-handler
:code
(behavior ()
(nav-enemy-execute-jump)
(let ((a1-0 (the-as structure (-> self nav user-poly))))
(if (not (the-as nav-poly a1-0))
(let ((a1-0 (-> self nav user-poly)))
(if (not a1-0)
(set! a1-0 (dummy-16 (-> self nav) (-> self jump-dest)))
)
(if a1-0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,422 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type static-screen
(deftype static-screen (process)
((part sparticle-launch-control 1 :offset-assert 112)
(state-time uint64 :offset-assert 120)
)
:heap-base #x10
:method-count-assert 15
:size-assert #x80
:flag-assert #xf00100080
(:methods
(idle (int int symbol) _type_ :state 14)
)
)
;; definition for method 3 of type static-screen
(defmethod inspect static-screen ((obj static-screen))
(let ((t9-0 (method-of-type process inspect)))
(t9-0 obj)
)
(format #t "~T~Tpart[1] @ #x~X~%" (-> obj stack))
(format #t "~T~Tstate-time: ~D~%" (-> obj state-time))
obj
)
;; definition for method 7 of type static-screen
;; INFO: Return type mismatch process vs static-screen.
(defmethod relocate static-screen ((obj static-screen) (arg0 int))
(let ((v1-0 *kernel-context*))
(set! (-> v1-0 relocating-process) obj)
(set! (-> v1-0 relocating-min) (the-as int (&-> obj type)))
(set!
(-> v1-0 relocating-max)
(the-as
int
(+ (+ (-> obj allocated-length) -4 (-> process size)) (the-as int obj))
)
)
(set! (-> v1-0 relocating-offset) arg0)
)
(dotimes (v1-2 1)
(if (nonzero? (-> obj part v1-2))
(&+! (-> obj part v1-2) arg0)
)
)
(the-as static-screen ((method-of-type process relocate) obj arg0))
)
;; definition for method 10 of type static-screen
(defmethod deactivate static-screen ((obj static-screen))
(dotimes (s5-0 1)
(if (nonzero? (-> obj part s5-0))
(deactivate (-> obj part s5-0))
)
)
((method-of-type process deactivate) obj)
(none)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2966)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600000)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value #x45970a3d
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x46d00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2967)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600100)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value -979252543
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x46500000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 2968)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x5c600200)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x3f800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xb
:flags #x1
:initial-value -971056873
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x47700000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x1
:initial-value #x45d00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x43000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value -1
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value #x2204
:random-mult 1
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
;; failed to figure out what this is:
(set!
(-> *part-group-id-table* 707)
(new 'static 'sparticle-launch-group
:length 3
:duration #xbb8
:linger-duration #x5dc
:flags #x4
:name "group-part-screen1"
:launcher
(new 'static 'inline-array sparticle-group-item 3
(new 'static 'sparticle-group-item :launcher #xb96 :flags #x8)
(new 'static 'sparticle-group-item :launcher #xb97 :flags #x8)
(new 'static 'sparticle-group-item :launcher #xb98 :flags #x8)
)
:bounds (new 'static 'sphere :w 4096.0)
)
)
;; failed to figure out what this is:
(defstate idle (static-screen)
:virtual #t
:enter
(behavior ((arg0 int) (arg1 int) (arg2 symbol))
(set! (-> *setting-control* current bg-a) 1.0)
(set! (-> *setting-control* default bg-a) 0.0)
(push-setting!
*setting-control*
self
(the-as (function object object object object object) 'common-page)
'set
0.0
(ash 1 (+ arg0 1))
)
(none)
)
:trans
(behavior ()
(hide-hud-quick)
(dummy-11 (-> self part 0) *zero-vector*)
0
(none)
)
:code
(behavior ((arg0 int) (arg1 int) (arg2 symbol))
(local-vars (v1-6 symbol))
(set! (-> self state-time) (the-as uint (-> *display* base-frame-counter)))
(until v1-6
(suspend)
(set!
v1-6
(or
(and
(> arg1 0)
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
arg1
)
)
(and
arg2
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(logtest?
(-> *cpad-list* cpads 0 button0-rel 0)
(pad-buttons select start triangle circle x square)
)
)
)
)
)
(set! (-> *setting-control* default bg-a) 1.0)
(while
(!= (-> *setting-control* current bg-a) (-> *setting-control* default bg-a))
(suspend)
)
(clear-pending-settings-from-process *setting-control* self 'common-page)
(suspend)
0
(none)
)
)
;; definition for function static-screen-init-by-other
;; INFO: Return type mismatch int vs none.
(defbehavior
static-screen-init-by-other static-screen
((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 symbol))
(let ((s3-0 (lookup-part-group-by-name "group-part-screen1")))
(when
(and
s3-0
(nonzero? s3-0)
(type-type? (-> s3-0 type) sparticle-launch-group)
)
(set! (-> *part-id-table* 2966 init-specs 0 initial-value) arg1)
(set! (-> *part-id-table* 2967 init-specs 0 initial-value) arg2)
(set! (-> *part-id-table* 2968 init-specs 0 initial-value) arg3)
(set!
(-> self part 0)
(create-launch-control (the-as sparticle-launch-group s3-0) self)
)
(go-virtual idle arg0 arg4 arg5)
)
)
0
(none)
)
;; definition for function static-screen-spawn
;; Used lq/sq
(defun
static-screen-spawn
((arg0 int)
(arg1 int)
(arg2 int)
(arg3 int)
(arg4 int)
(arg5 symbol)
(arg6 target)
)
(local-vars (sv-16 process))
(set! sv-16 (get-process *default-dead-pool* static-screen #x4000))
(when sv-16
(let ((t9-1 (method-of-type static-screen activate)))
(t9-1
(the-as static-screen sv-16)
arg6
'static-screen
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-16
static-screen-init-by-other
arg0
arg1
arg2
arg3
arg4
arg5
)
(-> sv-16 ppointer)
)
)
@@ -0,0 +1,826 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type fin-door
(deftype fin-door (process-hidden)
()
:method-count-assert 15
:size-assert #x70
:flag-assert #xf00000070
)
;; definition for method 3 of type fin-door
(defmethod inspect fin-door ((obj fin-door))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tname: ~A~%" (-> obj name))
(format #t "~Tmask: ~D~%" (-> obj mask))
(format #t "~Tparent: #x~X~%" (-> obj parent))
(format #t "~Tbrother: #x~X~%" (-> obj brother))
(format #t "~Tchild: #x~X~%" (-> obj child))
(format #t "~Tppointer: #x~X~%" (-> obj ppointer))
(format #t "~Tself: ~A~%" (-> obj self))
(format #t "~Tpool: ~A~%" (-> obj pool))
(format #t "~Tstatus: ~A~%" (-> obj status))
(format #t "~Tpid: ~D~%" (-> obj pid))
(format #t "~Tmain-thread: ~A~%" (-> obj main-thread))
(format #t "~Ttop-thread: ~A~%" (-> obj top-thread))
(format #t "~Tentity: ~A~%" (-> obj entity))
(format #t "~Tstate: ~A~%" (-> obj state))
(format #t "~Ttrans-hook: ~A~%" (-> obj trans-hook))
(format #t "~Tpost-hook: ~A~%" (-> obj post-hook))
(format #t "~Tevent-hook: ~A~%" (-> obj event-hook))
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
(format #t "~Tnext-state: ~A~%" (-> obj next-state))
(format #t "~Theap-base: #x~X~%" (-> obj heap-base))
(format #t "~Theap-top: #x~X~%" (-> obj heap-top))
(format #t "~Theap-cur: #x~X~%" (-> obj heap-cur))
(format #t "~Tstack-frame-top: ~A~%" (-> obj stack-frame-top))
(format #t "~Theap: #<kheap @ #x~X>~%" (&-> obj heap-base))
(format #t "~Tconnection-list: ~`'connectable`P~%" (-> obj connection-list))
(format #t "~Tstack[0] @ #x~X~%" (-> obj stack))
obj
)
;; definition of type final-door
(deftype final-door (process-drawable)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
(:methods
(idle () _type_ :state 20)
(dummy-21 (_type_) none 21)
(open () _type_ :state 22)
)
)
;; definition for method 3 of type final-door
(defmethod inspect final-door ((obj final-door))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'skeleton-group
:art-group-name "power-left"
:bounds
(new 'static 'vector :y 45056.0 :w 49152.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! *power-left-sg* v1-2)
)
;; failed to figure out what this is:
(let
((v1-3
(new 'static 'skeleton-group
:art-group-name "power-right"
:bounds
(new 'static 'vector :y 45056.0 :w 49152.0)
:version #x6
)
)
)
(set! (-> v1-3 jgeo) 0)
(set! (-> v1-3 janim) 2)
(set! (-> v1-3 mgeo 0) (the-as uint 1))
(set! (-> v1-3 lod-dist 0) 4095996000.0)
(set! *power-right-sg* v1-3)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'skeleton-group
:art-group-name "powercellalt"
:bounds (new 'static 'vector :w 8192.0)
:version #x6
)
)
)
(set! (-> v1-4 jgeo) 0)
(set! (-> v1-4 janim) 2)
(set! (-> v1-4 mgeo 0) (the-as uint 1))
(set! (-> v1-4 lod-dist 0) 4095996000.0)
(set! *powercellalt-sg* v1-4)
)
;; failed to figure out what this is:
(defstate idle (final-door)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'open)
enter-state
(go-virtual open)
)
)
)
)
:code
(behavior ()
(transform-post)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
)
;; failed to figure out what this is:
(defstate open (final-door)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'brightness)
(let ((f0-0 (the-as float (-> arg3 param 0)))
(f1-0 (the-as float (-> arg3 param 1)))
)
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
(let ((v0-0 (-> self draw color-emissive)))
(set! (-> v0-0 x) f1-0)
(set! (-> v0-0 y) f1-0)
(set! (-> v0-0 z) f1-0)
(set! (-> v0-0 w) f1-0)
v0-0
)
)
)
)
)
)
:code
(behavior ()
(case (-> self type)
((power-left)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> a0-1 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> a0-1 param 1) 0.353)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group!
a0-1
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(transform-post)
(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) 0.353)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(else
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set!
(-> a0-4 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 2))
data
0
length
)
-1
)
)
)
(set! (-> a0-4 param 1) 0.353)
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group!
a0-4
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (ja-done? 0)
(transform-post)
(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) 0.353)
(joint-control-channel-group-eval!
a0-5
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
(transform-post)
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
(none)
)
)
;; definition for method 11 of type final-door
(defmethod copy-defaults! final-door ((obj final-door) (arg0 res-lump))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))
)
)
(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 512))
(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) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 45056.0 0.0 49152.0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-21 obj)
(go (method-of-object obj idle))
(none)
)
;; definition of type power-left
(deftype power-left (final-door)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
)
;; definition for method 3 of type power-left
(defmethod inspect power-left ((obj power-left))
(let ((t9-0 (method-of-type final-door inspect)))
(t9-0 obj)
)
obj
)
;; definition of type power-right
(deftype power-right (final-door)
()
:heap-base #x40
:method-count-assert 23
:size-assert #xb0
:flag-assert #x17004000b0
)
;; definition for method 3 of type power-right
(defmethod inspect power-right ((obj power-right))
(let ((t9-0 (method-of-type final-door inspect)))
(t9-0 obj)
)
obj
)
;; failed to figure out what this is:
(defstate idle (power-left)
:virtual #t
:code
(behavior ()
(ja-post)
(while #t
(if
(and
(and
*target*
(>=
61440.0
(vector-vector-distance
(-> self root trans)
(-> *target* control trans)
)
)
)
(and
(zero? (logand (-> *target* state-flags) 256))
(and
(>= (-> *game-info* fuel) 100.0)
(not
(and
(-> self entity)
(logtest?
(-> self entity extra perm status)
(entity-perm-status complete)
)
)
)
(=
(get-task-status (game-task finalboss-movies))
(task-status need-reward-speech)
)
(let ((gp-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> gp-0 from) self)
(set! (-> gp-0 num-params) 3)
(set! (-> gp-0 message) 'change-mode)
(set! (-> gp-0 param 0) (the-as uint 'final-door))
(set!
(-> gp-0 param 1)
(the-as
uint
(search-process-tree *active-pool* (lambda ((arg0 final-door))
(= (-> arg0 type) power-right)
)
)
)
)
(set!
(-> gp-0 param 2)
(the-as
uint
(search-process-tree *active-pool* (lambda ((arg0 final-door))
(= (-> arg0 type) power-left)
)
)
)
)
(send-event-function *target* gp-0)
)
)
)
)
(process-entity-status! self (entity-perm-status complete) #t)
)
(suspend)
)
(none)
)
)
;; definition for method 21 of type power-left
;; INFO: Return type mismatch int vs none.
(defmethod dummy-21 power-left ((obj power-left))
(dummy-14 obj *power-left-sg* '())
0
(none)
)
;; definition for method 21 of type power-right
;; INFO: Return type mismatch int vs none.
(defmethod dummy-21 power-right ((obj power-right))
(dummy-14 obj *power-right-sg* '())
0
(none)
)
;; definition of type powercellalt
(deftype powercellalt (process-drawable)
((root-override collide-shape-moving :offset 112)
(jump-pos vector :inline :offset-assert 176)
(base vector :inline :offset-assert 192)
(index int32 :offset-assert 208)
)
:heap-base #x70
:method-count-assert 23
:size-assert #xd4
:flag-assert #x17007000d4
(:methods
(dummy-20 () none 20)
(jump () _type_ :state 21)
(idle () _type_ :state 22)
)
)
;; definition for method 3 of type powercellalt
(defmethod inspect powercellalt ((obj powercellalt))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tjump-pos: ~`vector`P~%" (-> obj jump-pos))
(format #t "~T~Tbase: ~`vector`P~%" (-> obj base))
(format #t "~T~Tindex: ~D~%" (-> obj index))
obj
)
;; failed to figure out what this is:
(defstate jump (powercellalt)
:virtual #t
:code
(behavior ()
(sound-play-by-name
(static-sound-name "cell-prize")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((gp-1 (new 'stack 'trajectory)))
(set! (-> self base y) (-> self jump-pos y))
(setup-from-to-duration!
gp-1
(-> self root-override trans)
(-> self jump-pos)
300.0
-2.2755556
)
(set!
(-> self state-time)
(the-as seconds (-> *display* base-frame-counter))
)
(until
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(let
((f0-2
(the
float
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
)
)
)
(eval-position! gp-1 f0-2 (-> self root-override trans))
)
(transform-post)
(dummy-11
(-> self part)
(the-as vector (-> self root-override root-prim prim-core))
)
(suspend)
(when (nonzero? (-> self skel))
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) 0.5)
(joint-control-channel-group-eval!
a0-7
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
)
(set! (-> self root-override trans quad) (-> self jump-pos quad))
(set! (-> self base quad) (-> self root-override trans quad))
(transform-post)
(sound-play-by-name
(static-sound-name "land-pcmetal")
(new-sound-id)
1024
3048
0
(the-as uint 1)
(the-as vector #t)
)
(let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-3
(let ((t9-12 (method-of-type part-tracker activate)))
(t9-12
(the-as part-tracker gp-3)
*entity-pool*
'part-tracker
(the-as pointer #x70004000)
)
)
(run-now-in-process
gp-3
part-tracker-init
(-> *part-group-id-table* 4)
-1
#f
#f
#f
(-> self root-override root-prim prim-core)
)
(-> gp-3 ppointer)
)
)
(go-virtual idle)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (powercellalt)
:virtual #t
:code
(behavior ()
(while #t
(vector<-cspace!
(-> self root-override trans)
(->
(the-as process-drawable (-> self parent 0))
node-list
data
(-> self index)
)
)
(transform-post)
(suspend)
)
(none)
)
)
;; definition for function powercellalt-init-by-other
;; Used lq/sq
(defbehavior
powercellalt-init-by-other powercellalt
((arg0 entity) (arg1 vector) (arg2 vector) (arg3 int))
(set! (-> self entity) arg0)
(let
((s3-0
(new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))
)
)
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction) default-collision-reaction)
(set! (-> s3-0 no-reaction) nothing)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s3-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 64))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 4915.2)
)
(dummy-46 s3-0)
(set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w)))
(dummy-50 s3-0)
(set! (-> self root-override) s3-0)
)
(set! (-> self root-override trans quad) (-> arg1 quad))
(set! (-> self jump-pos quad) (-> arg2 quad))
(set-vector! (-> self root-override scale) 0.5 0.5 0.5 1.0)
(set! (-> self index) arg3)
(dummy-14 self *powercellalt-sg* '())
(set!
(-> self part)
(create-launch-control (-> *part-group-id-table* 63) self)
)
enter-state
(-> self root-override trans)
(-> self jump-pos)
(go-virtual jump)
(none)
)
;; failed to figure out what this is:
(defstate target-final-door (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
((-> target-grab event) arg0 arg1 arg2 arg3)
)
:enter
(behavior ((arg0 basic) (arg1 handle))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 1)
(set! (-> a1-1 message) 'change-to-entity-by-name)
(set! (-> a1-1 param 0) (the-as uint "camera-403"))
(send-event-function *camera* a1-1)
)
(set! (-> self control unknown-surface00) *empty-mods*)
(logior! (-> self state-flags) 272)
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
(none)
)
:exit
(behavior ()
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) self)
(set! (-> a1-0 num-params) 2)
(set! (-> a1-0 message) 'change-state)
(set! (-> a1-0 param 0) (the-as uint *camera-base-mode*))
(set! (-> a1-0 param 1) (the-as uint 60))
(send-event-function *camera* a1-0)
)
(set! (-> self state-flags) (logand -273 (-> self state-flags)))
(target-exit)
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
(none)
)
:trans
(behavior ()
(set-letterbox-frames 5)
(none)
)
:code
(behavior ((arg0 basic) (arg1 handle))
(local-vars
(sv-144 process)
(sv-160 vector)
(sv-176 process)
(sv-192 vector)
)
(let ((a0-2 (get-task-control (game-task finalboss-movies))))
(save-reminder a0-2 (logior (get-reminder a0-2 0) 2) 0)
)
(TODO-RENAME-30
(-> self control)
(new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0)
)
(set-quaternion!
(-> self control)
(the-as quaternion (new 'static 'vector :y -0.8472 :w 0.5312))
)
(rot->dir-targ! (-> self control))
(transform-post)
(ja-channel-push! 1 60)
(let ((s4-1 (-> self skel root-channel 0)))
(set!
(-> s4-1 frame-group)
(the-as art-joint-anim (-> self draw art-group data 88))
)
(set! (-> s4-1 param 0) (ja-aframe 18.0 0))
(set! (-> s4-1 param 1) 1.0)
(set! (-> s4-1 frame-num) 0.0)
(joint-control-channel-group!
s4-1
(the-as art-joint-anim (-> self draw art-group data 88))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((s4-2 (-> self skel root-channel 0)))
(set! (-> s4-2 param 0) (ja-aframe 18.0 0))
(set! (-> s4-2 param 1) 1.0)
(joint-control-channel-group-eval!
s4-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(let ((s4-3 (-> (handle->process (the-as handle arg0)) entity))
(s3-1
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> self node-list data 7)
)
)
)
(dotimes (s2-0 50)
(when (handle->process (the-as handle arg0))
(let ((s1-0 (handle->process (the-as handle arg0)))
(s0-0 (+ s2-0 4))
)
(set!
sv-160
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> (the-as process-drawable s1-0) node-list data s0-0)
)
)
(set! sv-144 (get-process *default-dead-pool* powercellalt #x4000))
(when sv-144
(let ((t9-16 (method-of-type powercellalt activate)))
(t9-16
(the-as powercellalt sv-144)
s1-0
'powercellalt
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-144
powercellalt-init-by-other
s4-3
s3-1
sv-160
s0-0
)
(-> sv-144 ppointer)
)
)
)
(let ((s1-1 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) s1-1) 30)
(suspend)
)
)
(when (handle->process arg1)
(let ((s1-2 (handle->process arg1))
(s0-1 (+ s2-0 4))
)
(set!
sv-192
(vector<-cspace!
(new 'stack-no-clear 'vector)
(-> (the-as process-drawable s1-2) node-list data s0-1)
)
)
(set! sv-176 (get-process *default-dead-pool* powercellalt #x4000))
(when sv-176
(let ((t9-20 (method-of-type powercellalt activate)))
(t9-20
(the-as powercellalt sv-176)
s1-2
'powercellalt
(the-as pointer #x70004000)
)
)
(run-now-in-process
sv-176
powercellalt-init-by-other
s4-3
s3-1
sv-192
s0-1
)
(-> sv-176 ppointer)
)
)
)
(let ((s1-3 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) s1-3) 30)
(suspend)
)
)
)
)
(let ((gp-1 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) gp-1) 600)
(suspend)
)
)
(let ((v0-22 (entity-by-name "sage-finalboss-1"))
(a1-26 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-26 from) self)
(set! (-> a1-26 num-params) 0)
(set! (-> a1-26 message) 'play-anim)
(let ((v1-70 v0-22))
(send-event-function (if v1-70
(-> v1-70 extra process)
)
a1-26
)
)
)
(go target-stance)
(none)
)
:post
target-no-stick-post
)
@@ -0,0 +1,202 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type robotboss-dda
(deftype robotboss-dda (structure)
((blue-bomb-time float :offset-assert 0)
(num-blobs int32 :offset-assert 4)
(green-bomb-time float :offset-assert 8)
(red-shots-min int32 :offset-assert 12)
(red-shots-rnd int32 :offset-assert 16)
(red-shot-time-min float :offset-assert 20)
(red-shot-time-rnd float :offset-assert 24)
(red-bomb-time float :offset-assert 28)
(yellow-shot-time-min float :offset-assert 32)
(yellow-shot-time-rnd float :offset-assert 36)
(yellow-gun-hits int32 :offset-assert 40)
(yellow-bomb-time float :offset-assert 44)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
;; definition for method 3 of type robotboss-dda
(defmethod inspect robotboss-dda ((obj robotboss-dda))
(format #t "[~8x] ~A~%" obj 'robotboss-dda)
(format #t "~Tblue-bomb-time: ~f~%" (-> obj blue-bomb-time))
(format #t "~Tnum-blobs: ~D~%" (-> obj num-blobs))
(format #t "~Tgreen-bomb-time: ~f~%" (-> obj green-bomb-time))
(format #t "~Tred-shots-min: ~D~%" (-> obj red-shots-min))
(format #t "~Tred-shots-rnd: ~D~%" (-> obj red-shots-rnd))
(format #t "~Tred-shot-time-min: ~f~%" (-> obj red-shot-time-min))
(format #t "~Tred-shot-time-rnd: ~f~%" (-> obj red-shot-time-rnd))
(format #t "~Tred-bomb-time: ~f~%" (-> obj red-bomb-time))
(format #t "~Tyellow-shot-time-min: ~f~%" (-> obj yellow-shot-time-min))
(format #t "~Tyellow-shot-time-rnd: ~f~%" (-> obj yellow-shot-time-rnd))
(format #t "~Tyellow-gun-hits: ~D~%" (-> obj yellow-gun-hits))
(format #t "~Tyellow-bomb-time: ~f~%" (-> obj yellow-bomb-time))
obj
)
;; definition of type robotboss
(deftype robotboss (process-drawable)
((alts entity-actor 13 :offset-assert 176)
(desired-loc vector :inline :offset-assert 240)
(old-loc vector :inline :offset-assert 256)
(loc-t float :offset-assert 272)
(loc-t-start seconds :offset-assert 280)
(loc-t-duration seconds :offset-assert 288)
(hits-to-go int32 :offset-assert 296)
(took-hit symbol :offset-assert 300)
(children-spawned int32 :offset-assert 304)
(vulnerable seconds :offset-assert 312)
(till-next-shot seconds :offset-assert 320)
(shot-attractor uint64 :offset-assert 328)
(desired-pool-y float :offset-assert 336)
(particle sparticle-launch-control 7 :offset-assert 340)
(blue-smoke basic :offset-assert 368)
(red-smoke basic :offset-assert 372)
(yellow-smoke basic :offset-assert 376)
(white-eco handle :offset-assert 384)
(des-cam-entity basic :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
)
:heap-base #x16
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
(:methods
(dummy-20 () none 20)
)
)
;; definition for method 3 of type robotboss
(defmethod inspect robotboss ((obj robotboss))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Talts[13] @ #x~X~%" (-> obj alts))
(format #t "~T~Tdesired-loc: #<vector @ #x~X>~%" (-> obj desired-loc))
(format #t "~T~Told-loc: #<vector @ #x~X>~%" (-> obj old-loc))
(format #t "~T~Tloc-t: ~f~%" (-> obj loc-t))
(format #t "~T~Tloc-t-start: ~D~%" (-> obj loc-t-start))
(format #t "~T~Tloc-t-duration: ~D~%" (-> obj loc-t-duration))
(format #t "~T~Thits-to-go: ~D~%" (-> obj hits-to-go))
(format #t "~T~Ttook-hit: ~A~%" (-> obj took-hit))
(format #t "~T~Tchildren-spawned: ~D~%" (-> obj children-spawned))
(format #t "~T~Tvulnerable: ~D~%" (-> obj vulnerable))
(format #t "~T~Ttill-next-shot: ~D~%" (-> obj till-next-shot))
(format #t "~T~Tshot-attractor: ~D~%" (-> obj shot-attractor))
(format #t "~T~Tdesired-pool-y: ~f~%" (-> obj desired-pool-y))
(format #t "~T~Tparticle[7] @ #x~X~%" (-> obj particle))
(format #t "~T~Tblue-smoke: ~A~%" (-> obj blue-smoke))
(format #t "~T~Tred-smoke: ~A~%" (-> obj red-smoke))
(format #t "~T~Tyellow-smoke: ~A~%" (-> obj yellow-smoke))
(format #t "~T~Twhite-eco: ~D~%" (-> obj white-eco))
(format #t "~T~Tdes-cam-entity: ~A~%" (-> obj des-cam-entity))
(format #t "~T~Tuse-interesting: ~A~%" (-> obj use-interesting))
(format #t "~T~Tignore-camera: ~A~%" (-> obj ignore-camera))
(format #t "~T~Tambient: #<ambient-control @ #x~X>~%" (&-> obj ambient))
(format #t "~T~Tyellow-gun: ~A~%" (-> obj yellow-gun))
(format #t "~T~Tpalette-val: ~f~%" (-> obj palette-val))
(format #t "~T~Tlooping-sound[4] @ #x~X~%" (-> obj looping-sound))
(format #t "~T~Tdda: #<robotboss-dda @ #x~X>~%" (-> obj dda))
(format #t "~T~Tvalid-frames: ~D~%" (-> obj valid-frames))
(format #t "~T~Tskip-cut: ~A~%" (-> obj skip-cut))
(format #t "~T~Tkeep-charging: ~A~%" (-> obj keep-charging))
obj
)
;; definition for method 7 of type robotboss
;; INFO: Return type mismatch process-drawable vs robotboss.
(defmethod relocate robotboss ((obj robotboss) (arg0 int))
(dotimes (v1-0 7)
(if (nonzero? (-> obj particle v1-0))
(&+! (-> obj particle v1-0) arg0)
)
)
(dotimes (v1-3 4)
(if (nonzero? (-> obj looping-sound v1-3))
(&+! (-> obj looping-sound v1-3) arg0)
)
)
(if (nonzero? (-> obj yellow-gun))
(&+! (-> obj yellow-gun) arg0)
)
(the-as robotboss ((method-of-type process-drawable relocate) obj arg0))
)
;; definition for method 10 of type robotboss
(defmethod deactivate robotboss ((obj robotboss))
(dotimes (s5-0 7)
(let ((a0-1 (-> obj particle s5-0)))
(if (nonzero? a0-1)
(deactivate a0-1)
)
)
)
(dotimes (s5-1 4)
(let ((a0-2 (-> obj looping-sound s5-1)))
(if (nonzero? a0-2)
(stop! a0-2)
)
)
)
((method-of-type process-drawable deactivate) obj)
(none)
)
;; definition for function target-has-all-the-cells?
;; INFO: Return type mismatch basic vs symbol.
(defun target-has-all-the-cells? ()
(with-pp
(the-as
symbol
(and *target* (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) pp)
(set! (-> a1-0 num-params) 2)
(set! (-> a1-0 message) 'query)
(set! (-> a1-0 param 0) (the-as uint 'pickup))
(set! (-> a1-0 param 1) (the-as uint 6))
(>=
(the int (the-as float (send-event-function *target* a1-0)))
100
)
)
)
)
)
)
;; failed to figure out what this is:
(let
((v0-6
(new 'static 'skeleton-group
:art-group-name "robotboss"
:bounds
(new 'static 'vector :y -40960.0 :w 327680.0)
:longest-edge (meters 19.9)
:version #x6
)
)
)
(set! (-> v0-6 jgeo) 0)
(set! (-> v0-6 janim) 2)
(set! (-> v0-6 mgeo 0) (the-as uint 1))
(set! (-> v0-6 lod-dist 0) 4095996000.0)
(set! *robotboss-sg* v0-6)
)
+1 -5
View File
@@ -47,7 +47,7 @@ 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))
(dummy-10 (-> obj water))
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
0
(none)
@@ -651,7 +651,3 @@ nav-enemy-default-event-handler
(go (method-of-object obj nav-enemy-idle))
(none)
)
+690
View File
@@ -0,0 +1,690 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type aphid
(deftype aphid (nav-enemy)
((try int32 :offset-assert 400)
)
:heap-base #x130
:method-count-assert 76
:size-assert #x194
:flag-assert #x4c01300194
)
;; definition for method 3 of type aphid
(defmethod inspect aphid ((obj aphid))
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
(format #t "~T~Ttry: ~D~%" (-> obj try))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "aphid-lurker"
:bounds
(new 'static 'vector :y 8192.0 :w 8192.0)
:version #x6
:shadow 2
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) -1)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *aphid-sg* v1-1)
)
;; definition for function aphid-invulnerable
(defbehavior aphid-invulnerable aphid ()
(set! (-> self nav-enemy-flags) (logand -33 (-> self nav-enemy-flags)))
(dummy-54 (-> self collide-info) 2 4)
(none)
)
;; definition for function aphid-vulnerable
(defbehavior aphid-vulnerable aphid ()
(logior! (-> self nav-enemy-flags) 32)
(dummy-54 (-> self collide-info) 2 1)
(none)
)
;; definition for method 43 of type aphid
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block))
(with-pp
(the-as object (cond
((or
(logtest? (-> obj nav-enemy-flags) 32)
(= arg0 (ppointer->process (-> obj parent)))
)
(let ((v1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> v1-5 from) pp)
(set! (-> v1-5 num-params) 1)
(set! (-> v1-5 message) 'get-attack-count)
(set! (-> v1-5 param 0) (the-as uint 1))
(send-event-function arg0 v1-5)
)
(logclear!
(-> obj mask)
(process-mask actor-pause attackable)
)
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-chase (aphid)
:virtual #t
:exit
aphid-vulnerable
:code
(behavior ()
(let ((gp-0 (cond
((>= (-> self try) 15)
450
)
((>= (-> self try) 10)
300
)
((>= (-> self try) 5)
150
)
(else
0
)
)
)
)
(while #t
(ja-channel-push! 1 15)
(sound-play-by-name
(static-sound-name "aphid-spike-out")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set!
(-> a0-3 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(set! (-> a0-3 param 1) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group!
a0-3
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) 1.0)
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(aphid-invulnerable)
(ja-channel-push! 1 30)
(let ((v1-28 (-> self skel root-channel 0)))
(set!
(-> v1-28 frame-group)
(the-as art-joint-anim (-> self draw art-group data 5))
)
)
(let ((v1-31 (-> self skel root-channel 0)))
(set! (-> v1-31 num-func) num-func-identity)
(set! (-> v1-31 frame-num) 0.0)
)
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1))
(s5-1 (-> *display* base-frame-counter))
(s4-1 (- (the int (nav-enemy-rnd-float-range 900.0 1440.0)) gp-0))
)
(until (>= (- (-> *display* base-frame-counter) s5-1) s4-1)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set! (-> a0-13 param 0) f30-0)
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
(aphid-vulnerable)
(ja-channel-push! 1 15)
(sound-play-by-name
(static-sound-name "aphid-spike-in")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(let ((a0-17 (-> self skel root-channel 0)))
(set!
(-> a0-17 frame-group)
(the-as art-joint-anim (-> self draw art-group data 6))
)
(set! (-> a0-17 param 0) 0.0)
(set! (-> a0-17 param 1) 1.0)
(set!
(-> a0-17 frame-num)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 6))
data
0
length
)
-1
)
)
)
(joint-control-channel-group!
a0-17
(the-as art-joint-anim (-> self draw art-group data 6))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-18 (-> self skel root-channel 0)))
(set! (-> a0-18 param 0) 0.0)
(set! (-> a0-18 param 1) 1.0)
(joint-control-channel-group-eval!
a0-18
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(ja-channel-push! 1 30)
(let ((v1-63 (-> self skel root-channel 0)))
(set!
(-> v1-63 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data (-> self nav-info run-anim))
)
)
)
(let ((v1-66 (-> self skel root-channel 0)))
(set! (-> v1-66 num-func) num-func-identity)
(set! (-> v1-66 frame-num) 0.0)
)
(let ((f30-1 (nav-enemy-rnd-float-range 0.9 1.1))
(s5-3 (-> *display* base-frame-counter))
(s4-3 (+ (the int (nav-enemy-rnd-float-range 660.0 900.0)) gp-0))
)
(until (>= (- (-> *display* base-frame-counter) s5-3) s4-3)
(suspend)
(let ((a0-29 (-> self skel root-channel 0)))
(set! (-> a0-29 param 0) f30-1)
(joint-control-channel-group-eval!
a0-29
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-stare (aphid)
:virtual #t
:code
(behavior ()
(set! (-> self turn-time) 60)
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
(when
(or
(logtest? (-> self nav-enemy-flags) 256)
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
)
(ja-channel-push! 1 30)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
(-> a0-3 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-3 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-3 param 1) f30-0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group!
a0-3
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set!
(-> a0-4 param 0)
(the float (+ (-> a0-4 frame-group data 0 length) -1))
)
(set! (-> a0-4 param 1) f30-0)
(joint-control-channel-group-eval!
a0-4
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
(while #t
(when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) 16)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) 1.0)
(joint-control-channel-group!
a0-7
(the-as art-joint-anim #f)
num-func-loop!
)
)
(ja-channel-push! 1 60)
(let ((v1-35 (-> self skel root-channel 0)))
(set!
(-> v1-35 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
)
(let ((v1-38 (-> self skel root-channel 0)))
(set! (-> v1-38 num-func) num-func-identity)
(set! (-> v1-38 frame-num) 0.0)
)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(let ((a0-13 (-> self skel root-channel 0)))
(set! (-> a0-13 param 0) 0.75)
(joint-control-channel-group-eval!
a0-13
(the-as art-joint-anim #f)
num-func-loop!
)
)
)
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
)
(when (nav-enemy-rnd-percent? 0.3)
(if (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 10)
)
)
(ja-channel-push! 1 30)
)
(let ((a0-22 (-> self skel root-channel 0)))
(set!
(-> a0-22 frame-group)
(the-as art-joint-anim (-> self draw art-group data 10))
)
(set!
(-> a0-22 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 10))
data
0
length
)
-1
)
)
)
(set! (-> a0-22 param 1) f30-0)
(set! (-> a0-22 frame-num) 0.0)
(joint-control-channel-group!
a0-22
(the-as art-joint-anim (-> self draw art-group data 10))
num-func-seek!
)
)
(until (ja-done? 0)
(suspend)
(let ((a0-23 (-> self skel root-channel 0)))
(set!
(-> a0-23 param 0)
(the float (+ (-> a0-23 frame-group data 0 length) -1))
)
(set! (-> a0-23 param 1) f30-0)
(joint-control-channel-group-eval!
a0-23
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate nav-enemy-give-up (aphid)
:virtual #t
:code
(behavior ()
(set! (-> self rotate-speed) 218453.33)
(set! (-> self turn-time) 150)
(ja-channel-push! 1 45)
(let ((s4-0 (-> self collide-info))
(s5-0 (target-pos 0))
)
(when
(<
(fabs
(deg-diff
(y-angle s4-0)
(vector-y-angle
(vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans))
)
)
)
12743.111
)
(let ((a0-6 (-> self skel root-channel 0)))
(set!
(-> a0-6 frame-group)
(the-as art-joint-anim (-> self draw art-group data 7))
)
(set!
(-> a0-6 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 7))
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 7))
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!
)
)
)
)
)
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
(nav-enemy-get-new-patrol-point)
(let ((a0-12 (-> self skel root-channel 0)))
(set!
(-> a0-12 frame-group)
(the-as art-joint-anim (-> self draw art-group data 8))
)
(set!
(-> a0-12 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 8))
data
0
length
)
-1
)
)
)
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group!
a0-12
(the-as art-joint-anim (-> self draw art-group data 8))
num-func-seek!
)
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self collide-info)
(-> self nav destination-pos)
(-> self rotate-speed)
(-> self turn-time)
)
(suspend)
(let ((a0-14 (-> self skel root-channel 0)))
(set!
(-> a0-14 param 0)
(the float (+ (-> a0-14 frame-group data 0 length) -1))
)
(set! (-> a0-14 param 1) 1.0)
(joint-control-channel-group-eval!
a0-14
(the-as art-joint-anim #f)
num-func-seek!
)
)
)
(go-virtual nav-enemy-patrol)
(none)
)
)
;; definition for symbol *aphid-nav-enemy-info*, type nav-enemy-info
(define
*aphid-nav-enemy-info*
(new 'static 'nav-enemy-info
:idle-anim 3
:walk-anim 4
:turn-anim 9
:notice-anim 3
:run-anim 4
:jump-anim -1
:jump-land-anim -1
:victory-anim 10
:taunt-anim 10
:die-anim 11
:neck-joint 10
:player-look-at-joint 5
:run-travel-speed (meters 5.0)
:run-rotate-speed (degrees 2880.0)
:run-acceleration (meters 1.0)
:run-turn-time #x1e
:walk-travel-speed (meters 3.0)
:walk-rotate-speed (degrees 720.0)
:walk-acceleration (meters 1.0)
:walk-turn-time #x96
:attack-shove-back (meters 3.0)
:attack-shove-up (meters 2.0)
:shadow-size (meters 2.0)
:notice-nav-radius (meters 2.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 24.0
:jump-anim-start-frame 10.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 0.25)
:shadow-min-y (meters -0.25)
:shadow-locus-dist (meters 150.0)
:use-align #f
: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 #f
)
)
;; definition for method 47 of type aphid
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-47 aphid ((obj aphid))
(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-sphere s5-0 (the-as uint 3))))
(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! (-> s4-0 prim-core offense) 1)
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 4096.0)
)
(dummy-46 s5-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 aphid
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-48 aphid ((obj aphid))
(dummy-14 obj *aphid-sg* '())
(TODO-RENAME-45 obj *aphid-nav-enemy-info*)
(set! (-> obj neck up) (the-as uint 0))
(set! (-> obj neck nose) (the-as uint 1))
(set! (-> obj neck ear) (the-as uint 2))
0
(none)
)
;; definition for function aphid-init-by-other
;; Used lq/sq
(defbehavior
aphid-init-by-other aphid
((arg0 nav-enemy) (arg1 vector) (arg2 vector))
(TODO-RENAME-47 self)
(logior! (-> self mask) (process-mask actor-pause))
(set! (-> self collide-info trans quad) (-> arg1 quad))
(set! (-> self event-param-point quad) (-> arg2 quad))
(let ((s3-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1)))
(set! (-> s3-1 y) 0.0)
(vector-normalize! s3-1 1.0)
(forward-up->quaternion (-> self collide-info quat) s3-1 *up-vector*)
)
(vector-identity! (-> self collide-info scale))
(set! (-> self entity) (-> arg0 entity))
(TODO-RENAME-48 self)
(set! (-> self nav-enemy-flags) (logand -4097 (-> self nav-enemy-flags)))
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 0)
(set! (-> a1-3 message) 'try)
(set!
(-> self try)
(the-as int (send-event-function (ppointer->process (-> self parent)) a1-3))
)
)
(go-virtual nav-enemy-chase)
(none)
)
+1 -1
View File
@@ -289,7 +289,7 @@ class OfflineDecompilation : public ::testing::Test {
std::vector<std::string> dgos = {"CGO/KERNEL.CGO", "CGO/ENGINE.CGO", "CGO/GAME.CGO",
"DGO/BEA.DGO", "CGO/L1.CGO", "DGO/INT.DGO",
"DGO/VI1.DGO"};
"DGO/VI1.DGO", "DGO/DEM.DGO"};
std::vector<std::string> dgo_paths;
if (g_iso_data_path.empty()) {
for (auto& x : dgos) {