From ea245b969d1864441b41d25c7631beccfb39d874 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 13 Jan 2008 11:15:32 +0000 Subject: new mapformat in place. continued the cleanup. some effects are gone, gonna be redone so no biggie. CTF isn't working now. --- src/game/client/gc_render_map.cpp | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'src/game/client/gc_render_map.cpp') diff --git a/src/game/client/gc_render_map.cpp b/src/game/client/gc_render_map.cpp index fcb8c272..4345aa03 100644 --- a/src/game/client/gc_render_map.cpp +++ b/src/game/client/gc_render_map.cpp @@ -88,7 +88,7 @@ void render_quads(QUAD *quads, int num_quads) } -void render_tilemap(TILE *tiles, int w, int h, float scale) +void render_tilemap(TILE *tiles, int w, int h, float scale, int flags) { //gfx_texture_set(img_get(tmap->image)); float screen_x0, screen_y0, screen_x1, screen_y1; @@ -116,14 +116,29 @@ void render_tilemap(TILE *tiles, int w, int h, float scale) { int mx = x; int my = y; - if(mx<0) - continue; // mx = 0; - if(mx>=w) - continue; // mx = w-1; - if(my<0) - continue; // my = 0; - if(my>=h) - continue; // my = h-1; + + if(flags) + { + if(mx<0) + mx = 0; + if(mx>=w) + mx = w-1; + if(my<0) + my = 0; + if(my>=h) + my = h-1; + } + else + { + if(mx<0) + continue; // mx = 0; + if(mx>=w) + continue; // mx = w-1; + if(my<0) + continue; // my = 0; + if(my>=h) + continue; // my = h-1; + } int c = mx + my*w; -- cgit 1.4.1