diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-01-13 11:15:32 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-01-13 11:15:32 +0000 |
| commit | ea245b969d1864441b41d25c7631beccfb39d874 (patch) | |
| tree | 68fb62ef99cdd90f5dd4ec8edf11e7bb54b7f953 /src/game/client/gc_render_map.cpp | |
| parent | 906ece7894927983b8ac69e37dd3cb82cfe7aad1 (diff) | |
| download | zcatch-ea245b969d1864441b41d25c7631beccfb39d874.tar.gz zcatch-ea245b969d1864441b41d25c7631beccfb39d874.zip | |
new mapformat in place. continued the cleanup. some effects are gone, gonna be redone so no biggie. CTF isn't working now.
Diffstat (limited to 'src/game/client/gc_render_map.cpp')
| -rw-r--r-- | src/game/client/gc_render_map.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
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; |