Files
jak-project/test/decompiler/reference/engine/collide/collide-shape-h_REF.gc
T
water111 b19a2c82f0 [decomp] detect vector-! inlined. (#633)
* fix flipped order

* format

* parser hack

* actually flip

* detect
2021-06-26 22:52:52 -04:00

856 lines
29 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-sticky-rider
(deftype collide-sticky-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)
)
:method-count-assert 10
:size-assert #x20
:flag-assert #xa00000020
(:methods
(set-rider! (_type_ handle) symbol 9)
)
)
;; definition for method 3 of type collide-sticky-rider
(defmethod inspect collide-sticky-rider ((obj collide-sticky-rider))
(format #t "[~8x] ~A~%" obj 'collide-sticky-rider)
(format #t "~Trider-handle: ~D~%" (-> obj rider-handle))
(format #t "~Tsticky-prim: ~A~%" (-> obj sticky-prim))
(format #t "~Tprim-ry: ~f~%" (-> obj prim-ry))
(format #t "~Trider-local-pos: #<vector @ #x~X>~%" (-> obj rider-local-pos))
obj
)
;; definition for method 9 of type collide-sticky-rider
(defmethod
set-rider!
collide-sticky-rider
((obj collide-sticky-rider) (arg0 handle))
(set! (-> obj rider-handle) arg0)
(set! (-> obj sticky-prim) #f)
#f
)
;; definition of type collide-sticky-rider-group
(deftype collide-sticky-rider-group (basic)
((num-riders int32 :offset-assert 4)
(allocated-riders int32 :offset-assert 8)
(rider collide-sticky-rider 1 :inline :offset-assert 16)
)
:method-count-assert 11
:size-assert #x30
:flag-assert #xb00000030
(:methods
(new (symbol type int) _type_ 0)
(dummy-9 () none 9)
(reset! (_type_) int 10)
)
)
;; definition for method 3 of type collide-sticky-rider-group
(defmethod inspect collide-sticky-rider-group ((obj collide-sticky-rider-group))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tnum-riders: ~D~%" (-> obj num-riders))
(format #t "~Tallocated-riders: ~D~%" (-> obj allocated-riders))
(format #t "~Trider[1] @ #x~X~%" (-> obj rider))
obj
)
;; definition for method 10 of type collide-sticky-rider-group
(defmethod reset! collide-sticky-rider-group ((obj collide-sticky-rider-group))
(set! (-> obj num-riders) 0)
0
)
;; definition of type pull-rider-info
(deftype pull-rider-info (structure)
((rider collide-sticky-rider :offset-assert 0)
(rider-cshape basic :offset-assert 4)
(rider-delta-ry float :offset-assert 8)
(rider-dest vector :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
;; definition for method 3 of type pull-rider-info
(defmethod inspect pull-rider-info ((obj pull-rider-info))
(format #t "[~8x] ~A~%" obj 'pull-rider-info)
(format #t "~Trider: #<collide-sticky-rider @ #x~X>~%" (-> obj rider))
(format #t "~Trider-cshape: ~A~%" (-> obj rider-cshape))
(format #t "~Trider-delta-ry: ~f~%" (-> obj rider-delta-ry))
(format #t "~Trider-dest: #<vector @ #x~X>~%" (-> obj rider-dest))
obj
)
;; definition of type collide-shape-intersect
(deftype collide-shape-intersect (basic)
((move-vec vector :inline :offset-assert 16)
(best-u float :offset-assert 32)
(best-tri collide-tri-result :inline :offset-assert 48)
(best-from-prim basic :offset-assert 132)
(best-to-prim basic :offset-assert 136)
)
:method-count-assert 10
:size-assert #x8c
:flag-assert #xa0000008c
(:methods
(dummy-9 () none 9)
)
)
;; definition for method 3 of type collide-shape-intersect
(defmethod inspect collide-shape-intersect ((obj collide-shape-intersect))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tmove-vec: ~`vector`P~%" (-> obj move-vec))
(format #t "~Tbest-u: ~f~%" (-> obj best-u))
(format #t "~Tbest-tri: #<collide-tri-result @ #x~X>~%" (-> obj best-tri))
(format #t "~Tbest-from-prim: ~A~%" (-> obj best-from-prim))
(format #t "~Tbest-to-prim: ~A~%" (-> obj best-to-prim))
obj
)
;; definition of type collide-overlap-result
(deftype collide-overlap-result (structure)
((best-dist float :offset-assert 0)
(best-from-prim basic :offset-assert 4)
(best-to-prim basic :offset-assert 8)
(best-from-tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 10
:size-assert #x64
:flag-assert #xa00000064
(:methods
(reset! (_type_) none 9)
)
)
;; definition for method 3 of type collide-overlap-result
(defmethod inspect collide-overlap-result ((obj collide-overlap-result))
(format #t "[~8x] ~A~%" obj 'collide-overlap-result)
(format #t "~Tbest-dist: ~f~%" (-> obj best-dist))
(format #t "~Tbest-from-prim: ~A~%" (-> obj best-from-prim))
(format #t "~Tbest-to-prim: ~A~%" (-> obj best-to-prim))
(format
#t
"~Tbest-from-tri: #<collide-tri-result @ #x~X>~%"
(-> obj best-from-tri)
)
obj
)
;; definition for method 9 of type collide-overlap-result
;; INFO: Return type mismatch symbol vs none.
(defmethod reset! collide-overlap-result ((obj collide-overlap-result))
(set! (-> obj best-dist) 0.0)
(set! (-> obj best-from-prim) #f)
(set! (-> obj best-to-prim) #f)
(none)
)
;; definition of type overlaps-others-params
(deftype overlaps-others-params (structure)
((options uint32 :offset-assert 0)
(tlist basic :offset-assert 4)
)
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition for method 3 of type overlaps-others-params
(defmethod inspect overlaps-others-params ((obj overlaps-others-params))
(format #t "[~8x] ~A~%" obj 'overlaps-others-params)
(format #t "~Toptions: ~D~%" (-> obj options))
(format #t "~Ttlist: ~A~%" (-> obj tlist))
obj
)
;; definition for symbol *collide-hit-by-player-list*, type engine
(define
*collide-hit-by-player-list*
(new 'global 'engine 'collide-hit-by-player-list 768)
)
;; definition for symbol *collide-usually-hit-by-player-list*, type engine
(define
*collide-usually-hit-by-player-list*
(new 'global 'engine 'collide-usually-hit-by-player-list 256)
)
;; definition for symbol *collide-hit-by-others-list*, type engine
(define
*collide-hit-by-others-list*
(new 'global 'engine 'collide-hit-by-others-list 96)
)
;; definition for symbol *collide-player-list*, type engine
(define *collide-player-list* (new 'global 'engine 'collide-player-list 32))
;; definition of type collide-prim-core
(deftype collide-prim-core (structure)
((world-sphere vector :inline :offset-assert 0)
(collide-as uint64 :offset-assert 16)
(action uint32 :offset-assert 24)
(offense int8 :offset-assert 28)
(prim-type int8 :offset-assert 29)
(extra uint8 2 :offset-assert 30)
(quad uint128 2 :offset 0)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
;; definition for method 3 of type collide-prim-core
(defmethod inspect collide-prim-core ((obj collide-prim-core))
(format #t "[~8x] ~A~%" obj 'collide-prim-core)
(format #t "~Tworld-sphere: ~`vector`P~%" (-> obj world-sphere))
(format #t "~Tcollide-as: ~D~%" (-> obj collide-as))
(format #t "~Taction: ~D~%" (-> obj action))
(format #t "~Toffense: ~D~%" (-> obj offense))
(format #t "~Tprim-type: ~D~%" (-> obj prim-type))
(format #t "~Textra[2] @ #x~X~%" (-> obj extra))
(format #t "~Tquad[2] @ #x~X~%" (-> obj world-sphere))
obj
)
;; definition of type collide-shape-prim
(deftype collide-shape-prim (basic)
((cshape basic :offset-assert 4)
(prim-id uint32 :offset-assert 8)
(transform-index int8 :offset-assert 12)
(prim-core collide-prim-core :inline :offset-assert 16)
(local-sphere vector :inline :offset-assert 48)
(collide-with uint64 :offset-assert 64)
(world-sphere vector :inline :offset 16)
(collide-as uint64 :offset 32)
(action uint32 :offset 40)
(offense int8 :offset 44)
(prim-type int8 :offset 45)
(radius float :offset 60)
)
:method-count-assert 28
:size-assert #x48
:flag-assert #x1c00000048
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
)
)
;; definition for method 3 of type collide-shape-prim
(defmethod inspect collide-shape-prim ((obj collide-shape-prim))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tcshape: ~A~%" (-> obj cshape))
(format #t "~Tprim-id: #x~X~%" (-> obj prim-id))
(format #t "~Ttransform-index: ~D~%" (-> obj transform-index))
(format #t "~Tprim-core: #<collide-prim-core @ #x~X>~%" (-> obj prim-core))
(format #t "~Tlocal-sphere: ~`vector`P~%" (-> obj local-sphere))
(format #t "~Tcollide-with: ~D~%" (-> obj collide-with))
(format #t "~Tworld-sphere: ~`vector`P~%" (-> obj prim-core))
(format #t "~Tcollide-as: ~D~%" (-> obj prim-core collide-as))
(format #t "~Taction: ~D~%" (-> obj prim-core action))
(format #t "~Toffense: ~D~%" (-> obj prim-core offense))
(format #t "~Tprim-type: ~D~%" (-> obj prim-core prim-type))
(format #t "~Tradius: (meters ~m)~%" (-> obj local-sphere w))
obj
)
;; definition of type collide-shape-prim-sphere
(deftype collide-shape-prim-sphere (collide-shape-prim)
((pat uint32 :offset-assert 72)
)
:method-count-assert 28
:size-assert #x4c
:flag-assert #x1c0000004c
(:methods
(new (symbol type basic uint) _type_ 0)
)
)
;; definition for method 3 of type collide-shape-prim-sphere
(defmethod inspect collide-shape-prim-sphere ((obj collide-shape-prim-sphere))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tcshape: ~A~%" (-> obj cshape))
(format #t "~Tprim-id: #x~X~%" (-> obj prim-id))
(format #t "~Ttransform-index: ~D~%" (-> obj transform-index))
(format #t "~Tprim-core: #<collide-prim-core @ #x~X>~%" (-> obj prim-core))
(format #t "~Tlocal-sphere: ~`vector`P~%" (-> obj local-sphere))
(format #t "~Tcollide-with: ~D~%" (-> obj collide-with))
(format #t "~Tworld-sphere: ~`vector`P~%" (-> obj prim-core))
(format #t "~Tcollide-as: ~D~%" (-> obj prim-core collide-as))
(format #t "~Taction: ~D~%" (-> obj prim-core action))
(format #t "~Toffense: ~D~%" (-> obj prim-core offense))
(format #t "~Tprim-type: ~D~%" (-> obj prim-core prim-type))
(format #t "~Tradius: (meters ~m)~%" (-> obj local-sphere w))
(format #t "~Tpat: ~D~%" (-> obj pat))
obj
)
;; definition of type collide-shape-prim-mesh
(deftype collide-shape-prim-mesh (collide-shape-prim)
((mesh basic :offset-assert 72)
(mesh-id int32 :offset-assert 76)
(mesh-cache-id uint64 :offset-assert 80)
(mesh-cache-tris uint32 :offset-assert 88)
)
:method-count-assert 29
:size-assert #x5c
:flag-assert #x1d0000005c
(:methods
(new (symbol type basic uint uint) _type_ 0)
(dummy-28 () none 28)
)
)
;; definition for method 3 of type collide-shape-prim-mesh
(defmethod inspect collide-shape-prim-mesh ((obj collide-shape-prim-mesh))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tcshape: ~A~%" (-> obj cshape))
(format #t "~Tprim-id: #x~X~%" (-> obj prim-id))
(format #t "~Ttransform-index: ~D~%" (-> obj transform-index))
(format #t "~Tprim-core: #<collide-prim-core @ #x~X>~%" (-> obj prim-core))
(format #t "~Tlocal-sphere: ~`vector`P~%" (-> obj local-sphere))
(format #t "~Tcollide-with: ~D~%" (-> obj collide-with))
(format #t "~Tworld-sphere: ~`vector`P~%" (-> obj prim-core))
(format #t "~Tcollide-as: ~D~%" (-> obj prim-core collide-as))
(format #t "~Taction: ~D~%" (-> obj prim-core action))
(format #t "~Toffense: ~D~%" (-> obj prim-core offense))
(format #t "~Tprim-type: ~D~%" (-> obj prim-core prim-type))
(format #t "~Tradius: (meters ~m)~%" (-> obj local-sphere w))
(format #t "~Tmesh: ~A~%" (-> obj mesh))
(format #t "~Tmesh-id: ~D~%" (-> obj mesh-id))
(format #t "~Tmesh-cache-id: ~D~%" (-> obj mesh-cache-id))
(format #t "~Tmesh-cache-tris: #x~X~%" (-> obj mesh-cache-tris))
obj
)
;; definition of type collide-shape-prim-group
(deftype collide-shape-prim-group (collide-shape-prim)
((num-prims int32 :offset-assert 72)
(allocated-prims int32 :offset-assert 76)
(prim uint32 1 :offset-assert 80)
)
:method-count-assert 30
:size-assert #x54
:flag-assert #x1e00000054
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-28 () none 28)
(dummy-29 () none 29)
)
)
;; definition for method 3 of type collide-shape-prim-group
(defmethod inspect collide-shape-prim-group ((obj collide-shape-prim-group))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tcshape: ~A~%" (-> obj cshape))
(format #t "~Tprim-id: #x~X~%" (-> obj prim-id))
(format #t "~Ttransform-index: ~D~%" (-> obj transform-index))
(format #t "~Tprim-core: #<collide-prim-core @ #x~X>~%" (-> obj prim-core))
(format #t "~Tlocal-sphere: ~`vector`P~%" (-> obj local-sphere))
(format #t "~Tcollide-with: ~D~%" (-> obj collide-with))
(format #t "~Tworld-sphere: ~`vector`P~%" (-> obj prim-core))
(format #t "~Tcollide-as: ~D~%" (-> obj prim-core collide-as))
(format #t "~Taction: ~D~%" (-> obj prim-core action))
(format #t "~Toffense: ~D~%" (-> obj prim-core offense))
(format #t "~Tprim-type: ~D~%" (-> obj prim-core prim-type))
(format #t "~Tradius: (meters ~m)~%" (-> obj local-sphere w))
(format #t "~Tnum-prims: ~D~%" (-> obj num-prims))
(format #t "~Tallocated-prims: ~D~%" (-> obj allocated-prims))
(format #t "~Tprim[1] @ #x~X~%" (-> obj prim))
obj
)
;; definition of type collide-shape
(deftype collide-shape (trsqv)
((process process :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags uint8 :offset-assert 145)
(pad-byte uint8 2 :offset-assert 146)
(pat-ignore-mask uint32 :offset-assert 148)
(event-self basic :offset-assert 152)
(event-other basic :offset-assert 156)
(root-prim basic :offset-assert 160)
(riders basic :offset-assert 164)
(backup-collide-as uint64 :offset-assert 168)
(backup-collide-with uint64 :offset-assert 176)
)
:method-count-assert 56
:size-assert #xb8
:flag-assert #x38000000b8
(:methods
(new (symbol type process collide-list-enum) _type_ 0)
(dummy-28 () none 28)
(dummy-29 () none 29)
(dummy-30 () none 30)
(dummy-31 () none 31)
(dummy-32 () none 32)
(dummy-33 () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
(dummy-38 () none 38)
(dummy-39 () none 39)
(dummy-40 () none 40)
(dummy-41 () none 41)
(dummy-42 () none 42)
(dummy-43 () none 43)
(dummy-44 () none 44)
(dummy-45 () none 45)
(dummy-46 () none 46)
(dummy-47 () none 47)
(dummy-48 () none 48)
(dummy-49 () none 49)
(dummy-50 () none 50)
(dummy-51 () none 51)
(dummy-52 () none 52)
(dummy-53 () none 53)
(dummy-54 () none 54)
(dummy-55 () none 55)
)
)
;; definition for method 3 of type collide-shape
(defmethod inspect collide-shape ((obj collide-shape))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Ttrans: ~`vector`P~%" (-> obj trans))
(format #t "~Trot: ~`vector`P~%" (-> obj quat))
(format #t "~Tscale: ~`vector`P~%" (-> obj scale))
(format #t "~Tquat: #<quaternion @ #x~X>~%" (-> obj quat))
(format
#t
"~Tpause-adjust-distance: (meters ~m)~%"
(-> obj pause-adjust-distance)
)
(format #t "~Tnav-radius: (meters ~m)~%" (-> obj nav-radius))
(format #t "~Ttransv: ~`vector`P~%" (-> obj transv))
(format #t "~Trotv: ~`vector`P~%" (-> obj rotv))
(format #t "~Tscalev: ~`vector`P~%" (-> obj scalev))
(format #t "~Tdir-targ: #<quaternion @ #x~X>~%" (-> obj dir-targ))
(format #t "~Tangle-change-time: ~D~%" (-> obj angle-change-time))
(format #t "~Told-y-angle-diff: ~f~%" (-> obj old-y-angle-diff))
(format #t "~Tprocess: ~A~%" (-> obj process))
(format #t "~Tmax-iteration-count: ~D~%" (-> obj max-iteration-count))
(format #t "~Tnav-flags: ~D~%" (-> obj nav-flags))
(format #t "~Tpad-byte[2] @ #x~X~%" (-> obj pad-byte))
(format #t "~Tpat-ignore-mask: ~D~%" (-> obj pat-ignore-mask))
(format #t "~Tevent-self: ~A~%" (-> obj event-self))
(format #t "~Tevent-other: ~A~%" (-> obj event-other))
(format #t "~Troot-prim: ~A~%" (-> obj root-prim))
(format #t "~Triders: ~A~%" (-> obj riders))
(format #t "~Tbackup-collide-as: ~D~%" (-> obj backup-collide-as))
(format #t "~Tbackup-collide-with: ~D~%" (-> obj backup-collide-with))
obj
)
;; definition of type collide-shape-moving
(deftype collide-shape-moving (collide-shape)
((rider-time uint64 :offset-assert 184)
(rider-last-move vector :inline :offset-assert 192)
(trans-old vector 3 :inline :offset-assert 208)
(poly-pat uint32 :offset-assert 256)
(cur-pat uint32 :offset-assert 260)
(ground-pat uint32 :offset-assert 264)
(status uint64 :offset-assert 272)
(old-status uint64 :offset-assert 280)
(prev-status uint64 :offset-assert 288)
(reaction-flag uint32 :offset-assert 296)
(reaction basic :offset-assert 300)
(no-reaction basic :offset-assert 304)
(local-normal vector :inline :offset-assert 320)
(surface-normal vector :inline :offset-assert 336)
(poly-normal vector :inline :offset-assert 352)
(ground-poly-normal vector :inline :offset-assert 368)
(ground-touch-point vector :inline :offset-assert 384)
(shadow-pos vector :inline :offset-assert 400)
(ground-impact-vel float :offset-assert 416)
(surface-angle float :offset-assert 420)
(poly-angle float :offset-assert 424)
(touch-angle float :offset-assert 428)
(coverage float :offset-assert 432)
(dynam basic :offset-assert 436)
(surf basic :offset-assert 440)
)
:method-count-assert 65
:size-assert #x1bc
:flag-assert #x41000001bc
(:methods
(dummy-56 () none 56)
(dummy-57 () none 57)
(dummy-58 () none 58)
(dummy-59 () none 59)
(dummy-60 () none 60)
(dummy-61 () none 61)
(dummy-62 () none 62)
(dummy-63 () none 63)
(dummy-64 () none 64)
)
)
;; definition for method 3 of type collide-shape-moving
(defmethod inspect collide-shape-moving ((obj collide-shape-moving))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Ttrans: ~`vector`P~%" (-> obj trans))
(format #t "~Trot: ~`vector`P~%" (-> obj quat))
(format #t "~Tscale: ~`vector`P~%" (-> obj scale))
(format #t "~Tquat: #<quaternion @ #x~X>~%" (-> obj quat))
(format
#t
"~Tpause-adjust-distance: (meters ~m)~%"
(-> obj pause-adjust-distance)
)
(format #t "~Tnav-radius: (meters ~m)~%" (-> obj nav-radius))
(format #t "~Ttransv: ~`vector`P~%" (-> obj transv))
(format #t "~Trotv: ~`vector`P~%" (-> obj rotv))
(format #t "~Tscalev: ~`vector`P~%" (-> obj scalev))
(format #t "~Tdir-targ: #<quaternion @ #x~X>~%" (-> obj dir-targ))
(format #t "~Tangle-change-time: ~D~%" (-> obj angle-change-time))
(format #t "~Told-y-angle-diff: ~f~%" (-> obj old-y-angle-diff))
(format #t "~Tprocess: ~A~%" (-> obj process))
(format #t "~Tmax-iteration-count: ~D~%" (-> obj max-iteration-count))
(format #t "~Tnav-flags: ~D~%" (-> obj nav-flags))
(format #t "~Tpad-byte[2] @ #x~X~%" (-> obj pad-byte))
(format #t "~Tpat-ignore-mask: ~D~%" (-> obj pat-ignore-mask))
(format #t "~Tevent-self: ~A~%" (-> obj event-self))
(format #t "~Tevent-other: ~A~%" (-> obj event-other))
(format #t "~Troot-prim: ~A~%" (-> obj root-prim))
(format #t "~Triders: ~A~%" (-> obj riders))
(format #t "~Tbackup-collide-as: ~D~%" (-> obj backup-collide-as))
(format #t "~Tbackup-collide-with: ~D~%" (-> obj backup-collide-with))
(format #t "~Trider-time: ~D~%" (-> obj rider-time))
(format #t "~Trider-last-move: ~`vector`P~%" (-> obj rider-last-move))
(format #t "~Ttrans-old[3] @ #x~X~%" (-> obj trans-old))
(format #t "~Tpoly-pat: #x~X~%" (-> obj poly-pat))
(format #t "~Tcur-pat: #x~X~%" (-> obj cur-pat))
(format #t "~Tground-pat: #x~X~%" (-> obj ground-pat))
(format #t "~Tstatus: ~D~%" (-> obj status))
(format #t "~Told-status: ~D~%" (-> obj old-status))
(format #t "~Tprev-status: ~D~%" (-> obj prev-status))
(format #t "~Treaction-flag: ~D~%" (-> obj reaction-flag))
(format #t "~Treaction: ~A~%" (-> obj reaction))
(format #t "~Tno-reaction: ~A~%" (-> obj no-reaction))
(format #t "~Tlocal-normal: ~`vector`P~%" (-> obj local-normal))
(format #t "~Tsurface-normal: ~`vector`P~%" (-> obj surface-normal))
(format #t "~Tpoly-normal: ~`vector`P~%" (-> obj poly-normal))
(format #t "~Tground-poly-normal: ~`vector`P~%" (-> obj ground-poly-normal))
(format #t "~Tground-touch-point: ~`vector`P~%" (-> obj ground-touch-point))
(format #t "~Tshadow-pos: ~`vector`P~%" (-> obj shadow-pos))
(format #t "~Tground-impact-vel: (meters ~m)~%" (-> obj ground-impact-vel))
(format #t "~Tsurface-angle: ~f~%" (-> obj surface-angle))
(format #t "~Tpoly-angle: ~f~%" (-> obj poly-angle))
(format #t "~Ttouch-angle: ~f~%" (-> obj touch-angle))
(format #t "~Tcoverage: ~f~%" (-> obj coverage))
(format #t "~Tdynam: ~A~%" (-> obj dynam))
(format #t "~Tsurf: ~A~%" (-> obj surf))
obj
)
;; definition for method 0 of type collide-shape-prim
(defmethod
new
collide-shape-prim
((allocation symbol)
(type-to-make type)
(cshape basic)
(prim-id uint)
(size-bytes int)
)
(let ((v0-0 (object-new allocation type-to-make size-bytes)))
(set! (-> v0-0 cshape) cshape)
(set! (-> v0-0 prim-id) prim-id)
(set! (-> v0-0 prim-core action) (the-as uint 0))
(set! (-> v0-0 prim-core collide-as) (the-as uint 0))
(set! (-> v0-0 collide-with) (the-as uint 0))
(set! (-> v0-0 transform-index) -2)
(set! (-> v0-0 prim-core offense) 0)
(set! (-> v0-0 prim-core prim-type) -2)
v0-0
)
)
;; definition for method 0 of type collide-shape-prim-sphere
;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere.
(defmethod
new
collide-shape-prim-sphere
((allocation symbol) (type-to-make type) (cshape basic) (prim-id uint))
(let
((obj
(the-as
collide-shape-prim-sphere
((method-of-type collide-shape-prim new)
allocation
type-to-make
cshape
prim-id
76
)
)
)
)
(set! (-> obj pat) (the-as uint 16))
(set! (-> obj prim-core prim-type) -1)
(the-as collide-shape-prim-sphere obj)
)
)
;; definition for method 0 of type collide-shape-prim-mesh
;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh.
(defmethod
new
collide-shape-prim-mesh
((allocation symbol)
(type-to-make type)
(cshape basic)
(mesh-id uint)
(prim-id uint)
)
(let
((obj
(the-as
collide-shape-prim-mesh
((method-of-type collide-shape-prim new)
allocation
type-to-make
cshape
prim-id
92
)
)
)
)
(set! (-> obj mesh) #f)
(set! (-> obj mesh-id) (the-as int mesh-id))
(set! (-> obj mesh-cache-id) (the-as uint 0))
(set! (-> obj prim-core prim-type) 1)
(the-as collide-shape-prim-mesh obj)
)
)
;; definition for method 0 of type collide-shape-prim-group
;; INFO: Return type mismatch collide-shape-prim vs collide-shape-prim-group.
(defmethod
new
collide-shape-prim-group
((allocation symbol)
(type-to-make type)
(cshape basic)
(elt-count uint)
(prim-id int)
)
(let
((obj
(the-as
collide-shape-prim-group
((method-of-type collide-shape-prim new)
allocation
type-to-make
cshape
(the-as uint prim-id)
(the-as int (+ (-> type-to-make size) (* (+ elt-count -1) 4)))
)
)
)
)
(set! (-> obj allocated-prims) (the-as int elt-count))
(set! (-> obj num-prims) 0)
(set! (-> obj prim-core prim-type) 0)
(while (nonzero? elt-count)
(+! elt-count -1)
(set! (-> obj prim elt-count) (the-as uint #f))
(nop!)
)
(the-as collide-shape-prim-group obj)
)
)
;; definition for method 4 of type collide-shape-prim-group
(defmethod length collide-shape-prim-group ((obj collide-shape-prim-group))
(-> obj num-prims)
)
;; definition for method 5 of type collide-shape-prim-group
;; INFO: Return type mismatch uint vs int.
(defmethod asize-of collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as
int
(+ (-> obj type size) (the-as uint (* (+ (-> obj allocated-prims) -1) 4)))
)
)
;; definition for method 0 of type collide-shape
(defmethod
new
collide-shape
((allocation symbol)
(type-to-make type)
(proc process)
(collide-list-kind collide-list-enum)
)
(let
((obj
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
)
)
(set! (-> obj process) proc)
(set! (-> obj max-iteration-count) (the-as uint 1))
(set! (-> obj nav-flags) (the-as uint 1))
(set! (-> obj event-self) #f)
(set! (-> obj event-other) #f)
(set! (-> obj riders) #f)
(set! (-> obj root-prim) #f)
(let ((v1-5 (-> proc type symbol)))
(if (= v1-5 'camera)
(set! (-> obj pat-ignore-mask) (the-as uint 2))
(set! (-> obj pat-ignore-mask) (the-as uint 1))
)
)
(set! (-> obj trans w) 1.0)
(quaternion-identity! (-> obj quat))
(vector-identity! (-> obj scale))
(cond
((= collide-list-kind (collide-list-enum hit-by-player))
(add-connection
*collide-hit-by-player-list*
proc
(the-as (function object object object object object) #f)
obj
#f
#f
)
)
((= collide-list-kind (collide-list-enum usually-hit-by-player))
(add-connection
*collide-usually-hit-by-player-list*
proc
(the-as (function object object object object object) #f)
obj
#f
#f
)
)
((= collide-list-kind (collide-list-enum hit-by-others))
(add-connection
*collide-hit-by-others-list*
proc
(the-as (function object object object object object) #f)
obj
#f
#f
)
)
((= collide-list-kind (collide-list-enum player))
(add-connection
*collide-player-list*
proc
(the-as (function object object object object object) #f)
obj
#f
#f
)
)
(else
(format 0 "Unsupported collide-list-enum in collide-shape constructor!~%")
)
)
obj
)
)
;; definition for method 0 of type collide-sticky-rider-group
(defmethod
new
collide-sticky-rider-group
((allocation symbol) (type-to-make type) (arg0 int))
(let
((obj
(object-new
allocation
type-to-make
(the-as int (+ (-> type-to-make size) (the-as uint (* (+ arg0 -1) 32))))
)
)
)
(set! (-> obj allocated-riders) arg0)
(set! (-> obj num-riders) 0)
obj
)
)
;; definition for method 4 of type collide-sticky-rider-group
(defmethod length collide-sticky-rider-group ((obj collide-sticky-rider-group))
(-> obj num-riders)
)
;; definition for method 5 of type collide-sticky-rider-group
;; INFO: Return type mismatch uint vs int.
(defmethod asize-of collide-sticky-rider-group ((obj collide-sticky-rider-group))
(the-as
int
(+ (-> obj type size) (the-as uint (* (+ (-> obj allocated-riders) -1) 32)))
)
)
;; 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
:world-sphere (new 'static 'vector :w 204800000.0)
:collide-as #x1
:action #x1
:offense 4
:prim-type 2
)
:local-sphere (new 'static 'vector :w 204800000.0)
:mesh #f
)
)
;; 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
:world-sphere (new 'static 'vector :w 204800000.0)
:collide-as #x20
:action #x1
:offense 4
:prim-type 2
)
:local-sphere (new 'static 'vector :w 204800000.0)
:mesh #f
)
)