EnterName: si has plenat tots els slots de lletres, apretar una volta mes el de fixar lletra fixa el nom

This commit is contained in:
2025-02-07 14:15:18 +01:00
parent 01591175ef
commit 84595da13a
6 changed files with 16 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ APP_NAME := Coffee Crisis Arcade Edition
RELEASE_FOLDER := ccae_release
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
RESOURCE_FILE := release/coffee.res
VERSION := 2025-01-05
VERSION := 2025-02-07
# Nombres para los ficheros de lanzamiento
WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip

View File

@@ -52,7 +52,7 @@ Director::Director(int argc, const char *argv[])
section::name = section::Name::GAME;
section::options = section::Options::GAME_PLAY_1P;
#elif DEBUG
section::name = section::Name::GAME;
section::name = section::Name::LOGO;
#else // NORMAL GAME
section::name = section::Name::LOGO;
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;

View File

@@ -58,4 +58,5 @@ public:
std::string getFinalName() const { return trim(name_.substr(0, position_)); }
std::string getCurrentName() const { return trim(name_); }
int getPosition() const { return position_; }
bool getPositionOverflow() const { return position_overflow_; }
};

View File

@@ -1649,9 +1649,18 @@ void Game::handleNameInput(const std::shared_ptr<Player> &player)
if (input_->checkInput(InputType::FIRE_LEFT, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index) ||
input_->checkInput(InputType::FIRE_CENTER, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index) ||
input_->checkInput(InputType::FIRE_RIGHT, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index))
{
if (player->getEnterNamePositionOverflow())
{
player->setInput(InputType::START);
addScoreToScoreBoard(player);
player->setPlayingState(PlayerState::SHOWING_NAME);
}
else
{
player->setInput(InputType::RIGHT);
}
}
else if (input_->checkInput(InputType::UP, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index))
{
player->setInput(InputType::UP);

View File

@@ -12,7 +12,7 @@ void ManageHiScoreTable::clear()
table_.clear();
// Añade 10 entradas predefinidas
table_.push_back(HiScoreEntry("BRIBON", 1000000));
table_.push_back(HiScoreEntry("BRY", 1000000));
table_.push_back(HiScoreEntry("USUFON", 500000));
table_.push_back(HiScoreEntry("GLUCAS", 100000));
table_.push_back(HiScoreEntry("PDLGAT", 50000));

View File

@@ -239,6 +239,7 @@ public:
PlayerState getPlayingState() const { return playing_state_; }
std::string getName() const { return name_; }
bool get1CC() const { return game_completed_ && credits_used_ == 1; }
bool getEnterNamePositionOverflow() const { return enter_name_->getPositionOverflow(); }
// Setters
void setController(int index) { controller_index_ = index; }