--- deliantra/Deliantra-Client/Client.xs 2006/12/13 17:30:02 1.169 +++ deliantra/Deliantra-Client/Client.xs 2007/04/02 19:29:27 1.172 @@ -1,6 +1,6 @@ #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN -# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls +# define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls # include # include # include @@ -1488,7 +1488,7 @@ { mapface face = cell->face [z]; - if (face) + if (face > 0 && face < self->texs) { maptex tex = self->tex [face]; int a0 = 255 - tex.a; @@ -1515,7 +1515,7 @@ RETVAL void -draw (CFPlus::Map self, int mx, int my, int sw, int sh) +draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T) CODE: { int x, y, z; @@ -1549,11 +1549,11 @@ face = cell->face [z]; - if (face && face < self->texs) + if (face > 0 && face < self->texs) { maptex tex = self->tex [face]; - int px = (x + 1) * 32 - tex.w; - int py = (y + 1) * 32 - tex.h; + int px = (x + 1) * T - tex.w; + int py = (y + 1) * T - tex.h; if (last_name != tex.name) { @@ -1573,8 +1573,8 @@ if (cell->flags & 1) { maptex tex = self->tex [1]; - int px = (x + 1) * 32 - tex.w + 2; - int py = (y + 1) * 32 - tex.h - 6; + int px = (x + 1) * T - tex.w + 2; + int py = (y + 1) * T - tex.h - 6; glEnd (); glBindTexture (GL_TEXTURE_2D, last_name = tex.name); @@ -1605,12 +1605,12 @@ { mapcell *cell = row->col + (x + mx - row->c0); - int px = x * 32; - int py = y * 32; + int px = x * T; + int py = y * T; if (cell->stat_hp) { - int width = cell->stat_width * 32; + int width = cell->stat_width * T; int thick = sh / 28 + 1 + cell->stat_width; glColor3ub (0, 0, 0);