Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
707 B · 38 lines
C++
at main
1234567891011121314151617181920212223242526272829303132333435363738#include "stdafx.h"#include "ScreenSizeCalculator.h"#include "Options.h"
ScreenSizeCalculator::ScreenSizeCalculator(Options *options, int width, int height, int forceScale/*=-1*/){ w = width; h = height; if( forceScale == -1 ) { scale = 1;
int maxScale = options->guiScale; if (maxScale == 0) maxScale = 1000; while (scale < maxScale && w / (scale + 1) >= 320 && h / (scale + 1) >= 240) { scale++; } } else { scale = forceScale; } rawWidth = w / (double) scale; rawHeight = h / (double) scale; w = (int) ceil(rawWidth); h = (int) ceil(rawHeight);}
int ScreenSizeCalculator::getWidth(){ return w;}
int ScreenSizeCalculator::getHeight(){ return h;}