Ya permite continuar

This commit is contained in:
2022-09-25 23:16:20 +02:00
parent ed67e429d8
commit 25616e1e6c
7 changed files with 37 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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))
{

View File

@@ -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();