diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-13 22:20:34 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-13 22:20:34 +0000 |
| commit | 587632d99a2170298e10acf3b78d949f4d3d8315 (patch) | |
| tree | 1df8c74ac8094085015a08f723d1a3ade35cad24 /src/game | |
| parent | f796eeb6a79a47b3e1cc600d54faf4aa060d7491 (diff) | |
| download | zcatch-587632d99a2170298e10acf3b78d949f4d3d8315.tar.gz zcatch-587632d99a2170298e10acf3b78d949f4d3d8315.zip | |
fixed minor issues with the snow and cleaned it up
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/game_client.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index f47e94ff..00deea5f 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -1700,9 +1700,12 @@ void render_stars() void render_snow() { - //gfx_mapscreen(0,0,800,600); vec2 tl, br; gfx_getscreen(&tl.x, &tl.y, &br.x, &br.y); + tl.x += 1000; // this is here to fix positions below 0,0 + tl.y += 1000; + br.x += 1000; + br.y += 1000; struct flake { @@ -1742,10 +1745,7 @@ void render_snow() int basey = (int)(tl.y/h); float splity = tl.y-basey*h; - int64 now = time_get(); - int64 freq = time_freq()*5; float f = client_frametime(); - float t = (now%freq)/(float)freq; gfx_texture_set(data->images[IMAGE_SNOW].id); gfx_quads_begin(); for(int i = 0; i < NUM_FLAKES; i++) @@ -1764,16 +1764,11 @@ void render_snow() x += w; if(flakes[i].p.y < splity) y += h; - //flakes[i].p.y += f*100; - - /* - if(flakes[i].p.x < -50) - flakes[i].p.x += (800+50+50); - if(flakes[i].p.y > 650) - flakes[i].p.y -= (600 + 50 +50);*/ + + x -= 1000; + y -= 1000; gfx_quads_setrotation(flakes[i].rot); - gfx_setcolor(1,1,1,1); gfx_quads_draw(x, y, flakes[i].size, flakes[i].size); } |