|
|
|
|
@@ -183,7 +183,7 @@ void GameDirector::initProg()
|
|
|
|
|
mMenu.title->addItem("OPTIONS");
|
|
|
|
|
mMenu.title->addItem("HOW TO PLAY", 0, 5);
|
|
|
|
|
mMenu.title->addItem("QUIT");
|
|
|
|
|
mMenu.title->setDefaultActionWhenCancel(2);
|
|
|
|
|
mMenu.title->setDefaultActionWhenCancel(3);
|
|
|
|
|
mMenu.title->setBackgroundColor(0x30, 0x30, 0x40, 192);
|
|
|
|
|
mMenu.title->setSelectorColor(0xe5, 0x1c, 0x23, 255);
|
|
|
|
|
mMenu.title->setSelectorTextColor(0xFF, 0xF1, 0x76);
|
|
|
|
|
@@ -684,6 +684,7 @@ void GameDirector::resetTitle(Uint8 subsection)
|
|
|
|
|
mTitle.menuVisible = false;
|
|
|
|
|
mTitle.nextProgSection = PROG_SECTION_GAME;
|
|
|
|
|
mTitle.instructionsCounter = INSTRUCTIONS_COUNTER;
|
|
|
|
|
mTitle.instructionsMode = MODE_AUTO;
|
|
|
|
|
|
|
|
|
|
// Inicializa el bitmap de Coffee
|
|
|
|
|
mTitle.coffeeBitmap->init(mTexture[TEXTURE_TITLE].texture, mRenderer);
|
|
|
|
|
@@ -4064,7 +4065,7 @@ void GameDirector::renderFade(Uint8 index)
|
|
|
|
|
void GameDirector::renderMessages()
|
|
|
|
|
{
|
|
|
|
|
// GetReady
|
|
|
|
|
if (mGame.counter < STAGE_COUNTER)
|
|
|
|
|
if ((mGame.counter < STAGE_COUNTER) && (!mDemo.enabled))
|
|
|
|
|
{
|
|
|
|
|
mGame.getReadyBitmap->setPosX((int)mGame.getReadyBitmapPath[mGame.counter]);
|
|
|
|
|
mGame.getReadyBitmap->render();
|
|
|
|
|
@@ -4096,8 +4097,8 @@ void GameDirector::renderMessages()
|
|
|
|
|
{
|
|
|
|
|
if (mDemo.counter % 30 > 14)
|
|
|
|
|
{
|
|
|
|
|
mText.black->writeCentered(PLAY_AREA_CENTER_X + 1, PLAY_AREA_FIRST_QUARTER_Y + 1, "D E M O");
|
|
|
|
|
mText.white->writeCentered(PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, "D E M O");
|
|
|
|
|
mText.blackX2->writeCentered(PLAY_AREA_CENTER_X + 2, PLAY_AREA_FIRST_QUARTER_Y + 2, "D E M O");
|
|
|
|
|
mText.whiteX2->writeCentered(PLAY_AREA_CENTER_X, PLAY_AREA_FIRST_QUARTER_Y, "D E M O");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -4752,8 +4753,7 @@ void GameDirector::runTitle(Uint8 subsection)
|
|
|
|
|
mMenu.active->reset();
|
|
|
|
|
mMenu.keyPressed = false;
|
|
|
|
|
mTitle.section = TITLE_SECTION_INSTRUCTIONS;
|
|
|
|
|
//runInstructions(MODE_MANUAL);
|
|
|
|
|
//setProgSection(PROG_SECTION_TITLE,TITLE_SECTION_INSTRUCTIONS);
|
|
|
|
|
mTitle.instructionsMode = MODE_MANUAL;
|
|
|
|
|
break;
|
|
|
|
|
case 3: // QUIT
|
|
|
|
|
JA_PlaySound(mSound[SOUND_MENU_CANCEL].sound);
|
|
|
|
|
@@ -4827,7 +4827,7 @@ void GameDirector::runTitle(Uint8 subsection)
|
|
|
|
|
|
|
|
|
|
// Sección Instrucciones
|
|
|
|
|
if (mTitle.section == TITLE_SECTION_INSTRUCTIONS)
|
|
|
|
|
runInstructions(MODE_AUTO);
|
|
|
|
|
runInstructions(mTitle.instructionsMode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
quitTitle();
|
|
|
|
|
@@ -5039,6 +5039,10 @@ void GameDirector::runInstructions(Uint8 mode)
|
|
|
|
|
Sprite *sprite = new Sprite();
|
|
|
|
|
SDL_Rect srcRect = {0, 0, 16, 16};
|
|
|
|
|
|
|
|
|
|
bool wannaExit = false;
|
|
|
|
|
if (mode == MODE_MANUAL)
|
|
|
|
|
mTitle.instructionsCounter = 0;
|
|
|
|
|
|
|
|
|
|
const SDL_Rect destRect1 = {60, 88 + (16 * 0), 16, 16}; // Disquito
|
|
|
|
|
const SDL_Rect destRect2 = {60, 88 + (16 * 1), 16, 16}; // Gavineixon
|
|
|
|
|
const SDL_Rect destRect3 = {60, 88 + (16 * 2), 16, 16}; // Pacmar
|
|
|
|
|
@@ -5060,27 +5064,34 @@ void GameDirector::runInstructions(Uint8 mode)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((mEventHandler->type == SDL_KEYDOWN) || (mEventHandler->type == SDL_JOYBUTTONDOWN))
|
|
|
|
|
{
|
|
|
|
|
if (mode == MODE_AUTO)
|
|
|
|
|
{
|
|
|
|
|
JA_StopMusic();
|
|
|
|
|
setProgSection(PROG_SECTION_TITLE);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
wannaExit = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Pinta en la surface el texto y los sprites
|
|
|
|
|
SDL_SetRenderTarget(mRenderer, mInstructionsSurface);
|
|
|
|
|
SDL_SetRenderDrawColor(mRenderer, 0x27, 0x27, 0x36, 255);
|
|
|
|
|
SDL_RenderClear(mRenderer);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 8, "OBJECTIVE", 0);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 24, "YOU HAVE TO POP AS MANY", 0);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 34, "BALLOONS AS YOU CAN", 0);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 48, "DIFFICULTY WILL BE INCREASED", 0);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 58, "AS YOU SCORE POINTS", 0);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 75, "ITEMS", 0);
|
|
|
|
|
mText.white->writeCenteredAndColored(SCREEN_CENTER_X, 8, "OBJECTIVE", 0, 0xFF, 0x7A, 0x00);
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 24, "YOU HAVE TO POP AS MANY");
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 34, "BALLOONS AS YOU CAN");
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 48, "DIFFICULTY WILL BE INCREASED");
|
|
|
|
|
mText.white->writeCentered(SCREEN_CENTER_X, 58, "AS YOU SCORE POINTS");
|
|
|
|
|
mText.white->writeCenteredAndColored(SCREEN_CENTER_X, 75, "ITEMS", 0, 0xFF, 0x7A, 0x00);
|
|
|
|
|
mText.white->write(84, 92, "1.000 POINTS", 0);
|
|
|
|
|
mText.white->write(84, 108, "2.500 POINTS", 0);
|
|
|
|
|
mText.white->write(84, 124, "5.000 POINTS", 0);
|
|
|
|
|
mText.white->write(84, 140, "TIME STOPPER", 0);
|
|
|
|
|
mText.white->write(84, 156, "EXTRA HIT", 0);
|
|
|
|
|
if ((mode == MODE_MANUAL) && (mTitle.instructionsCounter % 50 > 14))
|
|
|
|
|
mText.white->writeCenteredAndColored(SCREEN_CENTER_X, SCREEN_HEIGHT - 12, "PRESS ANY KEY TO RETURN", 0, 0xFF, 0x7A, 0x00);
|
|
|
|
|
|
|
|
|
|
// Disquito
|
|
|
|
|
sprite->init(destRect1, mTexture[TEXTURE_ITEMS].texture, mRenderer);
|
|
|
|
|
@@ -5125,15 +5136,38 @@ void GameDirector::runInstructions(Uint8 mode)
|
|
|
|
|
SDL_RenderClear(mRenderer);
|
|
|
|
|
|
|
|
|
|
// Dibuja los objetos
|
|
|
|
|
if (mode == MODE_AUTO)
|
|
|
|
|
window.y = std::max(0, SCREEN_HEIGHT - (INSTRUCTIONS_COUNTER - mTitle.instructionsCounter) + 100);
|
|
|
|
|
else
|
|
|
|
|
window.y = 0;
|
|
|
|
|
SDL_RenderCopy(mRenderer, mInstructionsSurface, NULL, &window);
|
|
|
|
|
|
|
|
|
|
// Muestra la pantalla
|
|
|
|
|
SDL_RenderPresent(mRenderer);
|
|
|
|
|
|
|
|
|
|
// Lógica
|
|
|
|
|
if (SDL_GetTicks() - mProg.ticks > mProg.ticksSpeed)
|
|
|
|
|
{
|
|
|
|
|
// Actualiza el contador de ticks
|
|
|
|
|
mProg.ticks = SDL_GetTicks();
|
|
|
|
|
|
|
|
|
|
// Modo automático
|
|
|
|
|
if (mode == MODE_AUTO)
|
|
|
|
|
{
|
|
|
|
|
mTitle.instructionsCounter--;
|
|
|
|
|
|
|
|
|
|
if (mTitle.instructionsCounter == 0)
|
|
|
|
|
{
|
|
|
|
|
resetTitle(TITLE_SECTION_1);
|
|
|
|
|
mTitle.nextProgSection = PROG_SECTION_LOGO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Modo manual
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
++mTitle.instructionsCounter %= 60000;
|
|
|
|
|
|
|
|
|
|
if (wannaExit)
|
|
|
|
|
{
|
|
|
|
|
resetTitle(TITLE_SECTION_1);
|
|
|
|
|
mTitle.section = TITLE_SECTION_3;
|
|
|
|
|
@@ -5148,6 +5182,8 @@ void GameDirector::runInstructions(Uint8 mode)
|
|
|
|
|
mMenu.title->setSelectorPos(2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
delete sprite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|