Support texture resizing.

This commit is contained in:
King_DuckZ 2014-02-22 12:25:16 +01:00
parent e2bd48ec90
commit 739b75b0b6
8 changed files with 29 additions and 14 deletions

View file

@ -13,8 +13,7 @@ namespace cloonel {
SDLMain::SDLMain (const char* parGameName, int parWidth, int parHeight) :
m_gameName(parGameName),
m_localData(new LocalData),
m_defWidth(parWidth),
m_defHeight(parHeight)
m_defWH(parWidth, parHeight)
{
}
@ -42,7 +41,7 @@ namespace cloonel {
throw std::runtime_error(SDL_GetError());
parInitSDL.initialized = true;
SDL_Window* const win = SDL_CreateWindow(m_gameName.c_str(), 100, 100, m_defWidth, m_defHeight, SDL_WINDOW_SHOWN);
SDL_Window* const win = SDL_CreateWindow(m_gameName.c_str(), 100, 100, m_defWH.x(), m_defWH.y(), SDL_WINDOW_SHOWN);
if (!win)
throw std::runtime_error(SDL_GetError());
parInitSDL.window = win;