diff --git a/src/CloonelJumpConfig.h.in b/src/CloonelJumpConfig.h.in index 944c582..634f127 100644 --- a/src/CloonelJumpConfig.h.in +++ b/src/CloonelJumpConfig.h.in @@ -5,4 +5,7 @@ #define GameVersionMinor 1 #define GameVersionMajor 0 +#define DEF_WIN_WIDTH 800 +#define DEF_WIN_HEIGHT 600 + #endif diff --git a/src/main.cpp b/src/main.cpp index d79af39..dbd869b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,8 +10,8 @@ namespace { bool initialized; }; - ///------------------------------------------------------------------------- - ///------------------------------------------------------------------------- + ///------------------------------------------------------------------------ + ///------------------------------------------------------------------------ void InitSDL (InitSDLStuff& parInitSDL) { parInitSDL.window = nullptr; parInitSDL.renderer = nullptr; @@ -21,7 +21,7 @@ namespace { throw std::runtime_error(SDL_GetError()); parInitSDL.initialized = true; - SDL_Window* const win = SDL_CreateWindow(GameName, 100, 100, 640, 480, SDL_WINDOW_SHOWN); + SDL_Window* const win = SDL_CreateWindow(GameName, 100, 100, DEF_WIN_WIDTH, DEF_WIN_HEIGHT, SDL_WINDOW_SHOWN); if (!win) throw std::runtime_error(SDL_GetError()); parInitSDL.window = win; @@ -32,8 +32,8 @@ namespace { parInitSDL.renderer = renderer; } - ///------------------------------------------------------------------------- - ///------------------------------------------------------------------------- + ///------------------------------------------------------------------------ + ///------------------------------------------------------------------------ void ClearIFN (InitSDLStuff& parInitSDL) { if (parInitSDL.renderer) SDL_DestroyRenderer(parInitSDL.renderer); @@ -44,7 +44,9 @@ namespace { } } //unnamed namespace -//following http://twinklebeardev.blogspot.co.uk/2012/07/lesson-1-hello-world.html +///---------------------------------------------------------------------------- +///following http://twinklebeardev.blogspot.co.uk/2012/07/lesson-1-hello-world.html +///---------------------------------------------------------------------------- int main() { std::cout << GameName << " v" << GameVersionMajor << "." << GameVersionMinor << std::endl;