1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: add support for transparency / opacity / alpha in particle example (#6488)

This commit is contained in:
Larpon
2020-09-28 06:14:15 +02:00
committed by GitHub
parent 06cade6c31
commit 0e2f267805
3 changed files with 15 additions and 7 deletions

View File

@ -46,12 +46,12 @@ pub fn (s System) draw() {
}
pub fn (mut s System) reset() {
for i in 0..s.pool.len {
for i in 0 .. s.pool.len {
mut p := s.pool[i]
p.reset()
p.life_time = 0
}
for i in 0..s.bin.len {
for i in 0 .. s.bin.len {
mut p := s.pool[i]
p.reset()
p.life_time = 0
@ -82,9 +82,7 @@ pub fn (mut s System) free() {
print(ptr_str(p) + ' ouch')
continue
}
unsafe {
free(p)
}
unsafe {free(p)}
}
s.pool.clear()
for p in s.bin {