diff --git a/main.c b/main.c index b184079..0725e36 100755 --- a/main.c +++ b/main.c @@ -399,7 +399,8 @@ void SFG_drawScaledImage( const uint8_t *image, int16_t centerX, int16_t centerY, - int16_t size) + int16_t size, + uint8_t minusValue) { if ((size > SFG_MAX_SPRITE_SIZE) || (size == 0)) return; @@ -482,7 +483,13 @@ void SFG_drawScaledImage( SFG_spriteSamplingPoints[v]); if (color != SFG_TRANSPARENT_COLOR) + { +#if SFG_DIMINISH_SPRITES + color = palette_minusValue(color,minusValue); +#endif + SFG_setGamePixel(x,y,color); + } } } @@ -879,7 +886,8 @@ void SFG_draw() SFG_player.camera); SFG_drawScaledImage(SFG_sprites[0],p.position.x,p.position.y, - RCL_perspectiveScale(256,p.depth)); + RCL_perspectiveScale(SFG_GAME_RESOLUTION_Y / 2,p.depth), + p.depth / (RCL_UNITS_PER_SQUARE * 2)); } } diff --git a/settings.h b/settings.h index 53566b3..a363596 100644 --- a/settings.h +++ b/settings.h @@ -89,7 +89,12 @@ Enables or disables fog (darkness) due to distance. Recommended to keep on for good look, but can be turned off for performance. */ - #define SFG_ENABLE_FOG 1 +/** + Says whether sprites should diminish in fog. This takes more performance but + looks better. +*/ +#define SFG_DIMINISH_SPRITES 1 + #endif // guard