nou: quan arribes a la maxima puntuació, posa un lletreret
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
"[GAME_TEXT] 7": "Endavant!",
|
"[GAME_TEXT] 7": "Endavant!",
|
||||||
"[GAME_TEXT] 8": "1.000.000 de punts!",
|
"[GAME_TEXT] 8": "1.000.000 de punts!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Gracies!",
|
"[GAME_TEXT] THANK_YOU": "Gracies!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "Nou record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Millors puntuacions",
|
"[HIGHSCORE_TABLE] CAPTION": "Millors puntuacions",
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"[GAME_TEXT] 7": "Get Ready!",
|
"[GAME_TEXT] 7": "Get Ready!",
|
||||||
"[GAME_TEXT] 8": "1,000,000 points!",
|
"[GAME_TEXT] 8": "1,000,000 points!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Thank you!",
|
"[GAME_TEXT] THANK_YOU": "Thank you!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "New record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Best scores",
|
"[HIGHSCORE_TABLE] CAPTION": "Best scores",
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"[GAME_TEXT] 7": "Adelante!",
|
"[GAME_TEXT] 7": "Adelante!",
|
||||||
"[GAME_TEXT] 8": "1.000.000 de puntos!",
|
"[GAME_TEXT] 8": "1.000.000 de puntos!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Gracias!",
|
"[GAME_TEXT] THANK_YOU": "Gracias!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "Nuevo record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Mejores puntuaciones",
|
"[HIGHSCORE_TABLE] CAPTION": "Mejores puntuaciones",
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Director::Director(int argc, std::span<char *> argv) {
|
|||||||
Section::name = Section::Name::GAME;
|
Section::name = Section::Name::GAME;
|
||||||
Section::options = Section::Options::GAME_PLAY_1P;
|
Section::options = Section::Options::GAME_PLAY_1P;
|
||||||
#elif _DEBUG
|
#elif _DEBUG
|
||||||
Section::name = Section::Name::TITLE;
|
Section::name = Section::Name::GAME;
|
||||||
Section::options = Section::Options::GAME_PLAY_1P;
|
Section::options = Section::Options::GAME_PLAY_1P;
|
||||||
#else // NORMAL GAME
|
#else // NORMAL GAME
|
||||||
Section::name = Section::Name::LOGO;
|
Section::name = Section::Name::LOGO;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ void ManageHiScoreTable::clear() {
|
|||||||
table_.clear();
|
table_.clear();
|
||||||
|
|
||||||
// Añade 10 entradas predefinidas
|
// Añade 10 entradas predefinidas
|
||||||
|
/*
|
||||||
table_.emplace_back("BRY", 1000000);
|
table_.emplace_back("BRY", 1000000);
|
||||||
table_.emplace_back("USUFO", 500000);
|
table_.emplace_back("USUFO", 500000);
|
||||||
table_.emplace_back("GLUCA", 100000);
|
table_.emplace_back("GLUCA", 100000);
|
||||||
@@ -23,6 +24,18 @@ void ManageHiScoreTable::clear() {
|
|||||||
table_.emplace_back("SAM", 500);
|
table_.emplace_back("SAM", 500);
|
||||||
table_.emplace_back("PACMQ", 200);
|
table_.emplace_back("PACMQ", 200);
|
||||||
table_.emplace_back("PELEC", 100);
|
table_.emplace_back("PELEC", 100);
|
||||||
|
*/
|
||||||
|
|
||||||
|
table_.emplace_back("BRY", 1000);
|
||||||
|
table_.emplace_back("USUFO", 500);
|
||||||
|
table_.emplace_back("GLUCA", 100);
|
||||||
|
table_.emplace_back("PARRA", 50);
|
||||||
|
table_.emplace_back("CAGAM", 10);
|
||||||
|
table_.emplace_back("PEPE", 5);
|
||||||
|
table_.emplace_back("ROSIT", 4);
|
||||||
|
table_.emplace_back("SAM", 3);
|
||||||
|
table_.emplace_back("PACMQ", 2);
|
||||||
|
table_.emplace_back("PELEC", 1);
|
||||||
|
|
||||||
sort();
|
sort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -678,6 +678,7 @@ void Resource::createTextTextures() {
|
|||||||
{"game_text_get_ready", Lang::getText("[GAME_TEXT] 7")},
|
{"game_text_get_ready", Lang::getText("[GAME_TEXT] 7")},
|
||||||
{"game_text_last_stage", Lang::getText("[GAME_TEXT] 3")},
|
{"game_text_last_stage", Lang::getText("[GAME_TEXT] 3")},
|
||||||
{"game_text_congratulations", Lang::getText("[GAME_TEXT] 1")},
|
{"game_text_congratulations", Lang::getText("[GAME_TEXT] 1")},
|
||||||
|
{"game_text_new_record", Lang::getText("[GAME_TEXT] NEW_RECORD")},
|
||||||
{"game_text_game_over", "Game Over"}};
|
{"game_text_game_over", "Game Over"}};
|
||||||
|
|
||||||
auto text2 = getText("04b_25_2x_enhanced");
|
auto text2 = getText("04b_25_2x_enhanced");
|
||||||
|
|||||||
@@ -201,10 +201,11 @@ void Game::updateHiScore() {
|
|||||||
hi_score_.score = player->getScore();
|
hi_score_.score = player->getScore();
|
||||||
hi_score_.name.clear();
|
hi_score_.name.clear();
|
||||||
|
|
||||||
// Si se supera la máxima puntuación emite sonido
|
// Si se supera la máxima puntuación
|
||||||
if (!hi_score_achieved_) {
|
if (!hi_score_achieved_) {
|
||||||
hi_score_achieved_ = true;
|
hi_score_achieved_ = true;
|
||||||
playSound("hi_score_achieved.wav");
|
playSound("hi_score_achieved.wav"); // Emite un sonido
|
||||||
|
createMessage({paths_.at(8), paths_.at(9)}, Resource::get()->getTexture("game_text_new_record")); // CRea un mensaje
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1036,7 +1037,7 @@ void Game::initPaths() {
|
|||||||
const int X1 = param.game.play_area.center_x - (W / 2);
|
const int X1 = param.game.play_area.center_x - (W / 2);
|
||||||
const int X2 = param.game.play_area.rect.w;
|
const int X2 = param.game.play_area.rect.w;
|
||||||
const int Y = param.game.play_area.center_y;
|
const int Y = param.game.play_area.center_y;
|
||||||
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 0.33f); // 20 frames → segundos
|
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 0.5f);
|
||||||
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1048,11 +1049,11 @@ void Game::initPaths() {
|
|||||||
const int Y1 = param.game.play_area.center_y - (H / 2);
|
const int Y1 = param.game.play_area.center_y - (H / 2);
|
||||||
const int Y2 = -H;
|
const int Y2 = -H;
|
||||||
const int X = param.game.play_area.center_x;
|
const int X = param.game.play_area.center_x;
|
||||||
paths_.emplace_back(createPath(Y0, Y1, PathType::VERTICAL, X, 80, easeOutQuint), 0.33f); // 20 frames → segundos
|
paths_.emplace_back(createPath(Y0, Y1, PathType::VERTICAL, X, 80, easeOutQuint), 0.5f);
|
||||||
paths_.emplace_back(createPath(Y1, Y2, PathType::VERTICAL, X, 80, easeInQuint), 0);
|
paths_.emplace_back(createPath(Y1, Y2, PathType::VERTICAL, X, 80, easeInQuint), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recorrido para el texto de "Congratulations!!" (3,4)
|
// Recorrido para el texto de "Congratulations!!" (4,5)
|
||||||
{
|
{
|
||||||
const auto &texture = Resource::get()->getTexture("game_text_congratulations");
|
const auto &texture = Resource::get()->getTexture("game_text_congratulations");
|
||||||
const auto W = texture->getWidth();
|
const auto W = texture->getWidth();
|
||||||
@@ -1061,11 +1062,11 @@ void Game::initPaths() {
|
|||||||
const int X1 = param.game.play_area.center_x - (W / 2);
|
const int X1 = param.game.play_area.center_x - (W / 2);
|
||||||
const int X2 = param.game.play_area.rect.w;
|
const int X2 = param.game.play_area.rect.w;
|
||||||
const int Y = param.game.play_area.center_y - (H / 2) - 20;
|
const int Y = param.game.play_area.center_y - (H / 2) - 20;
|
||||||
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 6.67f); // 400 frames → segundos
|
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 7.0F);
|
||||||
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recorrido para el texto de "1.000.000 points!" (5,6)
|
// Recorrido para el texto de "1.000.000 points!" (6,7)
|
||||||
{
|
{
|
||||||
const auto &texture = Resource::get()->getTexture("game_text_1000000_points");
|
const auto &texture = Resource::get()->getTexture("game_text_1000000_points");
|
||||||
const auto W = texture->getWidth();
|
const auto W = texture->getWidth();
|
||||||
@@ -1074,7 +1075,19 @@ void Game::initPaths() {
|
|||||||
const int X1 = param.game.play_area.center_x - (W / 2);
|
const int X1 = param.game.play_area.center_x - (W / 2);
|
||||||
const int X2 = -W;
|
const int X2 = -W;
|
||||||
const int Y = param.game.play_area.center_y + (H / 2) - 20;
|
const int Y = param.game.play_area.center_y + (H / 2) - 20;
|
||||||
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 6.67f); // 400 frames → segundos
|
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 7.0F);
|
||||||
|
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recorrido para el texto de "New Record!" (8,9)
|
||||||
|
{
|
||||||
|
const auto &texture = Resource::get()->getTexture("game_text_new_record");
|
||||||
|
const auto W = texture->getWidth();
|
||||||
|
const int X0 = -W;
|
||||||
|
const int X1 = param.game.play_area.center_x - (W / 2);
|
||||||
|
const int X2 = param.game.play_area.rect.w;
|
||||||
|
const int Y = param.game.play_area.first_quarter_y;
|
||||||
|
paths_.emplace_back(createPath(X0, X1, PathType::HORIZONTAL, Y, 80, easeOutQuint), 1.0f);
|
||||||
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
paths_.emplace_back(createPath(X1, X2, PathType::HORIZONTAL, Y, 80, easeInQuint), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user