about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorJoel de Vahl <joel@stalverk80.se>2007-12-09 18:19:42 +0000
committerJoel de Vahl <joel@stalverk80.se>2007-12-09 18:19:42 +0000
commit349fcdb7f8f53e2657309c2c0548a123af96c410 (patch)
tree2f1926804d6c4e4a9b58bf2d2b53d009aab13aec /src/game
parent88078b8de0c5d175328afe1be9ed18c1f79af2ea (diff)
downloadzcatch-349fcdb7f8f53e2657309c2c0548a123af96c410.tar.gz
zcatch-349fcdb7f8f53e2657309c2c0548a123af96c410.zip
Initial code for winter background
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/game_client.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index 3c3619c3..250883f0 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -1614,6 +1614,28 @@ static void render_player(
 	}
 }
 
+void render_moon(float x, float y)
+{
+	gfx_texture_set(data->images[IMAGE_MOON].id);
+	gfx_quads_begin();
+	gfx_quads_draw(x, y, 512, 512);
+	gfx_quads_end();
+}
+
+void render_stars()
+{
+	gfx_texture_set(data->images[IMAGE_STARS].id);
+	gfx_quads_begin();
+	gfx_quads_end();
+}
+
+void render_snow()
+{
+	gfx_texture_set(data->images[IMAGE_SNOW].id);
+	gfx_quads_begin();
+	gfx_quads_end();
+}
+
 void render_sun(float x, float y)
 {
 	vec2 pos(x, y);
@@ -1919,6 +1941,10 @@ void render_world(float center_x, float center_y, float zoom)
 				gfx_setcolorvertex(3, bottom.r, bottom.g, bottom.b, bottom.a);
 				gfx_quads_drawTL(0, 0, 1, 1);
 			gfx_quads_end();
+
+			render_stars();
+			render_moon(20+center_x*0.6f, 20+center_y*0.6f);
+			render_snow();
 			
 			mapscreen_to_world(center_x, center_y, zoom);
 		}