Files
jak-project/test/decompiler/reference/jak2/engine/collide/collide-edge-grab-h_REF.gc
T
Hat Kid fc43870d85 decompiler: obj -> this, set-time! and time-elapsed? macros (#3026)
This renames the method object in `defmethod`s to `this` and adds
detection for the `set-time!` and `time-elapsed?` macros.

Definitely my biggest PR yet...
2023-09-26 15:17:00 +01:00

376 lines
18 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type pilot-edge-grab-info
(deftype pilot-edge-grab-info (structure)
((local-pos vector :inline :offset-assert 0)
(local-dir vector :inline :offset-assert 16)
(handle handle :offset-assert 32)
)
:method-count-assert 9
:size-assert #x28
:flag-assert #x900000028
)
;; definition for method 3 of type pilot-edge-grab-info
(defmethod inspect pilot-edge-grab-info ((this pilot-edge-grab-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'pilot-edge-grab-info)
(format #t "~1Tlocal-pos: #<vector @ #x~X>~%" (-> this local-pos))
(format #t "~1Tlocal-dir: #<vector @ #x~X>~%" (-> this local-dir))
(format #t "~1Thandle: ~D~%" (-> this handle))
(label cfg-4)
this
)
;; definition of type edge-grab-info
(deftype edge-grab-info (structure)
((world-vertex vector 8 :inline :offset-assert 0)
(local-vertex vector 8 :inline :offset-assert 128)
(status uint64 :offset-assert 256)
(actor-cshape-prim-offset int32 :offset-assert 264)
(actor-handle handle :offset-assert 272)
(hanging-matrix matrix :inline :offset-assert 288)
(edge-vertex vector 2 :inline :offset 0)
(center-hold vector :inline :offset 32)
(tri-vertex vector 3 :inline :offset 48)
(adjacent-edge-left-vertex vector :inline :offset 96)
(adjacent-edge-right-vertex vector :inline :offset 112)
(left-hand-hold vector :inline :offset-assert 352)
(right-hand-hold vector :inline :offset-assert 368)
(center-hold-old vector :inline :offset-assert 384)
(edge-tri-pat uint32 :offset-assert 400)
(found-edge? symbol :offset-assert 404)
(pilot-edge-grab? symbol :offset-assert 408)
(pilot-edge-grab pilot-edge-grab-info :inline :offset-assert 416)
(pilot-start-grab-pos vector :inline :offset-assert 464)
(pilot-grab-interp float :offset-assert 480)
)
:method-count-assert 11
:size-assert #x1e4
:flag-assert #xb000001e4
(:methods
(edge-grab-info-method-9 (_type_) symbol 9)
(debug-draw (_type_) none 10)
)
)
;; definition for method 3 of type edge-grab-info
(defmethod inspect edge-grab-info ((this edge-grab-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'edge-grab-info)
(format #t "~1Tworld-vertex[8] @ #x~X~%" (-> this world-vertex))
(format #t "~1Tlocal-vertex[8] @ #x~X~%" (-> this local-vertex))
(format #t "~1Tstatus: ~D~%" (-> this status))
(format #t "~1Tactor-cshape-prim-offset: ~D~%" (-> this actor-cshape-prim-offset))
(format #t "~1Tactor-handle: ~D~%" (-> this actor-handle))
(format #t "~1Thanging-matrix: #<matrix @ #x~X>~%" (-> this hanging-matrix))
(format #t "~1Tedge-vertex[2] @ #x~X~%" (-> this world-vertex))
(format #t "~1Tcenter-hold: ~`vector`P~%" (-> this center-hold))
(format #t "~1Ttri-vertex[3] @ #x~X~%" (-> this tri-vertex))
(format #t "~1Tadjacent-edge-left-vertex: #<vector @ #x~X>~%" (-> this adjacent-edge-left-vertex))
(format #t "~1Tadjacent-edge-right-vertex: #<vector @ #x~X>~%" (-> this adjacent-edge-right-vertex))
(format #t "~1Tleft-hand-hold: #<vector @ #x~X>~%" (-> this left-hand-hold))
(format #t "~1Tright-hand-hold: #<vector @ #x~X>~%" (-> this right-hand-hold))
(format #t "~1Tcenter-hold-old: ~`vector`P~%" (-> this center-hold-old))
(format #t "~1Tedge-tri-pat: ~D~%" (-> this edge-tri-pat))
(format #t "~1Tfound-edge?: ~A~%" (-> this found-edge?))
(format #t "~1Tpilot-edge-grab?: ~A~%" (-> this pilot-edge-grab?))
(format #t "~1Tpilot-edge-grab: #<pilot-edge-grab-info @ #x~X>~%" (-> this pilot-edge-grab))
(format #t "~1Tpilot-start-grab-pos: #<vector @ #x~X>~%" (-> this pilot-start-grab-pos))
(format #t "~1Tpilot-grab-interp: ~f~%" (-> this pilot-grab-interp))
(label cfg-4)
this
)
;; definition of type collide-edge-tri
(deftype collide-edge-tri (structure)
((ctri collide-cache-tri :offset-assert 0)
(normal vector :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
;; definition for method 3 of type collide-edge-tri
(defmethod inspect collide-edge-tri ((this collide-edge-tri))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-tri)
(format #t "~1Tctri: ~A~%" (-> this ctri))
(format #t "~1Tnormal: #<vector @ #x~X>~%" (-> this normal))
(label cfg-4)
this
)
;; definition of type collide-edge-edge
(deftype collide-edge-edge (structure)
((ignore basic :offset-assert 0)
(etri collide-edge-tri :offset-assert 4)
(vertex-ptr (inline-array vector) 2 :offset-assert 8)
(outward vector :inline :offset-assert 16)
(edge-vec-norm vector :inline :offset-assert 32)
)
:method-count-assert 10
:size-assert #x30
:flag-assert #xa00000030
(:methods
(no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol 9)
)
)
;; definition for method 3 of type collide-edge-edge
(defmethod inspect collide-edge-edge ((this collide-edge-edge))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-edge)
(format #t "~1Tignore: ~A~%" (-> this ignore))
(format #t "~1Tetri: #<collide-edge-tri @ #x~X>~%" (-> this etri))
(format #t "~1Tvertex-ptr[2] @ #x~X~%" (-> this vertex-ptr))
(format #t "~1Toutward: #<vector @ #x~X>~%" (-> this outward))
(format #t "~1Tedge-vec-norm: #<vector @ #x~X>~%" (-> this edge-vec-norm))
(label cfg-4)
this
)
;; definition of type collide-edge-hold-item
(deftype collide-edge-hold-item (structure)
((next collide-edge-hold-item :offset-assert 0)
(rating float :offset-assert 4)
(split int8 :offset-assert 8)
(edge collide-edge-edge :offset-assert 12)
(center-pt vector :inline :offset-assert 16)
(outward-pt vector :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
;; definition for method 3 of type collide-edge-hold-item
(defmethod inspect collide-edge-hold-item ((this collide-edge-hold-item))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-hold-item)
(format #t "~1Tnext: #<collide-edge-hold-item @ #x~X>~%" (-> this next))
(format #t "~1Trating: ~f~%" (-> this rating))
(format #t "~1Tsplit: ~D~%" (-> this split))
(format #t "~1Tedge: #<collide-edge-edge @ #x~X>~%" (-> this edge))
(format #t "~1Tcenter-pt: #<vector @ #x~X>~%" (-> this center-pt))
(format #t "~1Toutward-pt: #<vector @ #x~X>~%" (-> this outward-pt))
(label cfg-4)
this
)
;; definition of type collide-edge-hold-list
(deftype collide-edge-hold-list (structure)
((num-allocs uint32 :offset-assert 0)
(num-attempts uint32 :offset-assert 4)
(head collide-edge-hold-item :offset-assert 8)
(items collide-edge-hold-item 32 :inline :offset-assert 16)
(attempts qword 32 :inline :offset-assert 1552)
)
:method-count-assert 11
:size-assert #x810
:flag-assert #xb00000810
(:methods
(debug-draw (_type_) object 9)
(add-to-list! (_type_ collide-edge-hold-item) none 10)
)
)
;; definition for method 3 of type collide-edge-hold-list
(defmethod inspect collide-edge-hold-list ((this collide-edge-hold-list))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-hold-list)
(format #t "~1Tnum-allocs: ~D~%" (-> this num-allocs))
(format #t "~1Tnum-attempts: ~D~%" (-> this num-attempts))
(format #t "~1Thead: #<collide-edge-hold-item @ #x~X>~%" (-> this head))
(format #t "~1Titems[32] @ #x~X~%" (-> this items))
(format #t "~1Tattempts[32] @ #x~X~%" (-> this attempts))
(label cfg-4)
this
)
;; definition of type collide-edge-spec
(deftype collide-edge-spec (structure)
((split-dists float 2 :offset-assert 0)
(outward-offset vector :inline :offset-assert 16)
(flags collide-edge-spec-flags :offset-assert 32)
(ignore-pat pat-surface :offset-assert 40)
(max-dist-sqrd-to-outward-pt float :offset-assert 44)
(max-dir-cosa-delta float :offset-assert 48)
(max-dir-cosa-player float :offset-assert 52)
(touching-segment symbol :offset-assert 56)
(local-cache-fill-box bounding-box :inline :offset-assert 64)
(local-within-reach-box bounding-box :inline :offset-assert 96)
(local-player-spheres sphere 12 :inline :offset 128)
(local-player-hanging-spheres sphere 6 :inline :offset 128)
(local-player-leap-up-spheres sphere 6 :inline :offset 224)
)
:method-count-assert 9
:size-assert #x140
:flag-assert #x900000140
)
;; definition for method 3 of type collide-edge-spec
(defmethod inspect collide-edge-spec ((this collide-edge-spec))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-spec)
(format #t "~1Tsplit-dists[2] @ #x~X~%" (-> this split-dists))
(format #t "~1Toutward-offset: #<vector @ #x~X>~%" (-> this outward-offset))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tignore-pat: ~D~%" (-> this ignore-pat))
(format #t "~1Tmax-dist-sqrd-to-outward-pt: ~f~%" (-> this max-dist-sqrd-to-outward-pt))
(format #t "~1Tmax-dir-cosa-delta: ~f~%" (-> this max-dir-cosa-delta))
(format #t "~1Tmax-dir-cosa-player: ~f~%" (-> this max-dir-cosa-player))
(format #t "~1Ttouching-segment: #x~X~%" (-> this touching-segment))
(format #t "~1Tlocal-cache-fill-box: #<bounding-box @ #x~X>~%" (-> this local-cache-fill-box))
(format #t "~1Tlocal-within-reach-box: #<bounding-box @ #x~X>~%" (-> this local-within-reach-box))
(format #t "~1Tlocal-player-spheres[12] @ #x~X~%" (-> this local-player-spheres))
(format #t "~1Tlocal-player-hanging-spheres[6] @ #x~X~%" (-> this local-player-spheres))
(format #t "~1Tlocal-player-leap-up-spheres[6] @ #x~X~%" (-> this local-player-leap-up-spheres))
(label cfg-4)
this
)
;; definition of type collide-edge-work
(deftype collide-edge-work (structure)
((ccache collide-cache :offset-assert 0)
(cshape collide-shape :offset-assert 4)
(num-verts uint32 :offset-assert 8)
(num-edges uint32 :offset-assert 12)
(num-tris uint32 :offset-assert 16)
(cache-fill-box bounding-box :inline :offset-assert 32)
(within-reach-box bounding-box :inline :offset-assert 64)
(within-reach-box4w bounding-box4w :inline :offset-assert 96)
(search-pt vector :inline :offset-assert 128)
(search-dir-vec vector :inline :offset-assert 144)
(world-player-spheres sphere 12 :inline :offset-assert 160)
(world-player-hanging-spheres sphere 6 :inline :offset 160)
(world-player-leap-up-spheres sphere 6 :inline :offset 256)
(spec collide-edge-spec :inline :offset-assert 352)
(process (pointer process-drawable) :offset-assert 672)
(verts vector 64 :inline :offset-assert 688)
(edges collide-edge-edge 96 :inline :offset-assert 1712)
(tris collide-edge-tri 48 :inline :offset-assert 6320)
(hold-list collide-edge-hold-list :inline :offset-assert 7856)
)
:method-count-assert 21
:size-assert #x26c0
:flag-assert #x15000026c0
(:methods
(search-for-edges (_type_ collide-edge-hold-list) none 9)
(debug-draw-edges (_type_) object 10)
(debug-draw-tris (_type_) none 11)
(debug-draw-sphere (_type_) none 12)
(find-adjacent-edge (_type_ collide-edge-hold-item edge-grab-info) none 13)
(compute-center-point! (_type_ collide-edge-edge vector) float 14)
(get-best-hand-point (_type_ vector vector int) float 15)
(find-grabbable-edges (_type_) none 16)
(find-grabbable-tris (_type_) none 17)
(should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol 18)
(find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol 19)
(check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol 20)
)
)
;; definition for method 3 of type collide-edge-work
(defmethod inspect collide-edge-work ((this collide-edge-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-edge-work)
(format #t "~1Tccache: ~A~%" (-> this ccache))
(format #t "~1Tcshape: ~A~%" (-> this cshape))
(format #t "~1Tnum-verts: ~D~%" (-> this num-verts))
(format #t "~1Tnum-edges: ~D~%" (-> this num-edges))
(format #t "~1Tnum-tris: ~D~%" (-> this num-tris))
(format #t "~1Tcache-fill-box: #<bounding-box @ #x~X>~%" (-> this cache-fill-box))
(format #t "~1Twithin-reach-box: #<bounding-box @ #x~X>~%" (-> this within-reach-box))
(format #t "~1Twithin-reach-box4w: #<bounding-box4w @ #x~X>~%" (-> this within-reach-box4w))
(format #t "~1Tsearch-pt: #<vector @ #x~X>~%" (-> this search-pt))
(format #t "~1Tsearch-dir-vec: #<vector @ #x~X>~%" (-> this search-dir-vec))
(format #t "~1Tworld-player-spheres[12] @ #x~X~%" (-> this world-player-spheres))
(format #t "~1Tworld-player-hanging-spheres[6] @ #x~X~%" (-> this world-player-spheres))
(format #t "~1Tworld-player-leap-up-spheres[6] @ #x~X~%" (-> this world-player-leap-up-spheres))
(format #t "~1Tspec: #<collide-edge-spec @ #x~X>~%" (-> this spec))
(format #t "~1Tprocess: #x~X~%" (-> this process))
(format #t "~1Tverts[64] @ #x~X~%" (-> this verts))
(format #t "~1Tedges[96] @ #x~X~%" (-> this edges))
(format #t "~1Ttris[48] @ #x~X~%" (-> this tris))
(format #t "~1Thold-list: #<collide-edge-hold-list @ #x~X>~%" (-> this hold-list))
(label cfg-4)
this
)
;; definition for symbol *collide-edge-spec*, type collide-edge-spec
(define *collide-edge-spec*
(new 'static 'collide-edge-spec
:split-dists (new 'static 'array float 2 1024.0 1433.6)
:outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0)
:flags (collide-edge-spec-flags send-event)
:ignore-pat (new 'static 'pat-surface :noentity #x1 :noedge #x1 :nojak #x1 :probe #x1 :noendlessfall #x1)
:max-dist-sqrd-to-outward-pt 37748736.0
:max-dir-cosa-delta 0.6
:touching-segment #f
:local-cache-fill-box (new 'static 'bounding-box
:min (new 'static 'vector :x -8192.0 :y -11059.2 :z -8192.0 :w 1.0)
:max (new 'static 'vector :x 8192.0 :y 24576.0 :z 8192.0 :w 1.0)
)
:local-within-reach-box (new 'static 'bounding-box
:min (new 'static 'vector :x -6144.0 :y 5324.8 :z -6144.0 :w 1.0)
:max (new 'static 'vector :x 6144.0 :y 11059.2 :z 6144.0 :w 1.0)
)
:local-player-spheres (new 'static 'inline-array sphere 12
(new 'static 'sphere :x 1720.32 :y -819.2 :r 1433.6)
(new 'static 'sphere :x 2293.76 :y -3276.8 :r 1884.16)
(new 'static 'sphere :x 1966.08 :y -6144.0 :r 1556.48)
(new 'static 'sphere :x 1966.08 :y -8601.6 :r 1556.48)
(new 'static 'sphere :x 1761.28 :y -11059.2 :r 1351.68)
(new 'static 'sphere :x 1679.36 :y -13312.0 :r 1269.76)
(new 'static 'sphere :x -737.28 :y 4096.0 :r 3072.0)
(new 'static 'sphere :x -737.28 :y 6553.6 :r 3072.0)
(new 'static 'sphere :x -737.28 :y 9420.8 :r 3072.0)
(new 'static 'sphere :x 1720.32 :y 3686.4 :r 2949.12)
(new 'static 'sphere :x 1720.32 :y 5734.4 :r 2949.12)
(new 'static 'sphere :x 1720.32 :y 8601.6 :r 2949.12)
)
)
)
;; failed to figure out what this is:
(kmemopen global "collide-edge-work")
;; definition for symbol *collide-edge-work*, type collide-edge-work
(define *collide-edge-work* (new 'global 'collide-edge-work))
;; failed to figure out what this is:
(mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer *collide-edge-spec*) 320)
;; definition (perm) for symbol *edge-grab-info*, type edge-grab-info
(define-perm *edge-grab-info* edge-grab-info (new 'global 'edge-grab-info))
;; failed to figure out what this is:
(kmemclose)