Add setting

This commit is contained in:
Miloslav Číž 2020-11-13 13:59:12 +01:00
parent e9c5c99701
commit a8ec7e2ce2
2 changed files with 10 additions and 1 deletions

2
game.h
View File

@ -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)

View File

@ -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 ------
/**