--- deliantra/Deliantra-Client/Client.xs 2006/04/19 23:37:48 1.54 +++ deliantra/Deliantra-Client/Client.xs 2006/04/20 08:11:56 1.55 @@ -935,11 +935,11 @@ } SV * -mapmap (CFClient::Map self, int w, int h) +mapmap (CFClient::Map self, int x0, int y0, int w, int h) CODE: { - int x0, x1, x; - int y0, y1, y; + int x1, x; + int y1, y; int z; SV *map_sv = newSV (w * h * sizeof (uint32_t)); uint32_t *map = (uint32_t *)SvPVX (map_sv); @@ -947,8 +947,8 @@ SvPOK_only (map_sv); SvCUR_set (map_sv, w * h * sizeof (uint32_t)); - x0 = self->x - w / 2; x1 = x0 + w; - y0 = self->y - h / 2; y1 = y0 + h; + x0 += self->x; x1 = x0 + w; + y0 += self->y; y1 = y0 + h; for (y = y0; y < y1; y++) { @@ -1098,7 +1098,7 @@ *data++ = h >> 8; *data++ = h; // we need to do this 'cause we don't keep an absolute coord system for rows - // TODO: treat rows as we treat + // TODO: treat rows as we treat columns map_get_row (self, y0 + self->y - self->oy);//D map_get_row (self, y0 + self->y - self->oy + h - 1);//D @@ -1172,7 +1172,7 @@ h = *data++ << 8; h |= *data++; // we need to do this 'cause we don't keep an absolute coord system for rows - // TODO: treat rows as we treat + // TODO: treat rows as we treat columns map_get_row (self, y0 + self->y - self->oy);//D map_get_row (self, y0 + self->y - self->oy + h - 1);//D @@ -1321,6 +1321,7 @@ const_iv (GL_CONSTANT_BORDER), const_iv (GL_LINES), const_iv (GL_QUADS), + const_iv (GL_LINE_LOOP), const_iv (GL_PERSPECTIVE_CORRECTION_HINT), const_iv (GL_FASTEST), # undef const_iv