;; draw system
(bind-func psystem_draw 500000000
(let ((vertex_dat:float* (zalloc 16000000))
(texcoord_dat:float* (zalloc 16000000))
(color_dat:float* (zalloc 32000000)))
(lambda (psys:psystem*)
(let ((i 0)
(size (psystem_size psys))
(texid (psystem_texid psys))
(states (psystem_states psys))
(state 0)
(xs:float* (psystem_xs psys))
(ys:float* (psystem_ys psys))
(xvs (psystem_xvs psys))
(yvs (psystem_yvs psys))
(sizes (psystem_sizes psys))
(reds (psystem_reds psys))
(greens (psystem_greens psys))
(blues (psystem_blues psys))
(alphas(psystem_alphas psys))
(cnt 0))