jak-project/goal_src/jak3/engine/gfx/generic/generic-vu1-h.gc
Hat Kid 2969833b2d
decomp3: more engine stuff, detect non-virtual state inheritance (#3377)
- `speech`
- `ambient`
- `water-h`
- `vol-h`
- `generic-obs`
- `carry-h`
- `pilot-h`
- `board-h`
- `gun-h`
- `flut-h`
- `indax-h`
- `lightjak-h`
- `darkjak-h`
- `target-util`
- `history`
- `collide-reaction-target`
- `logic-target`
- `sidekick`
- `projectile`
- `voicebox`
- `ragdoll-edit`
- most of `ragdoll` (not added to gsrc yet)
- `curves`
- `find-nearest`
- `lightjak-wings`
- `target-handler`
- `target-anim`
- `target`
- `target2`
- `target-swim`
- `target-lightjak`
- `target-invisible`
- `target-death`
- `target-gun`
- `gun-util`
- `board-util`
- `target-board`
- `board-states`
- `mech-h`
- `vol`
- `vent`
- `viewer`
- `gem-pool`
- `collectables`
- `crates`
- `secrets-menu`

Additionally:

- Detection of non-virtual state inheritance
- Added a config file that allows overriding the process stack size set
by `stack-size-set!` calls
- Fix for integer multiplication with `r0`
- Fixed detection for the following macros:
	- `static-attack-info`
- `defpart` and `defpartgroup` (probably still needs adjustments, uses
Jak 2 implementation at the moment)
- `sound-play` (Jak 3 seems to always call `sound-play-by-name` with a
`sound-group` of 0, so the macro has been temporarily defaulted to use
that)

One somewhat significant change made here that should be noted is that
the return type of `process::init-from-entity!` was changed to `object`.
I've been thinking about this for a while, since it looks a bit nicer
without the `(none)` at the end and I have recently encountered init
methods that early return `0`.
2024-03-03 15:15:27 -05:00

79 lines
2.1 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: generic-vu1-h.gc
;; name in dgo: generic-vu1-h
;; dgos: GAME
;; DECOMP BEGINS
(deftype pris-mtx (structure)
"Matrix for merc rendering. Named after the earlier 'pris' renderer.
Contains a transformation matrix for vertices, one for normals, and a scale.
This matrix is likely not used by generic VU1, but is used by the merc -> generic converter."
((data float 32)
(vector vector 8 :overlay-at (-> data 0))
(t-mtx matrix :inline :overlay-at (-> data 0))
(n-mtx matrix3 :inline :overlay-at (-> data 16))
(scale vector :inline :overlay-at (-> data 28))
)
)
(deftype generic-pris-mtx-save (structure)
((loc-mtx pris-mtx :inline)
(par-mtx pris-mtx :inline)
(dif-mtx pris-mtx :inline)
)
)
(deftype generic-constants (structure)
"Constant data sent to VU1 for generic rendering."
((fog vector :inline)
(adgif gs-gif-tag :inline)
(hvdf-offset vector :inline)
(hmge-scale vector :inline)
(invh-scale vector :inline)
(guard vector :inline)
(flush qword :inline)
(stores qword :inline)
)
)
(deftype generic-shrub-constants (structure)
((shrub-giftag generic-gif-tag :inline)
(shrub-adnop qword :inline)
)
)
(deftype gcf-shader (structure)
((adgif uint128 5)
(shader adgif-shader :inline :overlay-at (-> adgif 0))
(pos uint32 :offset 12)
(num uint32 :offset 28)
)
)
(deftype gcf-control (structure)
((matrix matrix :inline)
(giftag generic-gif-tag :inline)
(adnops gs-adcmd 2 :inline)
(num-strips uint32 :overlay-at (-> giftag data 3))
(num-dps uint32 :overlay-at (-> adnops 0 word 3))
(kick-offset uint32 :offset 108)
(shader gcf-shader :inline :dynamic)
)
)
(deftype gcf-vertex (structure)
((tex vector4w :inline)
(clr gs-packed-rgba :inline)
(pos gs-packed-xyzw :inline)
)
)