Files
jak-project/goal_src/engine/sparticle/sparticle-h.gc
T
Tyler Wilding 1c7c2132eb decomp: weather-part (#798)
* stash

* decomp: finish what is currently possible in `time-of-day`

* need to know how sp-field-init-spec's functions are called

* solved some issues, but going to be blocked by the sparticle-group-item

* decompiler: Add support for `sparticle-launch-group` from static data

* decomp: finish `weather-part`
2021-08-31 21:36:19 -04:00

95 lines
3.9 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: sparticle-h.gc
;; name in dgo: sparticle-h
;; dgos: GAME, ENGINE
(define *sp-frame-time* (new 'global 'vector))
(set-vector!
*sp-frame-time*
0.00000000000000000000000000000000000001175495
5.0
1.0
1.0
)
(define *sp-60-hz* #t)
(deftype sparticle-cpuinfo (structure)
((sprite sprite-vec-data-2d :offset-assert 0)
(adgif adgif-shader :offset-assert 4)
(radius float :offset-assert 8)
(omega float :offset-assert 12)
(vel-sxvel vector :inline :offset-assert 16)
(rot-syvel vector :inline :offset-assert 32)
(fade rgbaf :inline :offset-assert 48)
(acc vector :inline :offset-assert 64)
(rotvel3d quaternion :inline :offset-assert 80)
(vel vector3s :inline :offset 16)
(accel vector3s :inline :offset 64)
(scalevelx float :offset 28)
(scalevely float :offset 44)
(friction float :offset-assert 96)
(timer int32 :offset-assert 100)
(flags uint32 :offset-assert 104)
(user-int32 int32 :offset-assert 108)
(user-uint32 uint32 :offset 108)
(user-float float :offset 108)
(user-pntr uint32 :offset 108)
(user-sprite sprite-vec-data-2d :offset 108)
(func basic :offset-assert 112)
(next-time uint32 :offset-assert 116)
(next-launcher basic :offset-assert 120)
(cache-alpha float :offset-assert 124)
(valid basic :offset-assert 128)
(key basic :offset-assert 132)
(binding sparticle-launch-state :offset-assert 136)
(data uint32 1 :offset 12)
(dataf float 1 :offset 12)
(datac uint8 1 :offset 12)
)
:method-count-assert 9
:size-assert #x8c
:flag-assert #x90000008c
)
(deftype sparticle-launchinfo (structure)
((launchrot vector :inline :offset-assert 0)
(conerot vector :inline :offset-assert 16)
(coneradius float :offset-assert 32)
(rotate-y float :offset-assert 36)
(data uint8 1 :offset 0)
)
:method-count-assert 9
:size-assert #x28
:flag-assert #x900000028
)
(deftype sparticle-system (basic)
((blocks int32 2 :offset-assert 4)
(length uint32 2 :offset-assert 12)
(num-alloc uint32 2 :offset-assert 20)
(is-3d basic :offset-assert 28)
(flags uint32 :offset-assert 32)
(alloc-table uint32 :offset-assert 36)
(cpuinfo-table sparticle-cpuinfo :offset-assert 40)
(vecdata-table uint32 :offset-assert 44)
(adgifdata-table uint32 :offset-assert 48)
)
:method-count-assert 9
:size-assert #x34
:flag-assert #x900000034
)
(define-extern part-group-pointer? (function pointer symbol))
;; TODO - for shadow
(define-extern *part-id-table* (array sparticle-launcher))
(define-extern *part-group-id-table* (array sparticle-launch-group))
;; TODO - for basically everything particle related
(define-extern *sp-particle-system-2d* sparticle-system)
(define-extern *sp-particle-system-3d* sparticle-system)