diff --git a/asteroids/Model.cc b/asteroids/Model.cc index 8e1f46e..96f62c0 100644 --- a/asteroids/Model.cc +++ b/asteroids/Model.cc @@ -363,7 +363,7 @@ void Model::ProceedToNextLevel () { Engine::LogDebug ("Proceeding to next level %d", mCurrentLevelIndex + 1); mCurrentLevelIndex++; - if (mCurrentLevelIndex + 1 == mLevelList.size()) { + if (mCurrentLevelIndex == mLevelList.size()) { Engine::EventBasePtr gameover_event (new Engine::EventBase()); gameover_event->mEventType = EventGameOver; QueueEvent (gameover_event); diff --git a/asteroids/main.cc b/asteroids/main.cc index 42c6b4d..f5facf3 100644 --- a/asteroids/main.cc +++ b/asteroids/main.cc @@ -10,7 +10,7 @@ #include "EntityFactory.h" #ifdef WIN32 -#include +#include #endif using namespace std; @@ -19,8 +19,8 @@ int main (int argc, char* argv[]) { cout << "Game Start" << endl; #ifdef WIN32 - HWND hWnd = GetConsoleWindow(); - ShowWindow( hWnd, SW_HIDE ); + HWND hWnd = GetConsoleWindow(); + ShowWindow( hWnd, SW_HIDE ); #endif Engine::Engine engine;