Files
jak-project/test/decompiler/reference/jak2/engine/collide/collide-mesh-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

205 lines
6.8 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-tri-result
(deftype collide-tri-result (structure)
((vertex vector 3 :inline :offset-assert 0)
(intersect vector :inline :offset-assert 48)
(normal vector :inline :offset-assert 64)
(pat pat-surface :offset-assert 80)
(collide-ptr basic :offset-assert 84)
)
:method-count-assert 9
:size-assert #x58
:flag-assert #x900000058
)
;; definition for method 3 of type collide-tri-result
(defmethod inspect collide-tri-result ((this collide-tri-result))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-tri-result)
(format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex))
(format #t "~1Tintersect: ~`vector`P~%" (-> this intersect))
(format #t "~1Tnormal: ~`vector`P~%" (-> this normal))
(format #t "~1Tpat: ~D~%" (-> this pat))
(format #t "~1Tcollide-ptr: ~A~%" (-> this collide-ptr))
(label cfg-4)
this
)
;; definition of type collide-mesh-tri
(deftype collide-mesh-tri (structure)
((vertex-index uint8 3 :offset-assert 0)
(unused uint8 :offset-assert 3)
(pat pat-surface :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition for method 3 of type collide-mesh-tri
(defmethod inspect collide-mesh-tri ((this collide-mesh-tri))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-mesh-tri)
(format #t "~1Tvertex-index[3] @ #x~X~%" (-> this vertex-index))
(format #t "~1Tunused: ~D~%" (-> this unused))
(format #t "~1Tpat: ~D~%" (-> this pat))
(label cfg-4)
this
)
;; definition of type collide-mesh
(deftype collide-mesh (basic)
((joint-id int32 :offset-assert 4)
(num-tris uint32 :offset-assert 8)
(num-verts uint32 :offset-assert 12)
(vertex-data (inline-array vector) :offset-assert 16)
(tris collide-mesh-tri 1 :inline :offset 32)
)
:method-count-assert 16
:size-assert #x28
:flag-assert #x1000000028
(:methods
(debug-draw-tris (_type_ process-drawable int) none 9)
(overlap-test (_type_ collide-mesh-cache-tri vector) symbol 10)
(should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 11)
(sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 12)
(unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none 13)
(collide-mesh-math-1 (_type_ object object) none 14)
(collide-mesh-math-2 (_type_ object object object) none 15)
)
)
;; definition for method 3 of type collide-mesh
(defmethod inspect collide-mesh ((this collide-mesh))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tjoint-id: ~D~%" (-> this joint-id))
(format #t "~1Tnum-tris: ~D~%" (-> this num-tris))
(format #t "~1Tnum-verts: ~D~%" (-> this num-verts))
(format #t "~1Tvertex-data: #x~X~%" (-> this vertex-data))
(format #t "~1Ttris[1] @ #x~X~%" (-> this tris))
(label cfg-4)
this
)
;; definition of type collide-mesh-cache-tri
(deftype collide-mesh-cache-tri (structure)
((vertex vector 3 :inline :offset-assert 0)
(normal vector :inline :offset-assert 48)
(bbox4w bounding-box4w :inline :offset-assert 64)
(pat pat-surface :offset 60)
)
:method-count-assert 9
:size-assert #x60
:flag-assert #x900000060
)
;; definition for method 3 of type collide-mesh-cache-tri
(defmethod inspect collide-mesh-cache-tri ((this collide-mesh-cache-tri))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-mesh-cache-tri)
(format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex))
(format #t "~1Tnormal: ~`vector`P~%" (-> this normal))
(format #t "~1Tbbox4w: #<bounding-box4w @ #x~X>~%" (-> this bbox4w))
(format #t "~1Tpat: ~D~%" (-> this pat))
(label cfg-4)
this
)
;; definition of type collide-mesh-cache-entry
(deftype collide-mesh-cache-entry (structure)
((mat matrix :inline :offset-assert 0)
(tris collide-mesh-cache-tri :inline :dynamic :offset-assert 64)
)
:method-count-assert 9
:size-assert #x40
:flag-assert #x900000040
)
;; definition for method 3 of type collide-mesh-cache-entry
(defmethod inspect collide-mesh-cache-entry ((this collide-mesh-cache-entry))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'collide-mesh-cache-entry)
(format #t "~1Tmat: #<matrix @ #x~X>~%" (-> this mat))
(format #t "~1Ttris[0] @ #x~X~%" (-> this tris))
(label cfg-4)
this
)
;; definition of type collide-mesh-cache
(deftype collide-mesh-cache (basic)
((used-size uint32 :offset-assert 4)
(max-size uint32 :offset-assert 8)
(id uint32 :offset-assert 12)
(data uint8 48000 :offset-assert 16)
)
:method-count-assert 13
:size-assert #xbb90
:flag-assert #xd0000bb90
(:methods
(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)
)
)
;; definition for method 3 of type collide-mesh-cache
(defmethod inspect collide-mesh-cache ((this collide-mesh-cache))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tused-size: ~D~%" (-> this used-size))
(format #t "~1Tmax-size: ~D~%" (-> this max-size))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tdata[48000] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition for method 11 of type collide-mesh-cache
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for method 10 of type collide-mesh-cache
(defmethod is-id? collide-mesh-cache ((this collide-mesh-cache) (arg0 int))
(= (-> this id) arg0)
)
;; failed to figure out what this is:
(kmemopen global "collide-mesh-cache")
;; definition (perm) for symbol *collide-mesh-cache*, type collide-mesh-cache
(define-perm *collide-mesh-cache* collide-mesh-cache (new 'global 'collide-mesh-cache))
;; failed to figure out what this is:
(set! (-> *collide-mesh-cache* id) (the-as uint 1))
;; failed to figure out what this is:
(set! (-> *collide-mesh-cache* used-size) (the-as uint 0))
;; failed to figure out what this is:
(set! (-> *collide-mesh-cache* max-size) (the-as uint #xbb80))
;; failed to figure out what this is:
(kmemclose)