diff --git a/game.h b/game.h index c7cdb71..c5d4591 100755 --- a/game.h +++ b/game.h @@ -244,7 +244,7 @@ typedef struct (((size0to3 + 3) * SFG_BASE_SPRITE_SIZE) / 4) #define SFG_SPRITE_SIZE_PIXELS(size0to3) \ - ((SFG_SPRITE_SIZE(size0to3) * SFG_GAME_RESOLUTION_Y) / RCL_UNITS_PER_SQUARE) + ((SFG_SPRITE_SIZE(size0to3) * SFG_SPRITE_MAX_SIZE) / RCL_UNITS_PER_SQUARE) #define SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(size0to3) \ (SFG_SPRITE_SIZE(size0to3) / 2) diff --git a/settings.h b/settings.h index c42a7c0..d8ff15b 100644 --- a/settings.h +++ b/settings.h @@ -390,6 +390,15 @@ #define SFG_DRAW_LEVEL_BACKGROUND 1 #endif +/** + Says the size, in pixels, of a sprite when it is closest to the camera, which + is the maximum size that can be drawn. Sprites on "weird" aspect ratios can + look weirdly scaled, so this option can be used to fix that. +*/ +#ifndef SFG_SPRITE_MAX_SIZE + #define SFG_SPRITE_MAX_SIZE SFG_SCREEN_RESOLUTION_Y +#endif + //------ developer/debug settings ------ /**