Fix sprite drawing

This commit is contained in:
Miloslav Číž 2020-03-22 20:12:06 +01:00
parent de70658447
commit 7fcbd9d838
3 changed files with 3 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

5
main.c
View File

@ -958,9 +958,9 @@ void SFG_drawScaledSprite(
precompFrom = RCL_max(0,precompFrom);
precompTo = RCL_min(SFG_MAX_SPRITE_SIZE - 1,precompTo);
#define PRECOMP_SCALE 2048
#define PRECOMP_SCALE 512
int16_t precompStepScaled = ((SFG_TEXTURE_SIZE - 1) * PRECOMP_SCALE) / size;
int16_t precompStepScaled = ((SFG_TEXTURE_SIZE) * PRECOMP_SCALE) / size;
int16_t precompPosScaled = precompFrom * precompStepScaled;
for (int16_t i = precompFrom; i <= precompTo; ++i)
@ -1166,6 +1166,7 @@ void SFG_getItemSprite(
{
case SFG_LEVEL_ELEMENT_TREE:
case SFG_LEVEL_ELEMENT_RUIN:
case SFG_LEVEL_ELEMENT_LAMP:
*spriteSize = 2;
break;