llevat soport per a colors amb nom
This commit is contained in:
@@ -28,8 +28,8 @@ Logo::Logo()
|
||||
delta_timer_(std::make_unique<DeltaTimer>()) {
|
||||
// Configura variables
|
||||
since_1998_sprite_->setClip(0, 0, since_1998_surface_->getWidth(), since_1998_surface_->getHeight());
|
||||
since_1998_color_ = static_cast<Uint8>(PaletteColor::BLACK);
|
||||
jailgames_color_ = static_cast<Uint8>(PaletteColor::BRIGHT_WHITE);
|
||||
since_1998_color_ = 0;
|
||||
jailgames_color_ = 15;
|
||||
|
||||
// Inicializa variables
|
||||
SceneManager::current = SceneManager::Scene::LOGO;
|
||||
@@ -51,7 +51,7 @@ Logo::Logo()
|
||||
easing_function_ = EASING_OPTIONS[dist(gen)];
|
||||
|
||||
// Cambia el color del borde
|
||||
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
|
||||
Screen::get()->setBorderColor(0);
|
||||
}
|
||||
|
||||
// Comprueba el manejador de eventos
|
||||
@@ -216,7 +216,7 @@ void Logo::update() {
|
||||
void Logo::render() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
// Prepara para empezar a dibujar en la textura de juego
|
||||
Screen::get()->start();
|
||||
Screen::get()->clearSurface(static_cast<Uint8>(PaletteColor::BLACK));
|
||||
Screen::get()->clearSurface(0);
|
||||
|
||||
// Dibuja los objetos
|
||||
for (const auto& sprite : jailgames_sprite_) {
|
||||
@@ -257,14 +257,14 @@ void Logo::endSection() {
|
||||
void Logo::initColors() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
// Inicializa el vector de colores
|
||||
const std::vector<Uint8> COLORS = {
|
||||
static_cast<Uint8>(PaletteColor::BLACK),
|
||||
static_cast<Uint8>(PaletteColor::BLUE),
|
||||
static_cast<Uint8>(PaletteColor::RED),
|
||||
static_cast<Uint8>(PaletteColor::MAGENTA),
|
||||
static_cast<Uint8>(PaletteColor::GREEN),
|
||||
static_cast<Uint8>(PaletteColor::CYAN),
|
||||
static_cast<Uint8>(PaletteColor::YELLOW),
|
||||
static_cast<Uint8>(PaletteColor::BRIGHT_WHITE)};
|
||||
0,
|
||||
2,
|
||||
4,
|
||||
6,
|
||||
8,
|
||||
10,
|
||||
12,
|
||||
15};
|
||||
for (const auto& color : COLORS) {
|
||||
color_.push_back(color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user