diff --git a/data/font/smb2.gif b/data/font/smb2.gif deleted file mode 100644 index c1e17d6..0000000 Binary files a/data/font/smb2.gif and /dev/null differ diff --git a/data/font/smb2.png b/data/font/smb2.png new file mode 100644 index 0000000..a0d16e7 Binary files /dev/null and b/data/font/smb2.png differ diff --git a/data/font/smb2_grad.png b/data/font/smb2_grad.png new file mode 100644 index 0000000..1c0d973 Binary files /dev/null and b/data/font/smb2_grad.png differ diff --git a/data/font/smb2_palette1.pal b/data/font/smb2_palette1.pal deleted file mode 100644 index 496c4a2..0000000 Binary files a/data/font/smb2_palette1.pal and /dev/null differ diff --git a/data/gfx/player/player1.gif b/data/gfx/player/player1.gif index ce1f9e8..9424819 100644 Binary files a/data/gfx/player/player1.gif and b/data/gfx/player/player1.gif differ diff --git a/data/gfx/player/player1_1_coffee_palette.gif b/data/gfx/player/player1_1_coffee_palette.gif deleted file mode 100644 index 108c27f..0000000 Binary files a/data/gfx/player/player1_1_coffee_palette.gif and /dev/null differ diff --git a/data/gfx/player/player1_2_coffee_palette.gif b/data/gfx/player/player1_2_coffee_palette.gif deleted file mode 100644 index 772936e..0000000 Binary files a/data/gfx/player/player1_2_coffee_palette.gif and /dev/null differ diff --git a/data/gfx/player/player1_coffee1.pal b/data/gfx/player/player1_coffee1.pal new file mode 100644 index 0000000..5bff4ee --- /dev/null +++ b/data/gfx/player/player1_coffee1.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +136 66 83 255 +150 66 83 255 +186 97 86 255 +217 148 85 255 +230 157 90 255 +242 166 94 255 +189 189 189 255 +224 224 224 255 +243 108 96 255 +117 117 117 255 +238 238 238 255 +255 255 235 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +61 156 112 255 +79 163 112 255 +93 222 112 255 +125 242 92 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +50 64 143 255 +54 70 156 255 +59 75 168 255 +63 81 181 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +78 52 46 255 +93 64 55 255 +109 76 65 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +239 224 5 255 +232 247 8 255 +245 247 215 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +102 50 63 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player1_coffee2.pal b/data/gfx/player/player1_coffee2.pal new file mode 100644 index 0000000..1c36bbe --- /dev/null +++ b/data/gfx/player/player1_coffee2.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +136 66 83 255 +150 66 83 255 +186 97 86 255 +217 148 85 255 +230 157 90 255 +242 166 94 255 +189 189 189 255 +224 224 224 255 +243 108 96 255 +117 117 117 255 +238 238 238 255 +255 255 235 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +214 164 26 255 +227 174 27 255 +239 183 29 255 +252 193 30 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +50 64 143 255 +54 70 156 255 +59 75 168 255 +63 81 181 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +78 52 46 255 +93 64 55 255 +109 76 65 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +239 224 5 255 +232 247 8 255 +245 247 215 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +102 50 63 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player1_invencible.pal b/data/gfx/player/player1_invencible.pal new file mode 100644 index 0000000..df120a1 --- /dev/null +++ b/data/gfx/player/player1_invencible.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +204 204 204 255 +204 204 204 255 +255 255 255 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +189 189 189 255 +224 224 224 255 +255 255 255 255 +204 204 204 255 +255 255 255 255 +255 255 235 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +170 170 170 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player1_invencible_palette.gif b/data/gfx/player/player1_invencible_palette.gif deleted file mode 100644 index 9d6210b..0000000 Binary files a/data/gfx/player/player1_invencible_palette.gif and /dev/null differ diff --git a/data/gfx/player/player2.gif b/data/gfx/player/player2.gif index a33fd87..31fd0de 100644 Binary files a/data/gfx/player/player2.gif and b/data/gfx/player/player2.gif differ diff --git a/data/gfx/player/player2_1_coffee_palette.gif b/data/gfx/player/player2_1_coffee_palette.gif deleted file mode 100644 index ce25f9d..0000000 Binary files a/data/gfx/player/player2_1_coffee_palette.gif and /dev/null differ diff --git a/data/gfx/player/player2_2_coffee_palette.gif b/data/gfx/player/player2_2_coffee_palette.gif deleted file mode 100644 index 708d120..0000000 Binary files a/data/gfx/player/player2_2_coffee_palette.gif and /dev/null differ diff --git a/data/gfx/player/player2_coffee1.pal b/data/gfx/player/player2_coffee1.pal new file mode 100644 index 0000000..fcca7be --- /dev/null +++ b/data/gfx/player/player2_coffee1.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +19 18 18 255 +35 35 35 255 +54 48 47 255 +212 148 85 255 +232 148 85 255 +242 166 94 255 +234 234 234 255 +199 199 199 255 +243 108 96 255 +196 20 17 255 +221 25 29 255 +222 222 222 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +46 139 87 255 +60 179 113 255 +72 209 129 255 +85 239 141 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +26 35 126 255 +29 38 138 255 +32 41 150 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +78 52 46 255 +93 64 55 255 +109 76 65 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +250 8 219 255 +250 86 229 255 +250 202 244 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +102 50 63 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player2_coffee2.pal b/data/gfx/player/player2_coffee2.pal new file mode 100644 index 0000000..aa226be --- /dev/null +++ b/data/gfx/player/player2_coffee2.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +19 18 18 255 +35 35 35 255 +54 48 47 255 +212 148 85 255 +232 148 85 255 +242 166 94 255 +234 234 234 255 +199 199 199 255 +243 108 96 255 +196 20 17 255 +221 25 29 255 +222 222 222 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +224 133 0 255 +250 125 0 255 +250 162 0 255 +250 133 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +26 35 126 255 +29 38 138 255 +32 41 150 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +78 52 46 255 +93 64 55 255 +109 76 65 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +250 8 219 255 +250 86 229 255 +250 202 244 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +102 50 63 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player2_invencible.pal b/data/gfx/player/player2_invencible.pal new file mode 100644 index 0000000..df120a1 --- /dev/null +++ b/data/gfx/player/player2_invencible.pal @@ -0,0 +1,67 @@ +JASC-PAL +0100 +64 +0 0 0 0 +204 204 204 255 +204 204 204 255 +255 255 255 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +189 189 189 255 +224 224 224 255 +255 255 255 255 +204 204 204 255 +255 255 255 255 +255 255 235 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +204 204 204 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +204 204 204 255 +255 255 255 255 +255 255 255 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +170 170 170 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 +0 0 0 255 diff --git a/data/gfx/player/player2_invencible_palette.gif b/data/gfx/player/player2_invencible_palette.gif deleted file mode 100644 index a152fea..0000000 Binary files a/data/gfx/player/player2_invencible_palette.gif and /dev/null differ diff --git a/source/director.cpp b/source/director.cpp index 1a1dd79..a010e06 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -407,16 +407,16 @@ void Director::setFileList() // Texturas - Jugador 1 Asset::get()->add(prefix + "/data/gfx/player/player1.gif", AssetType::BITMAP); - Asset::get()->add(prefix + "/data/gfx/player/player1_1_coffee_palette.gif", AssetType::PALETTE); - Asset::get()->add(prefix + "/data/gfx/player/player1_2_coffee_palette.gif", AssetType::PALETTE); - Asset::get()->add(prefix + "/data/gfx/player/player1_invencible_palette.gif", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player1_coffee1.pal", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player1_coffee2.pal", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player1_invencible.pal", AssetType::PALETTE); Asset::get()->add(prefix + "/data/gfx/player/player1_power.png", AssetType::BITMAP); // Texturas - Jugador 2 Asset::get()->add(prefix + "/data/gfx/player/player2.gif", AssetType::BITMAP); - Asset::get()->add(prefix + "/data/gfx/player/player2_1_coffee_palette.gif", AssetType::PALETTE); - Asset::get()->add(prefix + "/data/gfx/player/player2_2_coffee_palette.gif", AssetType::PALETTE); - Asset::get()->add(prefix + "/data/gfx/player/player2_invencible_palette.gif", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player2_coffee1.pal", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player2_coffee2.pal", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/gfx/player/player2_invencible.pal", AssetType::PALETTE); Asset::get()->add(prefix + "/data/gfx/player/player2_power.png", AssetType::BITMAP); // Animaciones del jugador @@ -428,8 +428,8 @@ void Director::setFileList() Asset::get()->add(prefix + "/data/font/8bithud.txt", AssetType::FONT); Asset::get()->add(prefix + "/data/font/aseprite.png", AssetType::BITMAP); Asset::get()->add(prefix + "/data/font/aseprite.txt", AssetType::FONT); - Asset::get()->add(prefix + "/data/font/smb2.gif", AssetType::BITMAP); - Asset::get()->add(prefix + "/data/font/smb2_palette1.pal", AssetType::PALETTE); + Asset::get()->add(prefix + "/data/font/smb2.png", AssetType::BITMAP); + Asset::get()->add(prefix + "/data/font/smb2_grad.png", AssetType::BITMAP); Asset::get()->add(prefix + "/data/font/smb2.txt", AssetType::FONT); Asset::get()->add(prefix + "/data/font/04b_25.png", AssetType::BITMAP); Asset::get()->add(prefix + "/data/font/04b_25.txt", AssetType::FONT); diff --git a/source/resource.cpp b/source/resource.cpp index 645681a..fd73677 100644 --- a/source/resource.cpp +++ b/source/resource.cpp @@ -279,17 +279,14 @@ void Resource::addPalettes() SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> PALETTES"); // Paletas para el jugador 1 - getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_1_coffee_palette.gif")); - getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_2_coffee_palette.gif")); - getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_invencible_palette.gif")); + getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_coffee1.pal")); + getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_coffee2.pal")); + getTexture("player1.gif")->addPaletteFromFile(Asset::get()->get("player1_invencible.pal")); // Paletas para el jugador 2 - getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_1_coffee_palette.gif")); - getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_2_coffee_palette.gif")); - getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_invencible_palette.gif")); - - // Paleta para la fuente SMB2 - getTexture("smb2.gif")->addPaletteFromFile(Asset::get()->get("smb2_palette1.pal")); + getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_coffee1.pal")); + getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_coffee2.pal")); + getTexture("player2.gif")->addPaletteFromFile(Asset::get()->get("player2_invencible.pal")); } // Crea texturas a partir de textos para mostrar puntuaciones y mensajes @@ -365,7 +362,8 @@ void Resource::createText() {"04b_25_reversed_2x", "04b_25_reversed_2x.png", "04b_25_2x.txt"}, {"8bithud", "8bithud.png", "8bithud.txt"}, {"aseprite", "aseprite.png", "aseprite.txt"}, - {"smb2", "smb2.gif", "smb2.txt"}}; + {"smb2", "smb2.png", "smb2.txt"}, + {"smb2_grad", "smb2_grad.png", "smb2.txt"}}; for (const auto &resource : resources) { diff --git a/source/sections/credits.cpp b/source/sections/credits.cpp index eecb85e..9145908 100644 --- a/source/sections/credits.cpp +++ b/source/sections/credits.cpp @@ -166,6 +166,7 @@ void Credits::checkInput() void Credits::fillTextTexture() { auto text = Resource::get()->getText("smb2"); + auto text_grad = Resource::get()->getText("smb2_grad"); SDL_SetRenderTarget(Screen::get()->getRenderer(), text_texture_); SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 0, 0, 0, 0); @@ -190,24 +191,18 @@ void Credits::fillTextTexture() int y = (param.game.height - TEXTS_HEIGHT) / 2; y = 0; - text->setPalette(1); - text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(0), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); + text_grad->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(0), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); - text->setPalette(0); y += SPACE_POST_TITLE; text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(4), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_PRE_TITLE; - text->setPalette(1); - text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(1), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); - text->setPalette(0); + text_grad->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(1), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_POST_TITLE; text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(4), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_PRE_TITLE; - text->setPalette(1); - text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(2), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); - text->setPalette(0); + text_grad->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(2), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_POST_TITLE; text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(5), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); @@ -215,9 +210,7 @@ void Credits::fillTextTexture() text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(6), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_PRE_TITLE; - text->setPalette(1); - text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(3), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); - text->setPalette(0); + text_grad->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(3), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_POST_TITLE; text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXTS.at(7), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR); y += SPACE_POST_TITLE; diff --git a/source/sections/title.cpp b/source/sections/title.cpp index e6068e8..b861561 100644 --- a/source/sections/title.cpp +++ b/source/sections/title.cpp @@ -28,7 +28,7 @@ // Constructor Title::Title() - : text_(Resource::get()->getText("smb2")), + : text_(Resource::get()->getText("smb2_grad")), fade_(std::make_unique()), tiled_bg_(std::make_unique(param.game.game_area.rect, TiledBGMode::RANDOM)), game_logo_(std::make_unique(param.game.game_area.center_x, param.title.title_c_c_position)), @@ -43,7 +43,6 @@ Title::Title() fade_->setColor(param.fade.color); fade_->setType(FadeType::RANDOM_SQUARE); fade_->setPostDuration(param.fade.post_duration); - Resource::get()->getTexture("smb2.gif")->setPalette(1); // Asigna valores a otras variables Section::options = Section::Options::TITLE_1; @@ -60,7 +59,6 @@ Title::Title() // Destructor Title::~Title() { - Resource::get()->getTexture("smb2.gif")->setPalette(0); Audio::get()->stopAllSounds(); if (Section::name == Section::Name::LOGO) {