… | |
… | |
1500 | if (cell->stat_hp) |
1500 | if (cell->stat_hp) |
1501 | { |
1501 | { |
1502 | int width = cell->stat_width * 32; |
1502 | int width = cell->stat_width * 32; |
1503 | int thick = sh / 28 + 1 + cell->stat_width; |
1503 | int thick = sh / 28 + 1 + cell->stat_width; |
1504 | |
1504 | |
1505 | glColor4ub (0, 0, 0, 127); |
1505 | glColor4ub (0, 0, 0, 223); |
1506 | glRectf (px + 1, py, |
1506 | glRectf (px + 1, py, |
1507 | px + width - 1, py + thick + 2); |
1507 | px + width - 1, py + thick + 2); |
1508 | |
1508 | |
1509 | glColor4ub (cell->stat_hp, 255 - cell->stat_hp, 0, 255); |
1509 | glColor4ub (cell->stat_hp, 255 - cell->stat_hp, 0, 223); |
1510 | glRectf (px + 2, |
1510 | glRectf (px + 2, |
1511 | py + 1, |
1511 | py + 1, |
1512 | px + width - 2 - cell->stat_hp * (width - 4) / 255, py + thick + 1); |
1512 | px + width - 2 - cell->stat_hp * (width - 4) / 255, py + thick + 1); |
1513 | } |
1513 | } |
1514 | } |
1514 | } |