mirror of
https://github.com/open-goal/jak-project
synced 2026-06-17 23:21:41 -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
230 lines
11 KiB
Common Lisp
Vendored
Generated
230 lines
11 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type vis-gif-tag
|
|
(deftype vis-gif-tag (structure)
|
|
((fog0 uint32 :offset-assert 0)
|
|
(strip uint32 :offset-assert 4)
|
|
(regs uint32 :offset-assert 8)
|
|
(fan uint32 :offset-assert 12)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
;; definition for method 3 of type vis-gif-tag
|
|
(defmethod inspect vis-gif-tag ((obj vis-gif-tag))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'vis-gif-tag)
|
|
(format #t "~1Tfog0: ~D~%" (-> obj fog0))
|
|
(format #t "~1Tstrip: ~D~%" (-> obj strip))
|
|
(format #t "~1Tregs: ~D~%" (-> obj regs))
|
|
(format #t "~1Tfan: ~D~%" (-> obj fan))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type cull-info
|
|
(deftype cull-info (structure)
|
|
((x-fact float :offset-assert 0)
|
|
(y-fact float :offset-assert 4)
|
|
(z-fact float :offset-assert 8)
|
|
(cam-radius float :offset-assert 12)
|
|
(cam-x float :offset-assert 16)
|
|
(cam-y float :offset-assert 20)
|
|
(xz-dir-ax float :offset-assert 24)
|
|
(xz-dir-az float :offset-assert 28)
|
|
(xz-dir-bx float :offset-assert 32)
|
|
(xz-dir-bz float :offset-assert 36)
|
|
(xz-cross-ab float :offset-assert 40)
|
|
(yz-dir-ay float :offset-assert 44)
|
|
(yz-dir-az float :offset-assert 48)
|
|
(yz-dir-by float :offset-assert 52)
|
|
(yz-dir-bz float :offset-assert 56)
|
|
(yz-cross-ab float :offset-assert 60)
|
|
)
|
|
:allow-misaligned
|
|
:method-count-assert 9
|
|
:size-assert #x40
|
|
:flag-assert #x900000040
|
|
)
|
|
|
|
;; definition for method 3 of type cull-info
|
|
(defmethod inspect cull-info ((obj cull-info))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'cull-info)
|
|
(format #t "~1Tx-fact: ~f~%" (-> obj x-fact))
|
|
(format #t "~1Ty-fact: ~f~%" (-> obj y-fact))
|
|
(format #t "~1Tz-fact: ~f~%" (-> obj z-fact))
|
|
(format #t "~1Tcam-radius: ~f~%" (-> obj cam-radius))
|
|
(format #t "~1Tcam-x: ~f~%" (-> obj cam-x))
|
|
(format #t "~1Tcam-y: ~f~%" (-> obj cam-y))
|
|
(format #t "~1Txz-dir-ax: ~f~%" (-> obj xz-dir-ax))
|
|
(format #t "~1Txz-dir-az: ~f~%" (-> obj xz-dir-az))
|
|
(format #t "~1Txz-dir-bx: ~f~%" (-> obj xz-dir-bx))
|
|
(format #t "~1Txz-dir-bz: ~f~%" (-> obj xz-dir-bz))
|
|
(format #t "~1Txz-cross-ab: ~f~%" (-> obj xz-cross-ab))
|
|
(format #t "~1Tyz-dir-ay: ~f~%" (-> obj yz-dir-ay))
|
|
(format #t "~1Tyz-dir-az: ~f~%" (-> obj yz-dir-az))
|
|
(format #t "~1Tyz-dir-by: ~f~%" (-> obj yz-dir-by))
|
|
(format #t "~1Tyz-dir-bz: ~f~%" (-> obj yz-dir-bz))
|
|
(format #t "~1Tyz-cross-ab: ~f~%" (-> obj yz-cross-ab))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type math-camera
|
|
(deftype math-camera (basic)
|
|
((d meters :offset-assert 4)
|
|
(f meters :offset-assert 8)
|
|
(fov degrees :offset-assert 12)
|
|
(x-ratio float :offset-assert 16)
|
|
(y-ratio float :offset-assert 20)
|
|
(x-pix float :offset-assert 24)
|
|
(x-clip float :offset-assert 28)
|
|
(x-clip-ratio-in float :offset-assert 32)
|
|
(x-clip-ratio-over float :offset-assert 36)
|
|
(y-pix float :offset-assert 40)
|
|
(y-clip float :offset-assert 44)
|
|
(y-clip-ratio-in float :offset-assert 48)
|
|
(y-clip-ratio-over float :offset-assert 52)
|
|
(cull-info cull-info :inline :offset-assert 56)
|
|
(fog-start meters :offset-assert 120)
|
|
(fog-end meters :offset-assert 124)
|
|
(fog-max float :offset-assert 128)
|
|
(fog-min float :offset-assert 132)
|
|
(reset int32 :offset-assert 136)
|
|
(smooth-step float :offset-assert 140)
|
|
(smooth-t float :offset-assert 144)
|
|
(perspective matrix :inline :offset-assert 160)
|
|
(isometric matrix :inline :offset-assert 224)
|
|
(sprite-2d matrix :inline :offset-assert 288)
|
|
(sprite-2d-hvdf vector :inline :offset-assert 352)
|
|
(camera-rot matrix :inline :offset-assert 368)
|
|
(inv-camera-rot matrix :inline :offset-assert 432)
|
|
(inv-camera-rot-smooth matrix :inline :offset-assert 496)
|
|
(inv-camera-rot-smooth-from quaternion :inline :offset-assert 560)
|
|
(camera-temp matrix :inline :offset-assert 576)
|
|
(prev-camera-temp matrix :inline :offset-assert 640)
|
|
(prev-inv-camera-rot matrix :inline :offset-assert 704)
|
|
(prev-trans vector :inline :offset-assert 768)
|
|
(hmge-scale vector :inline :offset-assert 784)
|
|
(inv-hmge-scale vector :inline :offset-assert 800)
|
|
(hvdf-off vector :inline :offset-assert 816)
|
|
(guard vector :inline :offset-assert 832)
|
|
(vis-gifs vis-gif-tag 4 :inline :offset-assert 848)
|
|
(giftex uint128 :offset 848)
|
|
(gifgr uint128 :offset 864)
|
|
(giftex-trans uint128 :offset 880)
|
|
(gifgr-trans uint128 :offset 896)
|
|
(pfog0 float :offset-assert 912)
|
|
(pfog1 float :offset-assert 916)
|
|
(trans vector :inline :offset-assert 928)
|
|
(plane plane 4 :inline :offset-assert 944)
|
|
(guard-plane plane 4 :inline :offset-assert 1008)
|
|
(shrub-mat matrix :inline :offset-assert 1072)
|
|
(quat-other quaternion :inline :offset-assert 1136)
|
|
(trans-other vector :inline :offset-assert 1152)
|
|
(shrub-mat-other matrix :inline :offset-assert 1168)
|
|
(camera-temp-other matrix :inline :offset-assert 1232)
|
|
(camera-rot-other matrix :inline :offset-assert 1296)
|
|
(inv-camera-rot-other matrix :inline :offset-assert 1360)
|
|
(plane-other plane 4 :inline :offset-assert 1424)
|
|
(guard-plane-other plane 4 :inline :offset-assert 1488)
|
|
(mirror-trans vector :inline :offset-assert 1552)
|
|
(mirror-normal vector :inline :offset-assert 1568)
|
|
(fov-correction-factor float :offset-assert 1584)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x634
|
|
:flag-assert #x900000634
|
|
(:methods
|
|
(new (symbol type) _type_ 0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type math-camera
|
|
;; INFO: Used lq/sq
|
|
(defmethod inspect math-camera ((obj math-camera))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~1Td: (meters ~m)~%" (-> obj d))
|
|
(format #t "~1Tf: (meters ~m)~%" (-> obj f))
|
|
(format #t "~1Tfov: (deg ~r)~%" (-> obj fov))
|
|
(format #t "~1Tx-ratio: ~f~%" (-> obj x-ratio))
|
|
(format #t "~1Ty-ratio: ~f~%" (-> obj y-ratio))
|
|
(format #t "~1Tx-pix: ~f~%" (-> obj x-pix))
|
|
(format #t "~1Tx-clip: ~f~%" (-> obj x-clip))
|
|
(format #t "~1Tx-clip-ratio-in: ~f~%" (-> obj x-clip-ratio-in))
|
|
(format #t "~1Tx-clip-ratio-over: ~f~%" (-> obj x-clip-ratio-over))
|
|
(format #t "~1Ty-pix: ~f~%" (-> obj y-pix))
|
|
(format #t "~1Ty-clip: ~f~%" (-> obj y-clip))
|
|
(format #t "~1Ty-clip-ratio-in: ~f~%" (-> obj y-clip-ratio-in))
|
|
(format #t "~1Ty-clip-ratio-over: ~f~%" (-> obj y-clip-ratio-over))
|
|
(format #t "~1Tcull-info: #<cull-info @ #x~X>~%" (-> obj cull-info))
|
|
(format #t "~1Tfog-start: (meters ~m)~%" (-> obj fog-start))
|
|
(format #t "~1Tfog-end: (meters ~m)~%" (-> obj fog-end))
|
|
(format #t "~1Tfog-max: ~f~%" (-> obj fog-max))
|
|
(format #t "~1Tfog-min: ~f~%" (-> obj fog-min))
|
|
(format #t "~1Treset: ~D~%" (-> obj reset))
|
|
(format #t "~1Tsmooth-step: ~f~%" (-> obj smooth-step))
|
|
(format #t "~1Tsmooth-t: ~f~%" (-> obj smooth-t))
|
|
(format #t "~1Tperspective: #<matrix @ #x~X>~%" (-> obj perspective))
|
|
(format #t "~1Tisometric: #<matrix @ #x~X>~%" (-> obj isometric))
|
|
(format #t "~1Tsprite-2d: #<matrix @ #x~X>~%" (-> obj sprite-2d))
|
|
(format #t "~1Tsprite-2d-hvdf: #<vector @ #x~X>~%" (-> obj sprite-2d-hvdf))
|
|
(format #t "~1Tcamera-rot: #<matrix @ #x~X>~%" (-> obj camera-rot))
|
|
(format #t "~1Tinv-camera-rot: #<matrix @ #x~X>~%" (-> obj inv-camera-rot))
|
|
(format #t "~1Tinv-camera-rot-smooth: #<matrix @ #x~X>~%" (-> obj inv-camera-rot-smooth))
|
|
(format #t "~1Tinv-camera-rot-smooth-from: #<quaternion @ #x~X>~%" (-> obj inv-camera-rot-smooth-from))
|
|
(format #t "~1Tcamera-temp: #<matrix @ #x~X>~%" (-> obj camera-temp))
|
|
(format #t "~1Tprev-camera-temp: #<matrix @ #x~X>~%" (-> obj prev-camera-temp))
|
|
(format #t "~1Tprev-inv-camera-rot: #<matrix @ #x~X>~%" (-> obj prev-inv-camera-rot))
|
|
(format #t "~1Tprev-trans: ~`vector`P~%" (-> obj prev-trans))
|
|
(format #t "~1Thmge-scale: #<vector @ #x~X>~%" (-> obj hmge-scale))
|
|
(format #t "~1Tinv-hmge-scale: #<vector @ #x~X>~%" (-> obj inv-hmge-scale))
|
|
(format #t "~1Thvdf-off: #<vector @ #x~X>~%" (-> obj hvdf-off))
|
|
(format #t "~1Tguard: #<vector @ #x~X>~%" (-> obj guard))
|
|
(format #t "~1Tvis-gifs[4] @ #x~X~%" (-> obj vis-gifs))
|
|
(format #t "~1Tgiftex: ~D~%" (-> obj giftex))
|
|
(format #t "~1Tgifgr: ~D~%" (-> obj gifgr))
|
|
(format #t "~1Tgiftex-trans: ~D~%" (-> obj giftex-trans))
|
|
(format #t "~1Tgifgr-trans: ~D~%" (-> obj gifgr-trans))
|
|
(format #t "~1Tpfog0: ~f~%" (-> obj pfog0))
|
|
(format #t "~1Tpfog1: ~f~%" (-> obj pfog1))
|
|
(format #t "~1Ttrans: ~`vector`P~%" (-> obj trans))
|
|
(format #t "~1Tplane[4] @ #x~X~%" (-> obj plane))
|
|
(format #t "~1Tguard-plane[4] @ #x~X~%" (-> obj guard-plane))
|
|
(format #t "~1Tshrub-mat: #<matrix @ #x~X>~%" (-> obj shrub-mat))
|
|
(format #t "~1Tquat-other: #<quaternion @ #x~X>~%" (-> obj quat-other))
|
|
(format #t "~1Ttrans-other: #<vector @ #x~X>~%" (-> obj trans-other))
|
|
(format #t "~1Tshrub-mat-other: #<matrix @ #x~X>~%" (-> obj shrub-mat-other))
|
|
(format #t "~1Tcamera-temp-other: #<matrix @ #x~X>~%" (-> obj camera-temp-other))
|
|
(format #t "~1Tcamera-rot-other: #<matrix @ #x~X>~%" (-> obj camera-rot-other))
|
|
(format #t "~1Tinv-camera-rot-other: #<matrix @ #x~X>~%" (-> obj inv-camera-rot-other))
|
|
(format #t "~1Tplane-other[4] @ #x~X~%" (-> obj plane-other))
|
|
(format #t "~1Tguard-plane-other[4] @ #x~X~%" (-> obj guard-plane-other))
|
|
(format #t "~1Tmirror-trans: #<vector @ #x~X>~%" (-> obj mirror-trans))
|
|
(format #t "~1Tmirror-normal: #<vector @ #x~X>~%" (-> obj mirror-normal))
|
|
(format #t "~1Tfov-correction-factor: ~f~%" (-> obj fov-correction-factor))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|
|
|
|
|
|
|
|
|