mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 23:47:57 -04:00
7edfc8bcec
* blocked: `part-tester` - `code` handler thinks it returns nothing * blocked: `crates` finished but `go` is returning none causing issues * blocked: `(event ram-boss-idle)::snow-ram-boss` expression building fails due to delay slot issue * decomp: finish `snow-ram` | `seagull` blocked, new static data issue * decomp: finish `snow-bumper` * stuck: `snow-ball` close, can't figure out a type made on the stack * decomp: finish `spider-egg` * decomp: finish `puffer` * decomp: finish `driller-lurker` * decomp: finish `dark-crystal` * stuck: `kermit` - mostly done but stuck on a joint related callback arg * decomp: finish `gnawer` * decomp: finish `mother-spider-egg` * decomp: finish `swamp-blimp` * stuck: `mistycannon` prebind function signature * decomp: finish `citb-plat` * decomp: finish `darkvine` * blocked: `jungle-mirrors` - issues with `link` macro * decomp: finish `launcherdoor` * decomp: finish `quicksandlurker` except for 1 unused function * stuck: `balloonlurker` - `(code balloonlurker-mine-explode)` has some weird joint related code * stuck: need to decompile an asm func in `orbit-plat` * decomp: finish `voicebox` * blocked: `mother-spider` has issues where `go` returns none * decomp: finish `bully` * decomp: finish `seagull` * fixed up after merge conflicts * decomp: finish `jungle-mirrors` * update gsrc * double checked files, fixed issues * decomp: revert change to projectile methods * decomp: some more fixes * address feedback * fix up remaining method calls in `cam-states` * fix jungle-mirrors
128 lines
4.7 KiB
Common Lisp
128 lines
4.7 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)
|
|
|
|
(defenum sp-cpuinfo-flag
|
|
:bitfield #t
|
|
:type uint32
|
|
(bit0 0)
|
|
(bit1 1) ;; village1-part
|
|
(bit2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst
|
|
(bit3 3)
|
|
(bit4 4) ;; see - swamp-blimp
|
|
(ready-to-launch 6) ;; maybe just just death?
|
|
(bit7 7)
|
|
(aux-list 8) ;; prevents relaunch, adds to aux
|
|
(bit9 9)
|
|
(level0 10)
|
|
(level1 11)
|
|
(bit12 12) ;; required to relaunch
|
|
(bit13 13)
|
|
(bit14 14)
|
|
(use-global-acc 16)
|
|
(launch-along-z 17)
|
|
(left-multiply-quat 18)
|
|
(right-multiply-quat 19)
|
|
(set-conerot 20)
|
|
)
|
|
|
|
(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 sp-cpuinfo-flag :offset-assert 104)
|
|
(user-int32 int32 :offset-assert 108)
|
|
(user-uint32 uint32 :offset 108)
|
|
(user-float float :score 100 :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 symbol :offset-assert 128)
|
|
(key sparticle-launch-control :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
|
|
;; field key is a basic loaded with a signed load
|
|
)
|
|
|
|
|
|
(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 int32 2 :offset-assert 12)
|
|
(num-alloc int32 2 :offset-assert 20)
|
|
(is-3d basic :offset-assert 28)
|
|
(flags uint32 :offset-assert 32)
|
|
(alloc-table (pointer uint64) :offset-assert 36)
|
|
(cpuinfo-table (inline-array sparticle-cpuinfo) :offset-assert 40)
|
|
(vecdata-table pointer :offset-assert 44)
|
|
(adgifdata-table (inline-array adgif-shader) :offset-assert 48)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x34
|
|
:flag-assert #x900000034
|
|
(:methods
|
|
(new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_ 0)
|
|
)
|
|
)
|
|
|
|
(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)
|
|
|
|
(defun-extern kill-all-particles-with-key sparticle-launch-control none)
|
|
|
|
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo))
|