Improve hurt indicator

This commit is contained in:
Miloslav Číž 2019-10-25 23:06:47 +02:00
parent 5ae0487b39
commit 46f485384f

6
main.c
View File

@ -2252,22 +2252,28 @@ void SFG_drawHurtIndicator(uint16_t width)
uint16_t j2 = SFG_GAME_RESOLUTION_Y - 1 - j; uint16_t j2 = SFG_GAME_RESOLUTION_Y - 1 - j;
for (uint16_t i = 0; i < SFG_GAME_RESOLUTION_X; ++i) for (uint16_t i = 0; i < SFG_GAME_RESOLUTION_X; ++i)
{
if ((i & 0x01) == (j & 0x01))
{ {
SFG_setGamePixel(i,j,175); SFG_setGamePixel(i,j,175);
SFG_setGamePixel(i,j2,175); SFG_setGamePixel(i,j2,175);
} }
} }
}
for (uint16_t i = 0; i < width; ++i) for (uint16_t i = 0; i < width; ++i)
{ {
uint16_t i2 = SFG_GAME_RESOLUTION_X - 1 - i; uint16_t i2 = SFG_GAME_RESOLUTION_X - 1 - i;
for (uint16_t j = width; j < SFG_GAME_RESOLUTION_Y - width; ++j) for (uint16_t j = width; j < SFG_GAME_RESOLUTION_Y - width; ++j)
{
if ((i & 0x01) == (j & 0x01))
{ {
SFG_setGamePixel(i,j,175); SFG_setGamePixel(i,j,175);
SFG_setGamePixel(i2,j,175); SFG_setGamePixel(i2,j,175);
} }
} }
}
} }
/** /**