;; create system
(bind-func psystem_create
(lambda (number texture_id)
(let ((psys:psystem* (halloc))
(states:i64* (halloc number))
(xs:float* (halloc number))
(ys:float* (halloc number))
(xvs:float* (halloc number))
(yvs:float* (halloc number))
(sizes:float* (halloc number))
(reds:float* (halloc number))
(greens:float* (halloc number))
(blues:float* (halloc number))
(alphas:float* (halloc number)))
;(printf "%p,%p,%p,%p,%p,%p,%p,%p,%p,%x\n" states xs ys xvs yvs sizes reds greens blues alphas)
(tfill! psys number states xs ys xvs yvs sizes reds greens blues alphas texture_id)
psys)))