jak-project/goal_src/engine/data/art-h.gc
Tyler Wilding dd959d0d0d
decomp: Continuing full pass of gameplay code (#839)
* decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)`

* decomp: almost finish `process-taskable`

* blocked: mistycannon / pelican

* decomp: finish `babak-with-cannon` write a script to fix gsrc

* decomp: finish `process-taskable`

* decomp: finish `flutflut` and `yakow`

* decomp: finish `fishermans-boat`

* blocked: state decomp `training-obs`

* decomp: finish `muse`

* decomp: finish `bonelurker`

* blocked: state decomp in `quicksandlurker`| `balloonlurker`

* decomp: finish `assistant-village2`

* scripts: script to help updating goal_src

* starting to update goal_src

* tests: update ref tests

* src: more src updating

* src: waiting on `process-taskable` and `muse`

* blocked: `citb-plat` state decomp

* decomp: finish `square-platform`

* blocked: `orbit-plat` due to overlays + static data

* decomp: finish `qbert-plat`

* blocked: almost finish `misty-conveyor`, sparticle-callback

* blocked: jungle-mirrors

* blocked: state decomp in `swamp-blimp`

* decomp: finish `swamp-bat`

* decomp: finish `swamp-rat`

* decomp: finish `swamp-rat-nest`

* blocked: state decomp `kermit`

* decomp: finish `cavecrystal-light`

* decomp: finish `spiderwebs`

* blocked: state decomp `dark-crystal`

* decomp: finish `baby-spider`

* decomp: finish `mother-spider-h`

* decomp: finish `mother-spider-proj`

* blocked: state decomp in `gnawer`

* blocked: state decomp in `driller-lurker`

* blocked: `sun-exit-chamber` breaks when adding handle cast

* decomp: finish `sunken-water`

* blocked: `target-tube` ShortCircuitElement::push_to_stack

* decomp: finish `sunken-fish`

* blocked: `minecart` decomp crash when adding stack cast

* decomp: finish `assistant-village3`

* decomp: finish `sage-village3`

* blocked: `cave-trap` done but ran into `go` issue

* blocked: `spider-egg` state decomp

* decomp: finish `target-snowball`

* blocked/stuck: `target-ice` decomp issue around cpad

* pausing: ice-cube has some weird collide-shape-prim handling

* blocked: `snow-ball` state decomp

* blocked: `snow-bumper` state decomp

* decomp: finish `snow-ram-h`

* decomp: finish `yeti`

* decomp: finish `assistant-lavatube`

* re-enable the float cast log

* decomp: updating to new sparticle definitions

* decomp: address feedback up to `swamp-rat-nest`

* address remaining feedback

* all-types: move the `pointer` def

* add back temporary `hud-hidden?`
2021-09-28 20:42:00 -04:00

302 lines
9.9 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: art-h.gc
;; name in dgo: art-h
;; dgos: GAME, ENGINE
(deftype joint-anim (basic)
((name string :offset-assert 4)
(number int16 :offset-assert 8)
(length int16 :offset-assert 10)
)
:method-count-assert 9
:size-assert #xc
:flag-assert #x90000000c
)
(deftype joint-anim-matrix (joint-anim)
((data matrix :inline :dynamic :offset 16)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(deftype joint-anim-transformq (joint-anim)
((data transformq :inline :dynamic :offset 16)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(deftype joint-anim-drawable (joint-anim)
((data drawable :dynamic :offset-assert 12) ;; guess
)
:method-count-assert 9
:size-assert #xc
:flag-assert #x90000000c
)
(declare-type joint-anim-compressed-hdr structure)
(deftype joint-anim-compressed (joint-anim)
((data joint-anim-compressed-hdr :dynamic :offset-assert 12) ;; guess
)
:method-count-assert 9
:size-assert #xc
:flag-assert #x90000000c
)
(deftype joint-anim-frame (structure)
((matrices matrix 2 :inline :offset-assert 0)
(data uint32 :dynamic :offset-assert 128) ;; guess
)
:method-count-assert 9
:size-assert #x80
:flag-assert #x900000080
(:methods
(new (symbol type int) _type_ 0)
)
)
(defmethod new joint-anim-frame ((allocation symbol) (type-to-make type) (arg0 int))
(let ((v1-1 (max 0 (+ arg0 -2))))
(the-as joint-anim-frame
(new-dynamic-structure
allocation
type-to-make
(the-as int (+ (-> type-to-make size) (the-as uint (* 48 v1-1)))))
)
)
)
(deftype joint-anim-compressed-hdr (structure)
((control-bits uint32 14 :offset-assert 0)
(num-joints uint32 :offset-assert 56)
(matrix-bits uint32 :offset-assert 60)
)
:method-count-assert 9
:size-assert #x40
:flag-assert #x900000040
)
(deftype joint-anim-compressed-fixed (structure)
((hdr joint-anim-compressed-hdr :inline :offset-assert 0)
(offset-64 uint32 :offset-assert 64)
(offset-32 uint32 :offset-assert 68)
(offset-16 uint32 :offset-assert 72)
(reserved uint32 :offset-assert 76)
(data vector 133 :inline :offset-assert 80) ;; guess
)
:method-count-assert 9
:size-assert #x8a0
:flag-assert #x9000008a0
)
(deftype joint-anim-compressed-frame (structure)
((offset-64 uint32 :offset-assert 0)
(offset-32 uint32 :offset-assert 4)
(offset-16 uint32 :offset-assert 8)
(reserved uint32 :offset-assert 12)
(data vector 133 :inline :offset-assert 16) ;; guess
)
:method-count-assert 9
:size-assert #x860
:flag-assert #x900000860
)
(deftype joint-anim-compressed-control (structure)
((num-frames uint32 :offset-assert 0)
(fixed-qwc uint32 :offset-assert 4)
(frame-qwc uint32 :offset-assert 8)
(fixed joint-anim-compressed-fixed :offset-assert 12)
(data uint32 1 :offset-assert 16) ;; guess
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
(declare-type art-element basic)
(deftype art (basic)
((name string :offset 8)
(length int32 :offset-assert 12)
(extra entity :offset-assert 16)
)
:method-count-assert 13
:size-assert #x14
:flag-assert #xd00000014
(:methods
(login (_type_) _type_ 9)
(dummy-10 (_type_ string type) joint 10)
(dummy-11 (_type_ string type) int 11)
(dummy-12 (_type_) symbol 12)
)
)
(deftype art-element (art)
((pad uint8 12))
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
)
(deftype art-mesh-anim (art-element)
((data basic :dynamic :offset-assert 32))
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
)
(deftype art-joint-anim (art-element)
;; figured out manually from custom inspect.
((_unknown (pointer int16) :offset 4) ;; no clue. used in mem-usage
(speed float :offset 20)
(artist-base float :offset 24)
(artist-step float :offset 28)
(master-art-group-name string :offset 32)
(master-art-group-index int32 :offset 36)
(blerc-data (pointer uint8) :offset 40) ;; todo, this is probably something else
(frames pointer :offset 44)
(data joint-anim-compressed :dynamic)
)
:method-count-assert 13
:size-assert #x30
:flag-assert #xd00000030
)
(deftype art-group (art)
((info file-info :offset 4)
(data art-element :dynamic :offset 32)
)
:method-count-assert 15
:size-assert #x20
:flag-assert #xf00000020
(:methods
(link-art! (_type_) art-group 13)
(unlink-art! (_type_) int 14)
)
)
(deftype art-mesh-geo (art-element)
((data basic :dynamic :offset-assert 32)
)
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
)
(deftype art-joint-geo (art-element)
((data joint :dynamic :offset-assert 32)
)
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
)
(deftype skeleton-group (basic)
((art-group-name basic :offset-assert 4)
(jgeo int32 :offset-assert 8)
(janim int32 :offset-assert 12)
(bounds vector :inline :offset-assert 16)
(radius meters :offset 28)
(mgeo uint16 4 :offset-assert 32)
(max-lod int32 :offset-assert 40)
(lod-dist float 4 :offset-assert 44)
(longest-edge meters :offset-assert 60)
(texture-level int8 :offset-assert 64)
(version int8 :offset-assert 65)
(shadow int8 :offset-assert 66)
(sort int8 :offset-assert 67)
(_pad uint8 4 :offset-assert 68)
)
:method-count-assert 9
:size-assert #x48
:flag-assert #x900000048
)
(declare-type merc-ctrl basic)
(deftype lod-group (structure)
((geo merc-ctrl :offset-assert 0)
(dist meters :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
(deftype lod-set (structure)
((lod lod-group 4 :inline :offset-assert 0)
(max-lod int8 :offset-assert 32)
)
:pack-me
:method-count-assert 10
:size-assert #x21
:flag-assert #xa00000021
(:methods
(dummy-9 (_type_) _type_ 9)
)
)
(declare-type ripple-control basic)
(declare-type shadow-geo basic)
(declare-type shadow-control basic)
(deftype draw-control (basic)
((status uint8 :offset-assert 4)
(matrix-type uint8 :offset-assert 5)
(data-format uint8 :offset-assert 6)
(global-effect uint8 :offset-assert 7)
(art-group art-group :offset-assert 8)
(jgeo art-joint-geo :offset-assert 12)
(mgeo merc-ctrl :offset-assert 16)
(dma-add-func function :offset-assert 20)
(skeleton skeleton-group :offset-assert 24) ;; or cspace-array or shadow-control
(lod-set lod-set :inline :offset-assert 28)
(lod lod-group 4 :inline :offset 28)
(max-lod int8 :offset 60)
(force-lod int8 :offset-assert 61)
(cur-lod int8 :offset-assert 62)
(desired-lod int8 :offset-assert 63)
(ripple ripple-control :offset-assert 64)
(longest-edge meters :offset-assert 68)
(longest-edge? uint32 :offset 68)
(light-index uint8 :offset-assert 72)
(dummy uint8 2 :offset-assert 73)
(death-draw-overlap uint8 :offset-assert 75)
(death-timer uint8 :offset-assert 76)
(death-timer-org uint8 :offset-assert 77)
(death-vertex-skip uint16 :offset-assert 78)
(death-effect uint32 :offset-assert 80)
(sink-group dma-foreground-sink-group :offset-assert 84) ;; dma-foreground-sink-group?
(process process :offset-assert 88)
(shadow shadow-geo :offset-assert 92)
(shadow-ctrl shadow-control :offset-assert 96)
(origin vector :inline :offset-assert 112)
(bounds vector :inline :offset-assert 128)
(radius meters :offset 140)
(color-mult rgbaf :inline :offset-assert 144)
(color-emissive rgbaf :inline :offset-assert 160)
(secondary-interp float :offset-assert 176)
(current-secondary-interp float :offset-assert 180)
(shadow-mask uint8 :offset-assert 184)
(level-index uint8 :offset-assert 185)
(origin-joint-index uint8 :offset-assert 186)
(shadow-joint-index uint8 :offset-assert 187)
)
:method-count-assert 12
:size-assert #xbc
:flag-assert #xc000000bc
(:methods
(new (symbol type process art-joint-geo) _type_ 0)
(dummy-9 (_type_) (pointer int8) 9)
(dummy-10 (_type_ int) int 10)
(dummy-11 (_type_ pointer) int 11)
)
)
(defmethod dummy-9 draw-control ((obj draw-control))
(&-> (-> obj skeleton) texture-level)
)