diff --git a/media/lang/ba_BA.txt b/media/lang/ba_BA.txt index c87bfe3..525363c 100644 --- a/media/lang/ba_BA.txt +++ b/media/lang/ba_BA.txt @@ -89,7 +89,7 @@ FI DEL JOC ## 44 - PANTALLA DE GAME OVER ELS TEUS PUNTS: ## 45 - PANTALLA DE GAME OVER -REINTENTAR? +CONTINUAR? ## 46 - MENU DE PAUSA CONTINUAR ## 47 - MENU DE PAUSA diff --git a/media/lang/en_UK.txt b/media/lang/en_UK.txt index 95183d3..c1a6f7a 100644 --- a/media/lang/en_UK.txt +++ b/media/lang/en_UK.txt @@ -89,7 +89,7 @@ GAME OVER ## 44 - PANTALLA DE GAME OVER YOUR SCORE: ## 45 - PANTALLA DE GAME OVER -RETRY? +CONTINUE? ## 46 - MENU DE PAUSA CONTINUE ## 47 - MENU DE PAUSA diff --git a/media/lang/es_ES.txt b/media/lang/es_ES.txt index 60df4a1..79ac2fa 100644 --- a/media/lang/es_ES.txt +++ b/media/lang/es_ES.txt @@ -89,7 +89,7 @@ FIN DE JUEGO ## 44 - PANTALLA DE GAME OVER TU PUNTUACION: ## 45 - PANTALLA DE GAME OVER -REINTENTAR? +CONTINUAR? ## 46 - MENU DE PAUSA CONTINUAR ## 47 - MENU DE PAUSA diff --git a/source/director.cpp b/source/director.cpp index 52897dd..46582b5 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -488,9 +488,15 @@ void Director::runTitle() void Director::runGame() { if (mSection.subsection == GAME_SECTION_PLAY_1P) - mGame = new Game(1, 0, mRenderer, mScreen, mFileList, mLang, mInput, false, mOptions); - if (mSection.subsection == GAME_SECTION_PLAY_2P) + { + mGame = new Game(1, 8, mRenderer, mScreen, mFileList, mLang, mInput, false, mOptions); + } + + else if (mSection.subsection == GAME_SECTION_PLAY_2P) + { mGame = new Game(2, 0, mRenderer, mScreen, mFileList, mLang, mInput, false, mOptions); + } + setSection(mGame->run()); delete mGame; } @@ -505,12 +511,15 @@ void Director::run() case PROG_SECTION_LOGO: runLogo(); break; + case PROG_SECTION_INTRO: runIntro(); break; + case PROG_SECTION_TITLE: runTitle(); break; + case PROG_SECTION_GAME: runGame(); break; diff --git a/source/game.cpp b/source/game.cpp index b608c5a..040c7e9 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -346,7 +346,6 @@ void Game::init() mTimeStopped = false; mTimeStoppedCounter = 0; mCounter = 0; - mBalloonsPopped = 0; mLastEnemyDeploy = 0; mEnemyDeployCounter = 0; mEnemySpeed = mDefaultEnemySpeed; @@ -371,7 +370,7 @@ void Game::init() if (mDemo.enabled) { - int num = rand() % 2; + const int num = rand() % 2; if (num == 0) { mBalloonsPopped = 1000; @@ -390,6 +389,13 @@ void Game::init() initEnemyPools(); initGameStages(); + // Mas variables + mBalloonsPopped = 0; + for (int i = 0; i < mCurrentStage; ++i) + { + mBalloonsPopped += mStage[i].powerToComplete; + } + // Modo debug mDebug.enabled = false; mDebug.enemySet = 0; diff --git a/source/menu.cpp b/source/menu.cpp index 2dbc492..62271d8 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -144,7 +144,7 @@ void Menu::updateSelector() { if (mSelector.h > mSelector.targetH) // Ha llegado al destino { - //mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index); + // mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index); mSelector.originH = mSelector.h = mSelector.targetH; mSelector.resizing = false; } @@ -153,7 +153,7 @@ void Menu::updateSelector() { if (mSelector.h < mSelector.targetH) // Ha llegado al destino { - //mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index); + // mSelector.originH = mSelector.targetH = mSelector.rect.h = getSelectorHeight(mSelector.index); mSelector.originH = mSelector.h = mSelector.targetH; mSelector.resizing = false; } @@ -229,7 +229,7 @@ bool Menu::increaseSelectorIndex() // Calcula cual es el siguiente elemento ++mSelector.index %= mTotalItems; while (!mItem[mSelector.index].selectable) - //mSelector.index++; + // mSelector.index++; ++mSelector.index %= mTotalItems; success = true; @@ -487,12 +487,20 @@ void Menu::setDefaultActionWhenCancel(Uint8 item) void Menu::checkInput() { if (mInput->checkInput(INPUT_UP, REPEAT_FALSE)) + { if (decreaseSelectorIndex()) + { JA_PlaySound(mSoundMove); + } + } if (mInput->checkInput(INPUT_DOWN, REPEAT_FALSE)) + { if (increaseSelectorIndex()) + { JA_PlaySound(mSoundMove); + } + } if (mInput->checkInput(INPUT_ACCEPT, REPEAT_FALSE)) { diff --git a/source/title.cpp b/source/title.cpp index ed370e9..679d360 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -872,7 +872,9 @@ section_t Title::run(Uint8 subsection) } if (mMenuVisible == true) + { mMenu.active->render(); + } mDustBitmapR->animate(0); mDustBitmapL->animate(0); @@ -881,7 +883,9 @@ section_t Title::run(Uint8 subsection) // PRESS ANY KEY! if ((mCounter % 50 > 14) && (mMenuVisible == false)) + { mText->writeDX(TXT_CENTER | TXT_SHADOW, SCREEN_CENTER_X, PLAY_AREA_THIRD_QUARTER_Y + BLOCK, mLang->getText(23), 1, noColor, 1, shdwTxtColor); + } // Fade mFade->render();