[decomp] start work on collide (#2008)

Adds `collide-shape` and a few other related ones.
This commit is contained in:
water111
2022-11-11 12:01:45 -05:00
committed by GitHub
parent 190fe6968f
commit 136136e498
93 changed files with 10269 additions and 1807 deletions
+22 -3
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-puss-sphere
(deftype collide-puss-sphere (structure)
((bsphere sphere :inline :offset-assert 0)
(bbox4w bounding-box4w :inline :offset-assert 16)
@@ -9,6 +11,7 @@
:flag-assert #x900000030
)
;; definition for method 3 of type collide-puss-sphere
(defmethod inspect collide-puss-sphere ((obj collide-puss-sphere))
(when (not obj)
(set! obj obj)
@@ -21,6 +24,7 @@
obj
)
;; definition of type collide-puss-work
(deftype collide-puss-work (structure)
((closest-pt vector :inline :offset-assert 0)
(tri-normal vector :inline :offset-assert 16)
@@ -37,6 +41,7 @@
)
)
;; definition for method 3 of type collide-puss-work
(defmethod inspect collide-puss-work ((obj collide-puss-work))
(when (not obj)
(set! obj obj)
@@ -52,6 +57,7 @@
obj
)
;; definition of type collide-cache-tri
(deftype collide-cache-tri (structure)
((vertex vector 3 :inline :offset-assert 0)
(extra-quad uint8 16 :offset-assert 48)
@@ -66,6 +72,7 @@
:flag-assert #x900000040
)
;; definition for method 3 of type collide-cache-tri
(defmethod inspect collide-cache-tri ((obj collide-cache-tri))
(when (not obj)
(set! obj obj)
@@ -83,6 +90,7 @@
obj
)
;; definition of type collide-cache-prim
(deftype collide-cache-prim (structure)
((prim-core collide-prim-core :inline :offset-assert 0)
(extra-quad uint8 16 :offset-assert 32)
@@ -100,11 +108,12 @@
:size-assert #x30
:flag-assert #xb00000030
(:methods
(collide-cache-prim-method-9 () none 9)
(collide-cache-prim-method-10 () none 10)
(resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float 9)
(resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float 10)
)
)
;; definition for method 3 of type collide-cache-prim
(defmethod inspect collide-cache-prim ((obj collide-cache-prim))
(when (not obj)
(set! obj obj)
@@ -126,6 +135,7 @@
obj
)
;; definition of type collide-cache
(deftype collide-cache (basic)
((num-tris int32 :offset-assert 4)
(num-tris-u32 uint32 :offset 4)
@@ -144,7 +154,7 @@
:size-assert #x8670
:flag-assert #x1a00008670
(:methods
(collide-cache-method-9 () none 9)
(debug-draw (_type_) none 9)
(fill-and-probe-using-line-sphere (_type_ collide-query) float 10)
(fill-and-probe-using-spheres (_type_ collide-query) symbol 11)
(fill-using-bounding-box (_type_ collide-query) none 12)
@@ -164,6 +174,7 @@
)
)
;; definition for method 3 of type collide-cache
(defmethod inspect collide-cache ((obj collide-cache))
(when (not obj)
(set! obj obj)
@@ -184,6 +195,7 @@
obj
)
;; definition of type collide-list-item
(deftype collide-list-item (structure)
((mesh instance-tie :offset-assert 0)
(inst basic :offset-assert 4)
@@ -194,6 +206,7 @@
:flag-assert #x900000008
)
;; definition for method 3 of type collide-list-item
(defmethod inspect collide-list-item ((obj collide-list-item))
(when (not obj)
(set! obj obj)
@@ -206,6 +219,7 @@
obj
)
;; definition of type collide-list
(deftype collide-list (structure)
((num-items int32 :offset-assert 0)
(items collide-list-item 256 :inline :offset 16)
@@ -215,6 +229,7 @@
:flag-assert #x900000810
)
;; definition for method 3 of type collide-list
(defmethod inspect collide-list ((obj collide-list))
(when (not obj)
(set! obj obj)
@@ -227,10 +242,14 @@
obj
)
;; failed to figure out what this is:
(kmemopen global "collide-cache")
;; definition (perm) for symbol *collide-cache*, type collide-cache
(define-perm *collide-cache* collide-cache (new 'global 'collide-cache))
;; definition (perm) for symbol *collide-list*, type collide-list
(define-perm *collide-list* collide-list (new 'global 'collide-list))
;; failed to figure out what this is:
(kmemclose)
+2 -6
View File
@@ -241,7 +241,7 @@
)
(let ((a1-12 (new 'stack-no-clear 'collide-query)))
(let ((v1-28 a1-12))
(set! (-> v1-28 spheres) (-> obj world-player-spheres))
(set! (-> v1-28 best-dist) (the-as float (-> obj world-player-spheres)))
(set! (-> v1-28 num-spheres) (the-as uint 12))
(set! (-> v1-28 collide-with) (-> obj cshape root-prim prim-core collide-with))
(set! (-> v1-28 ignore-process0) #f)
@@ -338,7 +338,7 @@
(transform-vectors! s4-0 s5-0 (-> arg0 spec local-player-spheres) 6)
(let ((a1-11 (new 'stack-no-clear 'collide-query)))
(let ((v1-13 a1-11))
(set! (-> v1-13 spheres) s5-0)
(set! (-> v1-13 best-dist) (the-as float s5-0))
(set! (-> v1-13 num-spheres) (the-as uint 6))
(set! (-> v1-13 collide-with) (-> arg0 cshape root-prim prim-core collide-with))
(set! (-> v1-13 ignore-process0) #f)
@@ -787,7 +787,3 @@
(set! (-> v1-2 touch-hook) nothing)
(set! (-> v1-2 active-hook) nothing)
)
+9 -4
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-query
(deftype collide-query (structure)
((best-other-tri collide-tri-result :inline :offset-assert 0)
(best-my-tri collide-tri-result :inline :offset 0)
@@ -46,6 +48,7 @@
:flag-assert #x90000021c
)
;; definition for method 3 of type collide-query
(defmethod inspect collide-query ((obj collide-query))
(when (not obj)
(set! obj obj)
@@ -59,7 +62,7 @@
(format #t "~1Tignore-process1: ~A~%" (-> obj ignore-process1))
(format #t "~1Tignore-pat: ~D~%" (-> obj ignore-pat))
(format #t "~1Tcollide-with: ~D~%" (-> obj collide-with))
(format #t "~1Toverlay-params[3] @ #x~X~%" (&-> obj spheres))
(format #t "~1Toverlay-params[3] @ #x~X~%" (&-> obj best-dist))
(format #t "~1Tbbox: #<bounding-box @ #x~X>~%" (-> obj bbox))
(format #t "~1Tbbox4w: #<bounding-box4w @ #x~X>~%" (-> obj bbox4w))
(format #t "~1Tbsphere: #<sphere @ #x~X>~%" (-> obj bsphere))
@@ -69,14 +72,14 @@
(format #t "~1Texit-planes[2] @ #x~X~%" (-> obj exit-planes))
(format #t "~1Tradius: ~f~%" (-> obj radius))
(format #t "~1Tinv-mat: #<matrix @ #x~X>~%" (-> obj inv-mat))
(format #t "~1Tspheres: #x~X~%" (-> obj spheres))
(format #t "~1Tspheres: #x~X~%" (-> obj best-dist))
(format #t "~1Tnum-spheres: ~D~%" (-> obj num-spheres))
(format #t "~1Tsolid-only: ~A~%" (-> obj best-my-prim))
(format #t "~1Tbest-dist: ~f~%" (the-as float (-> obj spheres)))
(format #t "~1Tbest-dist: ~f~%" (the-as float (-> obj best-dist)))
(format #t "~1Tbest-other-prim: ~A~%" (-> obj num-spheres))
(format #t "~1Tbest-my-prim: ~A~%" (-> obj best-my-prim))
(format #t "~1Tmove-vec: #<vector @ #x~X>~%" (-> obj move-dist))
(format #t "~1Tbest-u: ~f~%" (the-as float (-> obj spheres)))
(format #t "~1Tbest-u: ~f~%" (the-as float (-> obj best-dist)))
(format #t "~1Taction-mask: ~D~%" (-> obj action-mask))
(format #t "~1Tlocal-box4w: #<bounding-box4w @ #x~X>~%" (-> obj local-box4w))
(format #t "~1Tsearch-box: #<bounding-box4w @ #x~X>~%" (-> obj search-box))
@@ -93,6 +96,8 @@
obj
)
;; definition for symbol *collide-test-flag*, type symbol
(define *collide-test-flag* #f)
;; failed to figure out what this is:
0
+1 -1
View File
@@ -155,7 +155,7 @@
:size-assert #xbb90
:flag-assert #xd0000bb90
(:methods
(populate-for-prim-mesh (_type_ collide-shape-prim-mesh) none 9)
(populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry 9)
(is-id? (_type_ int) symbol 10)
(next-id! (_type_) uint 11)
(allocate! (_type_ int) collide-mesh-cache-entry 12)
+1 -6
View File
@@ -274,7 +274,6 @@
;; definition for method 9 of type collide-mesh-cache
;; INFO: Used lq/sq
;; WARN: Return type mismatch collide-mesh-cache-entry vs none.
;; ERROR: Unsupported inline assembly instruction kind - [pxor v1, v1, a0]
;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1]
;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1]
@@ -355,8 +354,8 @@
)
)
)
s4-0
)
(none)
)
;; definition for method 12 of type collide-mesh-cache
@@ -669,7 +668,3 @@
#f
)
)
+140 -91
View File
@@ -1,16 +1,19 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-rider
(deftype collide-rider (structure)
((rider-handle handle :offset-assert 0)
(sticky-prim basic :offset-assert 8)
(prim-ry float :offset-assert 12)
(rider-local-pos vector :inline :offset-assert 16)
((rider-handle handle :offset-assert 0)
(sticky-prim collide-shape-prim :offset-assert 8)
(prim-ry float :offset-assert 12)
(rider-local-pos vector :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
;; definition for method 3 of type collide-rider
(defmethod inspect collide-rider ((obj collide-rider))
(when (not obj)
(set! obj obj)
@@ -25,6 +28,7 @@
obj
)
;; definition of type collide-rider-pool
(deftype collide-rider-pool (basic)
((alloc-count int32 :offset-assert 4)
(riders collide-rider 20 :inline :offset-assert 16)
@@ -33,11 +37,12 @@
:size-assert #x290
:flag-assert #xb00000290
(:methods
(collide-rider-pool-method-9 () none 9)
(add-rider (_type_ handle) collide-rider 9)
(prepare (_type_) none 10)
)
)
;; definition for method 3 of type collide-rider-pool
(defmethod inspect collide-rider-pool ((obj collide-rider-pool))
(when (not obj)
(set! obj obj)
@@ -50,6 +55,8 @@
obj
)
;; definition for method 10 of type collide-rider-pool
;; WARN: Return type mismatch int vs none.
(defmethod prepare collide-rider-pool ((obj collide-rider-pool))
"Gets this pool ready to be used to allow allocations. This should be called once at the start of every frame."
(set! (-> obj alloc-count) 0)
@@ -57,6 +64,7 @@
(none)
)
;; definition of type pull-rider-info
(deftype pull-rider-info (structure)
((rider collide-rider :offset-assert 0)
(rider-cshape collide-shape-moving :offset-assert 4)
@@ -68,6 +76,7 @@
:flag-assert #x900000020
)
;; definition for method 3 of type pull-rider-info
(defmethod inspect pull-rider-info ((obj pull-rider-info))
(when (not obj)
(set! obj obj)
@@ -82,16 +91,22 @@
obj
)
;; failed to figure out what this is:
(kmemopen global "collide-lists")
;; definition for symbol *collide-hit-by-player-list*, type engine
(define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 640 connection))
;; definition for symbol *collide-hit-by-others-list*, type engine
(define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 768 connection))
;; definition for symbol *collide-player-list*, type engine
(define *collide-player-list* (new 'global 'engine 'collide-player-list 32 connection))
;; failed to figure out what this is:
(kmemclose)
;; definition of type overlaps-others-params
(deftype overlaps-others-params (structure)
((options overlaps-others-options :offset-assert 0)
(collide-with-filter collide-spec :offset-assert 4)
@@ -105,6 +120,7 @@
:flag-assert #x900000018
)
;; definition for method 3 of type overlaps-others-params
(defmethod inspect overlaps-others-params ((obj overlaps-others-params))
(when (not obj)
(set! obj obj)
@@ -121,6 +137,7 @@
obj
)
;; definition of type move-above-ground-params
(deftype move-above-ground-params (structure)
((gnd-collide-with collide-spec :offset-assert 0)
(popup float :offset-assert 4)
@@ -139,6 +156,7 @@
:flag-assert #x90000006c
)
;; definition for method 3 of type move-above-ground-params
(defmethod inspect move-above-ground-params ((obj move-above-ground-params))
(when (not obj)
(set! obj obj)
@@ -160,6 +178,7 @@
obj
)
;; definition of type collide-prim-core
(deftype collide-prim-core (structure)
((world-sphere vector :inline :offset-assert 0)
(collide-as collide-spec :offset-assert 16)
@@ -174,6 +193,7 @@
:flag-assert #x900000020
)
;; definition for method 3 of type collide-prim-core
(defmethod inspect collide-prim-core ((obj collide-prim-core))
(when (not obj)
(set! obj obj)
@@ -191,6 +211,7 @@
obj
)
;; definition of type collide-shape-prim
(deftype collide-shape-prim (basic)
((cshape collide-shape :offset-assert 4)
(prim-id uint32 :offset-assert 8)
@@ -211,20 +232,21 @@
:flag-assert #x1400000050
(:methods
(new (symbol type collide-shape uint int) _type_ 0)
(collide-shape-prim-method-9 () none 9)
(debug-draw (_type_) none 9)
(add-fg-prim-using-box () none 10)
(add-fg-prim-using-line-sphere () none 11)
(collide-shape-prim-method-12 () none 12)
(collide-shape-prim-method-13 () none 13)
(overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol 12)
(overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol 13)
(collide-shape-prim-method-14 () none 14)
(collide-shape-prim-method-15 () none 15)
(collide-shape-prim-method-16 () none 16)
(collide-shape-prim-method-17 () none 17)
(collide-shape-prim-method-18 () none 18)
(collide-shape-prim-method-19 () none 19)
(collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none 15)
(collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none 16)
(on-platform-test (_type_ collide-shape-prim collide-query float) none 17)
(should-push-away-test (_type_ collide-shape-prim collide-query) none 18)
(should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none 19)
)
)
;; definition for method 3 of type collide-shape-prim
(defmethod inspect collide-shape-prim ((obj collide-shape-prim))
(when (not obj)
(set! obj obj)
@@ -470,6 +492,7 @@
obj
)
;; definition of type collide-shape-prim-sphere
(deftype collide-shape-prim-sphere (collide-shape-prim)
((pat pat-surface :offset 64)
(nav-radius float :offset 68)
@@ -482,6 +505,7 @@
)
)
;; definition for method 3 of type collide-shape-prim-sphere
(defmethod inspect collide-shape-prim-sphere ((obj collide-shape-prim-sphere))
(when (not obj)
(set! obj obj)
@@ -729,6 +753,7 @@
obj
)
;; definition of type collide-shape-prim-mesh
(deftype collide-shape-prim-mesh (collide-shape-prim)
((mesh collide-mesh :offset 64)
(mesh-id int32 :offset 68)
@@ -743,6 +768,7 @@
)
)
;; definition for method 3 of type collide-shape-prim-mesh
(defmethod inspect collide-shape-prim-mesh ((obj collide-shape-prim-mesh))
(when (not obj)
(set! obj obj)
@@ -992,6 +1018,7 @@
obj
)
;; definition of type collide-shape-prim-group
(deftype collide-shape-prim-group (collide-shape-prim)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
@@ -1005,6 +1032,7 @@
)
)
;; definition for method 3 of type collide-shape-prim-group
(defmethod inspect collide-shape-prim-group ((obj collide-shape-prim-group))
(when (not obj)
(set! obj obj)
@@ -1253,24 +1281,25 @@
obj
)
;; definition of type collide-shape
(deftype collide-shape (trsqv)
((actor-hash-index int16 :offset 12)
(process process-drawable :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags nav-flags :offset-assert 145)
(total-prims uint8 :offset-assert 146)
(num-riders uint8 :offset-assert 147)
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self symbol :offset-assert 152)
(event-other symbol :offset-assert 156)
(root-prim collide-shape-prim :offset-assert 160)
(riders pointer :offset-assert 164)
(penetrate-using penetrate :offset-assert 168)
(penetrated-by penetrate :offset-assert 176)
(backup-collide-as collide-spec :offset-assert 184)
(backup-collide-with collide-spec :offset-assert 188)
(event-priority uint8 :offset-assert 192)
(rider-max-momentum float :offset-assert 196)
((actor-hash-index int16 :offset 12)
(process process-drawable :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags nav-flags :offset-assert 145)
(total-prims uint8 :offset-assert 146)
(num-riders uint8 :offset-assert 147)
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self symbol :offset-assert 152)
(event-other symbol :offset-assert 156)
(root-prim collide-shape-prim :offset-assert 160)
(riders (inline-array collide-rider) :offset-assert 164)
(penetrate-using penetrate :offset-assert 168)
(penetrated-by penetrate :offset-assert 176)
(backup-collide-as collide-spec :offset-assert 184)
(backup-collide-with collide-spec :offset-assert 188)
(event-priority uint8 :offset-assert 192)
(rider-max-momentum float :offset-assert 196)
)
:method-count-assert 55
:size-assert #xc8
@@ -1278,35 +1307,36 @@
(:methods
(new (symbol type process-drawable collide-list-enum) _type_ 0)
(move-by-vector! (_type_ vector) none 28)
(collide-shape-method-29 (_type_ vector) none 29)
(collide-shape-method-30 () none 30)
(collide-shape-method-31 () none 31)
(collide-shape-method-32 (_type_ vector collide-query meters) none 32)
(collide-shape-method-33 () none 33)
(collide-shape-method-34 () none 34)
(collide-shape-method-35 () none 35)
(collide-shape-method-36 () none 36)
(collide-shape-method-37 (_type_ vector) none 37)
(collide-shape-method-38 () none 38)
(collide-shape-method-39 () none 39)
(move-to-point! (_type_ vector) none 29)
(debug-draw (_type_) none 30)
(fill-cache-for-shape (_type_ float collide-query) none 31)
(fill-cache-integrate-and-collide (_type_ vector collide-query meters) none 32)
(find-prim-by-id (_type_ uint) collide-shape-prim 33)
(find-prim-by-id-logtest (_type_ uint) collide-shape-prim 34)
(detect-riders! (_type_) symbol 35)
(build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol 36)
(integrate-and-collide! (_type_ vector) none 37)
(find-collision-meshes (_type_) none 38)
(on-platform (_type_ collide-shape collide-query) symbol 39)
(find-overlapping-shapes (_type_ overlaps-others-params) symbol 40)
(collide-shape-method-41 () none 41)
(collide-shape-method-42 () none 42)
(collide-shape-method-43 () none 43)
(collide-shape-method-44 () none 44)
(collide-shape-method-45 () none 45)
(collide-shape-method-46 (_type_) none 46)
(shove-to-closest-point-on-path (_type_ attack-info float) vector 41)
(should-push-away (_type_ collide-shape collide-query) symbol 42)
(pull-rider! (_type_ pull-rider-info) none 43)
(pull-riders! (_type_) symbol 44)
(do-push-aways (_type_) collide-spec 45)
(update-transforms (_type_) none 46)
(set-collide-with! (_type_ collide-spec) none 47)
(set-collide-as! (_type_ collide-spec) none 48)
(collide-shape-method-49 (_type_ int int int) none 49)
(collide-shape-method-50 (_type_ process object float float float) none 50)
(collide-shape-method-51 (_type_) none 51)
(modify-collide-as! (_type_ int collide-spec collide-spec) none 49)
(send-shoves (_type_ process touching-shapes-entry float float float) symbol 50)
(above-ground? (_type_ collide-query vector object float float float) symbol 51)
(water-info-init! (_type_ water-info collide-action) water-info 52)
(collide-shape-method-53 (_type_) none 53)
(collide-shape-method-54 (_type_) none 54)
(iterate-prims (_type_ (function collide-shape-prim none)) none 53)
(pusher-init (_type_) none 54)
)
)
;; definition for method 3 of type collide-shape
(defmethod inspect collide-shape ((obj collide-shape))
(when (not obj)
(set! obj obj)
@@ -1550,57 +1580,59 @@
obj
)
;; definition of type collide-shape-moving
(deftype collide-shape-moving (collide-shape)
((rider-time time-frame :offset-assert 200)
(rider-last-move vector :inline :offset-assert 208)
(trans-old vector :inline :offset-assert 224)
(csm-unk-vec-981i2u312 vector :inline :offset 240)
(csm-unk-vec-klj1n23 vector :inline :offset 256)
(poly-pat pat-surface :offset 272)
(cur-pat pat-surface :offset-assert 276)
(ground-pat pat-surface :offset-assert 280)
(status cshape-moving-flags :offset-assert 288)
(old-status cshape-moving-flags :offset-assert 296)
(prev-status cshape-moving-flags :offset-assert 304)
(reaction-flag cshape-reaction-flags :offset-assert 312)
(reaction (function control-info collide-query vector vector cshape-moving-flags) :offset-assert 316)
(no-reaction function :offset-assert 320)
(local-normal vector :inline :offset-assert 336)
(surface-normal vector :inline :offset-assert 352)
(poly-normal vector :inline :offset-assert 368)
(ground-poly-normal vector :inline :offset-assert 384)
(gspot-pos vector :inline :offset-assert 400)
(gspot-normal vector :inline :offset-assert 416)
(grount-touch-point vector :inline :offset-assert 432)
(ground-impact-vel meters :offset-assert 448)
(surface-angle float :offset-assert 452)
(poly-angle float :offset-assert 456)
(touch-angle float :offset-assert 460)
(coverage float :offset-assert 464)
(dynam dynamics :offset-assert 468)
(surf surface :offset-assert 472)
((rider-time time-frame :offset-assert 200)
(rider-last-move vector :inline :offset-assert 208)
(trans-old vector :inline :offset-assert 224)
(trans-old-old vector :inline :offset 240)
(trans-old-old-old vector :inline :offset 256)
(poly-pat pat-surface :offset 272)
(cur-pat pat-surface :offset-assert 276)
(ground-pat pat-surface :offset-assert 280)
(status collide-status :offset-assert 288)
(old-status collide-status :offset-assert 296)
(prev-status collide-status :offset-assert 304)
(reaction-flag cshape-reaction-flags :offset-assert 312)
(reaction (function control-info collide-query vector vector collide-status) :offset-assert 316)
(no-reaction (function collide-shape-moving collide-query vector vector object) :offset-assert 320)
(local-normal vector :inline :offset-assert 336)
(surface-normal vector :inline :offset-assert 352)
(poly-normal vector :inline :offset-assert 368)
(ground-poly-normal vector :inline :offset-assert 384)
(gspot-pos vector :inline :offset-assert 400)
(gspot-normal vector :inline :offset-assert 416)
(grount-touch-point vector :inline :offset-assert 432)
(ground-impact-vel meters :offset-assert 448)
(surface-angle float :offset-assert 452)
(poly-angle float :offset-assert 456)
(touch-angle float :offset-assert 460)
(coverage float :offset-assert 464)
(dynam dynamics :offset-assert 468)
(surf surface :offset-assert 472)
)
:method-count-assert 68
:size-assert #x1dc
:flag-assert #x44000001dc
(:methods
(new (symbol type process-drawable collide-list-enum) _type_ 0)
(collide-shape-moving-method-55 (_type_ collide-query collide-spec float float float) symbol 55)
(collide-shape-moving-method-56 (_type_ pat-surface) none 56)
(collide-shape-moving-method-57 () none 57)
(collide-shape-moving-method-58 (_type_ vector overlaps-others-params) symbol 58)
(collide-shape-moving-method-59 () none 59)
(collide-shape-moving-method-60 () none 60)
(collide-shape-moving-method-61 () none 61)
(find-ground (_type_ collide-query collide-spec float float float) symbol 55)
(react-to-pat! (_type_ pat-surface) none 56)
(integrate-no-collide! (_type_ vector) none 57)
(integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol 58)
(move-above-ground (_type_ vector move-above-ground-params) none 59)
(move-to-ground (_type_ float float symbol collide-spec) none 60)
(move-to-ground-point (_type_ vector vector vector) none 61)
(compute-acc-due-to-gravity (_type_ vector float) vector 62)
(collide-shape-moving-method-63 () none 63)
(collide-shape-moving-method-64 () none 64)
(collide-shape-moving-method-65 (_type_ vector float float float) symbol 65)
(collide-shape-moving-method-66 () none 66)
(try-snap-to-surface (_type_ vector float float float) symbol 64)
(fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol 65)
(step-collison! (_type_ vector vector float int) float 66)
(collide-shape-moving-method-67 () none 67)
)
)
;; definition for method 3 of type collide-shape-moving
(defmethod inspect collide-shape-moving ((obj collide-shape-moving))
(when (not obj)
(set! obj obj)
@@ -1870,6 +1902,7 @@
obj
)
;; definition for method 0 of type collide-shape-prim
(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
(let ((v0-0 (object-new allocation type-to-make arg2)))
(set! (-> v0-0 cshape) arg0)
@@ -1883,6 +1916,8 @@
)
)
;; definition for method 0 of type collide-shape-prim-sphere
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere.
(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg1 80)))
(set! (-> (the-as collide-shape-prim-sphere v0-0) pat)
@@ -1893,6 +1928,8 @@
)
)
;; definition for method 0 of type collide-shape-prim-mesh
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh.
(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 uint))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg2 80)))
(set! (-> (the-as collide-shape-prim-mesh v0-0) mesh) #f)
@@ -1903,6 +1940,8 @@
)
)
;; definition for method 0 of type collide-shape-prim-group
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-group.
(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 (the-as uint arg2) 80)))
(set! (-> (the-as collide-shape-prim-group v0-0) num-children) arg1)
@@ -1915,10 +1954,13 @@
)
)
;; definition for method 4 of type collide-shape-prim-group
;; WARN: Return type mismatch uint8 vs int.
(defmethod length collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as int (-> obj num-children))
)
;; definition for method 0 of type collide-shape
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> s5-0 actor-hash-index) -1)
@@ -1927,7 +1969,7 @@
(set! (-> s5-0 nav-flags) (nav-flags nav-flags0))
(set! (-> s5-0 event-self) #f)
(set! (-> s5-0 event-other) #f)
(set! (-> s5-0 riders) (the-as pointer #f))
(set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f))
(set! (-> s5-0 root-prim) #f)
(set! (-> s5-0 penetrate-using) (penetrate))
(set! (-> s5-0 penetrated-by) (penetrate))
@@ -1967,6 +2009,9 @@
)
)
;; definition for method 0 of type collide-shape-moving
;; INFO: Used lq/sq
;; WARN: Return type mismatch collide-shape vs collide-shape-moving.
(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1)))
(set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0)
@@ -1976,6 +2021,7 @@
)
)
;; definition for symbol *collide-shape-prim-backgnd*, type collide-shape-prim-mesh
(define *collide-shape-prim-backgnd* (new 'static 'collide-shape-prim-mesh
:cshape #f
:prim-core (new 'static 'collide-prim-core
@@ -1989,6 +2035,7 @@
)
)
;; definition for symbol *collide-shape-prim-water*, type collide-shape-prim-mesh
(define *collide-shape-prim-water* (new 'static 'collide-shape-prim-mesh
:cshape #f
:prim-core (new 'static 'collide-prim-core
@@ -2002,6 +2049,8 @@
)
)
;; definition (perm) for symbol *collide-rider-pool*, type collide-rider-pool
(define-perm *collide-rider-pool* collide-rider-pool (new 'global 'collide-rider-pool))
;; failed to figure out what this is:
0
@@ -0,0 +1,438 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 39 of type collide-shape
(defmethod on-platform collide-shape ((obj collide-shape) (arg0 collide-shape) (arg1 collide-query))
(let ((v1-0 arg1))
(set! (-> v1-0 best-dist) 0.0)
(set! (-> v1-0 best-my-prim) #f)
(set! (-> v1-0 num-spheres) (the-as uint #f))
)
(set! (-> arg1 best-dist) 122.88)
(let ((s5-0 (-> obj root-prim))
(s4-0 (-> arg0 root-prim))
)
(when (and (logtest? (-> s5-0 prim-core collide-with) (-> s4-0 prim-core collide-as))
(logtest? (-> s5-0 prim-core action) (collide-action rideable))
(logtest? (-> s4-0 prim-core action) (collide-action can-ride))
)
(let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core)))
(-> s5-0 prim-core world-sphere w)
)
(-> s4-0 prim-core world-sphere w)
)
)
)
(if (< f0-4 122.88)
(on-platform-test s5-0 s4-0 arg1 f0-4)
)
)
)
)
(< (-> arg1 best-dist) 122.88)
)
;; definition for method 17 of type collide-shape-prim
;; WARN: Return type mismatch object vs none.
(defmethod on-platform-test collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float))
(format 0 "ERROR: collide-shape-prim::on-platform-test was called illegally!~%")
(none)
)
;; definition for method 17 of type collide-shape-prim-group
;; WARN: Return type mismatch int vs none.
(defmethod on-platform-test collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float))
(let ((s4-0 (-> arg0 prim-core collide-as))
(s3-0 (-> obj child 0))
)
(countdown (s2-0 (the-as uint (-> obj num-children)))
(when (and (logtest? (-> s3-0 prim-core collide-with) s4-0)
(logtest? (-> s3-0 prim-core action) (collide-action rideable))
)
(let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core)))
(-> s3-0 prim-core world-sphere w)
)
(-> arg0 prim-core world-sphere w)
)
)
)
(if (< f0-2 122.88)
(on-platform-test s3-0 arg0 arg1 f0-2)
)
)
)
(&+! s3-0 80)
)
)
0
(none)
)
;; definition for method 17 of type collide-shape-prim-mesh
;; INFO: Used lq/sq
;; WARN: Return type mismatch pat-surface vs none.
(defmethod on-platform-test collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float))
(case (-> arg0 type)
((collide-shape-prim-group)
(let ((s4-0 (-> obj prim-core collide-with))
(s3-0 (-> (the-as collide-shape-prim-group arg0) child 0))
(s2-1 (the-as object (-> (the-as collide-shape-prim-group arg0) num-children)))
)
(while (nonzero? (the-as uint s2-1))
(set! s2-1 (+ (the-as uint s2-1) -1))
(when (and (logtest? s4-0 (-> s3-0 prim-core collide-as))
(logtest? (-> s3-0 prim-core action) (collide-action can-ride))
)
(let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> obj prim-core)) (the-as vector (-> s3-0 prim-core)))
(-> obj prim-core world-sphere w)
)
(-> s3-0 prim-core world-sphere w)
)
)
)
(if (< f0-2 122.88)
(on-platform-test obj s3-0 arg1 f0-2)
)
)
)
(&+! s3-0 80)
)
)
)
((collide-shape-prim-sphere)
(let ((s3-1 (-> obj mesh)))
(when s3-1
(let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* obj)))
(when v1-13
(let* ((s4-1 (new 'stack-no-clear 'collide-tri-result))
(f0-4 (sphere-on-platform-test
s3-1
(the-as collide-mesh-cache-tri (-> v1-13 tris))
s4-1
(the-as vector (-> arg0 prim-core))
(-> arg1 best-dist)
)
)
)
(when (< f0-4 (-> arg1 best-dist))
(set! (-> arg1 best-dist) f0-4)
(set! (-> arg1 best-my-prim) obj)
(set! (-> arg1 num-spheres) (the-as uint arg0))
(set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 vertex 0 quad))
(set! (-> arg1 best-other-tri vertex 1 quad) (-> s4-1 vertex 1 quad))
(set! (-> arg1 best-other-tri vertex 2 quad) (-> s4-1 vertex 2 quad))
(set! (-> arg1 best-other-tri intersect quad) (-> s4-1 intersect quad))
(set! (-> arg1 best-other-tri normal quad) (-> s4-1 normal quad))
(set! (-> arg1 best-other-tri pat) (-> s4-1 pat))
)
)
)
)
)
)
)
)
(none)
)
;; definition for method 9 of type collide-rider-pool
(defmethod add-rider collide-rider-pool ((obj collide-rider-pool) (arg0 handle))
(let ((v1-0 (-> obj alloc-count)))
(cond
((< v1-0 20)
(let ((v0-0 (-> obj riders v1-0)))
(set! (-> obj alloc-count) (+ v1-0 1))
(set! (-> v0-0 rider-handle) arg0)
(set! (-> v0-0 sticky-prim) #f)
v0-0
)
)
(else
(format 0 "ERROR: <SW> *collide-rider-pool*: exceeded max # of riders!~%")
(the-as collide-rider #f)
)
)
)
)
;; definition for method 35 of type collide-shape
;; WARN: Return type mismatch joint-control-status vs symbol.
(defmethod detect-riders! collide-shape ((obj collide-shape))
(local-vars (v0-7 joint-control-status) (a2-5 float) (a2-12 float))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
)
(set! (-> obj num-riders) (the-as uint 0))
(set! (-> obj riders) (the-as (inline-array collide-rider) #f))
(let* ((s4-0 (-> obj root-prim))
(s5-0 (-> s4-0 prim-core collide-with))
)
(set! *actor-list-length* 0)
(if (logtest? s5-0 (collide-spec hit-by-others-list))
(set! *actor-list-length*
(fill-actor-list-for-sphere *actor-hash* (the-as sphere (-> s4-0 prim-core)) *actor-list* 256)
)
)
(when (logtest? s5-0 (collide-spec player-list))
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
*collide-player-list*
(let ((v1-11 (-> a0-2 next0)))
(while (!= a0-2 (-> *collide-player-list* alive-list-end))
(let* ((a0-3 (-> (the-as connection a0-2) param1))
(a1-1 (-> (the-as collide-shape a0-3) root-prim))
)
(when (logtest? s5-0 (-> a1-1 prim-core collide-as))
(let ((a1-2 (-> a1-1 prim-core)))
(let ((a2-4 a1-2)
(a3-1 (-> s4-0 prim-core))
)
(.lvf vf2 (&-> a2-4 world-sphere quad))
(.lvf vf3 (&-> a3-1 world-sphere quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-5 vf1)
(let ((f0-0 a2-5)
(f1-1 (+ (-> a1-2 world-sphere w) (-> s4-0 prim-core world-sphere w)))
)
(when (< f0-0 (* f1-1 f1-1))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-2 v1-11)
*collide-player-list*
(set! v1-11 (-> v1-11 next0))
)
)
)
)
(when (logtest? s5-0 (collide-spec hit-by-player-list))
(let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0)))
*collide-hit-by-player-list*
(let ((v1-19 (-> a0-5 next0)))
(while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end))
(let* ((a0-6 (-> (the-as connection a0-5) param1))
(a1-13 (-> (the-as collide-shape a0-6) root-prim))
)
(when (logtest? s5-0 (-> a1-13 prim-core collide-as))
(let ((a1-14 (-> a1-13 prim-core)))
(let ((a2-11 a1-14)
(a3-2 (-> s4-0 prim-core))
)
(.lvf vf2 (&-> a2-11 world-sphere quad))
(.lvf vf3 (&-> a3-2 world-sphere quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-12 vf1)
(let ((f0-1 a2-12)
(f1-5 (+ (-> a1-14 world-sphere w) (-> s4-0 prim-core world-sphere w)))
)
(when (< f0-1 (* f1-5 f1-5))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-5 v1-19)
*collide-hit-by-player-list*
(set! v1-19 (-> v1-19 next0))
)
)
)
)
(dotimes (s4-1 *actor-list-length*)
(let* ((s3-0 (-> *actor-list* s4-1))
(v1-24 (-> s3-0 root-prim))
)
(when (logtest? s5-0 (-> v1-24 prim-core collide-as))
(when (and (logtest? (-> v1-24 prim-core action) (collide-action can-ride)) (!= (-> obj process) (-> s3-0 process)))
(let ((s2-0 (new 'stack-no-clear 'collide-query)))
(when (on-platform obj s3-0 s2-0)
(let ((s5-1 (add-rider *collide-rider-pool* (process->handle (-> s3-0 process)))))
(when s5-1
(+! (-> obj num-riders) 1)
(if (not (-> obj riders))
(set! (-> obj riders) (the-as (inline-array collide-rider) s5-1))
)
(let ((a0-15 (-> s2-0 best-my-prim)))
(set! (-> s5-1 sticky-prim) a0-15)
(let ((s1-0 (-> obj process node-list data (-> a0-15 transform-index) bone transform)))
(set! (-> s5-1 prim-ry) (matrix-y-angle s1-0))
(let ((s2-1 (new 'stack-no-clear 'matrix)))
(matrix-4x4-inverse! s2-1 s1-0)
(set! (-> s3-0 trans w) 1.0)
(vector-matrix*! (-> s5-1 rider-local-pos) (-> s3-0 trans) s2-1)
)
)
)
(send-event (-> obj process) 'ridden s5-1)
)
)
(set! s5-0 (-> obj root-prim prim-core collide-with))
)
)
)
)
)
)
)
(let ((v1-58 (-> obj process skel)))
(the-as
symbol
(when (nonzero? v1-58)
(cond
((or (> (-> obj num-riders) 0) (logtest? (-> obj root-prim prim-core action) (collide-action edge-grabbed)))
(set! v0-7 (logior (-> v1-58 status) (joint-control-status sync-math)))
(set! (-> v1-58 status) v0-7)
)
(else
(set! v0-7 (logclear (-> v1-58 status) (joint-control-status sync-math)))
(set! (-> v1-58 status) v0-7)
)
)
v0-7
)
)
)
)
)
;; definition for method 44 of type collide-shape
;; WARN: Return type mismatch int vs symbol.
(defmethod pull-riders! collide-shape ((obj collide-shape))
(let ((s5-0 (-> obj riders)))
(when s5-0
(let ((s4-0 (new 'stack-no-clear 'pull-rider-info)))
(countdown (s3-0 (-> obj num-riders))
(let* ((v1-2 (-> s5-0 s3-0))
(a0-1 (-> v1-2 rider-handle))
)
(when (handle->process a0-1)
(set! (-> s4-0 rider) v1-2)
(set! (-> s4-0 rider-cshape)
(the-as collide-shape-moving (-> (the-as process-drawable (-> a0-1 process 0)) root))
)
(let ((a0-5 (-> v1-2 sticky-prim)))
(when a0-5
(let ((s2-0 (-> obj process node-list data (-> a0-5 transform-index) bone transform)))
(let ((s1-0 (-> s4-0 rider-dest)))
(vector-matrix*! s1-0 (-> v1-2 rider-local-pos) s2-0)
(vector-float*! s1-0 s1-0 (/ 1.0 (-> s1-0 w)))
)
(set! (-> s4-0 rider-delta-ry) (deg- (matrix-y-angle s2-0) (-> s4-0 rider prim-ry)))
)
(pull-rider! obj s4-0)
)
)
)
)
)
)
)
)
(the-as symbol 0)
)
;; definition for method 43 of type collide-shape
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod pull-rider! collide-shape ((obj collide-shape) (arg0 pull-rider-info))
(local-vars (at-0 int))
(with-pp
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((gp-0 (-> arg0 rider-cshape)))
(let ((s2-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector))
)
(set! (-> s3-0 quad) (-> gp-0 trans quad))
(vector-! s2-0 (-> arg0 rider-dest) s3-0)
(cond
((logtest? (-> obj root-prim prim-core action) (collide-action pull-rider-can-collide))
(let ((s1-0 (-> obj root-prim prim-core collide-as)))
(set! (-> obj root-prim prim-core collide-as) (collide-spec))
(let ((a2-0 (new 'stack-no-clear 'collide-query)))
(set! (-> a2-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
(set! (-> a2-0 ignore-process0) (-> gp-0 process))
(set! (-> a2-0 ignore-process1) #f)
(set! (-> a2-0 ignore-pat) (-> gp-0 pat-ignore-mask))
(set! (-> a2-0 action-mask) (collide-action solid))
(fill-cache-for-shape gp-0 (+ 8192.0 (vector-length s2-0)) a2-0)
)
(set! (-> obj root-prim prim-core collide-as) s1-0)
)
(let ((s1-1 (new 'stack-no-clear 'vector)))
(set! (-> s1-1 quad) (-> s2-0 quad))
(let ((v1-19 s1-1))
(.lvf vf1 (&-> s1-1 quad))
(let ((f0-2 (-> pp clock frames-per-second)))
(.mov at-0 f0-2)
)
(.mov vf2 at-0)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-19 quad) vf1)
)
(cond
((type? gp-0 collide-shape-moving)
(let ((s2-1 (-> gp-0 status)))
(integrate-and-collide! gp-0 s1-1)
(set! (-> gp-0 status) s2-1)
)
)
(else
(integrate-and-collide! gp-0 s1-1)
)
)
)
)
(else
(move-by-vector! gp-0 s2-0)
)
)
(when (type? gp-0 collide-shape-moving)
(let ((v1-26 (new 'stack-no-clear 'vector)))
(vector-! v1-26 (-> gp-0 trans) s3-0)
(vector-float*! (-> gp-0 rider-last-move) v1-26 (-> pp clock frames-per-second))
)
(let ((f0-4 (vector-length (-> gp-0 rider-last-move))))
(if (< (-> obj rider-max-momentum) f0-4)
(vector-normalize! (-> gp-0 rider-last-move) (-> obj rider-max-momentum))
)
)
(set! (-> gp-0 rider-time) (-> gp-0 process clock frame-counter))
)
)
(let ((f0-6 (-> arg0 rider-delta-ry)))
(if (!= f0-6 0.0)
(send-event (-> gp-0 process) 'rotate-y-angle f0-6)
)
)
)
(none)
)
)
)
File diff suppressed because it is too large Load Diff
+205 -203
View File
@@ -3,209 +3,211 @@
;; definition of type control-info
(deftype control-info (collide-shape-moving)
((unknown-float00 float :offset 448)
(unknown-float01 float :offset 452)
(unknown-float02 float :offset 456)
(unknown-float03 float :offset 460)
(unknown-vector00 vector :inline :offset 480)
(unknown-vector01 vector :inline :offset 496)
(unknown-vector02 vector :inline :offset 512)
(quat-for-control quaternion :inline :offset 528)
(override-quat quaternion :inline :offset 544)
(override-quat-alpha float :offset 560)
(unknown-float05 float :offset 564)
(unknown-float003 float :offset 568)
(unknown-float06 float :offset 572)
(unknown-float07 float :offset 576)
(unknown-time-frame00 time-frame :offset 584)
(unknown-vector03 vector :inline :offset 592)
(unknown-quaternion02 quaternion :inline :offset 608)
(unknown-quaternion03 quaternion :inline :offset 624)
(unknown-vector-array00 vector 128 :inline :offset 640)
(unknown-time-frame-array00 time-frame 128 :offset 2688)
(unknown-word00 int32 :offset 3712)
(unknown-vector04 vector :inline :offset 3728)
(unknown-vector05 vector :inline :offset 3744)
(unknown-vector06 vector :inline :offset 3760)
(unknown-vector07 vector :inline :offset 3776)
(unknown-vector000 vector :inline :offset 3792)
(unknown-dynamics00 dynamics :offset 3824)
(unknown-surface00 surface :offset 3828)
(unknown-surface01 surface :offset 3832)
(unknown-surface02 surface :offset 3836)
(unknown-time-frame02 time-frame :offset 3840)
(cpad cpad-info :offset 3848)
(unknown-float08 float :offset 3852)
(unknown-float09 float :offset 3856)
(unknown-float10 float :offset 3860)
(unknown-float11 float :offset 3864)
(to-target-pt-xz vector :inline :offset 3872)
(unknown-vector09 vector :inline :offset 3888)
(unknown-vector10 vector :inline :offset 3904)
(unknown-vector11 vector :inline :offset 3920)
(unknown-vector-array01 vector 7 :inline :offset 3936)
(unknown-vector12 vector :inline :offset 4064)
(unknown-vector13 vector :inline :offset 4080)
(unknown-float12 float :offset 4096)
(unknown-float13 float :offset 4100)
(unknown-dword01 int64 :offset 4104)
(unknown-matrix00 matrix :inline :offset 4112)
(unknown-matrix01 matrix :inline :offset 4176)
(unknown-matrix02 matrix :inline :offset 4240)
(unknown-vector14 vector :inline :offset 4320)
(unknown-vector15 vector :inline :offset 4336)
(unknown-matrix03 matrix :inline :offset 4352)
(unknown-dword02 int64 :offset 4416)
(unknown-vector16 vector :inline :offset 4432)
(unknown-float14 float :offset 4448)
(unknown-floatiujh1bnb2n3i1 float :offset 4452)
(unknown-float15 float :offset 4456)
(unknown-word01 int32 :offset 4460)
(unknown-vector17 vector :inline :offset 4464)
(unknown-vector18 vector :inline :offset 4480)
(unknown-time-frame03 time-frame :offset 4496)
(unknown-time-frame04 time-frame :offset 4504)
(unknown-vector19 vector :inline :offset 4512)
(unknown-vector20 vector :inline :offset 4528)
(unknown-vector21 vector :inline :offset 4544)
(unknown-float16 float :offset 4548)
(unknown-vector22 vector :inline :offset 4560)
(unknown-vector23 vector :inline :offset 4576)
(unknown-time-frame05 time-frame :offset 4624)
(unknown-float0000 float :offset 4632)
(unknown-float17 float :offset 4636)
(unknown-float18 float :offset 4640)
(unknown-float19 float :offset 4644)
(unknown-float20 float :offset 4648)
(unknown-time-frame06 time-frame :offset 4656)
(unknown-float21 float :offset 4664)
(unknown-time-frame07 time-frame :offset 4672)
(unknown-pat-surface00 pat-surface :offset 4680)
(unknown-vector24 vector :inline :offset 4688)
(unknown-vector25 vector :inline :offset 4720)
(unknown-vector001 vector :inline :offset 4736)
(unknown-handle00 handle :offset 4768)
(unknown-pat-surface01 pat-surface :offset 4776)
(unknown-float22 float :offset 4780)
(unknown-float23 float :offset 4784)
(unknown-float24 float :offset 4788)
(unknown-float25 float :offset 4792)
(unknown-float26 float :offset 4796)
(unknown-word000 int32 :offset 4800)
(unknown-float002 float :offset 4804)
(unknown-time-frame08 time-frame :offset 4816)
(unknown-vector26 vector :inline :offset 4928)
(unknwon-vector27 vector :inline :offset 4976)
(unknown-float27 float :offset 4992)
(unknown-time-frame09 time-frame :offset 5000)
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016)
(unknown-word02 int32 :offset 5064)
(unknown-time-frame10 time-frame :offset 5072)
(unknown-time-frame11 time-frame :offset 5080)
(unknown-time-frame001 time-frame :offset 5088)
(unknown-time-frame12 time-frame :offset 5096)
(unknown-time-frame002 time-frame :offset 5104)
(unknown-time-frame13 time-frame :offset 5112)
(unknown-time-frame14 time-frame :offset 5120)
(unknown-float28 float :offset 5132)
(unknown-float29 float :offset 5136)
(unknown-float30 float :offset 5140)
(unknown-vector28 vector :inline :offset 5152)
(lhand-cspace cspace :offset 5168)
(rhand-cspace cspace :offset 5172)
(midpoint-of-hands vector :inline :offset 5184)
(unknown-vector31 vector :inline :offset 5200)
(unknown-cspacei1un23i1 cspace :inline :offset 5216)
(unknown-symbol00 symbol :offset 5248)
(unknown-float000 float :offset 5252)
(unknown-float31 float :offset 5256)
(unknown-vector-array02 vector 15 :inline :offset 5264)
(unknown-float32 float :offset 5520)
(unknown-word03 int32 :offset 5524)
(unknown-float33 float :offset 5528)
(unknown-symbol000 symbol :offset 5532)
(unknown-vector34 vector :inline :offset 5536)
(unknown-vector35 vector :inline :offset 5552)
(unknown-vector36 vector :inline :offset 5568)
(unknown-time-frame15 time-frame :offset 5584)
(unknown-time-frame16 time-frame :offset 5592)
(unknown-handle000 handle :offset 5600)
(unknown-handle01 handle :offset 5608)
(unknown-word04 uint32 :offset 5616)
(unknown-spool-anim00 spool-anim :offset 5616)
(unknown-word05 int32 :offset 5616)
(unknown-symbol01 symbol :offset 5616)
(unknown-float34 float :offset 5616)
(unknown-symbol02 float :offset 5620)
(unknown-symbol03 float :offset 5624)
(unknown-float35 float :offset 5628)
(unknown-float36 float :offset 5632)
(unknown-float37 float :offset 5636)
(unknown-vector37 vector :inline :offset 5648)
(unknown-vector38 vector :inline :offset 5664)
(unknown-vector39 vector :inline :offset 5680)
(unknown-vector40 vector :inline :offset 5696)
(unknown-time-frame17 time-frame :offset 5712)
(unknown-time-frame18 time-frame :offset 5720)
(unknown-sound-id00 sound-id :offset 5776)
(unknown-handle02 handle :offset 5792)
(unknown-impact-control00 impact-control :inline :offset 5824)
(unknown-word06 int32 :offset 5832)
(unknown-vector41 vector :inline :offset 5888)
(unknown-vector42 vector :inline :offset 5904)
(unknown-float38 float :offset 5908)
(unknown-vector43 vector :inline :offset 5920)
(unknown-float39 float :offset 5924)
(unknown-time-frame19 time-frame :offset 5936)
(unknown-time-frame20 time-frame :offset 5944)
(unknown-symbol04 symbol :offset 5984)
(unknown-symbol05 symbol :offset 5988)
(unknown-attack-id00 int32 :offset 5992)
(unknown-float40 float :offset 5996)
(unknown-dword05 uint64 :offset 6000)
(unknown-dword06 handle :offset 6008)
(unknown-time-frame000 time-frame :offset 6016)
(unknown-combo-tracker00 combo-tracker :inline :offset 6032)
(unknown-time-frame21 time-frame :offset 6072)
(unknown-dword07 int64 :offset 6096)
(unknown-dword08 int64 :offset 6104)
(unknown-dword09 int64 :offset 6112)
(unknown-dword10 int64 :offset 6120)
(unknown-symbol06 symbol :offset 6144)
(unknown-quaternion04 quaternion :inline :offset 6160)
(unknown-sound-id01 sound-id :offset 6176)
(unknown-float41 float :offset 6180)
(unknown-float42 float :offset 6184)
(unknown-halfword00 uint16 :offset 6188)
(history-length uint16 :offset 6190)
(unknown-word07 int32 :offset 6192)
(unknown-time-frame22 time-frame :offset 6200)
(unknown-time-frame23 time-frame :offset 6208)
(unknown-time-frame24 time-frame :offset 6216)
(unknown-time-frame25 time-frame :offset 6224)
(unknown-float43 float :offset 6232)
(unknown-float001 float :offset 6236)
(unknown-sound-id02 sound-id :offset 6240)
(unknown-sound-id03 sound-id :offset 6244)
(unknown-time-frame26 time-frame :offset 6248)
(unknown-time-frame27 time-frame :offset 6256)
(unknown-dword11 int64 :offset 6264)
(unknown-vector44 vector :inline :offset 6272)
(unknown-float44 float :offset 6288)
(unknown-sound-id04 sound-id :offset 6292)
(unknown-float45 float :offset 6296)
(unknown-word08 int32 :offset 6300)
(unknown-sphere000 sphere :offset 6304)
(unknown-word09 int32 :offset 6308)
(unknown-word10 uint32 :offset 6312)
(unknown-time-frame28 time-frame :offset 6320)
(unknown-time-frame29 time-frame :offset 6328)
(unknown-dword12 int64 :offset 6336)
(unknown-time-frame30 time-frame :offset 6368)
(unknown-quaternion05 quaternion :inline :offset 6384)
(unknown-time-frame31 time-frame :offset 6400)
(unknown-time-frame32 time-frame :offset 6408)
(pad uint8 :offset 6415)
((unknown-float00 float :offset 448)
(unknown-float01 float :offset 452)
(unknown-float02 float :offset 456)
(unknown-float03 float :offset 460)
(unknown-vector00 vector :inline :offset 480)
(target-transv vector :inline :offset 496)
(unknown-vector02 vector :inline :offset 512)
(quat-for-control quaternion :inline :offset 528)
(override-quat quaternion :inline :offset 544)
(override-quat-alpha float :offset 560)
(unknown-float05 float :offset 564)
(unknown-float003 float :offset 568)
(unknown-float06 float :offset 572)
(unknown-float07 float :offset 576)
(unknown-time-frame00 time-frame :offset 584)
(unknown-vector03 vector :inline :offset 592)
(unknown-quaternion02 quaternion :inline :offset 608)
(unknown-quaternion03 quaternion :inline :offset 624)
(unknown-vector-array00 vector 128 :inline :offset 640)
(unknown-time-frame-array00 time-frame 128 :offset 2688)
(unknown-word00 int32 :offset 3712)
(draw-offset vector :inline :offset 3728)
(cspace-offset vector :inline :offset 3744)
(anim-collide-offset-local vector :inline :offset 3760)
(anim-collide-offset-world vector :inline :offset 3776)
(old-anim-collide-offset-world vector :inline :offset 3792)
(anim-collide-offset-delta-world vector :inline :offset 3808)
(unknown-dynamics00 dynamics :offset 3824)
(unknown-surface00 surface :offset 3828)
(unknown-surface01 surface :offset 3832)
(unknown-surface02 surface :offset 3836)
(unknown-time-frame02 time-frame :offset 3840)
(cpad cpad-info :offset 3848)
(unknown-float08 float :offset 3852)
(unknown-float09 float :offset 3856)
(unknown-float10 float :offset 3860)
(unknown-float11 float :offset 3864)
(to-target-pt-xz vector :inline :offset 3872)
(unknown-vector09 vector :inline :offset 3888)
(unknown-vector10 vector :inline :offset 3904)
(unknown-vector11 vector :inline :offset 3920)
(unknown-vector-array01 vector 7 :inline :offset 3936)
(unknown-vector12 vector :inline :offset 4064)
(unknown-vector13 vector :inline :offset 4080)
(unknown-float12 float :offset 4096)
(unknown-float13 float :offset 4100)
(unknown-dword01 int64 :offset 4104)
(unknown-matrix00 matrix :inline :offset 4112)
(unknown-matrix01 matrix :inline :offset 4176)
(ctrl-orientation matrix :inline :offset 4240)
(unknown-vector14 vector :inline :offset 4320)
(unknown-vector15 vector :inline :offset 4336)
(unknown-matrix03 matrix :inline :offset 4352)
(unknown-dword02 int64 :offset 4416)
(unknown-vector16 vector :inline :offset 4432)
(unknown-float14 float :offset 4448)
(unknown-floatiujh1bnb2n3i1 float :offset 4452)
(unknown-float15 float :offset 4456)
(unknown-word01 int32 :offset 4460)
(collide-extra-velocity vector :inline :offset 4464)
(unknown-vector18 vector :inline :offset 4480)
(unknown-time-frame03 time-frame :offset 4496)
(unknown-time-frame04 time-frame :offset 4504)
(unknown-vector19 vector :inline :offset 4512)
(unknown-vector20 vector :inline :offset 4528)
(unknown-vector21 vector :inline :offset 4544)
(unknown-float16 float :offset 4548)
(unknown-vector22 vector :inline :offset 4560)
(last-trans-on-surf vector :inline :offset 4576)
(unknown-time-frame05 time-frame :offset 4624)
(unknown-float0000 float :offset 4632)
(unknown-float17 float :offset 4636)
(unknown-float18 float :offset 4640)
(unknown-float19 float :offset 4644)
(unknown-float20 float :offset 4648)
(unknown-time-frame06 time-frame :offset 4656)
(unknown-float21 float :offset 4664)
(unknown-time-frame07 time-frame :offset 4672)
(unknown-pat-surface00 pat-surface :offset 4680)
(unknown-vector24 vector :inline :offset 4688)
(unknown-vector25 vector :inline :offset 4720)
(unknown-vector001 vector :inline :offset 4736)
(unknown-handle00 handle :offset 4768)
(unknown-pat-surface01 pat-surface :offset 4776)
(unknown-float22 float :offset 4780)
(unknown-float23 float :offset 4784)
(unknown-float24 float :offset 4788)
(unknown-float25 float :offset 4792)
(unknown-float26 float :offset 4796)
(unknown-word000 int32 :offset 4800)
(unknown-float002 float :offset 4804)
(unknown-time-frame08 time-frame :offset 4816)
(unknown-vector26 vector :inline :offset 4928)
(btransv vector :inline :offset 4976)
(blocked-factor float :offset 4992)
(blocked-in-air-factor float :offset 4996)
(unknown-time-frame09 time-frame :offset 5000)
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016)
(unknown-word02 int32 :offset 5064)
(unknown-time-frame10 time-frame :offset 5072)
(unknown-time-frame11 time-frame :offset 5080)
(unknown-time-frame001 time-frame :offset 5088)
(unknown-time-frame12 time-frame :offset 5096)
(unknown-time-frame002 time-frame :offset 5104)
(unknown-time-frame13 time-frame :offset 5112)
(unknown-time-frame14 time-frame :offset 5120)
(unknown-float28 float :offset 5132)
(unknown-float29 float :offset 5136)
(unknown-float30 float :offset 5140)
(unknown-vector28 vector :inline :offset 5152)
(lhand-cspace cspace :offset 5168)
(rhand-cspace cspace :offset 5172)
(midpoint-of-hands vector :inline :offset 5184)
(unknown-vector31 vector :inline :offset 5200)
(unknown-cspacei1un23i1 cspace :inline :offset 5216)
(unknown-symbol00 symbol :offset 5248)
(unknown-float000 float :offset 5252)
(unknown-float31 float :offset 5256)
(unknown-vector-array02 vector 15 :inline :offset 5264)
(unknown-float32 float :offset 5520)
(unknown-word03 int32 :offset 5524)
(unknown-float33 float :offset 5528)
(unknown-symbol000 symbol :offset 5532)
(unknown-vector34 vector :inline :offset 5536)
(unknown-vector35 vector :inline :offset 5552)
(unknown-vector36 vector :inline :offset 5568)
(unknown-time-frame15 time-frame :offset 5584)
(unknown-time-frame16 time-frame :offset 5592)
(unknown-handle000 handle :offset 5600)
(unknown-handle01 handle :offset 5608)
(unknown-word04 uint32 :offset 5616)
(unknown-spool-anim00 spool-anim :offset 5616)
(unknown-word05 int32 :offset 5616)
(unknown-symbol01 symbol :offset 5616)
(unknown-float34 float :offset 5616)
(unknown-symbol02 float :offset 5620)
(unknown-symbol03 float :offset 5624)
(unknown-float35 float :offset 5628)
(unknown-float36 float :offset 5632)
(unknown-float37 float :offset 5636)
(unknown-vector37 vector :inline :offset 5648)
(unknown-vector38 vector :inline :offset 5664)
(unknown-vector39 vector :inline :offset 5680)
(unknown-vector40 vector :inline :offset 5696)
(unknown-time-frame17 time-frame :offset 5712)
(unknown-time-frame18 time-frame :offset 5720)
(unknown-sound-id00 sound-id :offset 5776)
(unknown-handle02 handle :offset 5792)
(unknown-impact-control00 impact-control :inline :offset 5824)
(unknown-word06 int32 :offset 5832)
(unknown-vector41 vector :inline :offset 5888)
(unknown-vector42 vector :inline :offset 5904)
(unknown-float38 float :offset 5908)
(unknown-vector43 vector :inline :offset 5920)
(unknown-float39 float :offset 5924)
(unknown-time-frame19 time-frame :offset 5936)
(unknown-time-frame20 time-frame :offset 5944)
(unknown-symbol04 symbol :offset 5984)
(unknown-symbol05 symbol :offset 5988)
(unknown-attack-id00 int32 :offset 5992)
(unknown-float40 float :offset 5996)
(unknown-dword05 uint64 :offset 6000)
(unknown-dword06 handle :offset 6008)
(unknown-time-frame000 time-frame :offset 6016)
(unknown-combo-tracker00 combo-tracker :inline :offset 6032)
(unknown-time-frame21 time-frame :offset 6072)
(unknown-dword07 int64 :offset 6096)
(unknown-dword08 int64 :offset 6104)
(unknown-dword09 int64 :offset 6112)
(unknown-dword10 int64 :offset 6120)
(unknown-symbol06 symbol :offset 6144)
(unknown-quaternion04 quaternion :inline :offset 6160)
(unknown-sound-id01 sound-id :offset 6176)
(unknown-float41 float :offset 6180)
(unknown-float42 float :offset 6184)
(unknown-halfword00 uint16 :offset 6188)
(history-length uint16 :offset 6190)
(unknown-word07 int32 :offset 6192)
(unknown-time-frame22 time-frame :offset 6200)
(unknown-time-frame23 time-frame :offset 6208)
(unknown-time-frame24 time-frame :offset 6216)
(unknown-time-frame25 time-frame :offset 6224)
(unknown-float43 float :offset 6232)
(unknown-float001 float :offset 6236)
(unknown-sound-id02 sound-id :offset 6240)
(unknown-sound-id03 sound-id :offset 6244)
(unknown-time-frame26 time-frame :offset 6248)
(unknown-time-frame27 time-frame :offset 6256)
(unknown-dword11 int64 :offset 6264)
(align-xz-vel vector :inline :offset 6272)
(zx-vel-frac float :offset 6288)
(unknown-sound-id04 sound-id :offset 6292)
(unknown-float45 float :offset 6296)
(unknown-word08 int32 :offset 6300)
(unknown-sphere000 sphere :offset 6304)
(unknown-word09 int32 :offset 6308)
(unknown-word10 uint32 :offset 6312)
(unknown-time-frame28 time-frame :offset 6320)
(unknown-time-frame29 time-frame :offset 6328)
(unknown-dword12 int64 :offset 6336)
(unknown-time-frame30 time-frame :offset 6368)
(unknown-quaternion05 quaternion :inline :offset 6384)
(unknown-time-frame31 time-frame :offset 6400)
(unknown-time-frame32 time-frame :offset 6408)
(pad uint8 :offset 6415)
)
:method-count-assert 68
:size-assert #x1910
+23
View File
@@ -0,0 +1,23 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *collide-vif0-init*, type (array uint32)
(define *collide-vif0-init* (new 'static 'boxed-array :type uint32
#x30000000
#x4d000000
#x4d000000
#x4d000000
#x3f800000
#x5000001
#x20000000
#x40404040
#x1000404
#x0
#x0
#x0
)
)
+5 -5
View File
@@ -116,14 +116,14 @@
(let ((trans (new 'stack-no-clear 'vector)))
(set! (-> trans quad) (-> self basetrans quad))
(+! (-> trans y) (* (-> self bounce-scale) (update! (-> self smush))))
(collide-shape-method-29 (-> self root-override) trans)
(move-to-point! (-> self root-override) trans)
)
(if (not (!= (-> self smush amp) 0.0))
(set! (-> self bouncing) #f)
)
)
(else
(collide-shape-method-29 (-> self root-override) (-> self basetrans))
(move-to-point! (-> self root-override) (-> self basetrans))
)
)
(none)
@@ -263,7 +263,7 @@ eco-door-event-handler
:code (behavior ()
(ja :num-func num-func-identity :frame-num 0.0)
(suspend)
(collide-shape-method-46 (-> self root-override))
(update-transforms (-> self root-override))
(ja-post)
(until #f
(when (and *target* (and (>= (-> self open-distance)
@@ -331,7 +331,7 @@ eco-door-event-handler
(ja :num-func num-func-identity :frame-num max)
(logior! (-> self draw status) (draw-control-status no-draw))
(suspend)
(collide-shape-method-46 (-> self root-override))
(update-transforms (-> self root-override))
(ja-post)
(until #f
(let ((dist-from-target (vector4-dot (-> self out-dir) (target-pos 0)))
@@ -459,7 +459,7 @@ eco-door-event-handler
(set! (-> obj one-way) (logtest? (-> obj flags) (eco-door-flags one-way)))
(vector-z-quaternion! (-> obj out-dir) (-> obj root-override quat))
(set! (-> obj out-dir w) (- (vector-dot (-> obj out-dir) (-> obj root-override trans))))
(collide-shape-method-46 (-> obj root-override))
(update-transforms (-> obj root-override))
(stub obj)
(if (and (not (-> obj auto-close))
(-> obj entity)
+1 -1
View File
@@ -437,7 +437,7 @@
(set! (-> collision-shape total-prims) (the-as uint 1))
(set! (-> collision-shape root-prim) collision-mesh)
)
(collide-shape-method-54 collision-shape)
(pusher-init collision-shape)
(set! (-> collision-shape nav-radius) (* 0.75 (-> collision-shape root-prim local-sphere w)))
(let ((prim (-> collision-shape root-prim)))
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
+1 -1
View File
@@ -240,7 +240,7 @@
(init-vf0-vector)
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length* (spatial-hash-method-36 *actor-hash* (-> obj collide-bounds) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* (-> obj collide-bounds) *actor-list* 256))
)
(when #t
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
+71 -6
View File
@@ -1,11 +1,14 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup skel-crate-krimson crate 0 3
((1 (meters 20)) (2 (meters 999999)))
:bounds (static-spherem 0 1 0 1.6)
:texture-level 6
)
;; definition of type crate-bank
(deftype crate-bank (basic)
((COLLIDE_YOFF float :offset-assert 4)
(COLLIDE_RADIUS float :offset-assert 8)
@@ -16,6 +19,7 @@
:flag-assert #x900000010
)
;; definition for method 3 of type crate-bank
(defmethod inspect crate-bank ((obj crate-bank))
(when (not obj)
(set! obj obj)
@@ -29,10 +33,12 @@
obj
)
;; definition for symbol *CRATE-bank*, type crate-bank
(define *CRATE-bank*
(new 'static 'crate-bank :COLLIDE_YOFF 4096.0 :COLLIDE_RADIUS 6963.2 :DARKECO_EXPLODE_RADIUS 16384.0)
)
;; definition of type crate
(deftype crate (process-focusable)
((root-override2 collide-shape-moving :offset 128)
(smush smush-control :inline :offset-assert 208)
@@ -66,6 +72,7 @@
)
)
;; definition for method 3 of type crate
(defmethod inspect crate ((obj crate))
(when (not obj)
(set! obj obj)
@@ -86,8 +93,10 @@
obj
)
;; failed to figure out what this is:
(method-set! crate 12 (method-of-type process run-logic?))
;; definition for function crate-post
(defbehavior crate-post crate ()
(rider-trans)
(smush-update! self)
@@ -96,6 +105,7 @@
(none)
)
;; failed to figure out what this is:
(defpart 565
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
(sp-flt spt-num 16.0)
@@ -119,10 +129,12 @@
)
)
;; failed to figure out what this is:
(defpart 566
:init-specs ((sp-flt spt-fade-a -1.0666667))
)
;; failed to figure out what this is:
(defpart 567
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
(sp-flt spt-num 4.0)
@@ -147,10 +159,12 @@
)
)
;; failed to figure out what this is:
(defpart 568
:init-specs ((sp-flt spt-fade-a -2.1333334))
)
;; failed to figure out what this is:
(defpart 569
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
(sp-flt spt-num 1.0)
@@ -167,6 +181,7 @@
)
)
;; failed to figure out what this is:
(defpart 570
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc :page #xc))
(sp-flt spt-num 5.0)
@@ -195,6 +210,7 @@
)
)
;; failed to figure out what this is:
(defpart 571
:init-specs ((sp-flt spt-scalevel-x (meters -0.0033333334))
(sp-copy-from-other spt-scalevel-y -4)
@@ -202,6 +218,7 @@
)
)
;; failed to figure out what this is:
(defpart 572
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xb :page #xc))
(sp-flt spt-num 4.5)
@@ -230,6 +247,7 @@
)
)
;; failed to figure out what this is:
(defpartgroup group-crate-explode
:id 124
:duration (seconds 0.017)
@@ -243,6 +261,7 @@
)
)
;; failed to figure out what this is:
(defpartgroup group-crate-steel-explode
:id 125
:duration (seconds 0.017)
@@ -251,6 +270,7 @@
:parts ((sp-item 565) (sp-item 567) (sp-item 569) (sp-item 572) (sp-item 572) (sp-item 572))
)
;; failed to figure out what this is:
(defpartgroup group-dark-eco-box-explosion
:id 126
:duration (seconds 2)
@@ -297,6 +317,7 @@
)
)
;; failed to figure out what this is:
(defpart 156
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 6.0)
@@ -321,10 +342,12 @@
)
)
;; failed to figure out what this is:
(defpart 575
:init-specs ((sp-flt spt-fade-r 0.0) (sp-flt spt-fade-g 0.0) (sp-flt spt-fade-b 0.0) (sp-flt spt-fade-a -1.4222223))
)
;; failed to figure out what this is:
(defpart 574
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 3.0)
@@ -342,6 +365,7 @@
)
)
;; failed to figure out what this is:
(defpart 155
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
(sp-flt spt-num 1.0)
@@ -357,6 +381,7 @@
)
)
;; failed to figure out what this is:
(defpart 157
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
(sp-flt spt-num 4.0)
@@ -381,6 +406,7 @@
)
)
;; failed to figure out what this is:
(defpart 154
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
(sp-flt spt-num 16.0)
@@ -398,6 +424,7 @@
)
)
;; failed to figure out what this is:
(defpart 152
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 1.0)
@@ -422,6 +449,7 @@
)
)
;; failed to figure out what this is:
(defpart 153
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 1.0)
@@ -442,6 +470,7 @@
)
)
;; failed to figure out what this is:
(defpart 573
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xb :page #xc))
(sp-rnd-flt spt-num 8.0 16.0 1.0)
@@ -470,6 +499,7 @@
)
)
;; failed to figure out what this is:
(defpart 576
:init-specs ((sp-flt spt-scalevel-x (meters -0.0033333334))
(sp-copy-from-other spt-scalevel-y -4)
@@ -477,6 +507,8 @@
)
)
;; definition for function crate-standard-event-handler
;; INFO: Used lq/sq
(defbehavior crate-standard-event-handler crate ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('track)
@@ -643,6 +675,7 @@
)
)
;; failed to figure out what this is:
(defstate hide (crate)
:virtual #t
:code (behavior ()
@@ -683,12 +716,13 @@
)
)
;; failed to figure out what this is:
(defstate idle (crate)
:virtual #t
:event crate-standard-event-handler
:code (behavior ()
(suspend)
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(update-transforms (the-as collide-shape-moving (-> self root-override2)))
(carry-info-method-9 (-> self carry))
(logior! (-> self mask) (process-mask sleep))
(until #f
@@ -700,6 +734,7 @@
:post (the-as (function none :behavior crate) ja-post)
)
;; failed to figure out what this is:
(defstate carry (crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -718,11 +753,12 @@
(ja-post)
(carry-info-method-9 (-> self carry))
(carry-info-method-13 (-> self carry))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(update-transforms (the-as collide-shape-moving (-> self root-override2)))
(none)
)
)
;; failed to figure out what this is:
(defstate fall (crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -745,7 +781,7 @@
(-> self carry)
)
)
(set! (-> self root-override2 status) (cshape-moving-flags))
(set! (-> self root-override2 status) (collide-status))
(set! (-> self root-override2 root-prim local-sphere w) (-> self carry carry-radius))
(set! (-> self root-override2 root-prim prim-core collide-with)
(logior (collide-spec backgnd crate obstacle hit-by-others-list pusher)
@@ -755,7 +791,7 @@
(none)
)
:trans (behavior ()
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override2)) status) (cshape-moving-flags on-surface))
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override2)) status) (collide-status on-surface))
(< 0.8 (-> (the-as collide-shape-moving (-> self root-override2)) surface-angle))
)
(vector-reset! (-> self root-override2 transv))
@@ -799,7 +835,7 @@
(set! (-> a2-1 ignore-process1) #f)
(set! (-> a2-1 ignore-pat) (-> gp-1 pat-ignore-mask))
(set! (-> a2-1 action-mask) (collide-action solid))
(collide-shape-method-32 gp-1 (-> gp-1 transv) a2-1 (meters 0))
(fill-cache-integrate-and-collide gp-1 (-> gp-1 transv) a2-1 (meters 0))
)
(set! (-> gp-1 root-prim type) collide-shape-prim-mesh)
)
@@ -808,6 +844,7 @@
)
)
;; failed to figure out what this is:
(defstate bounce-on (crate)
:virtual #t
:event crate-standard-event-handler
@@ -821,6 +858,7 @@
:post crate-post
)
;; failed to figure out what this is:
(defstate notice-blue (crate)
:virtual #t
:event crate-standard-event-handler
@@ -901,6 +939,7 @@
:post crate-post
)
;; failed to figure out what this is:
(defstate die (crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -1126,6 +1165,7 @@
)
)
;; failed to figure out what this is:
(defstate special-contents-die (crate)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -1203,6 +1243,8 @@
)
)
;; definition for function crate-init-by-other
;; INFO: Used lq/sq
(defbehavior crate-init-by-other crate ((arg0 entity) (arg1 vector) (arg2 symbol) (arg3 fact-info-crate))
(crate-init! self (the-as entity-actor arg0))
(set! (-> self root-override2 trans quad) (-> arg1 quad))
@@ -1218,6 +1260,7 @@
(none)
)
;; definition for method 11 of type crate
(defmethod init-from-entity! crate ((obj crate) (arg0 entity-actor))
(crate-init! obj arg0)
(skel-init! obj)
@@ -1225,6 +1268,8 @@
(none)
)
;; definition for method 35 of type crate
;; WARN: Return type mismatch crate vs none.
(defmethod crate-init! crate ((obj crate) (arg0 entity-actor))
"Initialize the [[crate]] with the specified [[entity-actor]]."
(stack-size-set! (-> obj main-thread) 128)
@@ -1232,7 +1277,9 @@
(let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction) nothing)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec crate notice-blue-eco-powerup))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list tobot))
@@ -1313,6 +1360,9 @@
(none)
)
;; definition for method 36 of type crate
;; INFO: Used lq/sq
;; WARN: Return type mismatch crate vs none.
(defmethod skel-init! crate ((obj crate))
"Initialize the [[crate]]'s skeleton and other parameters based on the crate type."
(case (-> obj look)
@@ -1371,6 +1421,8 @@
(none)
)
;; definition for method 37 of type crate
;; WARN: Return type mismatch crate vs none.
(defmethod params-set! crate ((obj crate) (arg0 symbol) (arg1 symbol))
"Set [[crate]] params based on the arguments."
(if arg0
@@ -1382,6 +1434,8 @@
(none)
)
;; definition for method 38 of type crate
;; WARN: Return type mismatch int vs none.
(defmethod crate-method-38 crate ((obj crate))
(when (-> obj entity)
(if (>= (-> obj entity extra perm user-int8 0) 1)
@@ -1403,6 +1457,8 @@
(none)
)
;; definition for method 39 of type crate
;; WARN: Return type mismatch int vs none.
(defmethod smush-update! crate ((obj crate))
(let ((f0-0 (update! (-> obj smush))))
(set! (-> obj root-override2 scale x) (+ 1.0 (* -0.5 f0-0)))
@@ -1413,6 +1469,8 @@
(none)
)
;; definition for method 40 of type crate
;; WARN: disable def twice: 57. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod crate-method-40 crate ((obj crate))
(cond
((and (> (-> (the-as fact-info-crate (-> obj fact)) suck-count) 0)
@@ -1444,6 +1502,7 @@
)
)
;; definition of type pickup-spawner
(deftype pickup-spawner (crate)
((blocker entity-actor :offset-assert 288)
)
@@ -1453,6 +1512,7 @@
:flag-assert #x2900b00124
)
;; definition for method 3 of type pickup-spawner
(defmethod inspect pickup-spawner ((obj pickup-spawner))
(when (not obj)
(set! obj obj)
@@ -1466,6 +1526,8 @@
obj
)
;; definition for method 35 of type pickup-spawner
;; WARN: Return type mismatch pickup-spawner vs none.
(defmethod crate-init! pickup-spawner ((obj pickup-spawner) (arg0 entity-actor))
"Initialize the [[crate]] with the specified [[entity-actor]]."
(let ((t9-0 (method-of-type crate crate-init!)))
@@ -1479,12 +1541,15 @@
(none)
)
;; definition for method 38 of type pickup-spawner
;; WARN: Return type mismatch int vs none.
(defmethod crate-method-38 pickup-spawner ((obj pickup-spawner))
(go (method-of-object obj idle))
0
(none)
)
;; failed to figure out what this is:
(defstate idle (pickup-spawner)
:virtual #t
:code (behavior ()
+1 -1
View File
@@ -893,7 +893,7 @@
(initialize-skeleton obj (the-as skeleton-group (get-art-group obj)) (the-as pair 0))
(stop-bouncing! obj)
(set! (-> obj elevator-status) (elevator-status))
(collide-shape-method-46 (-> obj root-override))
(update-transforms (-> obj root-override))
(base-plat-method-32 obj)
(init-defaults! obj)
(set! (-> obj on-activate) (res-lump-struct (-> obj entity) 'on-activate basic))
+2 -2
View File
@@ -60,7 +60,7 @@
(set! (-> collision-shape total-prims) (the-as uint 1))
(set! (-> collision-shape root-prim) collision-mesh)
)
(collide-shape-method-54 collision-shape)
(pusher-init collision-shape)
(set! (-> collision-shape nav-radius) (* 0.75 (-> collision-shape root-prim local-sphere w)))
(let ((prim (-> collision-shape root-prim)))
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
@@ -177,7 +177,7 @@
(base-plat-method-31 obj)
(process-drawable-from-entity! obj entity)
(initialize-skeleton obj (the-as skeleton-group (get-art-group obj)) (the-as pair 0))
(collide-shape-method-46 (-> obj root-override))
(update-transforms (-> obj root-override))
(stop-bouncing! obj)
(base-plat-method-32 obj)
(set! (-> obj fact)
+20 -21
View File
@@ -177,8 +177,10 @@
;; definition for method 38 of type projectile
(defmethod made-impact? projectile ((obj projectile))
"TODO - queries the collision cache, return true/false"
(let ((v1-0 (-> obj root-override)))
(let ((a1-0 (new 'stack-no-clear 'collide-query)))
(let ((v1-0 (-> obj root-override))
(t1-0 (new 'stack-no-clear 'collide-query))
)
(let ((a1-0 t1-0))
(set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w))
(set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with))
(set! (-> a1-0 ignore-process0) obj)
@@ -186,7 +188,7 @@
(set! (-> a1-0 ignore-pat) (-> v1-0 pat-ignore-mask))
(set! (-> a1-0 action-mask) (collide-action solid))
)
(collide-shape-moving-method-65 v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0)
(fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0)
)
)
@@ -201,7 +203,7 @@
(set! (-> a2-0 ignore-process1) (handle->process (-> arg0 ignore-handle)))
(set! (-> a2-0 ignore-pat) (-> v1-0 pat-ignore-mask))
(set! (-> a2-0 action-mask) (collide-action solid))
(collide-shape-method-32 v1-0 (-> v1-0 transv) a2-0 (meters 0))
(fill-cache-integrate-and-collide v1-0 (-> v1-0 transv) a2-0 (meters 0))
)
0
(none)
@@ -243,7 +245,7 @@
)
(fill-using-line-sphere *collide-cache* a1-0)
)
(collide-shape-method-37 gp-0 (-> gp-0 transv))
(integrate-and-collide! gp-0 (-> gp-0 transv))
)
0
(none)
@@ -272,7 +274,7 @@
(s3-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 root-override transv) 1.0))
(f30-0 (vector-length (-> arg0 root-override transv)))
)
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-surface))
(vector-flatten! s5-1 s5-1 (-> arg0 root-override local-normal))
)
(vector-normalize-copy! s4-0 s5-1 1.0)
@@ -357,7 +359,7 @@
(+! f0-14 (-> self old-dist v1-38))
)
(if (or (and (logtest? (-> self options) (projectile-options proj-options-4))
(and (logtest? (-> self root-override status) (cshape-moving-flags t-wall)) (< f0-14 2048.0))
(and (logtest? (-> self root-override status) (collide-status touch-wall)) (< f0-14 2048.0))
)
(< f0-14 (-> self stop-speed))
)
@@ -437,7 +439,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-projectile)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec projectile))
(set! (-> v1-6 prim-core collide-with)
@@ -538,7 +542,7 @@
(set! (-> self target-pos quad) (-> self base-target-pos quad))
(set! (-> self event-hook) projectile-event-handler)
(init-proj-settings! self)
(collide-shape-method-46 (-> self root-override))
(update-transforms (-> self root-override))
(draw-laser-sight self)
(play-impact-sound self (projectile-options))
(when (logtest? (-> self options) (projectile-options proj-options-8000))
@@ -571,14 +575,7 @@
(projectile-bounce-update-velocity self)
(set! (-> s5-0 quad) (-> gp-0 trans quad))
(vector-v++! s5-0 (-> gp-0 transv))
(when (collide-shape-moving-method-55
gp-0
s4-0
(collide-spec backgnd crate obstacle hit-by-others-list pusher)
4096.0
81920.0
1024.0
)
(when (find-ground gp-0 s4-0 (collide-spec backgnd crate obstacle hit-by-others-list pusher) 4096.0 81920.0 1024.0)
(let ((f0-1 (+ (-> gp-0 gspot-pos y) (-> self root-override root-prim local-sphere w))))
(when (>= f0-1 (-> s5-0 y))
(set! (-> s5-0 y) f0-1)
@@ -586,7 +583,7 @@
)
)
)
(collide-shape-method-29 gp-0 s5-0)
(move-to-point! gp-0 s5-0)
)
(transform-post)
0
@@ -671,10 +668,10 @@
(let* ((a2-0 (-> obj root-override))
(v1-0 (-> a2-0 status))
)
(if (logtest? v1-0 (cshape-moving-flags t-surface))
(if (logtest? v1-0 (collide-status touch-surface))
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.6)
)
(when (and (logtest? v1-0 (cshape-moving-flags csmf11))
(when (and (logtest? v1-0 (collide-status impact-surface))
(>= (- (-> self clock frame-counter) (-> obj played-bounce-time)) (seconds 0.3))
)
(set! (-> obj played-bounce-time) (-> self clock frame-counter))
@@ -690,7 +687,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) projectile-bounce-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrate-using) (penetrate jak-dark-shot))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core action) (collide-action solid))
+6 -4
View File
@@ -317,7 +317,7 @@
;; WARN: Return type mismatch int vs none.
(defmethod rigid-body-object-method-30 rigid-body-platform ((obj rigid-body-platform))
(if (-> obj info-override platform)
((method-of-object (-> obj root-override-2) collide-shape-method-35))
(detect-riders! (-> obj root-override-2))
)
(set! (-> obj player-velocity-prev quad) (-> obj player-velocity quad))
(if *target*
@@ -457,7 +457,7 @@
(set! (-> obj control-point-array)
(new 'process 'rigid-body-control-point-inline-array (-> obj info-override control-point-count))
)
(collide-shape-method-46 (-> obj root-override-2))
(update-transforms (-> obj root-override-2))
(let ((v1-5 (-> obj rbody))
(a1-3 (&-> (-> obj info-override) mass))
(a2-2 (-> obj root-override-2 trans))
@@ -484,7 +484,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (collide-spec pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
@@ -494,7 +496,7 @@
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) s4-0)
)
(collide-shape-method-54 s5-0)
(pusher-init s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-15 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as))
+50 -2
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defpartgroup group-talkbox-speak
:id 77
:flags (unk-4 unk-6)
@@ -13,6 +15,7 @@
)
)
;; failed to figure out what this is:
(defpart 265
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xcb :page #xc))
(sp-func spt-birth-func 'birth-func-set-vel)
@@ -37,10 +40,12 @@
)
)
;; failed to figure out what this is:
(defpart 266
:init-specs ((sp-flt spt-fade-a -0.64))
)
;; definition of type camera-remote
(deftype camera-remote (camera-slave)
()
:heap-base #xa20
@@ -49,6 +54,7 @@
:flag-assert #xe0a200a94
)
;; definition for method 3 of type camera-remote
(defmethod inspect camera-remote ((obj camera-remote))
(when (not obj)
(set! obj obj)
@@ -61,6 +67,7 @@
obj
)
;; definition of type remote
(deftype remote (process-drawable)
((parent-override (pointer camera-slave) :offset 16)
(base-trans vector :inline :offset-assert 208)
@@ -85,6 +92,7 @@
)
)
;; definition for method 3 of type remote
(defmethod inspect remote ((obj remote))
(when (not obj)
(set! obj obj)
@@ -104,6 +112,7 @@
obj
)
;; failed to figure out what this is:
(defskelgroup skel-voicebox talk-box 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 4)
@@ -111,6 +120,8 @@
:sort 1
)
;; definition for method 24 of type remote
;; INFO: Used lq/sq
(defmethod remote-method-24 remote ((obj remote) (arg0 vector))
(let ((s4-0 (handle->process (-> obj focus handle))))
(when s4-0
@@ -123,6 +134,8 @@
(lerp-scale 1.0 0.0 (-> obj blend) 0.8 1.0)
)
;; definition for method 25 of type remote
;; WARN: Return type mismatch int vs none.
(defmethod remote-method-25 remote ((obj remote))
(with-pp
(rlet ((acc :class vf)
@@ -135,7 +148,7 @@
(init-vf0-vector)
(ja-post)
(if (type? (-> obj root) collide-shape)
(collide-shape-method-46 (the-as collide-shape (-> obj root)))
(update-transforms (the-as collide-shape (-> obj root)))
)
(when (and (nonzero? (-> obj part)) (and (or (and (-> obj next-state) (= (-> obj next-state name) 'idle))
(and (-> obj next-state) (= (-> obj next-state name) 'enter))
@@ -177,6 +190,9 @@
)
)
;; definition for function remote-track
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior remote-track remote ()
(let ((gp-0 (handle->process (-> self focus handle)))
(s5-0 (new 'stack-no-clear 'vector))
@@ -245,6 +261,7 @@
(none)
)
;; failed to figure out what this is:
(defstate enter (remote)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -322,6 +339,7 @@
)
)
;; failed to figure out what this is:
(defstate idle (remote)
:virtual #t
:event (-> (method-of-type remote enter) event)
@@ -337,6 +355,7 @@
:post (-> (method-of-type remote enter) post)
)
;; failed to figure out what this is:
(defstate exit (remote)
:virtual #t
:trans remote-track
@@ -350,6 +369,8 @@
:post (-> (method-of-type remote enter) post)
)
;; definition for method 23 of type remote
;; WARN: Return type mismatch remote vs none.
(defmethod remote-method-23 remote ((obj remote))
(reset-to-collide-spec (-> obj focus) (collide-spec jak player-list))
(initialize-skeleton
@@ -364,6 +385,7 @@
(none)
)
;; failed to figure out what this is:
(defstate cam-remote (camera-slave)
:event (-> cam-string event)
:enter (-> cam-string enter)
@@ -376,6 +398,7 @@
:code (-> cam-string code)
)
;; definition of type voicebox
(deftype voicebox (remote)
((hint handle :offset-assert 288)
)
@@ -385,6 +408,7 @@
:flag-assert #x1a00b00128
)
;; definition for method 3 of type voicebox
(defmethod inspect voicebox ((obj voicebox))
(when (not obj)
(set! obj obj)
@@ -398,6 +422,7 @@
obj
)
;; failed to figure out what this is:
(defstate exit (voicebox)
:virtual #t
:code (behavior ()
@@ -423,6 +448,9 @@
)
)
;; definition for function voicebox-init-by-other
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defbehavior voicebox-init-by-other voicebox ((arg0 vector) (arg1 handle))
(set! (-> self hint) arg1)
(set! (-> self root) (new 'process 'trsqv))
@@ -434,6 +462,7 @@
(none)
)
;; definition for function voicebox-spawn
(defun voicebox-spawn ((arg0 process-drawable) (arg1 vector))
(with-pp
(when *camera*
@@ -446,6 +475,7 @@
)
)
;; definition of type judge
(deftype judge (remote)
((total-time time-frame :offset-assert 288)
(beep-time time-frame :offset-assert 296)
@@ -462,6 +492,7 @@
)
)
;; definition for method 3 of type judge
(defmethod inspect judge ((obj judge))
(when (not obj)
(set! obj obj)
@@ -478,15 +509,19 @@
obj
)
;; definition for method 24 of type judge
;; INFO: Used lq/sq
(defmethod remote-method-24 judge ((obj judge) (arg0 vector))
(set! (-> arg0 quad) (-> obj base-trans quad))
1.0
)
;; definition for method 25 of type judge
;; WARN: Return type mismatch int vs none.
(defmethod remote-method-25 judge ((obj judge))
(ja-post)
(if (type? (-> obj root) collide-shape)
(collide-shape-method-46 (the-as collide-shape (-> obj root)))
(update-transforms (the-as collide-shape (-> obj root)))
)
(when (and (-> obj next-state) (let ((v1-6 (-> obj next-state name)))
(or (= v1-6 'idle) (= v1-6 'enter))
@@ -506,6 +541,7 @@
(none)
)
;; failed to figure out what this is:
(defstate wait (judge)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -544,6 +580,7 @@
)
)
;; failed to figure out what this is:
(defstate enter (judge)
:virtual #t
:enter (behavior ()
@@ -555,6 +592,7 @@
)
)
;; failed to figure out what this is:
(defstate idle (judge)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -578,6 +616,8 @@
)
)
;; definition for method 27 of type judge
;; WARN: Return type mismatch int vs none.
(defmethod judge-method-27 judge ((obj judge))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
@@ -598,6 +638,9 @@
(none)
)
;; definition for method 11 of type judge
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! judge ((obj judge) (arg0 entity-actor))
(judge-method-27 obj)
(remote-method-23 obj)
@@ -609,6 +652,9 @@
(none)
)
;; definition for function judge-init-by-other
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs none.
(defbehavior judge-init-by-other judge ((arg0 vector) (arg1 uint))
(process-entity-set! self (the-as entity-actor #f))
(set! (-> self score) arg1)
@@ -623,6 +669,8 @@
(none)
)
;; definition for function judge-spawn
;; WARN: Return type mismatch (pointer process) vs (pointer judge).
(defun judge-spawn ((arg0 process-tree) (arg1 vector) (arg2 uint))
(process-spawn judge arg1 arg2 :to arg0)
)
+87 -18
View File
@@ -1,5 +1,9 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function check-water-level-drop
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun check-water-level-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0))
(let ((gp-0 (new 'stack-no-clear 'vector)))
@@ -20,6 +24,8 @@
(none)
)
;; definition for function check-water-level-drop-and-die
;; WARN: Return type mismatch symbol vs none.
(defun check-water-level-drop-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0))
(sp-kill-particle arg0 arg1)
@@ -27,6 +33,7 @@
(none)
)
;; definition for function check-water-level-drop-and-die-motion
(defun check-water-level-drop-and-die-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0))
(sp-kill-particle arg0 arg1)
@@ -35,6 +42,8 @@
(none)
)
;; definition for function check-water-level-above-and-die
;; WARN: Return type mismatch symbol vs none.
(defun check-water-level-above-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(if (or (>= (-> arg2 y) (-> arg1 user-float)) (and *target* (>= (-> arg2 y) (-> *target* water height))))
(sp-kill-particle arg0 arg1)
@@ -42,6 +51,7 @@
(none)
)
;; failed to figure out what this is:
(defpart 502
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 9.0)
@@ -66,6 +76,7 @@
)
)
;; failed to figure out what this is:
(defpart 503
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 0.1)
@@ -90,6 +101,7 @@
)
)
;; failed to figure out what this is:
(defpart 504
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #xc))
(sp-flt spt-num 0.05)
@@ -109,6 +121,7 @@
)
)
;; failed to figure out what this is:
(defpart 506
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2e :page #xc))
(sp-flt spt-num 0.06)
@@ -133,14 +146,17 @@
)
)
;; failed to figure out what this is:
(defpart 507
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int-plain-rnd spt-next-time 90 119 1) (sp-launcher-by-id spt-next-launcher 508))
)
;; failed to figure out what this is:
(defpart 508
:init-specs ((sp-flt spt-fade-a -0.21333334))
)
;; failed to figure out what this is:
(defpart 509
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x33 :page #xc))
(sp-rnd-flt spt-num 0.05 0.4 1.0)
@@ -164,14 +180,17 @@
)
)
;; failed to figure out what this is:
(defpart 510
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 511))
)
;; failed to figure out what this is:
(defpart 511
:init-specs ((sp-flt spt-fade-a -0.7111111))
)
;; failed to figure out what this is:
(defpartgroup group-part-water-splash
:id 121
:duration (seconds 3)
@@ -213,6 +232,7 @@
)
)
;; failed to figure out what this is:
(defpartgroup group-part-water-splash-small
:id 122
:duration (seconds 3)
@@ -236,6 +256,7 @@
)
)
;; failed to figure out what this is:
(defpart 512
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 0.2)
@@ -257,6 +278,7 @@
)
)
;; failed to figure out what this is:
(defpart 513
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 0.2)
@@ -278,6 +300,7 @@
)
)
;; failed to figure out what this is:
(defpart 519
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #xc))
(sp-flt spt-num 0.05)
@@ -298,6 +321,7 @@
)
)
;; failed to figure out what this is:
(defpart 520
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 3.2)
@@ -324,6 +348,7 @@
)
)
;; failed to figure out what this is:
(defpart 518
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #xc))
(sp-flt spt-num 1.0)
@@ -344,6 +369,7 @@
)
)
;; failed to figure out what this is:
(defpart 525
:init-specs ((sp-flt spt-scalevel-y (meters 0.026666667))
(sp-int spt-next-time 20)
@@ -351,6 +377,7 @@
)
)
;; failed to figure out what this is:
(defpart 526
:init-specs ((sp-flt spt-scalevel-y (meters 0))
(sp-flt spt-fade-a -0.64)
@@ -359,6 +386,7 @@
)
)
;; failed to figure out what this is:
(defpart 527
:init-specs ((sp-flt spt-scalevel-x (meters 0.0016666667))
(sp-flt spt-scalevel-y (meters -0.026666667))
@@ -367,10 +395,12 @@
)
)
;; failed to figure out what this is:
(defpart 528
:init-specs ((sp-flt spt-scalevel-x (meters 0.0033333334)) (sp-flt spt-scalevel-y (meters -0.053333335)))
)
;; failed to figure out what this is:
(defpart 516
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-func spt-birth-func 'birth-func-texture-group)
@@ -396,10 +426,12 @@
)
)
;; failed to figure out what this is:
(defpart 505
:init-specs ((sp-flt spt-fade-a -0.21333334))
)
;; failed to figure out what this is:
(defpart 517
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 3.2)
@@ -425,10 +457,12 @@
)
)
;; failed to figure out what this is:
(defpart 524
:init-specs ((sp-flt spt-scalevel-x (meters 0)) (sp-copy-from-other spt-scalevel-y -4))
)
;; failed to figure out what this is:
(defpart 515
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 8.0)
@@ -452,6 +486,7 @@
)
)
;; failed to figure out what this is:
(defpart 514
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #xc))
(sp-flt spt-num 1.5)
@@ -477,6 +512,7 @@
)
)
;; failed to figure out what this is:
(defpart 529
:init-specs ((sp-flt spt-scalevel-x (meters 0))
(sp-flt spt-rotvel-x (degrees 0.16666667))
@@ -486,6 +522,7 @@
)
)
;; failed to figure out what this is:
(defpart 530
:init-specs ((sp-flt spt-rotvel-x (degrees 0.13333334))
(sp-flt spt-scalevel-y (meters 0))
@@ -495,6 +532,7 @@
)
)
;; failed to figure out what this is:
(defpart 531
:init-specs ((sp-flt spt-rotvel-x (degrees 0.1))
(sp-flt spt-scalevel-y (meters -0.016666668))
@@ -503,10 +541,12 @@
)
)
;; failed to figure out what this is:
(defpart 532
:init-specs ((sp-flt spt-rotvel-x (degrees 0.06666667)) (sp-flt spt-scalevel-y (meters -0.033333335)))
)
;; failed to figure out what this is:
(defpart 522
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xca :page #xc))
(sp-flt spt-num 1.0)
@@ -529,10 +569,12 @@
)
)
;; failed to figure out what this is:
(defpart 533
:init-specs ((sp-flt spt-fade-a -0.64))
)
;; failed to figure out what this is:
(defpart 521
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 12.0)
@@ -561,6 +603,7 @@
)
)
;; failed to figure out what this is:
(defpart 63
:init-specs ((sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
@@ -570,6 +613,7 @@
)
)
;; failed to figure out what this is:
(defpart 534
:init-specs ((sp-rnd-flt spt-r 32.0 32.0 1.0)
(sp-rnd-flt spt-g 32.0 32.0 1.0)
@@ -579,6 +623,7 @@
)
)
;; failed to figure out what this is:
(defpart 501
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
(sp-flt spt-num 0.3)
@@ -604,6 +649,7 @@
)
)
;; failed to figure out what this is:
(defpart 536
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-rnd-flt spt-num 0.0 0.5 1.0)
@@ -630,6 +676,8 @@
)
)
;; definition for function check-water-level-drop-motion
;; INFO: Used lq/sq
(defun check-water-level-drop-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
(when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0))
(let ((s3-0 (new 'stack-no-clear 'vector)))
@@ -659,6 +707,7 @@
(none)
)
;; failed to figure out what this is:
(defpart 537
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
(sp-flt spt-num 1.0)
@@ -685,11 +734,16 @@
)
)
;; definition for method 9 of type water-control
;; WARN: Return type mismatch int vs none.
(defmethod water-control-method-9 water-control ((obj water-control))
0
(none)
)
;; definition for method 10 of type water-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod water-control-method-10 water-control ((obj water-control))
(local-vars
(sv-272 (function vector entity-actor skeleton-group vector none :behavior manipy))
@@ -769,7 +823,7 @@
(set! (-> obj swim-depth) (fmax 0.0 (- (- (-> obj surface-height) (-> obj swim-height)) (-> obj bottom 0 y))))
(and (>= (-> obj height) (-> obj bottom 0 y)) (logtest? (water-flags touch-water) (-> s5-0 flags)))
)
(if (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags on-water))
(if (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water))
(set! (-> obj on-water-time) (-> pp clock frame-counter))
)
(when (not (logtest? (-> obj flags) (water-flags dark-eco lava)))
@@ -959,19 +1013,18 @@
)
(if (and (logtest? (-> obj flags) (water-flags swim-ground))
(and v1-237
(zero? (logand (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags on-water))
)
(zero? (logand (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water)))
)
)
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
)
(cond
((and (logtest? (-> obj flags) (water-flags can-swim))
(or (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags on-water))
(or (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water))
(>= f30-1 (-> obj bottom 0 y))
(and (logtest? (water-flags swimming) s4-0)
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags t-surface))
(not (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags on-surface))
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status touch-surface))
(not (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-surface))
)
(>= (+ 204.8 f30-1) (-> obj bottom 0 y))
)
@@ -998,23 +1051,23 @@
)
(cond
((and (logtest? (-> obj flags) (water-flags swim-ground))
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (cshape-moving-flags t-surface))
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status touch-surface))
(zero? (logand (water-flags jump-out) (-> obj flags)))
)
(let ((v1-260 (new 'stack-no-clear 'vector)))
(set! (-> v1-260 quad) (-> obj bottom 0 quad))
(set! (-> v1-260 y) (- (-> obj height) (-> obj swim-height)))
(let ((s3-3 (the-as collide-shape-moving (-> obj process control))))
(when (and (not (logtest? (-> s3-3 status) (cshape-moving-flags csmf12)))
(when (and (not (logtest? (-> s3-3 status) (collide-status touch-background)))
(logtest? (water-flags swimming) (-> obj flags))
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
)
(let ((a1-42 (vector-! (new 'stack-no-clear 'vector) v1-260 (-> (the-as control-info s3-3) trans))))
(vector-float*! a1-42 a1-42 (-> pp clock frames-per-second))
(collide-shape-method-37 s3-3 a1-42)
(integrate-and-collide! s3-3 a1-42)
)
(set! (-> (the-as control-info s3-3) status)
(logior (-> s3-3 status) (cshape-moving-flags on-surface on-ground t-surface on-water))
(logior (-> s3-3 status) (collide-status on-surface on-ground touch-surface on-water))
)
)
)
@@ -1054,12 +1107,8 @@
(set! (-> a1-47 y) f30-1)
(when (not (logtest? (focus-status board pilot) (-> obj process focus-status)))
(let ((f30-2 (-> s4-1 ground-impact-vel)))
(let ((t9-26 (method-of-object s4-1 collide-shape-moving-method-61)))
(-> (the-as control-info s4-1) transv)
*up-vector*
(t9-26)
)
(set! (-> (the-as control-info s4-1) status) (logior (-> s4-1 status) (cshape-moving-flags on-water)))
(move-to-ground-point s4-1 a1-47 (-> (the-as control-info s4-1) transv) *up-vector*)
(set! (-> (the-as control-info s4-1) status) (logior (-> s4-1 status) (collide-status on-water)))
(set! (-> (the-as control-info s4-1) ground-impact-vel) f30-2)
)
)
@@ -1071,7 +1120,7 @@
(cond
((logtest? (-> obj flags) (water-flags tar))
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status)
(cshape-moving-flags on-surface on-water)
(collide-status on-surface on-water)
)
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
)
@@ -1105,7 +1154,7 @@
)
((logtest? (-> obj flags) (water-flags lava))
(when (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status)
(cshape-moving-flags on-surface on-water)
(collide-status on-surface on-water)
)
(when (< (-> obj process control trans y) (+ -204.8 (-> obj base-height)))
(send-event (-> obj process) 'no-look-around (seconds 1.5))
@@ -1206,6 +1255,8 @@
)
)
;; definition for method 11 of type water-control
;; WARN: Return type mismatch int vs none.
(defmethod start-bobbing! water-control ((obj water-control) (arg0 float) (arg1 int) (arg2 int))
(with-pp
(activate! (-> obj bob) (- arg0) arg1 arg2 0.9 1.0 (-> pp clock))
@@ -1214,6 +1265,8 @@
)
)
;; definition for function part-water-splash-callback
;; WARN: Return type mismatch int vs none.
(defun part-water-splash-callback ((arg0 part-tracker))
(let ((f1-0 (-> arg0 root trans y))
(f0-0 (the-as float (-> arg0 userdata)))
@@ -1295,6 +1348,8 @@
(none)
)
;; definition for method 15 of type water-control
;; WARN: Return type mismatch int vs none.
(defmethod enter-water water-control ((obj water-control))
(with-pp
(set! (-> obj flags) (logior (water-flags touch-water) (-> obj flags)))
@@ -1327,6 +1382,8 @@
)
)
;; definition for method 16 of type water-control
;; WARN: Return type mismatch int vs none.
(defmethod water-control-method-16 water-control ((obj water-control))
(logclear! (-> obj flags) (water-flags touch-water))
(set-zero! (-> obj bob))
@@ -1337,6 +1394,9 @@
(none)
)
;; definition for function splash-spawn
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun splash-spawn ((arg0 float) (arg1 vector) (arg2 int))
(let ((s5-0 (get-process *default-dead-pool* part-tracker #x4000)))
(when s5-0
@@ -1380,6 +1440,9 @@
(none)
)
;; definition for function rings-water-spawn
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun rings-water-spawn ((arg0 float) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float))
(let* ((v1-0 arg2)
(f30-0 (sqrtf (+ (* (-> v1-0 x) (-> v1-0 x)) (* (-> v1-0 z) (-> v1-0 z)))))
@@ -1425,6 +1488,8 @@
(none)
)
;; definition for method 13 of type water-control
;; WARN: Return type mismatch int vs none.
(defmethod spawn-ripples water-control ((obj water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector) (arg4 symbol))
(with-pp
(when (and (logtest? (water-flags part-splash) (-> obj flags)) (logtest? (water-flags part-water) (-> obj flags)))
@@ -1471,6 +1536,8 @@
)
)
;; definition for function water-info<-region
;; INFO: Used lq/sq
(defun water-info<-region ((arg0 water-info) (arg1 drawable-region-prim) (arg2 collide-shape) (arg3 collide-action))
(with-pp
(set! (-> arg0 flags) (water-flags))
@@ -1611,6 +1678,8 @@
)
)
;; definition for method 52 of type collide-shape
;; INFO: Used lq/sq
(defmethod water-info-init! collide-shape ((obj collide-shape) (arg0 water-info) (arg1 collide-action))
"Initialize a [[water-info]] with the currently loaded regions."
(local-vars (sv-80 int))
+13 -1
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type process-drawable
(deftype process-drawable (process)
((root trsqv :offset-assert 128)
(node-list cspace-array :offset-assert 132)
@@ -33,6 +35,7 @@
)
)
;; definition for method 3 of type process-drawable
(defmethod inspect process-drawable ((obj process-drawable))
(when (not obj)
(set! obj obj)
@@ -62,6 +65,7 @@
obj
)
;; definition of type process-drawable-reserved
(deftype process-drawable-reserved (process-drawable)
()
:heap-base #x50
@@ -230,6 +234,7 @@
)
)
;; definition for method 3 of type process-drawable-reserved
(defmethod inspect process-drawable-reserved ((obj process-drawable-reserved))
(when (not obj)
(set! obj obj)
@@ -242,6 +247,7 @@
obj
)
;; definition of type attack-dir-info
(deftype attack-dir-info (structure)
((dir vector :inline :offset-assert 0)
(xz-dir vector :inline :offset-assert 16)
@@ -253,6 +259,7 @@
:flag-assert #x900000040
)
;; definition for method 3 of type attack-dir-info
(defmethod inspect attack-dir-info ((obj attack-dir-info))
(when (not obj)
(set! obj obj)
@@ -267,6 +274,7 @@
obj
)
;; definition of type attack-info
(deftype attack-info (structure)
((trans vector :inline :offset-assert 0)
(vector vector :inline :offset-assert 16)
@@ -291,7 +299,7 @@
(damage float :offset-assert 144)
(shield-damage float :offset-assert 148)
(knock uint8 :offset-assert 152)
(test uint32 :offset-assert 156)
(test symbol :offset-assert 156)
)
:method-count-assert 12
:size-assert #xa0
@@ -303,6 +311,7 @@
)
)
;; definition for method 3 of type attack-info
(defmethod inspect attack-info ((obj attack-info))
(when (not obj)
(set! obj obj)
@@ -409,6 +418,7 @@
obj
)
;; definition of type ground-tween-info
(deftype ground-tween-info (structure)
((chan uint8 3 :offset-assert 0)
(blend float 3 :offset-assert 4)
@@ -420,6 +430,7 @@
:flag-assert #x900000024
)
;; definition for method 3 of type ground-tween-info
(defmethod inspect ground-tween-info ((obj ground-tween-info))
(when (not obj)
(set! obj obj)
@@ -433,4 +444,5 @@
obj
)
;; failed to figure out what this is:
0
+5 -3
View File
@@ -645,7 +645,7 @@
(defmethod rigid-body-object-method-31 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
(set! (-> obj info) arg0)
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
(collide-shape-method-46 (-> obj root-override-2))
(update-transforms (-> obj root-override-2))
(rigid-body-method-25
(-> obj rbody state)
(the-as rigid-body-info (&-> (-> obj info) mass))
@@ -670,7 +670,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (collide-spec pusher))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
@@ -680,7 +682,7 @@
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) s4-0)
)
(collide-shape-method-54 s5-0)
(pusher-init s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-16 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
+48 -1
View File
@@ -1,21 +1,29 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type trajectory
(defmethod compute-trans-at-time trajectory ((obj trajectory) (arg0 float) (arg1 vector))
(vector+float*! arg1 (-> obj initial-position) (-> obj initial-velocity) arg0)
(+! (-> arg1 y) (* 0.5 arg0 arg0 (-> obj gravity)))
arg1
)
;; definition for method 10 of type trajectory
;; INFO: Used lq/sq
(defmethod compute-transv-at-time trajectory ((obj trajectory) (arg0 float) (arg1 vector))
(set! (-> arg1 quad) (-> obj initial-velocity quad))
(+! (-> arg1 y) (* arg0 (-> obj gravity)))
arg1
)
;; definition for method 11 of type trajectory
(defmethod compute-time-until-apex trajectory ((obj trajectory))
(/ (- (-> obj initial-velocity y)) (-> obj gravity))
)
;; definition for method 12 of type trajectory
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-duration! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(set! (-> obj initial-position quad) (-> arg0 quad))
(set! (-> obj gravity) arg3)
@@ -29,6 +37,8 @@
(none)
)
;; definition for method 13 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-xz-vel! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let ((f0-1 (/ (vector-vector-xz-distance arg1 arg0) arg2)))
(setup-from-to-duration! obj arg0 arg1 f0-1 arg3)
@@ -37,6 +47,8 @@
(none)
)
;; definition for method 14 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-y-vel! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let* ((f0-0 arg2)
(f1-3 (- (* f0-0 f0-0) (* 2.0 (- (-> arg0 y) (-> arg1 y)) arg3)))
@@ -53,6 +65,8 @@
(none)
)
;; definition for method 15 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-height! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let* ((f0-1 (+ arg2 (fmax (-> arg0 y) (-> arg1 y))))
(f1-4 (* 2.0 (- (-> arg0 y) f0-1) arg3))
@@ -67,6 +81,9 @@
(none)
)
;; definition for method 16 of type trajectory
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 16 trajectory) has a return type of none, but the expression builder found a return statement.
(defmethod setup-from-to-duration-and-height! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let ((f0-1 (- (-> arg1 y) (-> arg0 y))))
(cond
@@ -99,6 +116,9 @@
(none)
)
;; definition for method 17 of type trajectory
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw trajectory ((obj trajectory))
(let ((s5-0 (new 'stack-no-clear 'vector))
(s4-0 (new 'stack-no-clear 'vector))
@@ -125,6 +145,8 @@
(none)
)
;; definition for method 9 of type impact-control
;; INFO: Used lq/sq
(defmethod initialize impact-control ((obj impact-control) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec))
(set! (-> obj start-time) (-> self clock frame-counter))
(set! (-> obj process) (the-as (pointer process-drawable) (process->ppointer arg0)))
@@ -136,6 +158,9 @@
obj
)
;; definition for method 10 of type impact-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod update-from-cspace impact-control ((obj impact-control))
(when (>= (-> obj joint) 0)
(set! (-> obj trans 1 quad) (-> obj trans 0 quad))
@@ -146,6 +171,8 @@
(none)
)
;; definition for method 11 of type impact-control
;; INFO: Used lq/sq
(defmethod impact-control-method-11 impact-control ((obj impact-control) (arg0 collide-query) (arg1 process) (arg2 pat-surface))
(set! (-> arg0 start-pos quad) (-> obj trans 1 quad))
(set! (-> arg0 move-dist quad) (-> obj dir quad))
@@ -193,12 +220,16 @@
)
)
;; definition for method 9 of type point-tracker
;; INFO: Used lq/sq
(defmethod initialize point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector))
(set! (-> obj trans 0 quad) (-> arg0 quad))
(set! (-> obj trans 1 quad) (-> arg1 quad))
obj
)
;; definition for method 10 of type point-tracker
;; INFO: Used lq/sq
(defmethod point-tracker-method-10 point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(cond
((>= 0.0 arg3)
@@ -216,6 +247,7 @@
arg0
)
;; definition for method 11 of type point-tracker
(defmethod point-tracker-method-11 point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(with-pp
(let ((v1-1 (point-tracker-method-10 obj (new 'stack-no-clear 'vector) arg1 arg2 arg3)))
@@ -226,6 +258,7 @@
)
)
;; definition for method 13 of type combo-tracker
(defmethod combo-tracker-method-13 combo-tracker ((obj combo-tracker) (arg0 handle) (arg1 vector) (arg2 float) (arg3 vector) (arg4 float))
(cond
((send-event (handle->process arg0) 'combo)
@@ -246,7 +279,7 @@
)
)
(sphere<-vector+r! s1-0 arg1 arg2)
(set! (-> s2-1 length) (spatial-hash-method-36
(set! (-> s2-1 length) (fill-actor-list-for-sphere
*actor-hash*
s1-0
(the-as (pointer collide-shape) (-> s2-1 data))
@@ -277,6 +310,7 @@
)
)
;; definition for method 12 of type combo-tracker
(defmethod combo-tracker-method-12 combo-tracker ((obj combo-tracker) (arg0 vector) (arg1 vector) (arg2 process) (arg3 time-frame))
(initialize obj arg0 arg1)
(set! (-> obj target) (process->handle arg2))
@@ -284,6 +318,8 @@
obj
)
;; definition for method 11 of type combo-tracker
;; INFO: Used lq/sq
(defmethod point-tracker-method-11 combo-tracker ((obj combo-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(local-vars (at-0 int))
(with-pp
@@ -338,6 +374,7 @@
)
)
;; definition for function traj2d-calc-initial-speed-using-tilt
(defun traj2d-calc-initial-speed-using-tilt ((arg0 traj2d-params))
(let ((f0-4 (* (- (* (-> arg0 x) (tan (-> arg0 initial-tilt))) (-> arg0 y)) (/ 2.0 (-> arg0 gravity)))))
(cond
@@ -355,6 +392,7 @@
)
)
;; definition for function traj3d-calc-initial-velocity-using-tilt
(defun traj3d-calc-initial-velocity-using-tilt ((arg0 traj3d-params))
(vector-! (-> arg0 diff) (-> arg0 dest) (-> arg0 src))
(let ((s5-0 (new 'stack-no-clear 'traj2d-params)))
@@ -390,6 +428,9 @@
)
)
;; definition for method 9 of type cubic-curve
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod cubic-curve-method-9 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -434,6 +475,7 @@
)
)
;; definition for method 10 of type cubic-curve
(defmethod cubic-curve-method-10 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(let ((f0-1 (* arg1 arg1)))
@@ -445,6 +487,7 @@
arg0
)
;; definition for method 11 of type cubic-curve
(defmethod cubic-curve-method-11 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(set-vector! (-> v1-0 initial-position) 0.0 1.0 (* 2.0 arg1) (* 3.0 arg1 arg1))
@@ -454,6 +497,7 @@
arg0
)
;; definition for method 12 of type cubic-curve
(defmethod cubic-curve-method-12 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(set-vector! (-> v1-0 initial-position) 0.0 0.0 2.0 (* 6.0 arg1))
@@ -463,6 +507,9 @@
arg0
)
;; definition for method 13 of type cubic-curve
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw-curve cubic-curve ((obj cubic-curve))
(let ((s5-0 (new 'stack-no-clear 'trajectory))
(s4-0 10)
@@ -40,7 +40,7 @@
(go empty-state)
)
(('move-trans)
(collide-shape-method-29 (-> self root-override) (the-as vector (-> event param 0)))
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
#t
)
(('set-radius)
@@ -49,7 +49,7 @@
)
(set! (-> collide-shape nav-radius) radius)
(set! (-> collide-shape root-prim local-sphere w) radius)
(collide-shape-method-46 collide-shape)
(update-transforms collide-shape)
)
#t
)
@@ -107,7 +107,7 @@
(gp-0 (new 'stack-no-clear 'vector))
)
(vector<-cspace! gp-0 (-> (the-as process-drawable v1-0) node-list data (-> self track-joint)))
(collide-shape-method-29 (-> self root-override) gp-0)
(move-to-point! (-> self root-override) gp-0)
)
(none)
)
@@ -144,7 +144,7 @@
(set! (-> v1-11 prim-core collide-with) (collide-spec))
)
0
(collide-shape-method-46 s5-0)
(update-transforms s5-0)
(set! (-> self root-override) s5-0)
)
(logclear! (-> self mask) (process-mask actor-pause enemy))
+16 -1
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type grid-hash-word
(deftype grid-hash-word (uint8)
()
:method-count-assert 9
@@ -7,6 +9,7 @@
:flag-assert #x900000001
)
;; definition of type grid-hash-box
(deftype grid-hash-box (structure)
((min int8 3 :offset-assert 0)
(max int8 3 :offset-assert 3)
@@ -17,6 +20,7 @@
:flag-assert #x900000006
)
;; definition for method 3 of type grid-hash-box
(defmethod inspect grid-hash-box ((obj grid-hash-box))
(when (not obj)
(set! obj obj)
@@ -29,6 +33,7 @@
obj
)
;; definition of type grid-hash
(deftype grid-hash (basic)
((work grid-hash-work :offset-assert 4)
(search-box grid-hash-box :inline :offset-assert 8)
@@ -72,6 +77,7 @@
)
)
;; definition for method 3 of type grid-hash
(defmethod inspect grid-hash ((obj grid-hash))
(when (not obj)
(set! obj obj)
@@ -99,6 +105,7 @@
obj
)
;; definition of type find-nav-sphere-ids-params
(deftype find-nav-sphere-ids-params (structure)
((bsphere sphere :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
@@ -112,6 +119,7 @@
:flag-assert #x900000020
)
;; definition for method 3 of type find-nav-sphere-ids-params
(defmethod inspect find-nav-sphere-ids-params ((obj find-nav-sphere-ids-params))
(when (not obj)
(set! obj obj)
@@ -128,6 +136,7 @@
obj
)
;; definition of type sphere-hash
(deftype sphere-hash (grid-hash)
((sphere-array (inline-array sphere) :offset-assert 88)
(max-object-count int16 :offset-assert 92)
@@ -151,6 +160,7 @@
)
)
;; definition for method 3 of type sphere-hash
(defmethod inspect sphere-hash ((obj sphere-hash))
(when (not obj)
(set! obj obj)
@@ -183,6 +193,7 @@
obj
)
;; definition of type hash-object-info
(deftype hash-object-info (structure)
((object basic :offset-assert 0)
)
@@ -191,6 +202,7 @@
:flag-assert #x900000004
)
;; definition for method 3 of type hash-object-info
(defmethod inspect hash-object-info ((obj hash-object-info))
(when (not obj)
(set! obj obj)
@@ -202,6 +214,7 @@
obj
)
;; definition of type spatial-hash
(deftype spatial-hash (sphere-hash)
((object-array (pointer hash-object-info) :offset-assert 104)
(mem-object-array (pointer hash-object-info) :offset-assert 108)
@@ -213,7 +226,7 @@
(:methods
(spatial-hash-method-34 (_type_ vector hash-object-info) int 34)
(spatial-hash-method-35 (_type_) none 35)
(spatial-hash-method-36 (_type_ sphere (pointer collide-shape) int) int 36)
(fill-actor-list-for-sphere (_type_ sphere (pointer collide-shape) int) int 36)
(spatial-hash-method-37 (_type_) none 37)
(spatial-hash-method-38 (_type_) none 38)
(spatial-hash-method-39 (_type_ object hash-object-info) none 39)
@@ -221,6 +234,7 @@
)
)
;; definition for method 3 of type spatial-hash
(defmethod inspect spatial-hash ((obj spatial-hash))
(when (not obj)
(set! obj obj)
@@ -256,4 +270,5 @@
obj
)
;; failed to figure out what this is:
0
+1 -1
View File
@@ -449,7 +449,7 @@
(set! (-> s5-0 2 y) (+ 16384.0 (-> s5-0 2 y)))
(set! (-> s5-0 2 r) 2867.2)
(let ((v1-55 gp-0))
(set! (-> v1-55 spheres) s5-0)
(set! (-> v1-55 best-dist) (the-as float s5-0))
(set! (-> v1-55 num-spheres) (the-as uint 3))
(set! (-> v1-55 collide-with) (logclear
(-> self control root-prim prim-core collide-with)
+23 -23
View File
@@ -82,7 +82,7 @@
(when (and (board-on-ground?)
(>= (- (-> self clock frame-counter) (-> self board unknown-time-frame02)) (seconds 0.2))
)
(if (logtest? (-> self control status) (cshape-moving-flags csmf11))
(if (logtest? (-> self control status) (collide-status impact-surface))
(+! (-> self board turn-anim-duck-vel) (lerp-scale 0.0 15.0 (-> self control unknown-float21) 0.0 81920.0))
)
(let ((f0-38 (vector-dot (the-as vector (-> self board up-vector)) (-> self board up-vector 1))))
@@ -357,7 +357,7 @@
(if (< (vector-length (-> self control transv)) 114688.0)
(vector-normalize! (-> self control transv) 114688.0)
)
(when (not (logtest? (-> self control old-status) (cshape-moving-flags on-surface)))
(when (not (logtest? (-> self control old-status) (collide-status on-surface)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self control trans quad))
(set! (-> gp-0 y) (+ 2048.0 (-> gp-0 y)))
@@ -999,7 +999,7 @@
)
)
)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! arg2 (cond
((the-as object arg2)
(empty)
@@ -1558,7 +1558,7 @@
)
(else
(init-var-jump arg0 arg1 #t #f (-> self control transv) 1.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-float36)
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float05)))))
)
@@ -1741,7 +1741,7 @@
)
(else
(init-var-jump arg0 arg1 #t #f (-> self control transv) 1.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-float36)
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float05)))))
)
@@ -2269,7 +2269,7 @@
(none)
)
:exit (behavior ()
(logclear! (-> self control status) (cshape-moving-flags csmf16))
(logclear! (-> self control status) (collide-status probe-hit))
(let ((v1-2 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-2 command) (sound-command set-param))
(set! (-> v1-2 id) (the-as sound-id (-> self board ride-sound-id)))
@@ -2287,7 +2287,7 @@
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self control trans quad))
(let ((s5-0 (new 'stack-no-clear 'collide-query)))
(if (collide-shape-moving-method-55
(if (find-ground
(-> self control)
s5-0
(logclear (-> self control root-prim prim-core collide-with) (collide-spec water))
@@ -2301,7 +2301,7 @@
(if (< (-> self control trans y) (-> self control gspot-pos y))
(set! (-> gp-0 quad) (-> self control gspot-pos quad))
)
(collide-shape-method-29
(move-to-point!
(-> self control)
(vector+! (new 'stack-no-clear 'vector) gp-0 (new 'static 'vector :y 204.8 :w 1.0))
)
@@ -2592,7 +2592,7 @@
:enter (behavior ()
(set! (-> self board shock-offsetv) 0.0)
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-surface00) *board-jump-mods*)
(set! (-> self board mods-backup) (-> self control unknown-surface00))
(let ((a0-5 (target-time-to-ground)))
@@ -2708,7 +2708,7 @@
:frame-num 0.0
)
(until (ja-done? 0)
(when (logtest? (-> self control status) (cshape-moving-flags on-surface))
(when (logtest? (-> self control status) (collide-status on-surface))
(set! (-> self board turn-anim-duck-vel) 0.0)
(goto cfg-19)
)
@@ -2722,7 +2722,7 @@
)
(label cfg-19)
(send-event (ppointer->process (-> self sidekick)) 'matrix 'board)
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(go target-board-hit-ground)
(none)
)
@@ -2745,7 +2745,7 @@
(logclear! (-> self focus-status) (focus-status halfpipe))
(set! (-> self board shock-offsetv) 0.0)
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(none)
)
:exit target-board-exit
@@ -2820,7 +2820,7 @@
:post (behavior ()
(set! (-> self control unknown-float30) 0.0)
(set! (-> self control unknown-float29) 0.0)
(vector-seek! (-> self control unknown-vector04) *null-vector* (* 16384.0 (-> self clock seconds-per-frame)))
(vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame)))
(target-no-move-post)
(target-board-effect)
(none)
@@ -2839,7 +2839,7 @@
(logclear! (-> self focus-status) (focus-status halfpipe))
(set! (-> self board shock-offsetv) 0.0)
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-surface00) (new 'static 'surface
:name 'jump
:turnv 131072.0
@@ -2998,9 +2998,9 @@
(not (or (logtest? v1-114 (the-as water-flags a0-35))
(begin
(let ((v1-117 #t))
(set! a0-35 (the-as int (logand (-> self control status) (cshape-moving-flags on-water))))
(set! a0-35 (the-as int (logand (-> self control status) (collide-status on-water))))
(set! a0-35 a0-35)
(cmove-#f-zero v1-116 (the-as cshape-moving-flags a0-35) v1-117)
(cmove-#f-zero v1-116 (the-as collide-status a0-35) v1-117)
)
v1-116
)
@@ -3019,7 +3019,7 @@
:post (behavior ()
(set! (-> self control unknown-float30) 0.0)
(set! (-> self control unknown-float29) 0.0)
(vector-seek! (-> self control unknown-vector04) *null-vector* (* 16384.0 (-> self clock seconds-per-frame)))
(vector-seek! (-> self control draw-offset) *null-vector* (* 16384.0 (-> self clock seconds-per-frame)))
(target-post)
(target-board-effect)
(none)
@@ -3099,8 +3099,8 @@
)
:enter (-> target-clone-anim enter)
:exit (behavior ()
(set! (-> self control unknown-vector04 y) (the-as float (-> self control unknown-word04)))
(set! (-> self control unknown-vector05 y) (-> self control unknown-vector04 y))
(set! (-> self control draw-offset y) (the-as float (-> self control unknown-word04)))
(set! (-> self control cspace-offset y) (-> self control draw-offset y))
(send-event (ppointer->process (-> self sidekick)) 'matrix 'board)
((-> target-clone-anim exit))
((-> target-board-start exit))
@@ -3108,8 +3108,8 @@
(none)
)
:code (behavior ((arg0 handle))
(set! (-> self control unknown-word04) (the-as uint (-> self control unknown-vector04 y)))
(set! (-> self control unknown-vector04 y) 0.0)
(set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y)))
(set! (-> self control draw-offset y) 0.0)
(send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim)
(clone-anim arg0 #t "")
(go target-board-stance)
@@ -3208,14 +3208,14 @@
(cond
((= (-> self game mode) 'debug)
(let ((s4-1 (new-stack-vector0)))
(set! (-> s4-1 quad) (-> self control unknown-vector23 quad))
(set! (-> s4-1 quad) (-> self control last-trans-on-surf quad))
(ja-channel-set! 0)
(let ((s3-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s3-1) (seconds 1))
(suspend)
)
)
(collide-shape-method-29 (-> self control) s4-1)
(move-to-point! (-> self control) s4-1)
)
(set! (-> self control unknown-vector15 quad) (-> self control trans quad))
(send-event *camera* 'teleport)
+29 -29
View File
@@ -563,7 +563,7 @@
(let ((v1-82 (-> self node-list data)))
(set! (-> v1-82 0 param0) cspace<-transformq+world-trans!)
(set! (-> v1-82 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-82 0 param2) (the-as basic (-> self control unknown-vector05)))
(set! (-> v1-82 0 param2) (the-as basic (-> self control cspace-offset)))
)
(target-collide-set! 'board 0.0)
(set! (-> self state-flags) (logior (state-flags lleg-no-ik rleg-no-ik) (-> self state-flags)))
@@ -642,7 +642,7 @@
(let ((v1-43 (-> self node-list data)))
(set! (-> v1-43 0 param0) cspace<-transformq+trans!)
(set! (-> v1-43 0 param1) (the-as basic (-> self control trans)))
(set! (-> v1-43 0 param2) (the-as basic (-> self control unknown-vector05)))
(set! (-> v1-43 0 param2) (the-as basic (-> self control cspace-offset)))
)
(target-collide-set! 'normal 0.0)
(set! (-> self control reaction) target-collision-reaction)
@@ -654,7 +654,7 @@
(sound-stop (the-as sound-id (-> self board spin-sound-id)))
(set! (-> self board spin-sound-id) (the-as uint 0))
(send-event (ppointer->process (-> self sidekick)) 'matrix 'normal)
(set! (-> self control unknown-vector05 quad) (the-as uint128 0))
(set! (-> self control cspace-offset quad) (the-as uint128 0))
(remove-setting! 'sound-flava)
(remove-setting! 'mode-sound-bank)
(target-exit)
@@ -684,18 +684,18 @@
;; definition for function board-on-ground?
(defbehavior board-on-ground? target ()
(logtest? (-> self control status) (cshape-moving-flags on-surface))
(logtest? (-> self control status) (collide-status on-surface))
)
;; definition for function target-board-smack-surface?
;; INFO: Used lq/sq
(defbehavior target-board-smack-surface? target ()
(when (and (logtest? (-> self control status) (cshape-moving-flags t-wall))
(when (and (logtest? (-> self control status) (collide-status touch-wall))
(< (+ (-> self clock frame-counter) (seconds -0.05)) (-> self control unknown-time-frame07))
(< 0.7 (-> self control touch-angle))
(< 73728.0 (-> self control unknown-float05))
(and (< (vector-dot (-> self control unknown-vector25) (-> self control dynam gravity-normal)) 0.3)
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
(zero? (logand (-> self control status) (collide-status touch-actor)))
)
)
(set! (-> self board smack-surface-time) (-> self clock frame-counter))
@@ -785,7 +785,7 @@
)
(cond
((and (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.1))
(< 0.3 (-> self control unknown-float27))
(< 0.3 (-> self control blocked-factor))
)
(set! f0-28 f1-23)
)
@@ -823,7 +823,7 @@
"ltransv"
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0))
)
(set! (-> s5-0 quad) (-> self control unknwon-vector27 quad))
(set! (-> s5-0 quad) (-> self control btransv quad))
(vector-float*! s5-0 s5-0 0.5)
(vector+! s5-0 s5-0 (-> self control trans))
(add-debug-text-sphere
@@ -918,11 +918,11 @@
(set! gp-0 4)
)
((and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(set! gp-0 1)
)
((not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
((not (logtest? (-> self control status) (collide-status on-surface)))
(set! gp-0 2)
)
)
@@ -1170,11 +1170,11 @@
)
)
)
(set! (-> self control unknown-vector04 y)
(set! (-> self control draw-offset y)
(+ (-> self board cushion-base) (-> self board cushion-offset) (-> self board shock-offset))
)
(if (< (-> self control unknown-vector04 y) 0.0)
(set! (-> self control unknown-vector04 y) 0.0)
(if (< (-> self control draw-offset y) 0.0)
(set! (-> self control draw-offset y) 0.0)
)
0
(none)
@@ -1239,7 +1239,7 @@
(set! (-> a2-6 ignore-process1) #f)
(set! (-> a2-6 ignore-pat) (-> v1-30 pat-ignore-mask))
(set! (-> a2-6 action-mask) (collide-action solid))
(collide-shape-method-32 v1-30 (-> v1-30 transv) a2-6 (meters 1))
(fill-cache-integrate-and-collide v1-30 (-> v1-30 transv) a2-6 (meters 1))
)
(when (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(logclear! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags one))
@@ -1267,7 +1267,7 @@
(let* ((v1-60 gp-0)
(f30-0 (sqrtf (+ (* (-> v1-60 x) (-> v1-60 x)) (* (-> v1-60 z) (-> v1-60 z)))))
)
(when (and (logtest? (-> self control status) (cshape-moving-flags t-wall))
(when (and (logtest? (-> self control status) (collide-status touch-wall))
(and (< 16384.0 f30-0)
(not (and (-> self next-state) (= (-> self next-state name) 'target-board-smack)))
(not (logtest? (focus-status halfpipe) (-> self focus-status)))
@@ -1294,7 +1294,7 @@
)
(s3-3 (vector-matrix*! (new 'stack-no-clear 'vector) s3-2 (-> self control unknown-matrix00)))
)
(logior! (-> self control status) (cshape-moving-flags csmf15))
(logior! (-> self control status) (collide-status glance))
(set! (-> self board glance-time) (-> self clock frame-counter))
(let ((v1-99 s2-2))
(set! (-> self board glance-speed) (sqrtf (+ (* (-> v1-99 x) (-> v1-99 x)) (* (-> v1-99 z) (-> v1-99 z)))))
@@ -1314,7 +1314,7 @@
(when (and (< (vector-dot s4-3 s5-3) -0.77) (zero? (logand (-> self focus-status) (focus-status dead hit))))
(cond
((not (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
)
(if (< 32768.0 f30-0)
@@ -1400,7 +1400,7 @@
(defbehavior target-board-pre-move target ()
(cond
((and (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(begin
(set! (-> self board in-air-time) (-> self clock frame-counter))
@@ -1580,7 +1580,7 @@
(set! (-> self board unknown-time-frame00) (-> self clock frame-counter))
)
)
(when (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(when (and (not (logtest? (-> self control status) (collide-status on-surface)))
(< 0.0 f28-0)
(or (and (or (< (target-height-above-ground) 4096.0)
(< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1))
@@ -1794,7 +1794,7 @@
(seek! (-> self board cushion-offset) 0.0 (* 20480.0 (-> self clock seconds-per-frame)))
)
((and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(seek!
(-> self board cushion-offset)
@@ -2056,7 +2056,7 @@
)
)
(if (probe-test (-> self control) s3-5 (new 'static 'pat-surface :noentity #x1 :noboard #x1 :probe #x1))
(set! (-> self control status) (logior (cshape-moving-flags csmf16) (-> self control status)))
(set! (-> self control status) (logior (collide-status probe-hit) (-> self control status)))
(move-by-vector! (-> self control) s3-5)
)
)
@@ -2197,10 +2197,10 @@
)
(set! s4-3 (logior s4-3 32))
)
(if (logtest? (cshape-moving-flags csmf16) (-> self control status))
(if (logtest? (collide-status probe-hit) (-> self control status))
(set! s4-3 (logior s4-3 64))
)
(logclear! (-> self control status) (cshape-moving-flags csmf16))
(logclear! (-> self control status) (collide-status probe-hit))
(when (and (< (- (-> self clock frame-counter) (-> self board ride-time)) (seconds 0.2)) (nonzero? s4-3))
(if (logtest? s4-3 1)
(format #t "exit speed ~M~%" f30-2)
@@ -2260,7 +2260,7 @@
)
)
((logtest? s4-3 42)
(collide-shape-method-29 (-> self control) gp-0)
(move-to-point! (-> self control) gp-0)
(set! (-> self control transv quad) (-> s5-0 quad))
)
)
@@ -2435,7 +2435,7 @@
(set! (-> a2-4 ignore-process1) #f)
(set! (-> a2-4 ignore-pat) (-> v1-103 pat-ignore-mask))
(set! (-> a2-4 action-mask) (collide-action solid))
(collide-shape-method-32 v1-103 (-> v1-103 transv) a2-4 (meters 1))
(fill-cache-integrate-and-collide v1-103 (-> v1-103 transv) a2-4 (meters 1))
)
(when (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(logclear! (-> *collide-edge-board-spec* flags) (collide-edge-spec-flags two))
@@ -2496,10 +2496,10 @@
(vector-! (new 'stack-no-clear 'vector) s3-2 (-> self control trans))
(new 'static 'pat-surface :noentity #x1 :noboard #x1 :probe #x1)
)
(set! (-> self control status) (logior (cshape-moving-flags csmf16) (-> self control status)))
(set! (-> self control status) (logior (collide-status probe-hit) (-> self control status)))
)
(if (and (-> self board ride-lock-on) (zero? (logand (cshape-moving-flags csmf16) (-> self control status))))
(collide-shape-method-29 (-> self control) s3-2)
(if (and (-> self board ride-lock-on) (zero? (logand (collide-status probe-hit) (-> self control status))))
(move-to-point! (-> self control) s3-2)
)
)
(set! (-> self control transv quad) (-> s5-3 quad))
@@ -2664,7 +2664,7 @@
)
)
(let ((f0-59 (fmin
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (logtest? (-> self control status) (collide-status on-surface))
(seek (-> self board turn-anim-duck) 0.0 (-> self clock seconds-per-frame))
(-> self board turn-anim-duck)
)
+12 -8
View File
@@ -244,8 +244,10 @@
;; definition for method 38 of type gun-blue-shot
(defmethod made-impact? gun-blue-shot ((obj gun-blue-shot))
"TODO - queries the collision cache, return true/false"
(let ((v1-0 (-> obj root-override)))
(let ((a1-0 (new 'stack-no-clear 'collide-query)))
(let ((v1-0 (-> obj root-override))
(t1-0 (new 'stack-no-clear 'collide-query))
)
(let ((a1-0 t1-0))
(set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w))
(set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with))
(set! (-> a1-0 ignore-process0) obj)
@@ -253,7 +255,7 @@
(set! (-> a1-0 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
(set! (-> a1-0 action-mask) (collide-action solid))
)
(collide-shape-moving-method-65 v1-0 (-> v1-0 transv) -12288.0 12697.6 -2048.0)
(fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -12288.0 12697.6 -2048.0 t1-0)
)
)
@@ -261,7 +263,7 @@
;; WARN: Return type mismatch int vs none.
(defun gun-blue-shot-move ((arg0 gun-blue-shot))
(projectile-move-fill-line-sphere arg0)
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-surface))
(go (method-of-object arg0 impact))
)
0
@@ -270,17 +272,17 @@
;; definition for function cshape-reaction-blue-shot
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs cshape-moving-flags.
;; WARN: Return type mismatch int vs collide-status.
(defun cshape-reaction-blue-shot ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
(vector-reset! arg2)
(let ((a1-1 (new 'stack-no-clear 'vector)))
(vector-float*! a1-1 (-> arg1 move-dist) (the-as float (-> arg1 spheres)))
(vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist))
(move-by-vector! arg0 a1-1)
)
(set! (-> (the-as gun-blue-shot (-> arg0 process)) collide-normal quad) (-> arg1 best-other-tri normal quad))
(let ((v0-1 4))
(logior! (-> arg0 status) v0-1)
(the-as cshape-moving-flags v0-1)
(the-as collide-status v0-1)
)
)
@@ -291,7 +293,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-blue-shot)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrate-using) (penetrate jak-blue-shot))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
+13 -9
View File
@@ -292,7 +292,7 @@
(let ((s4-0 (-> obj root-override root-prim prim-core collide-with)))
(set! *actor-list-length* 0)
(if (logtest? s4-0 (collide-spec hit-by-others-list))
(set! *actor-list-length* (spatial-hash-method-36 *actor-hash* (the-as sphere s5-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* (the-as sphere s5-0) *actor-list* 256))
)
(when (logtest? s4-0 (collide-spec player-list))
(let ((a0-6 (-> *collide-player-list* alive-list next0)))
@@ -449,8 +449,8 @@
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-2 quad) vf1)
)
(collide-shape-method-37 gp-0 (-> gp-0 transv))
(if (logtest? (-> gp-0 status) (cshape-moving-flags t-surface t-wall))
(integrate-and-collide! gp-0 (-> gp-0 transv))
(if (logtest? (-> gp-0 status) (collide-status touch-surface touch-wall))
(sound-play "red-shot-hit")
)
)
@@ -460,8 +460,10 @@
;; definition for method 24 of type gun-red-shot
(defmethod gun-red-shot-method-24 gun-red-shot ((obj gun-red-shot))
(let ((v1-0 (-> obj root-override)))
(let ((a1-0 (new 'stack-no-clear 'collide-query)))
(let ((v1-0 (-> obj root-override))
(t1-0 (new 'stack-no-clear 'collide-query))
)
(let ((a1-0 t1-0))
(set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w))
(set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with))
(set! (-> a1-0 ignore-process0) obj)
@@ -469,7 +471,7 @@
(set! (-> a1-0 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
(set! (-> a1-0 action-mask) (collide-action solid))
)
(if (collide-shape-moving-method-65 v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0)
(if (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0)
#t
)
)
@@ -558,9 +560,11 @@
(let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as (function control-info collide-query vector vector cshape-moving-flags) cshape-reaction-just-move)
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 penetrate-using) (penetrate jak-red-shot))
(let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec projectile))
@@ -586,7 +590,7 @@
(quaternion-copy! (-> s5-1 quat) (-> (the-as process-drawable (-> self parent 0)) root quat))
(vector-identity! (-> s5-1 scale))
)
(collide-shape-method-46 (-> self root-override))
(update-transforms (-> self root-override))
(set! (-> self event-hook) gun-red-shot-event-handler)
(set! (-> self mask) (logior (process-mask projectile) (-> self mask)))
(logclear! (-> self mask) (process-mask enemy))
+13 -9
View File
@@ -296,8 +296,10 @@
;; definition for method 38 of type gun-yellow-shot
(defmethod made-impact? gun-yellow-shot ((obj gun-yellow-shot))
"TODO - queries the collision cache, return true/false"
(let ((v1-0 (-> obj root-override)))
(let ((a0-1 (new 'stack-no-clear 'collide-query)))
(let ((v1-0 (-> obj root-override))
(t1-0 (new 'stack-no-clear 'collide-query))
)
(let ((a0-1 t1-0))
(set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w))
(set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with))
(set! (-> a0-1 ignore-process0) obj)
@@ -305,8 +307,8 @@
(set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask))
(set! (-> a0-1 action-mask) (collide-action solid))
)
(when (collide-shape-moving-method-65 v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0)
(if (logtest? (-> obj root-override status) (cshape-moving-flags t-act))
(when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0)
(if (logtest? (-> obj root-override status) (collide-status touch-actor))
(set! (-> obj hit-actor?) #t)
)
#t
@@ -329,8 +331,8 @@
)
)
)
(when (logtest? (-> s5-0 status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-act))
(when (logtest? (-> s5-0 status) (collide-status touch-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-actor))
(set! (-> arg0 hit-actor?) #t)
)
(let ((v1-14 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0))
@@ -338,7 +340,7 @@
)
(set! (-> a1-5 quad) (-> s5-0 trans quad))
(vector+! a1-5 a1-5 v1-14)
(collide-shape-method-29 (-> arg0 root-override) a1-5)
(move-to-point! (-> arg0 root-override) a1-5)
)
(go (method-of-object arg0 impact))
)
@@ -354,9 +356,11 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as (function control-info collide-query vector vector cshape-moving-flags) cshape-reaction-just-move)
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
+81 -83
View File
@@ -70,7 +70,7 @@
)
;; definition for function reverse-conversions
;; WARN: Return type mismatch cshape-moving-flags vs none.
;; WARN: Return type mismatch collide-status vs none.
(defbehavior reverse-conversions target ((arg0 vector))
(let ((v1-1 (-> self control unknown-vector00)))
(set! (-> self control unknown-float05) (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))))
@@ -329,31 +329,31 @@
(format
arg1
"~0k~9S ~9S ~9S ~9S ~9S ~9S~%"
(if (logtest? (-> arg0 control status) (cshape-moving-flags on-surface))
(if (logtest? (-> arg0 control status) (collide-status on-surface))
"on-surface"
""
)
(if (logtest? (-> arg0 control status) (cshape-moving-flags on-ground))
(if (logtest? (-> arg0 control status) (collide-status on-ground))
"on-ground"
""
)
(if (logtest? (-> arg0 control status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 control status) (collide-status touch-surface))
"t-surface"
""
)
(if (logtest? (-> arg0 control status) (cshape-moving-flags t-wall))
(if (logtest? (-> arg0 control status) (collide-status touch-wall))
"t-wall"
""
)
(if (logtest? (-> arg0 control status) (cshape-moving-flags t-act))
(if (logtest? (-> arg0 control status) (collide-status touch-actor))
"t-act"
""
)
(cond
((logtest? (-> arg0 control status) (cshape-moving-flags t-ceil))
((logtest? (-> arg0 control status) (collide-status touch-ceiling))
"t-ceil"
)
((logtest? (-> arg0 control status) (cshape-moving-flags on-water))
((logtest? (-> arg0 control status) (collide-status on-water))
"on-water"
)
(else
@@ -645,7 +645,7 @@
(< 0.7 (-> self control unknown-float12))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.3))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame08)) (seconds 0.3))
(logtest? (-> self control status) (cshape-moving-flags on-surface))
(logtest? (-> self control status) (collide-status on-surface))
(and (< 0.7 (-> self control surface-angle)) #t)
)
)
@@ -657,10 +657,10 @@
;; INFO: Used lq/sq
(defbehavior wall-hide? target ()
(when (and (< 0.7 (-> self control unknown-float12))
(< 0.7 (-> self control unknown-float27))
(< 0.7 (-> self control blocked-factor))
(and (< (-> self control unknown-float05) 8192.0)
(logtest? (-> self control status) (cshape-moving-flags t-wall))
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
(logtest? (-> self control status) (collide-status touch-wall))
(not (logtest? (-> self control status) (collide-status touch-actor)))
(or (= (-> self control unknown-pat-surface00 event) (pat-event hide))
(let ((a0-2 (level-get-target-inside *level*)))
(and a0-2 (logtest? (-> a0-2 info level-flags) 1))
@@ -802,11 +802,11 @@
(set! (-> self control unknown-float08) f0-6)
)
(let ((f0-8 (* arg1 (-> self control unknown-surface01 target-speed))))
(set! (-> self control unknown-vector01 quad) (-> (vector-normalize! gp-0 f0-8) quad))
(set! (-> self control target-transv quad) (-> (vector-normalize! gp-0 f0-8) quad))
)
)
(let ((gp-1 (new-stack-vector0)))
(vector-matrix*! gp-1 (-> self control unknown-vector01) (-> self control unknown-matrix01))
(vector-matrix*! gp-1 (-> self control target-transv) (-> self control unknown-matrix01))
(vector-float*! gp-1 gp-1 0.5)
(vector+! gp-1 gp-1 (-> self control trans))
(add-debug-text-sphere
@@ -912,11 +912,11 @@
;; definition for function add-thrust
;; INFO: Used lq/sq
(defbehavior add-thrust target ()
(let ((s5-0 (-> self control unknown-vector01))
(let ((s5-0 (-> self control target-transv))
(gp-0 (-> self control unknown-vector00))
)
(let ((s4-0 (new 'stack-no-clear 'vector)))
(set! (-> s4-0 quad) (-> self control unknown-vector01 quad))
(set! (-> s4-0 quad) (-> self control target-transv quad))
(target-bend-vel-turn gp-0)
(target-add-slide-factor s5-0)
(let ((t9-2 vector-xz-normalize!)
@@ -963,7 +963,7 @@
)
)
)
(let* ((s2-0 (-> self control unknwon-vector27))
(let* ((s2-0 (-> self control btransv))
(s3-1 (vector-matrix*! (new 'stack-no-clear 'vector) s2-0 (-> self control unknown-matrix00)))
)
(if (< (-> s4-0 x) 0.0)
@@ -978,12 +978,12 @@
(set! (-> s3-1 z) (fmax (fmin 0.0 (-> s3-1 z)) (-> s4-0 z)))
(set! (-> s3-1 z) (fmax 0.0 (fmin (-> s3-1 z) (-> s4-0 z))))
)
(if (< 0.2 (-> self control unknown-float27))
(if (< 0.2 (-> self control blocked-factor))
(vector-seek! s3-1 s4-0 (* 122880.0 (-> self clock seconds-per-frame)))
)
(vector-matrix*! s2-0 s3-1 (-> self control unknown-matrix01))
(let ((f28-0 (vector-vector-xz-distance s3-1 s4-0)))
(when (and (not (logtest? (-> self control status) (cshape-moving-flags t-surface)))
(when (and (not (logtest? (-> self control status) (collide-status touch-surface)))
(let ((v1-51 gp-0))
(< (sqrtf (+ (* (-> v1-51 x) (-> v1-51 x)) (* (-> v1-51 z) (-> v1-51 z))))
(sqrtf (+ (* (-> s3-1 x) (-> s3-1 x)) (* (-> s3-1 z) (-> s3-1 z))))
@@ -999,8 +999,8 @@
)
)
)
(if (and (not (logtest? (-> self control status) (cshape-moving-flags t-wall)))
(logtest? (-> self control old-status) (cshape-moving-flags t-wall))
(if (and (not (logtest? (-> self control status) (collide-status touch-wall)))
(logtest? (-> self control old-status) (collide-status touch-wall))
(logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(< 0.0 (-> gp-0 y))
(< 0.0 (vector-dot
@@ -1018,8 +1018,8 @@
(if (< (- (-> self clock frame-counter) (-> self control unknown-time-frame09)) (seconds 0.2))
(set! f30-0 (+ 204800.0 f30-0))
)
(if (and (not (logtest? (-> self control status) (cshape-moving-flags t-wall)))
(and (logtest? (-> self control old-status) (cshape-moving-flags t-wall))
(if (and (not (logtest? (-> self control status) (collide-status touch-wall)))
(and (logtest? (-> self control old-status) (collide-status touch-wall))
(logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(< 0.0 (-> gp-0 y))
(< (-> gp-0 z) 0.0)
@@ -1056,7 +1056,7 @@
"ltransv"
(new 'static 'rgba :g #xff :a #x80)
)
(set! (-> gp-1 quad) (-> self control unknwon-vector27 quad))
(set! (-> gp-1 quad) (-> self control btransv quad))
(vector-float*! gp-1 gp-1 0.5)
(vector+! gp-1 gp-1 (-> self control trans))
(add-debug-text-sphere
@@ -1164,7 +1164,7 @@
(-> self control unknown-vector03)
)
((and (or (not (logtest? (logior (-> self control status) (-> self control old-status))
(cshape-moving-flags on-surface t-surface)
(collide-status on-surface touch-surface)
)
)
(< (- (-> self clock frame-counter) (-> self control unknown-time-frame07)) (seconds 0.5))
@@ -1411,7 +1411,7 @@
(dotimes (s5-0 2)
(let ((a1-4 (not (or (logtest? (state-flags lleg-no-ik rleg-no-ik) (-> self state-flags))
(and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(logtest? (focus-status edge-grab pole flut pilot mech) (-> self focus-status))
)
@@ -1556,7 +1556,7 @@
)
)
(cond
((logtest? (-> self control old-status) (cshape-moving-flags on-surface))
((logtest? (-> self control old-status) (collide-status on-surface))
(if (>= (+ (-> self clock frame-counter) (seconds -0.035)) (-> self control unknown-time-frame03))
(vector-reset! (-> self control unknown-vector18))
)
@@ -1576,7 +1576,7 @@
)
)
)
(set! (-> self control unknown-vector17 quad) (-> self control unknown-vector18 quad))
(set! (-> self control collide-extra-velocity quad) (-> self control unknown-vector18 quad))
(set! (-> self control unknown-vector14 quad) (-> self control local-normal quad))
0
(none)
@@ -1625,20 +1625,20 @@
(quaternion-copy! (-> self control unknown-quaternion03) (-> self control quat-for-control))
((-> self control unknown-surface01 active-hook))
(cond
((logtest? (-> self control status) (cshape-moving-flags on-surface))
((logtest? (-> self control status) (collide-status on-surface))
(set! (-> self control unknown-time-frame06) (-> self clock frame-counter))
(set! (-> self control unknown-vector21 quad) (-> self control trans quad))
(if (and (>= (-> self control coverage) 1.0)
(not (logtest? (-> self control status) (cshape-moving-flags t-act on-water)))
(logtest? (-> self control status) (cshape-moving-flags on-ground))
(not (logtest? (-> self control status) (collide-status touch-actor on-water)))
(logtest? (-> self control status) (collide-status on-ground))
)
(set! (-> self control unknown-vector23 quad) (-> self control trans quad))
(set! (-> self control last-trans-on-surf quad) (-> self control trans quad))
)
((-> self control unknown-surface01 touch-hook))
)
(else
(let ((v1-49 (-> self control trans)))
(when (logtest? (-> self control old-status) (cshape-moving-flags on-surface))
(when (logtest? (-> self control old-status) (collide-status on-surface))
(set! (-> self control unknown-vector42 quad) (-> self control unknown-vector21 quad))
(set! (-> self control unknown-vector43 quad) (-> self control unknown-vector21 quad))
)
@@ -1734,17 +1734,16 @@
(set! (-> self control unknown-time-frame20) (-> self clock frame-counter))
(cond
((logtest? (focus-status mech indax) (-> self focus-status))
(if (not (and (-> self next-state)
(let ((v1-179 (-> self next-state name)))
(or (= v1-179 'target-falling)
(= v1-179 'target-board-falling)
(= v1-179 'target-gun-falling)
(= v1-179 'target-mech-falling)
(= v1-179 'target-mech-carry-falling)
(= v1-179 'target-carry-falling)
(= v1-179 'target-indax-falling)
)
)
(if (not (and (-> self next-state) (let ((v1-179 (-> self next-state name)))
(or (= v1-179 'target-falling)
(= v1-179 'target-board-falling)
(= v1-179 'target-gun-falling)
(= v1-179 'target-mech-falling)
(= v1-179 'target-mech-carry-falling)
(= v1-179 'target-carry-falling)
(= v1-179 'target-indax-falling)
)
)
)
)
(send-event self 'change-mode 'falling)
@@ -1785,7 +1784,7 @@
)
)
)
(collide-shape-method-29 (-> self control) a1-36)
(move-to-point! (-> self control) a1-36)
)
(set! (-> self control surf) *standard-ground-surface*)
)
@@ -1800,7 +1799,7 @@
(or (= v1-211 'target-walk) (= v1-211 'target-gun-walk))
)
)
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
)
(and (< f0-17 0.0)
@@ -1843,11 +1842,10 @@
)
)
)
(set! (-> self control unknown-float30)
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
32.0
2.0
)
(set! (-> self control unknown-float30) (if (logtest? (-> self control status) (collide-status on-surface))
32.0
2.0
)
)
(let ((v1-248 (-> *setting-control* user-current beard)))
(when (!= (-> self beard?) v1-248)
@@ -1870,7 +1868,7 @@
;; definition for function post-flag-setup
;; WARN: Return type mismatch int vs none.
(defbehavior post-flag-setup target ()
(if (logtest? (-> self control status) (cshape-moving-flags t-wall t-act))
(if (logtest? (-> self control status) (collide-status touch-wall touch-actor))
(set! (-> self control unknown-time-frame07) (-> self clock frame-counter))
)
(when (logtest? (-> self state-flags) (state-flags tinvul1))
@@ -1961,13 +1959,13 @@
;; INFO: Used lq/sq
(defbehavior bend-gravity target ()
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action no-normal-reset))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(return #f)
)
(let ((f0-1
(if (and (logtest? (-> self control status) (cshape-moving-flags t-wall))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(if (and (logtest? (-> self control status) (collide-status touch-wall))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
0.0
(-> self control unknown-float29)
@@ -2170,15 +2168,15 @@
)
(vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second))
(set! (-> self control rider-time) (-> self clock frame-counter))
(vector+! s3-1 s3-1 (-> self control unknown-vector05))
(collide-shape-method-29 (-> self control) s3-1)
(vector+! s3-1 s3-1 (-> self control cspace-offset))
(move-to-point! (-> self control) s3-1)
)
(set! (-> self control unknown-float33) 0.0)
(set! (-> self control unknown-vector21 quad) (-> self control trans quad))
)
(else
(vector-normalize! s4-1 1228.8)
(let ((a1-20 (vector+! (new 'stack-no-clear 'vector) s4-1 (-> self control unknown-vector05))))
(let ((a1-20 (vector+! (new 'stack-no-clear 'vector) s4-1 (-> self control cspace-offset))))
(move-by-vector! (-> self control) a1-20)
)
(vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second))
@@ -2196,8 +2194,8 @@
(vector-! a1-23 (-> s5-0 center-hold) (-> self control unknown-vector31))
(vector-float*! (-> self control rider-last-move) s4-1 (-> self clock frames-per-second))
(set! (-> self control rider-time) (-> self clock frame-counter))
(vector+! a1-23 a1-23 (-> self control unknown-vector05))
(collide-shape-method-29 (-> self control) a1-23)
(vector+! a1-23 a1-23 (-> self control cspace-offset))
(move-to-point! (-> self control) a1-23)
)
(set! (-> self control unknown-float33) 0.0)
(set! (-> self control unknown-vector21 quad) (-> self control trans quad))
@@ -2344,7 +2342,7 @@
)
(else
(set! (-> self control unknown-symbol02) (the-as float #t))
(collide-shape-method-29
(move-to-point!
(-> self control)
(vector-! (new 'stack-no-clear 'vector) s5-0 (-> self control unknown-vector31))
)
@@ -2365,7 +2363,7 @@
(set-quaternion! (-> self control) (-> self control dir-targ))
(joint-control-method-10 (-> self skel))
(draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel))
(collide-shape-method-46 (-> self control))
(update-transforms (-> self control))
(none)
)
@@ -2391,7 +2389,7 @@
((logtest? (focus-status board pilot mech indax) (-> self focus-status))
(set! (-> self control unknown-vector15 quad) (-> self control trans quad))
)
((or (logtest? (-> self control status) (cshape-moving-flags on-water))
((or (logtest? (-> self control status) (collide-status on-water))
(let ((v1-23 (-> self water flags)))
(and (logtest? (water-flags touch-water) v1-23)
(logtest? (water-flags under-water swimming) v1-23)
@@ -2440,7 +2438,7 @@
(-> self control unknown-vector15)
)
((and (or (logtest? (water-flags touch-water) (-> self water flags))
(logtest? (-> self control status) (cshape-moving-flags on-water))
(logtest? (-> self control status) (collide-status on-water))
)
(logtest? (-> self water flags) (water-flags mud))
)
@@ -2522,7 +2520,7 @@
)
)
(let ((a2-5
(matrix<-no-trans-transformq! (-> self control unknown-matrix02) (the-as transformq (-> self control trans)))
(matrix<-no-trans-transformq! (-> self control ctrl-orientation) (the-as transformq (-> self control trans)))
)
)
(vector-matrix*! (-> self control unknown-vector28) (-> *TARGET-bank* head-offset) a2-5)
@@ -2567,7 +2565,7 @@
;; WARN: Return type mismatch int vs none.
(defbehavior do-target-gspot target ()
(cond
((and (logtest? (-> self control status) (cshape-moving-flags on-surface))
((and (logtest? (-> self control status) (collide-status on-surface))
(!= (-> self control unknown-surface00 mode) 'swim)
(!= (-> self control unknown-surface00 mode) 'dive)
(not (and (-> self next-state) (= (-> self next-state name) 'target-flop)))
@@ -2579,7 +2577,7 @@
)
(else
(let ((gp-0 (new 'stack-no-clear 'collide-query)))
(if (collide-shape-moving-method-55
(if (find-ground
(-> self control)
gp-0
(logclear (-> self control root-prim prim-core collide-with) (collide-spec water))
@@ -2685,7 +2683,7 @@
(set! (-> a2-3 ignore-pat) (-> v1-52 pat-ignore-mask))
)
(set! (-> a2-3 action-mask) (collide-action solid))
(collide-shape-method-32 (-> self control) (-> self control transv) a2-3 (meters 1))
(fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-3 (meters 1))
)
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(>= (vector-dot
@@ -2821,7 +2819,7 @@
(set! (-> a2-0 ignore-pat) (-> v1-30 pat-ignore-mask))
)
(set! (-> a2-0 action-mask) (collide-action solid))
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1))
(fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-0 (meters 1))
)
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(>= (vector-dot
@@ -2950,7 +2948,7 @@
(set! (-> a2-0 ignore-pat) (-> v1-29 pat-ignore-mask))
)
(set! (-> a2-0 action-mask) (collide-action solid))
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1))
(fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-0 (meters 1))
)
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(>= (vector-dot
@@ -3044,9 +3042,9 @@
(do-rotations2)
(reverse-conversions (-> self control transv))
(vector-!
(-> self control unknown-vector05)
(-> self control unknown-vector04)
(-> self control unknown-vector07)
(-> self control cspace-offset)
(-> self control draw-offset)
(-> self control anim-collide-offset-world)
)
(let ((a1-3 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-3 options) (overlaps-others-options oo0))
@@ -3116,9 +3114,7 @@
(clear-record-tags! *history* (history-channel collide-status) (-> gp-4 unknown-halfword00) (the-as uint 2))
)
)
(set! (-> v1-68 collide-status)
(the-as collide-status (logior (-> gp-4 status) (cshape-moving-flags csmf08)))
)
(set! (-> v1-68 collide-status) (logior (-> gp-4 status) (collide-status no-touch)))
(set! (-> v1-68 vector z) (the-as float (-> gp-4 reaction-flag)))
)
)
@@ -3131,9 +3127,9 @@
;; definition for function target-no-ja-move-post
(defbehavior target-no-ja-move-post target ()
(vector-!
(-> self control unknown-vector05)
(-> self control unknown-vector04)
(-> self control unknown-vector07)
(-> self control cspace-offset)
(-> self control draw-offset)
(-> self control anim-collide-offset-world)
)
(let ((a1-2 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-2 options) (overlaps-others-options oo0))
@@ -3162,7 +3158,7 @@
(target-exit)
(target-timed-invulnerable-off self 0)
(target-timed-invulnerable-off self 2)
(set! (-> self control status) (cshape-moving-flags))
(set! (-> self control status) (collide-status))
(set! (-> self control unknown-dynamics00) *standard-dynamics*)
(set! (-> self control surf) *standard-ground-surface*)
(set! (-> self control unknown-vector02 quad) (-> self control unknown-dynamics00 gravity-normal quad))
@@ -3216,7 +3212,9 @@
(let ((s0-0 (new 'process 'control-info obj (collide-list-enum hit-by-others))))
(set! (-> s0-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s0-0 reaction) target-collision-reaction)
(set! (-> s0-0 no-reaction) target-collision-no-reaction)
(set! (-> s0-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) target-collision-no-reaction)
)
(set! sv-16 (new 'process 'collide-shape-prim-group s0-0 (the-as uint 9) 1))
(set! (-> s0-0 total-prims) (the-as uint 10))
(set! (-> sv-16 prim-core action) (collide-action solid can-ride))
@@ -3297,7 +3295,7 @@
(set! (-> v1-69 event-self) 'touched)
)
(set! (-> obj game) *game-info*)
(collide-shape-method-29 (-> obj control) (-> arg0 trans))
(move-to-point! (-> obj control) (-> arg0 trans))
(set! (-> obj control unknown-vector15 quad) (-> arg0 trans quad))
(set! (-> obj focus-search) (new 'process 'boxed-array collide-shape 128))
(set! (-> obj focus-search length) 0)
@@ -3321,7 +3319,7 @@
(let ((v1-94 (-> obj node-list data)))
(set! (-> v1-94 0 param0) cspace<-transformq+trans!)
(set! (-> v1-94 0 param1) (the-as basic (-> obj control trans)))
(set! (-> v1-94 0 param2) (the-as basic (-> obj control unknown-vector05)))
(set! (-> v1-94 0 param2) (the-as basic (-> obj control cspace-offset)))
)
(set! (-> obj skel override) (new 'process 'boxed-array float 54))
(set! (-> obj draw light-index) (the-as uint 30))
+513
View File
@@ -0,0 +1,513 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup skel-sidekick daxter 0 -1
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:longest-edge (meters 1)
:shadow 3
:texture-level 6
:sort 1
:origin-joint-index 6
:shadow-joint-index 6
)
;; failed to figure out what this is:
(defskelgroup skel-sidekick-highres daxter-highres 0 -1
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:longest-edge (meters 1)
:shadow 2
:sort 1
:origin-joint-index 6
:shadow-joint-index 6
)
;; definition for symbol *sidekick-remap*, type pair
(define *sidekick-remap*
'(("run-to-stance-left" "run-to-stance")
("run-to-stance-loop-left" "run-to-stance-loop")
("stance-loop-left" "stance-loop")
("run-to-stance-right" "run-to-stance")
("run-to-stance-loop-right" "run-to-stance-loop")
("stance-loop-right" "stance-loop")
("run-to-stance-up" "run-to-stance")
("run-to-stance-loop-up" "run-to-stance-loop")
("stance-loop-up" "stance-loop")
("run-to-stance-down" "run-to-stance")
("run-to-stance-loop-down" "run-to-stance-loop")
("stance-loop-down" "stance-loop")
("run-right" "run")
("run-left" "run")
("walk-right" "walk")
("walk-left" "walk")
("gun-hit-elec" "hit-elec")
("gun-attack-from-stance-end"
"gun-attack-from-stance-end"
"gun-attack-from-stance-end"
"gun-attack-from-stance-end"
"gun-attack-from-stance-end-alt1"
)
("gun-attack-butt-end"
"gun-attack-butt-end"
"gun-attack-butt-end"
"gun-attack-butt-end"
"gun-attack-butt-end"
"gun-attack-butt-end-alt1"
)
("pole-cycle" "pole-cycle" "pole-cycle2")
("hit-from-front-alt1" "hit-from-front")
("board-jump"
,(lambda :behavior sidekick
((arg0 object) (arg1 vector) (arg2 object))
(let* ((v1-0 (-> self parent-override))
(gp-0 (if v1-0
(-> v1-0 0 self-override)
)
)
)
(when (>= (- (-> self clock frame-counter) (-> self special-anim-time)) (seconds 1))
(set! (-> self special-anim-interp) 0.0)
(set! (-> self special-anim-frame) 0.0)
)
(cond
((or (and (= (-> gp-0 control unknown-surface00 name) 'spin) (!= (-> gp-0 board trotyv) 0.0))
(!= (-> self special-anim-interp) 0.0)
)
(case arg2
((1)
(set! (-> self special-anim-time) (-> self clock frame-counter))
(cond
((= (-> gp-0 control unknown-surface00 name) 'spin)
(set! (-> arg1 z)
(* (lerp-scale 0.0 5.0 (fabs (-> gp-0 board trotyv)) 0.0 182044.44) (-> self special-anim-interp))
)
(set! (-> self special-anim-frame) (-> arg1 z))
(seek! (-> self special-anim-interp) 1.0 (* 8.0 (-> self clock seconds-per-frame)))
)
(else
(seek! (-> self special-anim-interp) 0.0 (* 4.0 (-> self clock seconds-per-frame)))
(set! (-> arg1 z) (* (-> self special-anim-frame) (-> self special-anim-interp)))
)
)
)
)
(if (>= (-> gp-0 board trotyv) 0.0)
"board-spin-ccw"
"board-spin-cw"
)
)
(else
"board-jump"
)
)
)
)
)
)
)
;; definition for function cspace<-cspace+transformq!
(defun cspace<-cspace+transformq! ((arg0 cspace) (arg1 cspace) (arg2 transformq))
(rlet ((acc :class vf)
(Q :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
)
(init-vf0-vector)
(let ((s4-0 (-> arg0 bone transform)))
(quaternion->matrix s4-0 (-> arg2 quat))
(.lvf vf1 (&-> (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) quad))
(.lvf vf2 (&-> (-> arg1 bone) transform trans quad))
(.lvf vf6 (&-> arg2 trans quad))
(.lvf vf3 (&-> s4-0 vector 0 quad))
(.lvf vf4 (&-> s4-0 vector 1 quad))
(.lvf vf5 (&-> s4-0 vector 2 quad))
(.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11)
(.wait.vf)
(.mul.vf vf2 vf2 Q :mask #b111)
(.mov.vf vf2 vf0 :mask #b1000)
(.mul.x.vf vf3 vf3 vf1)
(.mul.y.vf vf4 vf4 vf1)
(.mul.z.vf vf5 vf5 vf1)
(.mul.x.vf acc vf3 vf6)
(.add.mul.y.vf acc vf4 vf6 acc)
(.add.mul.z.vf acc vf5 vf6 acc)
(.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111)
(.svf (&-> s4-0 trans quad) vf2)
(.svf (&-> s4-0 vector 0 quad) vf3)
(.svf (&-> s4-0 vector 1 quad) vf4)
(.svf (&-> s4-0 vector 2 quad) vf5)
s4-0
)
)
)
;; definition for function target-sidekick-setup
;; WARN: Return type mismatch int vs none.
(defbehavior target-sidekick-setup target ((arg0 symbol))
(if (zero? (-> self sidekick))
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
)
(cond
(arg0
(if (not (-> self sidekick))
(set! (-> self sidekick) (process-spawn sidekick :init init-sidekick :from *16k-dead-pool* :to self))
)
)
((-> self sidekick)
(deactivate (-> self sidekick 0))
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
)
)
0
(none)
)
;; failed to figure out what this is:
(defstate sidekick-clone (sidekick)
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(local-vars (v0-0 object))
(case event-type
(('matrix)
(case (-> event param 0)
(('play-anim)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset)))
)
(('copy-parent)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
)
(('root)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
)
(('indax)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-transformq+trans!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control trans))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2)
(the-as basic (-> self parent-override 0 control cspace-offset))
)
)
(('board)
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace-normalized!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 node-list data 25))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) #f)
)
(else
(set! v0-0 (-> self node-list data))
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+transformq!)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param1)
(the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent))
)
(set! (-> (the-as (inline-array cspace) v0-0) 0 param2) (the-as basic (-> self offset)))
)
)
v0-0
)
(('shadow)
(set! v0-0 (-> event param 0))
(set! (-> self shadow-in-movie?) (the-as symbol v0-0))
v0-0
)
(('blend-shape)
(cond
((-> event param 0)
(set! v0-0 (logior (-> self skel status) (joint-control-status blend-shape)))
(set! (-> self skel status) (the-as joint-control-status v0-0))
)
(else
(set! v0-0 (logclear (-> self skel status) (joint-control-status blend-shape)))
(set! (-> self skel status) (the-as joint-control-status v0-0))
)
)
v0-0
)
)
)
:code (the-as (function none :behavior sidekick) looping-code)
:post (behavior ()
(let ((v1-0 (-> self parent-override)))
(when (not (and (-> (if v1-0
(-> v1-0 0 self-override)
)
next-state
)
(let ((v1-4 (-> self parent-override)))
(= (-> (if v1-4
(-> v1-4 0 self-override)
)
next-state
name
)
'process-drawable-art-error
)
)
)
)
(quaternion-rotate-y!
(-> self root quat)
(-> self parent-override 0 control quat)
(-> self parent-override 0 upper-body twist z)
)
(set! (-> self anim-seed) (-> self parent-override 0 anim-seed))
(set! (-> self draw status) (-> self parent-override 0 draw status))
(logclear! (-> self draw status) (draw-control-status no-draw-bounds2))
(let ((gp-0 0))
(cond
((and (not (logtest? (-> self parent-override 0 focus-status) (focus-status edge-grab)))
(> (-> self parent-override 0 skel float-channels) 0)
)
(let ((gp-1 (-> self skel)))
(joint-control-copy! gp-1 (-> self parent-override 0 skel))
(set! (-> gp-1 root-channel)
(the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels)))
)
(dotimes (s5-0 (the-as int (-> self parent-override 0 skel float-channels)))
(let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels)))))
(mem-copy!
(the-as pointer s4-0)
(the-as
pointer
(-> self parent-override 0 skel channel (+ s5-0 (-> self parent-override 0 skel active-channels)))
)
64
)
(set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1))
(set! (-> s4-0 command) (joint-control-command blend))
)
)
(dotimes (v1-58 (the-as int (-> gp-1 allocated-length)))
(set! (-> gp-1 channel v1-58 parent) gp-1)
)
(+! (-> gp-1 active-channels) (-> self parent-override 0 skel float-channels))
(set! (-> gp-1 float-channels) (the-as uint 0))
)
(set! gp-0 1)
)
(else
(joint-control-copy! (-> self skel) (-> self parent-override 0 skel))
)
)
(joint-control-remap!
(-> self skel)
(-> self draw art-group)
(-> self parent-override 0 draw art-group)
*sidekick-remap*
(the-as int (-> self anim-seed))
""
)
(cond
((zero? gp-0)
(set! (-> self skel effect channel-offset) (-> self parent-override 0 skel effect channel-offset))
)
((= gp-0 1)
(set! (-> self skel effect channel-offset) 0)
0
)
)
)
(let ((v1-85 (-> self parent-override 0 draw color-mult quad)))
(set! (-> self draw color-mult quad) v1-85)
)
(let ((v1-89 (-> self parent-override 0 draw color-emissive quad)))
(set! (-> self draw color-emissive quad) v1-89)
)
(set! (-> self draw force-fade) (-> self parent-override 0 draw force-fade))
(set! (-> self draw death-vertex-skip) (-> self parent-override 0 draw death-vertex-skip))
(set! (-> self draw death-effect) (-> self parent-override 0 draw death-effect))
(set! (-> self draw death-timer) (-> self parent-override 0 draw death-timer))
(set! (-> self draw death-timer-org) (-> self parent-override 0 draw death-timer-org))
(set! (-> self draw death-draw-overlap) (-> self parent-override 0 draw death-draw-overlap))
(quaternion-copy! (-> self offset quat) (-> self root quat))
(let ((f0-3 (* (-> self parent-override 0 darkjak-interp) (-> self parent-override 0 darkjak-giant-interp))))
(set! (-> self offset trans x) (* 286.72 f0-3))
(set! (-> self offset trans y) (* 204.8 f0-3))
(set! (-> self offset trans z) (* 409.6 f0-3))
)
(joint-control-method-10 (-> self skel))
(when *debug-segment*
(let ((gp-2 (-> *display* frames (-> *display* on-screen) profile-array data 0))
(v1-132 'target-post)
(s5-1 *profile-target-post-color*)
)
(when (and *dproc* *debug-segment*)
(let ((s4-1 (-> gp-2 data (-> gp-2 count))))
(let ((s3-0 (-> gp-2 base-time)))
(set! (-> s4-1 name) v1-132)
(set! (-> s4-1 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0))))
)
(set! (-> s4-1 depth) (the-as uint (-> gp-2 depth)))
(set! (-> s4-1 color) s5-1)
(set! (-> gp-2 segment (-> gp-2 depth)) s4-1)
)
(+! (-> gp-2 count) 1)
(+! (-> gp-2 depth) 1)
(set! (-> gp-2 max-depth) (max (-> gp-2 max-depth) (-> gp-2 depth)))
)
)
0
)
(draw-control-method-14 (-> self draw) (-> self node-list) (-> self skel))
(when *debug-segment*
(let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
(when (and *dproc* *debug-segment*)
(let* ((v1-158 (+ (-> gp-3 depth) -1))
(s5-2 (-> gp-3 segment v1-158))
(s4-2 (-> gp-3 base-time))
)
(when (>= v1-158 0)
(set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2))))
(+! (-> gp-3 depth) -1)
)
)
)
)
0
)
)
)
(when *display-sidekick-stats*
(format *stdcon* "~%")
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
(add-debug-sphere
*display-sidekick-stats*
(bucket-id debug-no-zbuf1)
(-> self parent-override 0 control unknown-cspacei1un23i1 parent bone transform trans)
(meters 0.1)
(new 'static 'rgba :g #xff :a #x80)
)
(add-debug-sphere
*display-sidekick-stats*
(bucket-id debug-no-zbuf1)
(-> self node-list data 3 bone transform trans)
(meters 0.1)
(new 'static 'rgba :r #xff :g #xff :a #x80)
)
(add-debug-sphere
*display-sidekick-stats*
(bucket-id debug-no-zbuf1)
(-> self node-list data 0 bone transform trans)
(meters 0.1)
(new 'static 'rgba :r #xff :a #x80)
)
(add-debug-matrix
*display-sidekick-stats*
(bucket-id debug-no-zbuf1)
(-> self node-list data 0 bone transform)
(meters 2)
)
)
(set! (-> self draw shadow)
(the-as shadow-geo (if (or (and (movie?) (-> self shadow-in-movie?))
(logtest? (focus-status indax) (-> self parent-override 0 focus-status))
)
(-> self draw art-group data 3)
)
)
)
(let ((a0-53 (-> self skel effect)))
(if a0-53
(effect-control-method-9 a0-53)
)
)
(if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid))
(merc-blend-shape self)
)
(if (logtest? (-> self skel status) (joint-control-status eye-anim-valid eye-anim))
(merc-eye-anim self)
)
(when (!= (not (-> *setting-control* user-current mirror)) (not (-> self mirror)))
(cond
((-> self mirror)
(deactivate (-> self mirror 0))
(set! (-> self mirror) (the-as (pointer process-drawable) #f))
)
(else
(let* ((s5-3 (get-process *default-dead-pool* manipy #x4000))
(gp-4
(when s5-3
(let ((t9-22 (method-of-type manipy activate)))
(t9-22 (the-as manipy s5-3) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
)
(let ((gp-5 run-function-in-process)
(s4-3 s5-3)
(s3-1 manipy-init)
(s2-0 (-> self root trans))
(s1-0 (-> self entity))
(t0-4 (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f)))
(t1-1 #f)
)
0
((the-as (function object object object object object object none) gp-5) s4-3 s3-1 s2-0 s1-0 t0-4 t1-1)
)
(the-as (pointer process-drawable) (-> s5-3 ppointer))
)
)
)
(send-event (ppointer->process gp-4) 'anim-mode 'mirror)
(send-event (ppointer->process gp-4) 'mirror #t)
(set! (-> self mirror) gp-4)
(let ((v0-29 (-> gp-4 0 node-list data)))
(set! (-> v0-29 0 param0) cspace<-cspace!)
(set! (-> v0-29 0 param1) (the-as basic (-> self node-list data)))
(set! (-> v0-29 0 param2) #f)
)
)
)
)
)
(none)
)
)
;; definition for function init-sidekick
;; WARN: Return type mismatch object vs none.
(defbehavior init-sidekick sidekick ()
(set! (-> self mask) (logior (process-mask sidekick) (-> self mask)))
(set! (-> self root) (new 'process 'trsqv))
(vector-identity! (-> self root scale))
(quaternion-identity! (-> self root quat))
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> self draw shadow-ctrl) *target-shadow-control*)
(logior! (-> self skel status) (joint-control-status sync-math blend-shape eye-anim))
(set! (-> self draw light-index) (the-as uint 30))
(let ((v1-14 (-> self node-list data)))
(set! (-> v1-14 0 param0) cspace<-cspace+transformq!)
(set! (-> v1-14 0 param1) (the-as basic (-> self parent-override 0 control unknown-cspacei1un23i1 parent)))
(set! (-> v1-14 0 param2) (the-as basic (-> self offset)))
)
(set! (-> self shadow-in-movie?) #t)
(set! (-> self mirror) (the-as (pointer process-drawable) #f))
(go sidekick-clone)
(none)
)
+6 -6
View File
@@ -84,7 +84,7 @@
(set! (-> s5-0 0 quad) (-> self control unknown-sphere-array00 2 prim-core world-sphere quad))
(set! (-> s5-0 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-0 0.0 1.0))
(let ((v1-17 gp-0))
(set! (-> v1-17 spheres) s5-0)
(set! (-> v1-17 best-dist) (the-as float s5-0))
(set! (-> v1-17 num-spheres) (the-as uint 1))
(set! (-> v1-17 collide-with) (-> self control root-prim prim-core collide-with))
(set! (-> v1-17 ignore-process0) #f)
@@ -368,7 +368,7 @@
)
(set! (-> s5-1 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
(let ((v1-64 gp-5))
(set! (-> v1-64 spheres) s5-1)
(set! (-> v1-64 best-dist) (the-as float s5-1))
(set! (-> v1-64 num-spheres) (the-as uint 1))
(set! (-> v1-64 collide-with) (-> self control root-prim prim-core collide-with))
(set! (-> v1-64 ignore-process0) #f)
@@ -557,7 +557,7 @@
(none)
)
:trans (behavior ()
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (logtest? (-> self control status) (collide-status on-surface))
(go target-carry-hit-ground #f)
)
(let* ((f0-0 (target-move-dist (-> *TARGET-bank* stuck-time)))
@@ -576,7 +576,7 @@
)
#t
)
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(go target-carry-hit-ground 'stuck)
)
)
@@ -682,7 +682,7 @@
(set! (-> self state-time) (-> self clock frame-counter))
(sound-play "jump" :vol 70)
(init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-surface00) *carry-jump-mods*)
(set! (-> self control unknown-float36)
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float05)))))
@@ -784,7 +784,7 @@
)
(set! (-> s5-0 0 quad) (-> s4-0 root-prim prim-core world-sphere quad))
(let ((v1-38 gp-3))
(set! (-> v1-38 spheres) s5-0)
(set! (-> v1-38 best-dist) (the-as float s5-0))
(set! (-> v1-38 num-spheres) (the-as uint 1))
(set! (-> v1-38 collide-with) (-> self control root-prim prim-core collide-with))
(set! (-> v1-38 ignore-process0) #f)
+16 -16
View File
@@ -107,7 +107,7 @@
(let ((a1-1 'eco-red))
(target-danger-set! (-> self control unknown-symbol04) a1-1)
)
(collide-shape-method-46 (-> self control))
(update-transforms (-> self control))
(let ((a1-2 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-2 options) (overlaps-others-options))
(set! (-> a1-2 collide-with-filter) (the-as collide-spec -1))
@@ -115,7 +115,7 @@
(find-overlapping-shapes (-> self control) a1-2)
)
(target-danger-set! (-> self control unknown-symbol04) #f)
(collide-shape-method-46 (-> self control))
(update-transforms (-> self control))
(if (and (or (>= (- (-> self clock frame-counter) (-> (the-as fact-info-target (-> self fact-override)) darkjak-start-time))
(-> (the-as fact-info-target (-> self fact-override)) darkjak-effect-time)
)
@@ -339,7 +339,7 @@
(set-setting! 'bg-b 'abs #x3dcccccd 0)
(set-forward-vel 0.0)
(let ((s5-0 0))
(while (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(while (not (logtest? (-> self control status) (collide-status on-surface)))
(target-falling-anim-trans)
(+! s5-0 (- (-> self clock frame-counter) (-> self clock old-frame-counter)))
(if (>= s5-0 300)
@@ -476,7 +476,7 @@
(not (and v1-10 (= v1-10 (-> self draw art-group data 412))))
)
(let ((gp-0 0))
(while (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(while (not (logtest? (-> self control status) (collide-status on-surface)))
(target-falling-anim-trans)
(+! gp-0 (- (-> self clock frame-counter) (-> self clock old-frame-counter)))
(if (>= gp-0 300)
@@ -489,7 +489,7 @@
)
)
(cond
((logtest? (-> self control status) (cshape-moving-flags on-water))
((logtest? (-> self control status) (collide-status on-water))
)
(else
(let ((v1-30 (ja-group)))
@@ -771,7 +771,7 @@
(when (not (ja-min? 0))
(cond
((and (>= (ja-frame-num 0) 20.0)
(and (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(and (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -864,7 +864,7 @@
(let ((gp-1 (new-stack-vector0)))
(vector-matrix*! gp-1 (-> self control transv) (-> self control unknown-matrix00))
(set! (-> gp-1 y) 0.0)
(vector-matrix*! (-> self control unknown-vector44) gp-1 (-> self control unknown-matrix01))
(vector-matrix*! (-> self control align-xz-vel) gp-1 (-> self control unknown-matrix01))
)
(when (!= (the-as float (-> self control unknown-word04)) 0.0)
(activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock))
@@ -989,11 +989,11 @@
(set! (-> *run-attack-mods* turnvv) 0.0)
)
(if (< 2 sv-24)
(set! sv-20 (* sv-20 (fmin 1.0 (-> self control unknown-float44))))
(set! sv-20 (* sv-20 (fmin 1.0 (-> self control zx-vel-frac))))
)
(set! sv-24 (+ sv-24 1))
)
(if (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(if (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -1049,7 +1049,7 @@
(seek! (-> (the-as (pointer float) arg0) 0) arg1 (* 4.0 (-> self clock seconds-per-frame)))
(set! (-> self control unknown-float40) (-> (the-as (pointer float) arg0) 0))
(target-danger-set! 'bomb #f)
(collide-shape-method-46 (-> self control))
(update-transforms (-> self control))
(let ((a1-2 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-2 options) (overlaps-others-options))
(set! (-> a1-2 collide-with-filter) (the-as collide-spec -1))
@@ -1058,7 +1058,7 @@
)
(set! (-> self control unknown-float40) 0.0)
(target-danger-set! 'bomb #f)
(collide-shape-method-46 (-> self control))
(update-transforms (-> self control))
0
(none)
)
@@ -1208,7 +1208,7 @@
)
(suspend)
(ja :num! (seek! max (lerp-scale 1.5 0.3 f30-0 30.0 210.0)))
(set! v1-100 (or (ja-done? 0) (logtest? (-> self control status) (cshape-moving-flags on-surface))))
(set! v1-100 (or (ja-done? 0) (logtest? (-> self control status) (collide-status on-surface))))
)
)
(logclear! (-> self state-flags) (state-flags sf6))
@@ -1502,7 +1502,7 @@
(suspend)
(ja :num! (seek! (ja-aframe 90.0 0)))
)
(logior! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logior! (-> self control status) (collide-status on-surface on-ground touch-surface))
(send-event (handle->process (-> self notify)) 'notify 'attack 16)
(go target-darkjak-get-off)
(none)
@@ -1642,7 +1642,7 @@
:enter (-> target-attack-uppercut-jump enter)
:exit (-> target-darkjak-bomb0 exit)
:trans (behavior ()
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (logtest? (-> self control status) (collide-status on-surface))
(go target-hit-ground #f)
)
(mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv))
@@ -1845,7 +1845,7 @@
327680.0
)
)
(set! sv-40 (spatial-hash-method-36 *actor-hash* sv-56 (-> sv-32 data) (-> sv-32 allocated-length)))
(set! sv-40 (fill-actor-list-for-sphere *actor-hash* sv-56 (-> sv-32 data) (-> sv-32 allocated-length)))
(set! (-> sv-32 length) sv-40)
(countdown (s5-0 sv-40)
(let* ((s4-0 (-> sv-32 s5-0 process))
@@ -2002,7 +2002,7 @@
(set! (-> s5-1 0 y) (+ 12697.6 (-> s5-1 0 y)))
(set! (-> s5-1 0 r) 11878.4)
(let ((v1-29 gp-1))
(set! (-> v1-29 spheres) s5-1)
(set! (-> v1-29 best-dist) (the-as float s5-1))
(set! (-> v1-29 num-spheres) (the-as uint 1))
(set! (-> v1-29 collide-with) (logclear
(-> self control root-prim prim-core collide-with)
+9 -9
View File
@@ -1180,7 +1180,7 @@
)
(set! (-> s3-0 w) (* 0.5 (vector-vector-distance gp-0 s5-0)))
(set! (-> s4-1 length)
(spatial-hash-method-36 *actor-hash* (the-as sphere s3-0) (-> s4-1 data) (-> s4-1 allocated-length))
(fill-actor-list-for-sphere *actor-hash* (the-as sphere s3-0) (-> s4-1 data) (-> s4-1 allocated-length))
)
)
)
@@ -1200,7 +1200,7 @@
(let ((gp-0 (the-as basic #f)))
(when (and (or (< (- (-> self clock frame-counter) (-> self control unknown-time-frame29)) (seconds 0.2))
(and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(or (logtest? (surface-flag gun-direct) (-> self control unknown-surface01 flags))
(= (-> self gun gun-type) (pickup-type eco-dark))
@@ -1226,7 +1226,7 @@
)
)
((or (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(logtest? (surface-flag gun-direct) (-> self control unknown-surface01 flags))
)
@@ -1314,7 +1314,7 @@
)
)
(and (or (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(logtest? (surface-flag gun-direct) (-> self control unknown-surface01 flags))
)
@@ -1660,9 +1660,9 @@
)
((= (-> self control unknown-symbol00) 'gun)
(cond
((or (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
((or (and (not (logtest? (-> self control status) (collide-status on-surface)))
(or (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(< 2048.0 (target-height-above-ground))
)
@@ -1687,7 +1687,7 @@
(set! (-> s5-2 0 quad) (-> self control unknown-sphere-array00 2 prim-core world-sphere quad))
(set! (-> s5-2 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-1 0.0 1.0))
(let ((v1-212 gp-3))
(set! (-> v1-212 spheres) s5-2)
(set! (-> v1-212 best-dist) (the-as float s5-2))
(set! (-> v1-212 num-spheres) (the-as uint 1))
(set! (-> v1-212 collide-with) (-> self control root-prim prim-core collide-with))
(set! (-> v1-212 ignore-process0) #f)
@@ -1845,7 +1845,7 @@
(set! (-> self gun upper-body twist-speed-x) 0.6)
)
((and (or (and (logtest? (-> self control unknown-surface00 flags) (surface-flag air))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
(zero? (logand (-> self control status) (collide-status on-surface)))
)
(logtest? (surface-flag gun-direct) (-> self control unknown-surface01 flags))
)
@@ -2922,7 +2922,7 @@
(set! (-> a2-1 ignore-process1) #f)
(set! (-> a2-1 ignore-pat) (-> v1-33 pat-ignore-mask))
(set! (-> a2-1 action-mask) (collide-action solid))
(collide-shape-method-32 v1-33 (-> v1-33 transv) a2-1 (meters 1))
(fill-cache-integrate-and-collide v1-33 (-> v1-33 transv) a2-1 (meters 1))
)
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
(>= (vector-dot
+8 -8
View File
@@ -372,7 +372,7 @@
(seek! (-> self control unknown-float001) -6144.0 (* 4096.0 (-> self clock seconds-per-frame)))
(seek! (-> self control unknown-float001) 0.0 (* 2048.0 (-> self clock seconds-per-frame)))
)
(set! (-> self control unknown-vector04 y) (-> self control unknown-float001))
(set! (-> self control draw-offset y) (-> self control unknown-float001))
)
;; failed to figure out what this is:
@@ -420,8 +420,8 @@
)
:trans (behavior ()
((-> self state-hook))
(if (and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
(if (and (logtest? (-> self control status) (collide-status on-surface))
(zero? (logand (-> self control status) (collide-status on-water)))
)
(set-zero! (-> self water bob))
)
@@ -543,8 +543,8 @@
:exit (-> target-swim-stance exit)
:trans (behavior ()
((-> self state-hook))
(if (and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
(if (and (logtest? (-> self control status) (collide-status on-surface))
(zero? (logand (-> self control status) (collide-status on-water)))
)
(set-zero! (-> self water bob))
)
@@ -843,7 +843,7 @@
(go target-swim-up)
)
(if (or (>= (- (-> self clock frame-counter) (-> self control unknown-time-frame27)) s5-0)
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(and (logtest? (-> self control status) (collide-status on-surface))
(and (< (-> self water swim-depth) 8192.0) (>= (- (-> self clock frame-counter) (-> self state-time)) gp-0))
)
)
@@ -923,7 +923,7 @@
)
(if (and (cpad-pressed? (-> self control cpad number) circle square)
(or (< (- (-> self clock frame-counter) (-> self control unknown-time-frame27)) (seconds 10))
(logtest? (-> self control status) (cshape-moving-flags t-ceil))
(logtest? (-> self control status) (collide-status touch-ceiling))
)
(and (< (-> *TARGET-bank* min-dive-depth) (target-height-above-ground))
(>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05))
@@ -1031,7 +1031,7 @@
(cond
((< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
(set! (-> self water flags) (logior (water-flags jump-out) (-> self water flags)))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
)
(else
(set! (-> self trans-hook) (-> target-jump trans))
+26 -26
View File
@@ -816,7 +816,7 @@
(logior! (-> self control penetrate-using) (penetrate touch board))
)
((= arg0 'racer)
(set! (-> gp-0 unknown-vector04 y) 4096.0)
(set! (-> gp-0 draw-offset y) 4096.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(new 'static 'vector :y 8192.0 :w 1.0)
@@ -849,7 +849,7 @@
(logior! (-> self control penetrate-using) (penetrate touch mech))
)
((= arg0 'mech-carry)
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(new 'static 'vector :y 12288.0 :w 1.0)
@@ -868,7 +868,7 @@
((= arg0 'duck)
(set! (-> self control unknown-float31) arg1)
(let ((f30-1 (- 1.0 arg1)))
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -908,7 +908,7 @@
)
((= arg0 'indax)
(let ((f30-2 0.2))
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -943,7 +943,7 @@
((= arg0 'tube)
(set! (-> self control unknown-float31) arg1)
(let ((f30-3 (- 1.0 arg1)))
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -974,7 +974,7 @@
(logior! (-> self control penetrate-using) (penetrate touch tube))
)
((= arg0 'carry)
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -1004,7 +1004,7 @@
)
((= arg0 'gun)
(set! (-> self control unknown-float31) arg1)
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -1058,7 +1058,7 @@
)
(else
(set! (-> self control unknown-float31) 0.0)
(set! (-> gp-0 unknown-vector04 y) 0.0)
(set! (-> gp-0 draw-offset y) 0.0)
(sphere<-vector+r!
(the-as sphere (-> gp-0 root-prim local-sphere))
(-> *TARGET-bank* root-offset)
@@ -1233,10 +1233,10 @@
(>= (- (-> *display* game-clock frame-counter) (the-as int (-> self game kiosk-timeout))) (seconds 60))
)
(and (>= (- (-> self clock frame-counter) (-> self ambient-time)) (seconds 30))
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
(logtest? (-> self control status) (cshape-moving-flags on-surface))
(not (logtest? (-> self control status) (collide-status touch-actor)))
(logtest? (-> self control status) (collide-status on-surface))
(not (or (logtest? (water-flags touch-water) (-> self water flags))
(logtest? (-> self control status) (cshape-moving-flags on-water))
(logtest? (-> self control status) (collide-status on-water))
)
)
(zero? (logand (focus-status dead hit grabbed in-head edge-grab pole flut tube board mech dark indax teleporting)
@@ -1275,11 +1275,11 @@
;; definition for function can-jump?
(defbehavior can-jump? target ((arg0 symbol))
(and (or (logtest? (-> self control status) (cshape-moving-flags on-surface))
(and (or (logtest? (-> self control status) (collide-status on-surface))
(< (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(and (logtest? (-> self control status) (collide-status on-surface))
(< 0.866 (-> self control surface-angle))
)
(and (= arg0 'board)
@@ -1315,7 +1315,7 @@
;; definition for function jump-hit-ground-stuck?
(defbehavior jump-hit-ground-stuck? target ()
(or (logtest? (-> self control status) (cshape-moving-flags on-surface))
(or (logtest? (-> self control status) (collide-status on-surface))
(when (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
(not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2)))
)
@@ -1344,7 +1344,7 @@
;; definition for function fall-test
;; WARN: Return type mismatch object vs none.
(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float))
(when (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(when (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -1364,11 +1364,11 @@
;; definition for function slide-down-test
;; WARN: Return type mismatch object vs none.
(defbehavior slide-down-test target ()
(if (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface csmf07)))
(if (and (not (logtest? (-> self control status) (collide-status on-surface touch-edge)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
(logtest? (-> self control status) (cshape-moving-flags t-surface))
(logtest? (-> self control status) (collide-status touch-surface))
(< 0.5 (-> self control surface-angle))
)
(go target-slide-down)
@@ -1380,16 +1380,16 @@
(defbehavior smack-surface? target ((arg0 symbol))
(and (< 0.7 (-> self control touch-angle))
(and (< (-> self control surface-angle) 0.3)
(logtest? (-> self control status) (cshape-moving-flags t-wall))
(or arg0 (zero? (logand (-> self control status) (cshape-moving-flags t-act))))
(logtest? (-> self control status) (collide-status touch-wall))
(or arg0 (zero? (logand (-> self control status) (collide-status touch-actor))))
)
)
)
;; definition for function can-roll?
(defbehavior can-roll? target ()
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(or (not (logtest? (-> self control status) (cshape-moving-flags t-wall)))
(and (logtest? (-> self control status) (collide-status on-surface))
(or (not (logtest? (-> self control status) (collide-status touch-wall)))
(>= 0.7 (-> self control touch-angle))
)
(< (-> self control unknown-float17) 0.7)
@@ -1410,7 +1410,7 @@
;; definition for function can-duck?
(defbehavior can-duck? target ()
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(and (logtest? (-> self control status) (collide-status on-surface))
(>= (-> self control unknown-float0000) 0.7)
(not (logtest? (water-flags under-water swimming) (-> self water flags)))
(not (logtest? (-> self state-flags) (state-flags sf9)))
@@ -1435,7 +1435,7 @@
(set! (-> s4-0 1 y) (+ 2867.2 (-> *TARGET-bank* body-radius) (-> s4-0 1 y)))
(set! (-> s4-0 1 r) (-> *TARGET-bank* body-radius))
(let ((v1-12 gp-0))
(set! (-> v1-12 spheres) s4-0)
(set! (-> v1-12 best-dist) (the-as float s4-0))
(set! (-> v1-12 num-spheres) (the-as uint 2))
(set! (-> v1-12 collide-with) (logclear
(-> arg0 control root-prim prim-core collide-with)
@@ -1605,7 +1605,7 @@
(set! (-> arg1 control unknown-time-frame25) arg0)
)
)
(collide-shape-method-49 (-> arg1 control) 2 #x8000 0)
(modify-collide-as! (-> arg1 control) 2 (collide-spec jak-vulnerable) (collide-spec))
(logior! (-> arg1 focus-status) (focus-status ignore))
0
(none)
@@ -1630,7 +1630,7 @@
)
(when (not (logtest? (state-flags tinvul1 tinvul2) (-> arg0 state-flags)))
(logclear! (-> arg0 draw status) (draw-control-status no-draw-bounds))
(collide-shape-method-49 (-> arg0 control) 2 0 #x8000)
(modify-collide-as! (-> arg0 control) 2 (collide-spec) (collide-spec jak-vulnerable))
)
0
(none)
@@ -2115,7 +2115,7 @@
)
)
((= arg0 7)
(-> v1-0 unknown-vector23)
(-> v1-0 last-trans-on-surf)
)
((= arg0 8)
(-> v1-0 unknown-vector42)
+41 -43
View File
@@ -10,7 +10,7 @@
(if (and (cpad-pressed? (-> self control cpad number) circle) (can-feet? #f))
(go target-attack-air #f)
)
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (logtest? (-> self control status) (collide-status on-surface))
(go target-hit-ground #f)
)
(when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
@@ -20,7 +20,7 @@
)
#t
)
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(go target-hit-ground 'stuck)
)
(if (!= (-> self state-time) (-> self clock frame-counter))
@@ -290,7 +290,7 @@
(if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t))
(go target-running-attack)
)
(if (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(if (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06)) (seconds 0.08))
)
(go target-falling #f)
@@ -332,12 +332,12 @@
(none)
)
:trans (behavior ()
(when (or (logtest? (-> self control status) (cshape-moving-flags on-surface))
(when (or (logtest? (-> self control status) (collide-status on-surface))
(if (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
#t
)
)
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(if (using-gun? self)
(go target-stance)
(go target-duck-stance #f)
@@ -461,7 +461,7 @@
(none)
)
:trans (behavior ()
(if (and (or (and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (and (or (and (logtest? (-> self control status) (collide-status on-surface))
(and (< 0.9 (-> self control surface-angle))
(!= (-> self control cur-pat material) 14)
(!= (-> self control cur-pat event) 7)
@@ -523,7 +523,7 @@
(go target-running-attack)
)
(when (= (-> self control unknown-float15) 0.0)
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(if (using-gun? self)
(go target-stance)
(go target-duck-stance #f)
@@ -582,7 +582,7 @@
(set! arg0 (* arg0 (-> self darkjak-giant-interp)))
(set! arg1 (* arg1 (-> self darkjak-giant-interp)))
)
(logclear! (-> self control status) (cshape-moving-flags csmf14))
(logclear! (-> self control status) (collide-status touch-ceiling-sticky))
(set! (-> self control unknown-time-frame19) (-> self clock frame-counter))
(delete-back-vel)
(let* ((f0-4 arg5)
@@ -717,11 +717,11 @@
)
(set! (-> v1-62 y) (* 0.5 (-> v1-62 y)))
)
(set! v0-1 (-> self control unknown-vector06))
(set! v0-1 (-> self control anim-collide-offset-local))
(set! (-> v0-1 quad) (-> v1-62 quad))
)
(else
(set! v0-1 (-> self control unknown-vector06))
(set! v0-1 (-> self control anim-collide-offset-local))
(set! (-> v0-1 quad) (the-as uint128 0))
)
)
@@ -1115,7 +1115,7 @@
(set! (-> self state-time) (-> self clock frame-counter))
(sound-play "jump" :vol 70)
(init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! arg2 (cond
(arg2
(empty)
@@ -1404,7 +1404,7 @@
)
(set! (-> self state-time) (-> self clock frame-counter))
(init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(if (!= (-> self control unknown-surface00) *slide-jump-mods*)
(set! (-> self control unknown-surface00) *double-jump-mods*)
)
@@ -1544,7 +1544,7 @@
(go target-duck-high-jump arg0 arg1 (the-as symbol arg2))
)
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(sound-play "jump" :pitch 0.3)
(init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0)
(set! (-> self control unknown-surface00) (cond
@@ -1622,7 +1622,7 @@
:event target-standard-event-handler
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-surface00) *turn-around-mods*)
(case arg2
(('launch)
@@ -1677,7 +1677,7 @@
(set! (-> self state-time) (-> self clock frame-counter))
(sound-play "jump" :vol 80 :pitch -0.4)
(init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(cond
((= arg2 'launch)
(set! (-> self neck flex-blend) 0.0)
@@ -1891,9 +1891,7 @@
)
)
)
(if (and (< (-> *TARGET-bank* fall-far) f0-2)
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
)
(if (and (< (-> *TARGET-bank* fall-far) f0-2) (zero? (logand (-> self control status) (collide-status on-water))))
(go target-hit-ground-hard f0-2)
)
)
@@ -2501,7 +2499,7 @@
(when (!= (-> self state-time) (-> self clock frame-counter))
(when (and (or (smack-surface? #t)
(and (>= (-> self control unknown-float19) 0.7)
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
(zero? (logand (-> self control status) (collide-status touch-actor)))
)
)
(begin
@@ -2652,7 +2650,7 @@
(when (not (ja-min? 0))
(cond
((and (>= (ja-aframe-num 0) 20.0)
(and (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(and (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -2697,7 +2695,7 @@
(let ((s5-1 (new-stack-vector0)))
(vector-matrix*! s5-1 (-> self control transv) (-> self control unknown-matrix00))
(set! (-> s5-1 y) 0.0)
(vector-matrix*! (-> self control unknown-vector44) s5-1 (-> self control unknown-matrix01))
(vector-matrix*! (-> self control align-xz-vel) s5-1 (-> self control unknown-matrix01))
)
(when (!= (the-as float (-> self control unknown-word04)) 0.0)
(activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock))
@@ -2800,12 +2798,12 @@
(set! (-> *run-attack-mods* turnvv) 0.0)
)
(if (< 2 gp-2)
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control unknown-float44))))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac))))
)
(+! gp-2 1)
)
)
(if (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(if (and (not (logtest? (-> self control status) (collide-status on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -2921,7 +2919,7 @@
)
:enter (behavior ((arg0 symbol))
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(target-start-attack)
(target-danger-set! 'spin-air #f)
(set! (-> self control unknown-surface00) *jump-attack-mods*)
@@ -3002,7 +3000,7 @@
(none)
)
:trans (behavior ()
(when (logtest? (-> self control status) (cshape-moving-flags on-surface))
(when (logtest? (-> self control status) (collide-status on-surface))
(set-quaternion! (-> self control) (-> self control dir-targ))
(go target-hit-ground #f)
)
@@ -3276,7 +3274,7 @@
)
(set! (-> self state-time) (-> self clock frame-counter))
(init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0)
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self neck flex-blend) 0.0)
(set! (-> self control unknown-surface00) *uppercut-jump-mods*)
(target-start-attack)
@@ -3289,7 +3287,7 @@
)
:exit target-exit
:trans (behavior ()
(if (logtest? (-> self control status) (cshape-moving-flags on-surface))
(if (logtest? (-> self control status) (collide-status on-surface))
(go target-hit-ground #f)
)
(when (and (cpad-pressed? (-> self control cpad number) square)
@@ -3470,7 +3468,7 @@
(set-forward-vel (-> self control unknown-float05))
)
(set! (-> self state-time) (-> self clock frame-counter))
(logclear! (-> self control status) (cshape-moving-flags on-surface on-ground t-surface))
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
(set! (-> self control unknown-surface00) *flop-mods*)
(set! (-> self neck flex-blend) 0.0)
(set! (-> self control unknown-word04) (the-as uint 0))
@@ -3513,16 +3511,16 @@
)
:trans (behavior ()
(delete-back-vel)
(let ((gp-1 (logtest? (-> self control status) (cshape-moving-flags on-surface))))
(let ((gp-1 (logtest? (-> self control status) (collide-status on-surface))))
(when (and (not gp-1)
(let ((v1-6 (ja-group)))
(and v1-6 (or (= v1-6 (-> self draw art-group data 53)) (= v1-6 (-> self draw art-group data 55))))
)
)
(when (and (or (< (target-move-dist (seconds 0.1)) 1638.4)
(and (logtest? (-> self control status) (cshape-moving-flags t-wall)) (< 0.7 (-> self control poly-angle)))
(and (logtest? (-> self control status) (collide-status touch-wall)) (< 0.7 (-> self control poly-angle)))
)
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
(not (logtest? (-> self control status) (collide-status touch-actor)))
(>= (the-as uint (-> self control unknown-word04)) (the-as uint 2))
)
(set! (-> self control unknown-time-frame14) (-> self clock frame-counter))
@@ -3530,7 +3528,7 @@
)
)
(when gp-1
(logior! (-> self control status) (cshape-moving-flags on-surface))
(logior! (-> self control status) (collide-status on-surface))
(when (or (and (= (-> (the-as fact-info-target (-> self fact-override)) eco-type) 2)
(>= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 1.0)
)
@@ -3636,11 +3634,11 @@
)
(let ((f30-0 1.0))
(let ((v1-58 (new-stack-vector0)))
(let ((f0-17 (vector-dot (-> self control dynam gravity-normal) (-> self control unknown-vector44))))
(let ((f0-17 (vector-dot (-> self control dynam gravity-normal) (-> self control align-xz-vel))))
0.0
(vector-!
v1-58
(-> self control unknown-vector44)
(-> self control align-xz-vel)
(vector-float*! v1-58 (-> self control dynam gravity-normal) f0-17)
)
)
@@ -3649,8 +3647,8 @@
(f2-0 -368640.0)
)
(vector+!
(-> self control unknown-vector44)
(vector-float*! (-> self control unknown-vector44) (-> self control dynam gravity-normal) f2-0)
(-> self control align-xz-vel)
(vector-float*! (-> self control align-xz-vel) (-> self control dynam gravity-normal) f2-0)
(vector-float*! v1-58 v1-58 (/ f0-18 f1-1))
)
)
@@ -3683,7 +3681,7 @@
(set! (-> gp-1 param 0) 0.0)
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-chan)
)
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control unknown-float44))))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac))))
(let ((v1-77 (new-stack-vector0))
(f0-33 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
)
@@ -3952,13 +3950,13 @@
(let ((s3-2 (new-stack-vector0)))
(vector-matrix*! s3-2 (-> self control transv) (-> self control unknown-matrix00))
(set! (-> s3-2 y) 0.0)
(vector-matrix*! (-> self control unknown-vector44) s3-2 (-> self control unknown-matrix01))
(vector-matrix*! (-> self control align-xz-vel) s3-2 (-> self control unknown-matrix01))
)
)
)
(suspend)
(ja :num! (seek!))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control unknown-float44))))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac))))
)
)
(if (and (or (< (- (-> self clock frame-counter) (the-as time-frame gp-0))
@@ -4105,20 +4103,20 @@
(let ((s4-1 (new-stack-vector0)))
(vector-matrix*! s4-1 (-> self control transv) (-> self control unknown-matrix00))
(set! (-> s4-1 y) 0.0)
(vector-matrix*! (-> self control unknown-vector44) s4-1 (-> self control unknown-matrix01))
(vector-matrix*! (-> self control align-xz-vel) s4-1 (-> self control unknown-matrix01))
)
(suspend)
(ja :num! (seek!))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control unknown-float44))))
(set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac))))
(set! v1-37
(or (ja-max? 0)
(and (>= (ja-aframe-num 0) 4.0) (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(and (>= (ja-aframe-num 0) 4.0) (logtest? (-> self control status) (collide-status on-surface)))
)
)
)
)
(set! (-> self state-time) (-> self clock frame-counter))
(while (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(while (not (logtest? (-> self control status) (collide-status on-surface)))
(when (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.01))
(let ((v1-50 (ja-group)))
(when (not (and v1-50 (= v1-50 (-> self draw art-group data 27))))
+92 -1
View File
@@ -1,5 +1,7 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type battle-info
(deftype battle-info (basic)
((id int8 :offset-assert 4)
(notice-spec uint64 :offset-assert 8)
@@ -23,6 +25,7 @@
:flag-assert #x900000048
)
;; definition for method 3 of type battle-info
(defmethod inspect battle-info ((obj battle-info))
(when (not obj)
(set! obj obj)
@@ -49,6 +52,7 @@
obj
)
;; definition of type battle-ally
(deftype battle-ally (structure)
((entity entity-actor :offset-assert 0)
)
@@ -57,6 +61,7 @@
:flag-assert #x900000004
)
;; definition for method 3 of type battle-ally
(defmethod inspect battle-ally ((obj battle-ally))
(when (not obj)
(set! obj obj)
@@ -68,6 +73,7 @@
obj
)
;; definition of type battle-ally-array
(deftype battle-ally-array (inline-array-class)
((data battle-ally :inline :dynamic :offset-assert 16)
)
@@ -76,6 +82,7 @@
:flag-assert #x900000010
)
;; definition for method 3 of type battle-ally-array
(defmethod inspect battle-ally-array ((obj battle-ally-array))
(when (not obj)
(set! obj obj)
@@ -89,8 +96,10 @@
obj
)
;; failed to figure out what this is:
(set! (-> battle-ally-array heap-base) (the-as uint 16))
;; definition of type battle-breed
(deftype battle-breed (structure)
((breed-type type :offset-assert 0)
(percent float :offset-assert 4)
@@ -100,6 +109,7 @@
:flag-assert #x900000008
)
;; definition for method 3 of type battle-breed
(defmethod inspect battle-breed ((obj battle-breed))
(when (not obj)
(set! obj obj)
@@ -112,6 +122,7 @@
obj
)
;; definition of type battle-breed-array
(deftype battle-breed-array (inline-array-class)
((data battle-breed :inline :dynamic :offset-assert 16)
)
@@ -120,6 +131,7 @@
:flag-assert #x900000010
)
;; definition for method 3 of type battle-breed-array
(defmethod inspect battle-breed-array ((obj battle-breed-array))
(when (not obj)
(set! obj obj)
@@ -133,8 +145,10 @@
obj
)
;; failed to figure out what this is:
(set! (-> battle-breed-array heap-base) (the-as uint 16))
;; definition of type battle-spawner
(deftype battle-spawner (structure)
((flags uint64 :offset-assert 0)
(entity entity-actor :offset-assert 8)
@@ -155,6 +169,7 @@
:flag-assert #x900000050
)
;; definition for method 3 of type battle-spawner
(defmethod inspect battle-spawner ((obj battle-spawner))
(when (not obj)
(set! obj obj)
@@ -178,6 +193,7 @@
obj
)
;; definition of type battle-spawner-array
(deftype battle-spawner-array (inline-array-class)
((data battle-spawner :inline :dynamic :offset-assert 16)
)
@@ -186,6 +202,7 @@
:flag-assert #x900000010
)
;; definition for method 3 of type battle-spawner-array
(defmethod inspect battle-spawner-array ((obj battle-spawner-array))
(when (not obj)
(set! obj obj)
@@ -199,8 +216,10 @@
obj
)
;; failed to figure out what this is:
(set! (-> battle-spawner-array heap-base) (the-as uint 80))
;; definition of type battle
(deftype battle (process-drawable)
((info battle-info :offset-assert 200)
(flags uint8 :offset-assert 204)
@@ -259,6 +278,7 @@
)
)
;; definition for method 3 of type battle
(defmethod inspect battle ((obj battle))
(when (not obj)
(set! obj obj)
@@ -286,6 +306,7 @@
obj
)
;; definition for symbol *battles*, type (array battle-info)
(define *battles* (new 'static 'boxed-array :type battle-info
(new 'static 'battle-info
:notice-spec #x1
@@ -850,6 +871,21 @@
)
)
;; definition for function battle-event-handler
;; WARN: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 13]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 23]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 33]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 37]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 39]
;; WARN: disable def twice: 9. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
;; WARN: disable def twice: 19. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
;; WARN: disable def twice: 29. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 54]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 72]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 103]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 122]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 147]
(defbehavior battle-event-handler battle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
@@ -919,6 +955,9 @@
)
)
;; definition for method 27 of type battle
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-27 battle ((obj battle))
(local-vars (sv-16 string) (sv-32 string))
(let ((s4-0 (-> obj root trans))
@@ -984,6 +1023,8 @@
(none)
)
;; definition for method 26 of type battle
;; INFO: Used lq/sq
(defmethod battle-method-26 battle ((obj battle) (arg0 battle-spawner))
(local-vars (a2-5 float) (a2-12 float))
(rlet ((vf1 :class vf)
@@ -1000,7 +1041,7 @@
)
(set! *actor-list-length* 0)
(if (logtest? s5-0 512)
(set! *actor-list-length* (spatial-hash-method-36 *actor-hash* (the-as sphere gp-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* (the-as sphere gp-0) *actor-list* 256))
)
(when (logtest? s5-0 1024)
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
@@ -1099,6 +1140,7 @@
)
)
;; definition for method 25 of type battle
(defmethod battle-method-25 battle ((obj battle) (arg0 battle-spawner))
(when (not (logtest? (the-as int (-> obj flags)) 8))
(let ((f0-0 (-> obj info spawner-blocked-by-player-xz)))
@@ -1115,12 +1157,14 @@
#f
)
;; definition for method 37 of type battle
(defmethod battle-method-37 battle ((obj battle) (arg0 battle-spawner))
(and (not (handle->process (-> arg0 creature)))
(or (>= (-> arg0 ready-index) 0) (not (battle-method-25 obj arg0)))
)
)
;; definition for method 36 of type battle
(defmethod battle-method-36 battle ((obj battle))
(let ((s5-0 (-> obj spawners length))
(v1-2 (-> obj info pick-logic))
@@ -1168,6 +1212,7 @@
(the-as battle-spawner #f)
)
;; definition for method 41 of type battle
(defmethod battle-method-41 battle ((obj battle) (arg0 battle-spawner))
(let ((f0-0 (rand-vu))
(v1-0 0)
@@ -1186,6 +1231,8 @@
)
)
;; definition for method 38 of type battle
;; WARN: Return type mismatch int vs handle.
(defmethod battle-method-38 battle ((obj battle) (arg0 battle-breed) (arg1 transformq))
(let* ((s3-0 (-> arg0 breed-type))
(s4-0 (get-process *default-dead-pool* s3-0 #x4000))
@@ -1206,6 +1253,8 @@
)
)
;; definition for method 39 of type battle
;; INFO: Used lq/sq
(defmethod battle-method-39 battle ((obj battle) (arg0 battle-spawner) (arg1 symbol))
(with-pp
(let ((s3-0 (new 'stack-no-clear 'vector))
@@ -1268,6 +1317,7 @@
)
)
;; definition for method 30 of type battle
(defmethod battle-method-30 battle ((obj battle) (arg0 process))
(let ((v1-0 (if (type? arg0 nav-enemy)
(the-as nav-enemy arg0)
@@ -1293,6 +1343,7 @@
(the-as battle-spawner #f)
)
;; definition for method 51 of type battle
(defmethod battle-method-51 battle ((obj battle) (arg0 battle-spawner) (arg1 symbol))
(when (and (logtest? (the-as int (-> obj flags)) 2) (zero? (logand (the-as int (-> obj flags)) 4)))
(let ((v1-5 (-> arg0 noticed-attack-time)))
@@ -1343,6 +1394,7 @@
#f
)
;; definition for method 46 of type battle
(defmethod battle-method-46 battle ((obj battle) (arg0 battle-spawner))
(when (-> arg0 intro-path)
(let ((v1-1 (-> arg0 creature-index))
@@ -1353,6 +1405,7 @@
)
)
;; definition for method 43 of type battle
(defmethod battle-method-43 battle ((obj battle) (arg0 battle-spawner) (arg1 touch-tracker))
(let ((s3-0 (+ (-> arg0 creature-index) 1))
(s4-0 (new 'stack-no-clear 'vector))
@@ -1382,6 +1435,7 @@
)
)
;; definition for method 45 of type battle
(defmethod battle-method-45 battle ((obj battle) (arg0 battle-spawner) (arg1 touch-tracker))
(when (logtest? (-> arg0 flags) 1)
(if (-> arg0 intro-path)
@@ -1391,6 +1445,7 @@
)
)
;; definition for method 42 of type battle
(defmethod battle-method-42 battle ((obj battle) (arg0 battle-spawner) (arg1 touch-tracker))
(let ((s5-0 (-> arg0 creature)))
(set! (-> arg0 creature) (the-as handle #f))
@@ -1406,6 +1461,8 @@
)
)
;; definition for method 44 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-44 battle ((obj battle) (arg0 battle-spawner))
(when (= (-> arg0 mode) 2)
(+! (-> arg0 creature-index) 1)
@@ -1416,6 +1473,7 @@
(none)
)
;; definition for method 52 of type battle
(defmethod battle-method-52 battle ((obj battle))
(let ((gp-0 0))
(dotimes (s4-0 (-> obj spawners length))
@@ -1427,6 +1485,8 @@
)
)
;; definition for method 40 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-40 battle ((obj battle))
(set! (-> obj spawn-initial-creatures?) #f)
(let ((s5-0 (-> obj spawners)))
@@ -1447,6 +1507,8 @@
(none)
)
;; definition for method 35 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-35 battle ((obj battle))
(let ((v1-0 (-> obj info)))
(rand-vu-int-range
@@ -1457,6 +1519,7 @@
(none)
)
;; failed to figure out what this is:
(defstate idle (battle)
:virtual #t
:event battle-event-handler
@@ -1495,6 +1558,7 @@
:code (the-as (function none :behavior battle) sleep-code)
)
;; failed to figure out what this is:
(defstate notice (battle)
:virtual #t
:event battle-event-handler
@@ -1530,6 +1594,7 @@
)
)
;; definition for method 49 of type battle
(defmethod battle-method-49 battle ((obj battle))
(let ((v1-0 (-> obj allies))
(gp-0 (-> obj allies length))
@@ -1552,6 +1617,7 @@
)
)
;; definition for method 50 of type battle
(defmethod battle-method-50 battle ((obj battle))
(with-pp
(let ((s5-0 (battle-method-52 obj))
@@ -1626,6 +1692,7 @@
)
)
;; failed to figure out what this is:
(defstate hostile (battle)
:virtual #t
:event battle-event-handler
@@ -1659,6 +1726,7 @@
:code (the-as (function none :behavior battle) sleep-code)
)
;; failed to figure out what this is:
(defstate beaten (battle)
:virtual #t
:event battle-event-handler
@@ -1678,6 +1746,8 @@
:code (the-as (function none :behavior battle) sleep-code)
)
;; definition for method 47 of type battle
;; WARN: Return type mismatch uint8 vs none.
(defmethod battle-method-47 battle ((obj battle))
(let ((a3-0 (-> obj info play-battle-music)))
(when (and a3-0 (zero? (logand (the-as int (-> obj flags)) 16)))
@@ -1695,6 +1765,8 @@
(none)
)
;; definition for method 48 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-48 battle ((obj battle))
(when (logtest? (the-as int (-> obj flags)) 16)
(remove-setting! 'sound-mode)
@@ -1704,6 +1776,7 @@
(none)
)
;; definition for method 7 of type battle-spawner-array
(defmethod relocate battle-spawner-array ((obj battle-spawner-array) (arg0 int))
(dotimes (v1-0 (-> obj length))
(let ((a2-3 (-> obj data v1-0)))
@@ -1716,6 +1789,8 @@
obj
)
;; definition for method 7 of type battle
;; WARN: Return type mismatch process-drawable vs battle.
(defmethod relocate battle ((obj battle) (arg0 int))
(&+! (-> obj spawners) arg0)
(&+! (-> obj allies) arg0)
@@ -1725,6 +1800,9 @@
)
)
;; definition for method 29 of type battle
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-29 battle ((obj battle) (arg0 battle-spawner) (arg1 entity-actor))
(local-vars (sv-16 res-tag) (sv-32 res-tag))
(let ((s2-0 0)
@@ -1809,6 +1887,8 @@
(none)
)
;; definition for method 32 of type battle
;; INFO: Used lq/sq
(defmethod battle-method-32 battle ((obj battle) (arg0 battle-spawner) (arg1 entity-actor))
(local-vars (v0-4 object))
(set! (-> arg0 flags) (the-as uint 0))
@@ -1854,12 +1934,17 @@
v0-4
)
;; definition for method 31 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-31 battle ((obj battle) (arg0 battle-ally) (arg1 entity-actor))
(set! (-> arg0 entity) arg1)
0
(none)
)
;; definition for method 28 of type battle
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-28 battle ((obj battle))
(local-vars (v0-4 battle-ally-array) (sv-16 res-tag) (sv-32 entity-actor))
(set! sv-16 (new 'static 'res-tag))
@@ -1925,6 +2010,8 @@
(none)
)
;; definition for method 33 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-33 battle ((obj battle))
(set! (-> obj spawn-initial-creatures?) #t)
(set! (-> obj count) (the-as uint 0))
@@ -1964,6 +2051,8 @@
(none)
)
;; definition for method 34 of type battle
;; WARN: Return type mismatch int vs none.
(defmethod battle-method-34 battle ((obj battle))
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
(go (method-of-object obj beaten))
@@ -1973,6 +2062,8 @@
(none)
)
;; definition for method 11 of type battle
;; INFO: Used lq/sq
(defmethod init-from-entity! battle ((obj battle) (arg0 entity-actor))
(set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
(let ((s4-0 (new 'process 'trsqv)))
@@ -86,7 +86,7 @@
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set! (-> s5-0 root-prim) s4-0)
)
(collide-shape-method-54 s5-0)
(pusher-init s5-0)
(let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-10 prim-core collide-as) (collide-spec pusher))
(set! (-> v1-10 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list))
+26 -22
View File
@@ -610,8 +610,8 @@
)
)
)
(when (logtest? (-> s5-0 status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-act))
(when (logtest? (-> s5-0 status) (collide-status touch-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-actor))
(set! (-> arg0 hit-actor?) #t)
)
(go (method-of-object arg0 impact))
@@ -624,8 +624,10 @@
;; definition for method 38 of type guard-shot
(defmethod made-impact? guard-shot ((obj guard-shot))
"TODO - queries the collision cache, return true/false"
(let ((v1-0 (-> obj root-override)))
(let ((a0-1 (new 'stack-no-clear 'collide-query)))
(let ((v1-0 (-> obj root-override))
(t1-0 (new 'stack-no-clear 'collide-query))
)
(let ((a0-1 t1-0))
(set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w))
(set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with))
(set! (-> a0-1 ignore-process0) obj)
@@ -633,8 +635,8 @@
(set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask))
(set! (-> a0-1 action-mask) (collide-action solid))
)
(when (collide-shape-moving-method-65 v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0)
(if (logtest? (-> obj root-override status) (cshape-moving-flags t-act))
(when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0)
(if (logtest? (-> obj root-override status) (collide-status touch-actor))
(set! (-> obj hit-actor?) #t)
)
#t
@@ -649,9 +651,11 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as (function control-info collide-query vector vector cshape-moving-flags) cshape-reaction-just-move)
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
@@ -766,7 +770,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) projectile-bounce-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrate-using) (penetrate explode))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core action) (collide-action solid))
@@ -842,10 +848,10 @@
(let* ((a2-0 (-> obj root-override))
(v1-0 (-> a2-0 status))
)
(if (logtest? v1-0 (cshape-moving-flags t-surface))
(if (logtest? v1-0 (collide-status touch-surface))
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.2)
)
(when (and (logtest? v1-0 (cshape-moving-flags csmf11))
(when (and (logtest? v1-0 (collide-status impact-surface))
(>= (- (-> self clock frame-counter) (-> obj played-bounce-time)) (seconds 0.3))
)
(set! (-> obj played-bounce-time) (-> self clock frame-counter))
@@ -1026,10 +1032,10 @@
;; definition for method 38 of type guard-lazer-shot
(defmethod made-impact? guard-lazer-shot ((obj guard-lazer-shot))
"TODO - queries the collision cache, return true/false"
(let ((gp-0 (-> obj root-override)))
(let* ((s5-0 (new 'stack-no-clear 'collide-query))
(v1-0 s5-0)
)
(let ((gp-0 (-> obj root-override))
(s5-0 (new 'stack-no-clear 'collide-query))
)
(let ((v1-0 s5-0))
(set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w))
(set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with))
(set! (-> v1-0 ignore-process0) obj)
@@ -1042,7 +1048,7 @@
(let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3)))
(f0-2 (- (vector-length s4-1)))
)
(collide-shape-moving-method-65 gp-0 s4-1 f0-2 0.0 -3072.0)
(fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0)
)
)
)
@@ -1053,7 +1059,7 @@
;; WARN: Return type mismatch int vs none.
(defun guard-lazer-shot-move ((arg0 guard-lazer-shot))
(projectile-move-fill-line-sphere arg0)
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-surface))
(go (method-of-object arg0 impact))
)
0
@@ -1067,7 +1073,9 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
@@ -1122,7 +1130,3 @@
0
(none)
)
+11 -11
View File
@@ -534,7 +534,7 @@
)
)
)
(if (logtest? (-> s5-0 status) (cshape-moving-flags t-surface))
(if (logtest? (-> s5-0 status) (collide-status touch-surface))
(go (method-of-object arg0 impact))
)
)
@@ -549,9 +549,11 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as (function control-info collide-query vector vector cshape-moving-flags) cshape-reaction-just-move)
(the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move)
)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
@@ -869,7 +871,7 @@
)
(set! (-> v1-1 prim-core collide-as) (collide-spec enemy))
)
(collide-shape-method-46 (-> self root-override))
(update-transforms (-> self root-override))
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-0 options) (overlaps-others-options))
(set! (-> a1-0 collide-with-filter) (the-as collide-spec -1))
@@ -919,7 +921,7 @@
(go (method-of-object arg0 impact))
)
)
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags t-surface))
(if (logtest? (-> arg0 root-override status) (collide-status touch-surface))
(go (method-of-object arg0 impact))
)
0
@@ -955,9 +957,11 @@
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as (function control-info collide-query vector vector cshape-moving-flags) gren-cshape-reaction-canister)
(the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister)
)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 no-reaction) nothing)
(set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec projectile))
@@ -1031,7 +1035,3 @@
(the-as (pointer metalhead-grenade-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*))
)
)
+10
View File
@@ -190,6 +190,16 @@
"(method 18 ocean)",
"check-normals", // ocean-texture
// collide-shape
"(method 18 collide-shape-prim-group)",
"(method 19 collide-shape-prim)",
"(method 36 collide-shape)",
"(method 12 collide-shape-prim-group)",
"(method 13 collide-shape-prim)",
"collide-shape-draw-debug-marks",
"i-hopefully-will-never-exist-dont-add-anything-after-me-please"
],