mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-25 10:22:23 -05:00
Improve hurt indicator
This commit is contained in:
parent
5ae0487b39
commit
46f485384f
6
main.c
6
main.c
@ -2252,23 +2252,29 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Draws the player weapon, handling the shooting animation.
|
Draws the player weapon, handling the shooting animation.
|
||||||
|
Loading…
Reference in New Issue
Block a user