diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-10-27 14:38:53 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-10-27 14:38:53 +0000 |
| commit | 878ede3080ab2cfb627aca505c397d9765052996 (patch) | |
| tree | 98bff371070e1dca0295f0ca58d64ac4ee8042ce /src/game/client/components/particles.cpp | |
| parent | 9b99ec0e60b60134e46f2f71d707230948f7db03 (diff) | |
| download | zcatch-878ede3080ab2cfb627aca505c397d9765052996.tar.gz zcatch-878ede3080ab2cfb627aca505c397d9765052996.zip | |
major update with stuff
Diffstat (limited to 'src/game/client/components/particles.cpp')
| -rw-r--r-- | src/game/client/components/particles.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp index ef6dbbe9..61fcf738 100644 --- a/src/game/client/components/particles.cpp +++ b/src/game/client/components/particles.cpp @@ -1,4 +1,6 @@ #include <base/math.hpp> +#include <engine/client/graphics.h> + #include <game/generated/gc_data.hpp> #include <game/client/render.hpp> #include <game/gamecore.hpp> @@ -124,31 +126,31 @@ void PARTICLES::on_render() void PARTICLES::render_group(int group) { - gfx_blend_normal(); + Graphics()->BlendNormal(); //gfx_blend_additive(); - gfx_texture_set(data->images[IMAGE_PARTICLES].id); - gfx_quads_begin(); + Graphics()->TextureSet(data->images[IMAGE_PARTICLES].id); + Graphics()->QuadsBegin(); int i = first_part[group]; while(i != -1) { - select_sprite(particles[i].spr); + RenderTools()->select_sprite(particles[i].spr); float a = particles[i].life / particles[i].life_span; vec2 p = particles[i].pos; float size = mix(particles[i].start_size, particles[i].end_size, a); - gfx_quads_setrotation(particles[i].rot); + Graphics()->QuadsSetRotation(particles[i].rot); - gfx_setcolor( + Graphics()->SetColor( particles[i].color.r, particles[i].color.g, particles[i].color.b, particles[i].color.a); // pow(a, 0.75f) * - gfx_quads_draw(p.x, p.y, size, size); + Graphics()->QuadsDraw(p.x, p.y, size, size); i = particles[i].next_part; } - gfx_quads_end(); - gfx_blend_normal(); + Graphics()->QuadsEnd(); + Graphics()->BlendNormal(); } |