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:
2
Makefile
2
Makefile
@@ -11,7 +11,7 @@ APP_NAME := Coffee Crisis Arcade Edition
|
|||||||
RELEASE_FOLDER := ccae_release
|
RELEASE_FOLDER := ccae_release
|
||||||
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
|
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
|
||||||
RESOURCE_FILE := release/coffee.res
|
RESOURCE_FILE := release/coffee.res
|
||||||
VERSION := 2025-01-05
|
VERSION := 2025-02-07
|
||||||
|
|
||||||
# Nombres para los ficheros de lanzamiento
|
# Nombres para los ficheros de lanzamiento
|
||||||
WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip
|
WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Director::Director(int argc, const 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::GAME;
|
section::name = section::Name::LOGO;
|
||||||
#else // NORMAL GAME
|
#else // NORMAL GAME
|
||||||
section::name = section::Name::LOGO;
|
section::name = section::Name::LOGO;
|
||||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;
|
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;
|
||||||
|
|||||||
@@ -58,4 +58,5 @@ public:
|
|||||||
std::string getFinalName() const { return trim(name_.substr(0, position_)); }
|
std::string getFinalName() const { return trim(name_.substr(0, position_)); }
|
||||||
std::string getCurrentName() const { return trim(name_); }
|
std::string getCurrentName() const { return trim(name_); }
|
||||||
int getPosition() const { return position_; }
|
int getPosition() const { return position_; }
|
||||||
|
bool getPositionOverflow() const { return position_overflow_; }
|
||||||
};
|
};
|
||||||
@@ -1650,7 +1650,16 @@ void Game::handleNameInput(const std::shared_ptr<Player> &player)
|
|||||||
input_->checkInput(InputType::FIRE_CENTER, 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))
|
input_->checkInput(InputType::FIRE_RIGHT, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index))
|
||||||
{
|
{
|
||||||
player->setInput(InputType::RIGHT);
|
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))
|
else if (input_->checkInput(InputType::UP, INPUT_DO_NOT_ALLOW_REPEAT, options.controllers[controllerIndex].type, options.controllers[controllerIndex].index))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ void ManageHiScoreTable::clear()
|
|||||||
table_.clear();
|
table_.clear();
|
||||||
|
|
||||||
// Añade 10 entradas predefinidas
|
// 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("USUFON", 500000));
|
||||||
table_.push_back(HiScoreEntry("GLUCAS", 100000));
|
table_.push_back(HiScoreEntry("GLUCAS", 100000));
|
||||||
table_.push_back(HiScoreEntry("PDLGAT", 50000));
|
table_.push_back(HiScoreEntry("PDLGAT", 50000));
|
||||||
@@ -141,7 +141,7 @@ bool ManageHiScoreTable::saveToFile(const std::string &file_path)
|
|||||||
// Guarda los datos de cada entrada
|
// Guarda los datos de cada entrada
|
||||||
for (int i = 0; i < tableSize; ++i)
|
for (int i = 0; i < tableSize; ++i)
|
||||||
{
|
{
|
||||||
const HiScoreEntry& entry = table_.at(i);
|
const HiScoreEntry &entry = table_.at(i);
|
||||||
|
|
||||||
// Guarda la puntuación
|
// Guarda la puntuación
|
||||||
SDL_RWwrite(file, &entry.score, sizeof(int), 1);
|
SDL_RWwrite(file, &entry.score, sizeof(int), 1);
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ public:
|
|||||||
PlayerState getPlayingState() const { return playing_state_; }
|
PlayerState getPlayingState() const { return playing_state_; }
|
||||||
std::string getName() const { return name_; }
|
std::string getName() const { return name_; }
|
||||||
bool get1CC() const { return game_completed_ && credits_used_ == 1; }
|
bool get1CC() const { return game_completed_ && credits_used_ == 1; }
|
||||||
|
bool getEnterNamePositionOverflow() const { return enter_name_->getPositionOverflow(); }
|
||||||
|
|
||||||
// Setters
|
// Setters
|
||||||
void setController(int index) { controller_index_ = index; }
|
void setController(int index) { controller_index_ = index; }
|
||||||
|
|||||||
Reference in New Issue
Block a user