… | |
… | |
1486 | |
1486 | |
1487 | for (z = 0; z <= 0; z++) |
1487 | for (z = 0; z <= 0; z++) |
1488 | { |
1488 | { |
1489 | mapface face = cell->face [z]; |
1489 | mapface face = cell->face [z]; |
1490 | |
1490 | |
1491 | if (face) |
1491 | if (face > 0 && face < self->texs) |
1492 | { |
1492 | { |
1493 | maptex tex = self->tex [face]; |
1493 | maptex tex = self->tex [face]; |
1494 | int a0 = 255 - tex.a; |
1494 | int a0 = 255 - tex.a; |
1495 | int a1 = tex.a; |
1495 | int a1 = tex.a; |
1496 | |
1496 | |
… | |
… | |
1547 | { |
1547 | { |
1548 | mapcell *cell = row->col + (x + mx - row->c0); |
1548 | mapcell *cell = row->col + (x + mx - row->c0); |
1549 | |
1549 | |
1550 | face = cell->face [z]; |
1550 | face = cell->face [z]; |
1551 | |
1551 | |
1552 | if (face && face < self->texs) |
1552 | if (face > 0 && face < self->texs) |
1553 | { |
1553 | { |
1554 | maptex tex = self->tex [face]; |
1554 | maptex tex = self->tex [face]; |
1555 | int px = (x + 1) * T - tex.w; |
1555 | int px = (x + 1) * T - tex.w; |
1556 | int py = (y + 1) * T - tex.h; |
1556 | int py = (y + 1) * T - tex.h; |
1557 | |
1557 | |
… | |
… | |
1609 | int py = y * T; |
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 * T; |
1613 | int width = cell->stat_width * T; |
1614 | int thick = sh / 28 + 1 + cell->stat_width; |
1614 | int thick = (sh * T / 32) / 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); |
1619 | |
1619 | |