From 5bd2c434f63ff4a039e854d647f02ef660c544d1 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 24 Jul 2007 22:53:43 +0000 Subject: epic commit. removed tga support, removed BGR support. fixed one config for editor, server and client, optimized tilemap rendering (this needs some cleanup), added tools to fix alpha outline quirk and glitches in the tilemap reindering --- src/game/client/game_client.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/game/client/game_client.cpp') diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index f253909f..c34e81ce 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -1239,7 +1239,23 @@ void modc_render() gfx_clear(0.65f,0.78f,0.9f); // draw the sun - render_sun(local_player_pos.x*0.5f, local_player_pos.y*0.5f); + render_sun(20+screen_x*0.6f, 20+screen_y*0.6f); + + + static vec2 cloud_pos[6] = {vec2(0,0),vec2(0,200),vec2(0,400)}; + static float cloud_speed[6] = {30, 20, 10}; + static int cloud_images[6] = {IMAGE_CLOUD_1, IMAGE_CLOUD_2, IMAGE_CLOUD_3}; + + for(int i = 0; i < 3; i++) + { + float parallax_amount = 0.55f; + gfx_texture_set(data->images[cloud_images[i]].id); + gfx_quads_begin(); + gfx_quads_drawTL((cloud_pos[i].x+fmod(client_localtime()*cloud_speed[i]+i*100.0f, 1000.0f))+screen_x*parallax_amount, + cloud_pos[i].y+screen_y*parallax_amount, 300, 300); + gfx_quads_end(); + } + // draw backdrop gfx_texture_set(data->images[IMAGE_BACKDROP].id); -- cgit 1.4.1