mirror of https://gitlab.com/drummyfish/anarch.git
Fix sprite scaling
This commit is contained in:
parent
5a071cef14
commit
e16b50f2e6
5
game.h
5
game.h
|
@ -1099,9 +1099,12 @@ void SFG_drawScaledSprite(
|
||||||
uint8_t minusValue,
|
uint8_t minusValue,
|
||||||
RCL_Unit distance)
|
RCL_Unit distance)
|
||||||
{
|
{
|
||||||
if ((size > SFG_MAX_SPRITE_SIZE) || (size == 0))
|
if (size == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (size > SFG_MAX_SPRITE_SIZE)
|
||||||
|
size = SFG_MAX_SPRITE_SIZE;
|
||||||
|
|
||||||
uint16_t halfSize = size / 2;
|
uint16_t halfSize = size / 2;
|
||||||
|
|
||||||
int16_t topLeftX = centerX - halfSize;
|
int16_t topLeftX = centerX - halfSize;
|
||||||
|
|
Loading…
Reference in New Issue