--- deliantra/Deliantra-Client/Client.xs 2006/12/09 02:21:25 1.167 +++ 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 @@ -16,6 +16,7 @@ # undef pipe #endif +#include #include #include #include @@ -494,6 +495,12 @@ assert (SDLK_MODIFIER_MAX == SDLK_COMPOSE); } +void +weaken (SV *rv) + PROTOTYPE: $ + CODE: + sv_rvweaken (rv); + int in_destruct () CODE: @@ -1407,10 +1414,10 @@ } else if (cmd == 6) // monster width cell->stat_width = *data++ + 1; - else if (cmd == 0x47) // monster width + else if (cmd == 0x47) { - if (*data == 4) - ; // decode player tag + if (*data == 8) + ; // decode player uuid data += *data + 1; } @@ -1481,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; @@ -1508,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; @@ -1542,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) { @@ -1566,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); @@ -1598,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);