Nova font de text per al text gran amb el doble de definició
This commit is contained in:
BIN
data/font/04b_25_2x.png
Normal file
BIN
data/font/04b_25_2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
194
data/font/04b_25_2x.txt
Normal file
194
data/font/04b_25_2x.txt
Normal file
@@ -0,0 +1,194 @@
|
||||
# box width
|
||||
28
|
||||
# box height
|
||||
28
|
||||
# 32 espacio ( )
|
||||
16
|
||||
# 33 !
|
||||
10
|
||||
# 34 "
|
||||
16
|
||||
# 35
|
||||
20
|
||||
# 36 $
|
||||
20
|
||||
# 37 %
|
||||
18
|
||||
# 38 &
|
||||
22
|
||||
# 39 '
|
||||
10
|
||||
# 40 (
|
||||
14
|
||||
# 41 )
|
||||
14
|
||||
# 42 *
|
||||
14
|
||||
# 43 +
|
||||
18
|
||||
# 44 ,
|
||||
10
|
||||
# 45 -
|
||||
18
|
||||
# 46 .
|
||||
10
|
||||
# 47 /
|
||||
24
|
||||
# 48 0
|
||||
16
|
||||
# 49 1
|
||||
12
|
||||
# 50 2
|
||||
16
|
||||
# 51 3
|
||||
16
|
||||
# 52 4
|
||||
16
|
||||
# 53 5
|
||||
16
|
||||
# 54 6
|
||||
16
|
||||
# 55 7
|
||||
16
|
||||
# 56 8
|
||||
16
|
||||
# 57 9
|
||||
16
|
||||
# 58 :
|
||||
10
|
||||
# 59 ;
|
||||
10
|
||||
# 60 <
|
||||
16
|
||||
# 61 =
|
||||
16
|
||||
# 62 >
|
||||
16
|
||||
# 63 ?
|
||||
16
|
||||
# 64 @
|
||||
22
|
||||
# 65 A
|
||||
16
|
||||
# 66 B
|
||||
16
|
||||
# 67 C
|
||||
16
|
||||
# 68 D
|
||||
16
|
||||
# 69 E
|
||||
16
|
||||
# 70 F
|
||||
16
|
||||
# 71 G
|
||||
16
|
||||
# 72 H
|
||||
16
|
||||
# 73 I
|
||||
10
|
||||
# 74 J
|
||||
16
|
||||
# 75 K
|
||||
16
|
||||
# 76 L
|
||||
16
|
||||
# 77 M
|
||||
22
|
||||
# 78 N
|
||||
16
|
||||
# 79 O
|
||||
16
|
||||
# 80 P
|
||||
16
|
||||
# 81 Q
|
||||
16
|
||||
# 82 R
|
||||
16
|
||||
# 83 S
|
||||
16
|
||||
# 84 T
|
||||
18
|
||||
# 85 U
|
||||
16
|
||||
# 86 V
|
||||
16
|
||||
# 87 W
|
||||
22
|
||||
# 88 X
|
||||
16
|
||||
# 89 Y
|
||||
16
|
||||
# 90 Z
|
||||
16
|
||||
# 91 [
|
||||
14
|
||||
# 92 \
|
||||
22
|
||||
# 93 ]
|
||||
14
|
||||
# 94 ^
|
||||
12
|
||||
# 95 _
|
||||
14
|
||||
# 96 `
|
||||
12
|
||||
# 97 a
|
||||
16
|
||||
# 98 b
|
||||
16
|
||||
# 99 c
|
||||
16
|
||||
# 100 d
|
||||
16
|
||||
# 101 e
|
||||
16
|
||||
# 102 f
|
||||
16
|
||||
# 103 g
|
||||
16
|
||||
# 104 h
|
||||
16
|
||||
# 105 i
|
||||
10
|
||||
# 106 j
|
||||
16
|
||||
# 107 k
|
||||
16
|
||||
# 108 l
|
||||
16
|
||||
# 109 m
|
||||
22
|
||||
# 110 n
|
||||
16
|
||||
# 111 o
|
||||
16
|
||||
# 112 p
|
||||
16
|
||||
# 113 q
|
||||
16
|
||||
# 114 r
|
||||
16
|
||||
# 115 s
|
||||
16
|
||||
# 116 t
|
||||
18
|
||||
# 117 u
|
||||
16
|
||||
# 118 v
|
||||
16
|
||||
# 119 w
|
||||
22
|
||||
# 120 x
|
||||
16
|
||||
# 121 y
|
||||
16
|
||||
# 122 z
|
||||
16
|
||||
# 123 {
|
||||
2
|
||||
# 124 |
|
||||
2
|
||||
# 125 }
|
||||
2
|
||||
# 126 ~
|
||||
2
|
||||
@@ -495,6 +495,8 @@ void Director::setFileList()
|
||||
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);
|
||||
Asset::get()->add(prefix + "/data/font/04b_25_2x.png", AssetType::BITMAP);
|
||||
Asset::get()->add(prefix + "/data/font/04b_25_2x.txt", AssetType::FONT);
|
||||
|
||||
// Textos
|
||||
Asset::get()->add(prefix + "/data/lang/es_ES.txt", AssetType::LANG);
|
||||
@@ -614,7 +616,7 @@ void Director::runGame()
|
||||
{
|
||||
const auto player_id = section::options == section::Options::GAME_PLAY_1P ? 1 : 2;
|
||||
#ifdef DEBUG
|
||||
constexpr auto current_stage = 9;
|
||||
constexpr auto current_stage = 0;
|
||||
#else
|
||||
constexpr auto current_stage = 0;
|
||||
#endif
|
||||
|
||||
@@ -351,9 +351,9 @@ void Game::updateStage()
|
||||
createMessage(paths, Resource::get()->getTexture("last_stage"));
|
||||
else
|
||||
{
|
||||
auto text = Resource::get()->getText("04b_25");
|
||||
auto text = Resource::get()->getText("04b_25_2x");
|
||||
const std::string caption = std::to_string(10 - current_stage_) + lang::getText(38);
|
||||
createMessage(paths, text->writeToTexture(caption, 2, -2));
|
||||
createMessage(paths, text->writeToTexture(caption, 1, -4));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,6 @@ void Resource::createTextures()
|
||||
};
|
||||
|
||||
std::cout << "\n>> CREATING TEXTURES" << std::endl;
|
||||
auto text = getText("04b_25");
|
||||
|
||||
// Tamaño normal
|
||||
std::vector<NameAndText> strings = {
|
||||
@@ -267,6 +266,7 @@ void Resource::createTextures()
|
||||
NameAndText("game_text_stop", lang::getText(119)),
|
||||
NameAndText("1000000_points", lang::getText(76))};
|
||||
|
||||
auto text = getText("04b_25");
|
||||
for (const auto &s : strings)
|
||||
{
|
||||
textures_.emplace_back(ResourceTexture(s.name, text->writeToTexture(s.text, 1, -2)));
|
||||
@@ -280,9 +280,10 @@ void Resource::createTextures()
|
||||
NameAndText("congratulations", lang::getText(50)),
|
||||
NameAndText("game_over", "Game Over")};
|
||||
|
||||
auto text2 = getText("04b_25_2x");
|
||||
for (const auto &s : strings2X)
|
||||
{
|
||||
textures_.emplace_back(ResourceTexture(s.name, text->writeToTexture(s.text, 2, -2)));
|
||||
textures_.emplace_back(ResourceTexture(s.name, text2->writeToTexture(s.text, 1, -4)));
|
||||
printWithDots("Texture : ", s.name, "[ DONE ]");
|
||||
}
|
||||
}
|
||||
@@ -294,6 +295,7 @@ void Resource::createText()
|
||||
|
||||
std::vector<std::pair<std::string, std::string>> resources = {
|
||||
{"04b_25", "04b_25.png"},
|
||||
{"04b_25_2x", "04b_25_2x.png"},
|
||||
{"8bithud", "8bithud.png"},
|
||||
{"nokia", "nokia.png"},
|
||||
{"smb2", "smb2.gif"}};
|
||||
|
||||
Reference in New Issue
Block a user