2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: sparticle-h.gc
|
|
|
|
;; name in dgo: sparticle-h
|
|
|
|
;; dgos: GAME, ENGINE
|
|
|
|
|
2021-06-07 18:30:16 -04:00
|
|
|
(define *sp-frame-time* (new 'global 'vector))
|
|
|
|
|
2021-07-17 15:00:10 -04:00
|
|
|
(set-vector!
|
|
|
|
*sp-frame-time*
|
|
|
|
0.00000000000000000000000000000000000001175495
|
|
|
|
5.0
|
|
|
|
1.0
|
|
|
|
1.0
|
2021-06-07 18:30:16 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
(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 uint32 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 uint32 :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
|
|
|
|
)
|
2021-07-17 13:41:05 -04:00
|
|
|
|
|
|
|
(define-extern part-group-pointer? (function pointer symbol))
|
2021-08-09 19:07:11 -04:00
|
|
|
|
|
|
|
;; TODO - for shadow
|
|
|
|
(define-extern *part-id-table* (array sparticle-launcher))
|
|
|
|
(define-extern *part-group-id-table* (array sparticle-launch-group))
|