Fixed the scaling which was borked

This commit is contained in:
Linus_Probert 2018-01-24 08:52:50 +01:00
parent dda89f65e7
commit 6853f860f6
2 changed files with 8 additions and 9 deletions

View File

@ -14,17 +14,17 @@
#define SPRITE_DIMENSION 16
/* Display stuff */
#define GAME_VIEW_WIDTH MAP_ROOM_WIDTH * TILE_DIMENSION
#define GAME_VIEW_HEIGHT MAP_ROOM_HEIGHT * TILE_DIMENSION
#define GAME_VIEW_WIDTH (MAP_ROOM_WIDTH * TILE_DIMENSION)
#define GAME_VIEW_HEIGHT (MAP_ROOM_HEIGHT * TILE_DIMENSION)
#define RIGHT_GUI_WIDTH 10 * SPRITE_DIMENSION
#define RIGHT_GUI_WIDTH (10 * SPRITE_DIMENSION)
#define RIGHT_GUI_HEIGHT GAME_VIEW_HEIGHT
#define BOTTOM_GUI_HEIGHT 10 * SPRITE_DIMENSION
#define BOTTOM_GUI_WIDTH GAME_VIEW_WIDTH + RIGHT_GUI_WIDTH
#define BOTTOM_GUI_HEIGHT (10 * SPRITE_DIMENSION)
#define BOTTOM_GUI_WIDTH (GAME_VIEW_WIDTH + RIGHT_GUI_WIDTH)
#define SCREEN_WIDTH GAME_VIEW_WIDTH + RIGHT_GUI_WIDTH
#define SCREEN_HEIGHT GAME_VIEW_HEIGHT + BOTTOM_GUI_HEIGHT
#define SCREEN_WIDTH (GAME_VIEW_WIDTH + RIGHT_GUI_WIDTH)
#define SCREEN_HEIGHT (GAME_VIEW_HEIGHT + BOTTOM_GUI_HEIGHT)
/* Windows and compile crap */
#ifdef _WIN32

View File

@ -40,8 +40,7 @@ bool initSDL(void)
if (dim.height > 1080) {
info("Hi resolution screen detected (%u x %u)", dim.width, dim.height);
//renderScale = ((double) dim.height)/1080;
renderScale = 4;
renderScale = ((double) dim.height)/1080;
info("Scaling by %f", renderScale);
}