ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.170 by root, Sun Mar 4 19:36:08 2007 UTC vs.
Revision 1.171 by root, Sun Apr 1 01:19:18 2007 UTC

1513} 1513}
1514 OUTPUT: 1514 OUTPUT:
1515 RETVAL 1515 RETVAL
1516 1516
1517void 1517void
1518draw (CFPlus::Map self, int mx, int my, int sw, int sh) 1518draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T)
1519 CODE: 1519 CODE:
1520{ 1520{
1521 int x, y, z; 1521 int x, y, z;
1522 int last_name; 1522 int last_name;
1523 mapface face; 1523 mapface face;
1550 face = cell->face [z]; 1550 face = cell->face [z];
1551 1551
1552 if (face && face < self->texs) 1552 if (face && face < self->texs)
1553 { 1553 {
1554 maptex tex = self->tex [face]; 1554 maptex tex = self->tex [face];
1555 int px = (x + 1) * 32 - tex.w; 1555 int px = (x + 1) * T - tex.w;
1556 int py = (y + 1) * 32 - tex.h; 1556 int py = (y + 1) * T - tex.h;
1557 1557
1558 if (last_name != tex.name) 1558 if (last_name != tex.name)
1559 { 1559 {
1560 glEnd (); 1560 glEnd ();
1561 glBindTexture (GL_TEXTURE_2D, last_name = tex.name); 1561 glBindTexture (GL_TEXTURE_2D, last_name = tex.name);
1571 if (cell->flags && z == 2) 1571 if (cell->flags && z == 2)
1572 { 1572 {
1573 if (cell->flags & 1) 1573 if (cell->flags & 1)
1574 { 1574 {
1575 maptex tex = self->tex [1]; 1575 maptex tex = self->tex [1];
1576 int px = (x + 1) * 32 - tex.w + 2; 1576 int px = (x + 1) * T - tex.w + 2;
1577 int py = (y + 1) * 32 - tex.h - 6; 1577 int py = (y + 1) * T - tex.h - 6;
1578 1578
1579 glEnd (); 1579 glEnd ();
1580 glBindTexture (GL_TEXTURE_2D, last_name = tex.name); 1580 glBindTexture (GL_TEXTURE_2D, last_name = tex.name);
1581 glBegin (GL_QUADS); 1581 glBegin (GL_QUADS);
1582 1582
1603 for (x = 0; x < sw; x++) 1603 for (x = 0; x < sw; x++)
1604 if (row->c0 <= x + mx && x + mx < row->c1) 1604 if (row->c0 <= x + mx && x + mx < row->c1)
1605 { 1605 {
1606 mapcell *cell = row->col + (x + mx - row->c0); 1606 mapcell *cell = row->col + (x + mx - row->c0);
1607 1607
1608 int px = x * 32; 1608 int px = x * T;
1609 int py = y * 32; 1609 int py = y * T;
1610 1610
1611 if (cell->stat_hp) 1611 if (cell->stat_hp)
1612 { 1612 {
1613 int width = cell->stat_width * 32; 1613 int width = cell->stat_width * T;
1614 int thick = sh / 28 + 1 + cell->stat_width; 1614 int thick = sh / 28 + 1 + cell->stat_width;
1615 1615
1616 glColor3ub (0, 0, 0); 1616 glColor3ub (0, 0, 0);
1617 glRectf (px + 1, py - thick - 2, 1617 glRectf (px + 1, py - thick - 2,
1618 px + width - 1, py); 1618 px + width - 1, py);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines