mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
13def9a8b2
Small fix to decompiler when the original compiler uses `ra` register. This seems to happen in "normal" code very rarely - perhaps they manually specified this in an `rlet`. Start figuring out buckets/textures for Jak 3. The foreground code is not yet modified for PC - I want to wait until the game is running, since it is too hard to do it now.
94 lines
2 KiB
Common Lisp
94 lines
2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: bones-h.gc
|
|
;; name in dgo: bones-h
|
|
;; dgos: GAME
|
|
|
|
(defenum bone-calc-flags
|
|
:type uint16
|
|
:bitfield #t
|
|
(write-ripple-data 0)
|
|
(no-cam-rot 1)
|
|
)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype bone-buffer (structure)
|
|
((joint matrix 16 :inline)
|
|
(bone bone 16 :inline)
|
|
(output pris-mtx 16 :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-layout (structure)
|
|
((data uint16 8)
|
|
(joint (inline-array matrix) 2 :overlay-at (-> data 0))
|
|
(bone (inline-array bone) 2 :overlay-at (-> data 4))
|
|
(output (inline-array pris-mtx) 2 :offset 16)
|
|
(unused uint32 2 :offset 24)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-regs (structure)
|
|
((dma-buf dma-buffer)
|
|
(wait-count uint32)
|
|
(in-count uint32)
|
|
(sp-size uint32)
|
|
(sp-bufnum uint32)
|
|
(joint-ptr (inline-array joint))
|
|
(bone-ptr (inline-array bone))
|
|
(num-bones uint32)
|
|
(mtxs (inline-array pris-mtx))
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-work (structure)
|
|
((layout bone-layout :inline)
|
|
(regs bone-regs :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-debug (structure)
|
|
((time-ctr uint32)
|
|
(timing uint32 360)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-memory (structure)
|
|
((work bone-work :inline)
|
|
(buffer bone-buffer 2 :inline)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-calculation (structure)
|
|
((flags bone-calc-flags)
|
|
(num-bones uint16)
|
|
(matrix-area (inline-array pris-mtx))
|
|
(joints (inline-array joint))
|
|
(bones (inline-array bone))
|
|
(ripple-scale float)
|
|
(ripple-y-scale float)
|
|
(ripple-normal-scale float)
|
|
(ripple-area (inline-array vector))
|
|
(ripple-vec vector :inline :overlay-at ripple-scale)
|
|
(next bone-calculation)
|
|
(dummy-1 uint32)
|
|
(dummy-2 uint32)
|
|
(dummy-3 uint32)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype bone-calculation-list (structure)
|
|
((first bone-calculation)
|
|
(next bone-calculation)
|
|
)
|
|
)
|