about summary refs log tree commit diff
path: root/src/game/client/gc_client.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-19 16:44:11 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-19 16:44:11 +0000
commitbf2ddd701a64da89dd55bdef0b30b4a222902660 (patch)
tree0f31f4e19419f2671d2dc654ba6d1e417ca031f3 /src/game/client/gc_client.cpp
parent38aacd5dbb9be44a78d93bb7260a0d3822de3dee (diff)
downloadzcatch-bf2ddd701a64da89dd55bdef0b30b4a222902660.tar.gz
zcatch-bf2ddd701a64da89dd55bdef0b30b4a222902660.zip
some missed files
Diffstat (limited to 'src/game/client/gc_client.cpp')
-rw-r--r--src/game/client/gc_client.cpp167
1 files changed, 1 insertions, 166 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp
index f4af5cc3..8df0e698 100644
--- a/src/game/client/gc_client.cpp
+++ b/src/game/client/gc_client.cpp
@@ -642,7 +642,7 @@ void anim_eval_add(animstate *state, animation *anim, float time, float amount)
 	anim_add(state, &add, amount);
 }
 
-void draw_circle(float x, float y, float r, int segments)
+static void draw_circle(float x, float y, float r, int segments)
 {
 	float f_segments = (float)segments;
 	for(int i = 0; i < segments; i+=2)
@@ -665,171 +665,6 @@ void draw_circle(float x, float y, float r, int segments)
 	}
 }
 
-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()
-{
-	struct star
-	{
-		vec2 p;
-		float tingle;
-		float rot;
-		float size;
-	};
-	
-	static const int NUM_STARS = 20;
-	static star stars[NUM_STARS];
-	static bool init = true;
-	if(init)
-	{
-		for(int i = 0; i < NUM_STARS; i++)
-		{
-			stars[i].p.x = (frandom()-0.5f)*800*3;
-			stars[i].p.y = (frandom()-0.5f)*300*3;
-			stars[i].tingle = frandom();
-			stars[i].rot = frandom()*pi;
-			stars[i].size = 30.0f+frandom()*20.0f;
-		}
-		
-		init = false;
-	}
-
-	int64 now = time_get();
-	int64 freq = time_freq()*5;
-	float t = (now%freq)/(float)freq;
-	gfx_texture_set(data->images[IMAGE_STARS].id);
-	gfx_quads_begin();
-	gfx_quads_setsubset(0,0,0.5f,1);
-	for(int i = 0; i < NUM_STARS; i++)
-	{
-		float a = fmod(t+stars[i].tingle, 1.0f);
-		gfx_quads_setrotation(stars[i].rot);
-		gfx_setcolor(1,1,1,0.25f+sinf(a*pi)*0.75f);
-		gfx_quads_draw(stars[i].p.x, stars[i].p.y, stars[i].size, stars[i].size);
-	}
-	
-	gfx_quads_end();
-}
-
-void render_snow()
-{
-	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
-	{
-		vec2 p;
-		float tingle;
-		float rot;
-		float size;
-		float yspeed;
-		float xspeed;
-	};
-	
-	static const int NUM_FLAKES = 100;
-	static flake flakes[NUM_FLAKES];
-	static bool init = true;
-	
-	float w = 400*6;
-	float h = 300*6;
-	
-	if(init)
-	{
-		for(int i = 0; i < NUM_FLAKES; i++)
-		{
-			flakes[i].p.x = frandom()*w;
-			flakes[i].p.y = frandom()*h;
-			flakes[i].tingle = frandom();
-			flakes[i].rot = frandom()*pi;
-			flakes[i].size = 50.0f+frandom()*10.0f;
-			flakes[i].yspeed = 50+frandom()*20.0f;
-			flakes[i].xspeed = flakes[i].yspeed * (0.4+frandom()*0.4f);
-		}
-		
-		init = false;
-	}
-	
-	int basex = (int)(tl.x/w);
-	float splitx = tl.x-basex*w;
-	int basey = (int)(tl.y/h);
-	float splity = tl.y-basey*h;
-	
-	float f = client_frametime();
-	gfx_texture_set(data->images[IMAGE_SNOW].id);
-	gfx_quads_begin();
-	for(int i = 0; i < NUM_FLAKES; i++)
-	{
-		flakes[i].p.x -= f*flakes[i].xspeed;
-		flakes[i].p.y += f*flakes[i].yspeed;
-		if(flakes[i].p.x < 0)
-			flakes[i].p.x += w;
-		if(flakes[i].p.y > h)
-			flakes[i].p.y -= h;
-			
-		float x = flakes[i].p.x + basex*w;
-		float y = flakes[i].p.y + basey*h;
-		
-		if(flakes[i].p.x < splitx)
-			x += w;
-		if(flakes[i].p.y < splity)
-			y += h;
-			
-		x -= 1000;
-		y -= 1000;
-			
-		gfx_quads_setrotation(flakes[i].rot);
-		gfx_quads_draw(x, y, flakes[i].size, flakes[i].size);
-	}
-		
-	gfx_quads_end();
-}
-
-void render_sun(float x, float y)
-{
-	vec2 pos(x, y);
-
-	gfx_texture_set(-1);
-	gfx_blend_additive();
-	gfx_quads_begin();
-	const int rays = 10;
-	gfx_setcolor(1.0f,1.0f,1.0f,0.025f);
-	for(int r = 0; r < rays; r++)
-	{
-		float a = r/(float)rays + client_localtime()*0.025f;
-		float size = (1.0f/(float)rays)*0.25f;
-		vec2 dir0(sinf((a-size)*pi*2.0f), cosf((a-size)*pi*2.0f));
-		vec2 dir1(sinf((a+size)*pi*2.0f), cosf((a+size)*pi*2.0f));
-
-		gfx_setcolorvertex(0, 1.0f,1.0f,1.0f,0.025f);
-		gfx_setcolorvertex(1, 1.0f,1.0f,1.0f,0.025f);
-		gfx_setcolorvertex(2, 1.0f,1.0f,1.0f,0.0f);
-		gfx_setcolorvertex(3, 1.0f,1.0f,1.0f,0.0f);
-		const float range = 1000.0f;
-		gfx_quads_draw_freeform(
-			pos.x+dir0.x, pos.y+dir0.y,
-			pos.x+dir1.x, pos.y+dir1.y,
-			pos.x+dir0.x*range, pos.y+dir0.y*range,
-			pos.x+dir1.x*range, pos.y+dir1.y*range);
-	}
-	gfx_quads_end();
-	gfx_blend_normal();
-
-	gfx_texture_set(data->images[IMAGE_SUN].id);
-	gfx_quads_begin();
-	gfx_quads_draw(pos.x, pos.y, 256, 256);
-	gfx_quads_end();
-}
-
 static vec2 emoticon_selector_mouse;
 
 void emoticon_selector_reset()