pls let me die

This commit is contained in:
Thomas R 2022-01-12 16:56:42 +01:00
parent a1b3cf4ae4
commit 8cf4c302fe
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7
2 changed files with 10 additions and 2 deletions

View File

@ -38,7 +38,12 @@ private:
* @brief the MinGL window in which the game will be drawn into * @brief the MinGL window in which the game will be drawn into
*/ */
MinGL window; MinGL window;
/*!
* @brief Harcoded window size
*/
const Position winSize{1280,720};
/*! /*!
* @brief PixelManager : Class that contains and draws all the data that will be drawn on screen * @brief PixelManager : Class that contains and draws all the data that will be drawn on screen
* This is a pointer because the object is allocated at runtime, following the configuration * This is a pointer because the object is allocated at runtime, following the configuration

View File

@ -15,7 +15,7 @@
#include "playMode.h" #include "playMode.h"
#include "goodPixelManager.h" #include "goodPixelManager.h"
#define WININIT window("SUPER Space Invader : Turbo Apocalypse DX - VS GOD", Position(1280, 720), Position(128, 128), nsGraphics::KBlack) #define WININIT window("SUPER Space Invader : Turbo Apocalypse DX - VS GOD", Position(1280, 720) /*for some reason I can't use the winSize member here*/, Position(128, 128), nsGraphics::KBlack)
Game::Game() : WININIT { Game::Game() : WININIT {
@ -128,6 +128,9 @@ WinValue Game::enterGameLoop(){ // returns when game is finished
fpsStartTime = startTime; fpsStartTime = startTime;
} }
// force window size
if(window.getWindowSize()!=winSize)window.setWindowSize(winSize);
pm->startFrame(); pm->startFrame();
managePlayers(); managePlayers();