mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-21 07:37:45 -04:00
f7bd0752f8
* wip * getting stuff set up so we can actually run test cases * better handle block entry stuff * types2 working on gstring * comments * math ref working * up to first stack stuff * stack fixes * bounding box * math stuff is working * float fixes * temp debug for (method 9 profile-array) * stupid stupid bug * debugging * everything is broken * some amount of type stuff works * bitfield * texture bitfields not working * temp * types * more stuff * type check * temp * float related fixes for light and res problems * revisit broken files, fix bugs * more types * vector debug * bug fixes for decompiler crashes in harder functions * update goal_src
214 lines
9.5 KiB
Common Lisp
214 lines
9.5 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: collide-edge-grab-h.gc
|
|
;; name in dgo: collide-edge-grab-h
|
|
;; dgos: ENGINE, GAME
|
|
|
|
(declare-type collide-cache-tri structure)
|
|
(declare-type collide-cache basic)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(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
|
|
)
|
|
|
|
(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 uint64 :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 () none 9)
|
|
(edge-grab-info-method-10 () none 10)
|
|
)
|
|
)
|
|
|
|
(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
|
|
)
|
|
|
|
(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
|
|
(collide-edge-edge-method-9 () none 9)
|
|
)
|
|
)
|
|
|
|
(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
|
|
)
|
|
|
|
(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
|
|
(collide-edge-hold-list-method-9 () none 9)
|
|
(collide-edge-hold-list-method-10 () none 10)
|
|
)
|
|
)
|
|
|
|
(deftype collide-edge-spec (structure)
|
|
((split-dists float 2 :offset-assert 0)
|
|
(outward-offset vector :inline :offset-assert 16)
|
|
(flags uint64 :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
|
|
)
|
|
|
|
(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 uint32 :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
|
|
(collide-edge-work-method-9 () none 9)
|
|
(collide-edge-work-method-10 () none 10)
|
|
(collide-edge-work-method-11 () none 11)
|
|
(collide-edge-work-method-12 () none 12)
|
|
(collide-edge-work-method-13 () none 13)
|
|
(collide-edge-work-method-14 () none 14)
|
|
(collide-edge-work-method-15 () none 15)
|
|
(collide-edge-work-method-16 () none 16)
|
|
(collide-edge-work-method-17 () none 17)
|
|
(collide-edge-work-method-18 () none 18)
|
|
(collide-edge-work-method-19 () none 19)
|
|
(collide-edge-work-method-20 () none 20)
|
|
)
|
|
)
|
|
|
|
(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 #x8
|
|
: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 :w 1433.6)
|
|
(new 'static 'sphere :x 2293.76 :y -3276.8 :w 1884.16)
|
|
(new 'static 'sphere :x 1966.08 :y -6144.0 :w 1556.48)
|
|
(new 'static 'sphere :x 1966.08 :y -8601.6 :w 1556.48)
|
|
(new 'static 'sphere :x 1761.28 :y -11059.2 :w 1351.68)
|
|
(new 'static 'sphere :x 1679.36 :y -13312.0 :w 1269.76)
|
|
(new 'static 'sphere :x -737.28 :y 4096.0 :w 3072.0)
|
|
(new 'static 'sphere :x -737.28 :y 6553.6 :w 3072.0)
|
|
(new 'static 'sphere :x -737.28 :y 9420.8 :w 3072.0)
|
|
(new 'static 'sphere :x 1720.32 :y 3686.4 :w 2949.12)
|
|
(new 'static 'sphere :x 1720.32 :y 5734.4 :w 2949.12)
|
|
(new 'static 'sphere :x 1720.32 :y 8601.6 :w 2949.12)
|
|
)
|
|
)
|
|
)
|
|
|
|
(kmemopen global "collide-edge-work")
|
|
|
|
(define *collide-edge-work* (new 'global 'collide-edge-work))
|
|
|
|
(mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer *collide-edge-spec*) 320)
|
|
|
|
(define-perm *edge-grab-info* edge-grab-info (new 'global 'edge-grab-info))
|
|
|
|
(kmemclose)
|
|
|
|
|
|
|
|
|