mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-21 23:08:49 -05:00
Fix sprite drawing
This commit is contained in:
parent
de70658447
commit
7fcbd9d838
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
5
main.c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user