diff --git a/data/font/04b_25.png b/data/font/04b_25.png index a87d2a9..dfc7409 100644 Binary files a/data/font/04b_25.png and b/data/font/04b_25.png differ diff --git a/data/font/04b_25_grey.png b/data/font/04b_25_grey.png new file mode 100644 index 0000000..a87d2a9 Binary files /dev/null and b/data/font/04b_25_grey.png differ diff --git a/data/font/04b_25_var01.png b/data/font/04b_25_metal.png similarity index 100% rename from data/font/04b_25_var01.png rename to data/font/04b_25_metal.png diff --git a/data/font/04b_25_var01.txt b/data/font/04b_25_var01.txt deleted file mode 100644 index 6fc925b..0000000 --- a/data/font/04b_25_var01.txt +++ /dev/null @@ -1,194 +0,0 @@ -# box width -14 -# box height -14 -# 32 espacio ( ) -8 -# 33 ! -5 -# 34 " -8 -# 35 -10 -# 36 $ -10 -# 37 % -9 -# 38 & -11 -# 39 ' -5 -# 40 ( -7 -# 41 ) -7 -# 42 * -7 -# 43 + -9 -# 44 , -5 -# 45 - -9 -# 46 . -5 -# 47 / -12 -# 48 0 -8 -# 49 1 -6 -# 50 2 -8 -# 51 3 -8 -# 52 4 -8 -# 53 5 -8 -# 54 6 -8 -# 55 7 -8 -# 56 8 -8 -# 57 9 -8 -# 58 : -5 -# 59 ; -5 -# 60 < -8 -# 61 = -8 -# 62 > -8 -# 63 ? -8 -# 64 @ -11 -# 65 A -8 -# 66 B -8 -# 67 C -8 -# 68 D -8 -# 69 E -8 -# 70 F -8 -# 71 G -8 -# 72 H -8 -# 73 I -5 -# 74 J -8 -# 75 K -8 -# 76 L -8 -# 77 M -11 -# 78 N -8 -# 79 O -8 -# 80 P -8 -# 81 Q -8 -# 82 R -8 -# 83 S -8 -# 84 T -9 -# 85 U -8 -# 86 V -8 -# 87 W -11 -# 88 X -8 -# 89 Y -8 -# 90 Z -8 -# 91 [ -7 -# 92 \ -11 -# 93 ] -7 -# 94 ^ -6 -# 95 _ -7 -# 96 ` -6 -# 97 a -8 -# 98 b -8 -# 99 c -8 -# 100 d -8 -# 101 e -8 -# 102 f -8 -# 103 g -8 -# 104 h -8 -# 105 i -5 -# 106 j -8 -# 107 k -8 -# 108 l -8 -# 109 m -11 -# 110 n -8 -# 111 o -8 -# 112 p -8 -# 113 q -8 -# 114 r -8 -# 115 s -8 -# 116 t -9 -# 117 u -8 -# 118 v -8 -# 119 w -11 -# 120 x -8 -# 121 y -8 -# 122 z -8 -# 123 { -1 -# 124 | -1 -# 125 } -1 -# 126 ~ -1 \ No newline at end of file diff --git a/data/font/nokia.png b/data/font/nokia.png deleted file mode 100644 index 7e40857..0000000 Binary files a/data/font/nokia.png and /dev/null differ diff --git a/data/font/nokia.txt b/data/font/nokia.txt deleted file mode 100644 index 8b54d71..0000000 --- a/data/font/nokia.txt +++ /dev/null @@ -1,194 +0,0 @@ -# box width -10 -# box height -10 -# 32 espacio ( ) -5 -# 33 ! -4 -# 34 " -5 -# 35 # -7 -# 36 $ -7 -# 37 % -8 -# 38 & -8 -# 39 ' -3 -# 40 ( -5 -# 41 ) -5 -# 42 * -7 -# 43 + -7 -# 44 , -4 -# 45 - -6 -# 46 . -4 -# 47 / -5 -# 48 0 -7 -# 49 1 -5 -# 50 2 -7 -# 51 3 -7 -# 52 4 -7 -# 53 5 -7 -# 54 6 -7 -# 55 7 -7 -# 56 8 -7 -# 57 9 -7 -# 58 : -4 -# 59 ; -4 -# 60 < -6 -# 61 = -6 -# 62 > -6 -# 63 ? -7 -# 64 @ -8 -# 65 A -7 -# 66 B -7 -# 67 C -7 -# 68 D -7 -# 69 E -7 -# 70 F -7 -# 71 G -7 -# 72 H -7 -# 73 I -4 -# 74 J -6 -# 75 K -8 -# 76 L -6 -# 77 M -9 -# 78 N -8 -# 79 O -8 -# 80 P -7 -# 81 Q -8 -# 82 R -7 -# 83 S -6 -# 84 T -8 -# 85 U -7 -# 86 V -8 -# 87 W -9 -# 88 X -8 -# 89 Y -8 -# 90 Z -7 -# 91 [ -4 -# 92 \ -5 -# 93 ] -4 -# 94 ^ -5 -# 95 _ -8 -# 96 ` -4 -# 97 a -7 -# 98 b -7 -# 99 c -6 -# 100 d -7 -# 101 e -7 -# 102 f -5 -# 103 g -7 -# 104 h -7 -# 105 i -4 -# 106 j -5 -# 107 k -7 -# 108 l -4 -# 109 m -10 -# 110 n -7 -# 111 o -7 -# 112 p -7 -# 113 q -7 -# 114 r -6 -# 115 s -6 -# 116 t -5 -# 117 u -7 -# 118 v -7 -# 119 w -9 -# 120 x -7 -# 121 y -7 -# 122 z -7 -# 123 { -> ñ -7 -# 124 | -> ç -7 -# 125 } -0 -# 126 ~ -0 \ No newline at end of file diff --git a/source/director.cpp b/source/director.cpp index 244ea93..9814801 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -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::HI_SCORE_TABLE; + section::name = section::Name::LOGO; #else // NORMAL GAME section::name = section::Name::LOGO; section::attract_mode = section::AttractMode::TITLE_TO_DEMO; @@ -536,8 +536,6 @@ void Director::setFileList() // Fuentes de texto Asset::get()->add(prefix + "/data/font/8bithud.png", AssetType::BITMAP); Asset::get()->add(prefix + "/data/font/8bithud.txt", AssetType::FONT); - Asset::get()->add(prefix + "/data/font/nokia.png", AssetType::BITMAP); - Asset::get()->add(prefix + "/data/font/nokia.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.txt", AssetType::FONT); @@ -545,8 +543,8 @@ void Director::setFileList() Asset::get()->add(prefix + "/data/font/04b_25.txt", AssetType::FONT); Asset::get()->add(prefix + "/data/font/04b_25_2x.png", AssetType::BITMAP); Asset::get()->add(prefix + "/data/font/04b_25_2x.txt", AssetType::FONT); - Asset::get()->add(prefix + "/data/font/04b_25_var01.png", AssetType::BITMAP); - Asset::get()->add(prefix + "/data/font/04b_25_var01.txt", AssetType::FONT); + Asset::get()->add(prefix + "/data/font/04b_25_metal.png", AssetType::BITMAP); + Asset::get()->add(prefix + "/data/font/04b_25_grey.png", AssetType::BITMAP); // Textos Asset::get()->add(prefix + "/data/lang/es_ES.txt", AssetType::LANG); diff --git a/source/hiscore_table.cpp b/source/hiscore_table.cpp index 1300c1b..8211db8 100644 --- a/source/hiscore_table.cpp +++ b/source/hiscore_table.cpp @@ -260,7 +260,7 @@ std::string HiScoreTable::format(int number) // Crea los sprites con los textos void HiScoreTable::createSprites() { - auto header_text = Resource::get()->getText("04b_25"); + auto header_text = Resource::get()->getText("04b_25_grey"); auto entry_text = Resource::get()->getText("smb2"); // Obtiene el tamaño de la textura diff --git a/source/intro.cpp b/source/intro.cpp index 18c4439..3d09423 100644 --- a/source/intro.cpp +++ b/source/intro.cpp @@ -21,7 +21,7 @@ // Constructor Intro::Intro() : texture_(Resource::get()->getTexture("intro.png")), - text_(Resource::get()->getText("04b_25_var01")) + text_(Resource::get()->getText("04b_25_metal")) { // Inicializa variables diff --git a/source/resource.cpp b/source/resource.cpp index 8deb24a..e9f4b8c 100644 --- a/source/resource.cpp +++ b/source/resource.cpp @@ -315,23 +315,35 @@ void Resource::createTextures() } } -// Crea los objetos de texto void Resource::createText() { + struct ResourceInfo + { + std::string key; // Identificador del recurso + std::string textureFile; // Nombre del archivo de textura + std::string textFile; // Nombre del archivo de texto + + // Constructor para facilitar la creación de objetos ResourceInfo + ResourceInfo(const std::string &k, const std::string &tFile, const std::string &txtFile) + : key(k), textureFile(tFile), textFile(txtFile) {} + }; + std::cout << "\n>> CREATING TEXT_OBJECTS" << std::endl; - std::vector> resources = { - {"04b_25", "04b_25.png"}, - {"04b_25_2x", "04b_25_2x.png"}, - {"04b_25_var01", "04b_25_var01.png"}, - {"8bithud", "8bithud.png"}, - {"nokia", "nokia.png"}, - {"smb2", "smb2.gif"}}; + std::vector resources = { + {"04b_25", "04b_25.png", "04b_25.txt"}, + {"04b_25_2x", "04b_25_2x.png", "04b_25_2x.txt"}, + {"04b_25_metal", "04b_25_metal.png", "04b_25.txt"}, + {"04b_25_grey", "04b_25_grey.png", "04b_25.txt"}, + {"8bithud", "8bithud.png", "8bithud.txt"}, + {"smb2", "smb2.gif", "smb2.txt"}}; for (const auto &resource : resources) { - texts_.emplace_back(ResourceText(resource.first, std::make_shared(getTexture(resource.second), getTextFile(resource.first + ".txt")))); - printWithDots("Text : ", resource.first, "[ DONE ]"); + texts_.emplace_back(ResourceText(resource.key, std::make_shared( + getTexture(resource.textureFile), + getTextFile(resource.textFile)))); + printWithDots("Text : ", resource.key, "[ DONE ]"); } }