Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
16220d754a
@ -37,6 +37,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
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
|
||||||
|
@ -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();
|
||||||
|
@ -105,10 +105,10 @@ bool Game::manageInvaders(){
|
|||||||
void Game::remCollidingProjectiles(){
|
void Game::remCollidingProjectiles(){
|
||||||
|
|
||||||
auto miss = missiles.begin();
|
auto miss = missiles.begin();
|
||||||
auto tor = torpedos.begin();
|
|
||||||
|
|
||||||
while(miss != missiles.end()){
|
while(miss != missiles.end()){
|
||||||
bool wasColliding = false;
|
bool wasColliding = false;
|
||||||
|
auto tor = torpedos.begin();
|
||||||
while(tor != torpedos.end()){
|
while(tor != torpedos.end()){
|
||||||
|
|
||||||
// missiles can't be right under torpedos, so that must means they are colliding in Y
|
// missiles can't be right under torpedos, so that must means they are colliding in Y
|
||||||
|
Loading…
Reference in New Issue
Block a user