summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/openttd.grfbin23690 -> 24890 bytes
-rw-r--r--gfx.c6
-rw-r--r--gfxinit.c140
-rw-r--r--strgen/strgen.c17
-rw-r--r--strings.c10
5 files changed, 139 insertions, 34 deletions
diff --git a/data/openttd.grf b/data/openttd.grf
index 5a784f20e..4bb791190 100644
--- a/data/openttd.grf
+++ b/data/openttd.grf
Binary files differ
diff --git a/gfx.c b/gfx.c
index 5c0c9b7a3..5bf45685a 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1627,15 +1627,15 @@ void LoadStringWidthTable(void)
// 2 equals space.
for (i = 2; i != 226; i++) {
- *b++ = (i < 93 || i >= 129 || i == 98) ? GetSprite(i)->width : 0;
+ *b++ = (i < 93 || i > 113) && i != 116 && i != 117 && (i < 123 || i > 131) && (i < 151 || i > 153) && i != 155 ? GetSprite(i)->width : 0;
}
for (i = 226; i != 450; i++) {
- *b++ = (i < 317 || i >= 353) ? GetSprite(i)->width + 1 : 0;
+ *b++ = (i < 317 || i >= 354) && i != 367 && (i < 375 || i > 377) && i != 379 ? GetSprite(i)->width + 1 : 0;
}
for (i = 450; i != 674; i++) {
- *b++ = (i < 541 || i >= 577) ? GetSprite(i)->width + 1 : 0;
+ *b++ = (i < 541 || i >= 579) && i != 585 && i != 587 && i != 588 && (i < 590 || i > 597) && (i < 599 || i > 601) && i != 603 && i != 633 && i != 665 ? GetSprite(i)->width + 1 : 0;
}
}
diff --git a/gfxinit.c b/gfxinit.c
index 60c155e85..f1bd93659 100644
--- a/gfxinit.c
+++ b/gfxinit.c
@@ -88,22 +88,6 @@ static void LoadGrfIndexed(const char* filename, const SpriteID* index_tbl, int
}
-#define OPENTTD_SPRITES_COUNT 100
-static const SpriteID _openttd_grf_indexes[] = {
- SPR_OPENTTD_BASE + 0, SPR_OPENTTD_BASE + 7, // icons etc
- 134, 134, // euro symbol medium size
- 582, 582, // euro symbol large size
- 358, 358, // euro symbol tiny
- SPR_OPENTTD_BASE+11, SPR_OPENTTD_BASE+57, // more icons
- 648, 648, // nordic char: æ
- 616, 616, // nordic char: Æ
- 666, 666, // nordic char: ø
- 634, 634, // nordic char: Ø
- SPR_OPENTTD_BASE+62, SPR_OPENTTD_BASE + OPENTTD_SPRITES_COUNT, // more icons
- 0xffff,
-};
-
-
/* Check that the supplied MD5 hash matches that stored for the supplied filename */
static bool CheckMD5Digest(const MD5File file, md5_byte_t *digest, bool warn)
{
@@ -202,6 +186,125 @@ void CheckExternalFiles(void)
}
+static const SpriteID trg1idx[] = {
+ 0, 1, // Mouse cursor, ZZZ
+/* Medium font */
+ 2, 92, // ' ' till 'z'
+ 0xFFFE, 36,
+ 160, 160, // Move ¾ to the correct position
+ 130, 130, // TODO Up arrow
+ 131, 133,
+ 0xFFFE, 1, // skip currency sign
+ 135, 135,
+ 0xFFFE, 1,
+ 137, 137,
+ 0xFFFE, 1,
+ 139, 139,
+ 140, 140, // TODO Down arrow
+ 141, 141,
+ 142, 142, // TODO Check mark
+ 143, 143, // TODO Cross
+ 144, 144,
+ 145, 145, // TODO Right arrow
+ 146, 149,
+ 118, 122, // Transport markers
+ 0xFFFE, 2,
+ 157, 157,
+ 114, 115, // Small up/down arrows
+ 0xFFFE, 1,
+ 161, 225,
+/* Small font */
+ 226, 316, // ' ' till 'z'
+ 0xFFFE, 25,
+ 342, 346, // place holders for transport markers
+ 0xFFFE, 6,
+ 384, 384, // Move ¾ to the correct position
+ 354, 354, // TODO Up arrow
+ 355, 357,
+ 0xFFFE, 1, // skip currency sign
+ 359, 359,
+ 0xFFFE, 1,
+ 361, 361,
+ 0xFFFE, 1,
+ 363, 363,
+ 364, 364, // TODO Down arrow
+ 365, 366,
+ 0xFFFE, 1,
+ 368, 368,
+ 369, 369, // TODO Right arrow
+ 370, 373,
+ 0xFFFE, 7,
+ 381, 381,
+ 0xFFFE, 3,
+ 385, 449,
+/* Big font */
+ 450, 540, // ' ' till 'z'
+ 0xFFFE, 36,
+ 608, 608, // Move ¾ to the correct position
+ 0xFFFE, 1,
+ 579, 581,
+ 0xFFFE, 1,
+ 583, 583,
+ 0xFFFE, 5,
+ 589, 589,
+ 0xFFFE, 15,
+ 605, 605,
+ 0xFFFE, 3,
+ 609, 625,
+ 0xFFFE, 1,
+ 627, 632,
+ 0xFFFE, 1,
+ 634, 639,
+ 0xFFFE, 1,
+ 641, 657,
+ 0xFFFE, 1,
+ 659, 664,
+ 0xFFFE, 2,
+ 667, 671,
+ 0xFFFE, 1,
+ 673, 673,
+/* Graphics */
+ 674, 4792,
+ 0xFFFF
+};
+
+#define OPENTTD_SPRITES_COUNT 100
+static const SpriteID _openttd_grf_indexes[] = {
+ SPR_OPENTTD_BASE + 0, SPR_OPENTTD_BASE + 7, // icons etc
+ 134, 134, // euro symbol medium size
+ 582, 582, // euro symbol large size
+ 358, 358, // euro symbol tiny
+ SPR_OPENTTD_BASE+11, SPR_OPENTTD_BASE+57, // more icons
+ 648, 648, // nordic char: æ
+ 616, 616, // nordic char: Æ
+ 666, 666, // nordic char: ø
+ 634, 634, // nordic char: Ø
+ SPR_OPENTTD_BASE+62, SPR_OPENTTD_BASE + OPENTTD_SPRITES_COUNT, // more icons
+ 382, 383, // ¼ ½ tiny
+ 158, 159, // ¼ ½ medium
+ 606, 607, // ¼ ½ large
+ 360, 360, // ¦ tiny
+ 362, 362, // ¨ tiny
+ 136, 136, // ¦ medium
+ 138, 138, // ¨ medium
+ 584, 584, // ¦ large
+ 586, 586, // ¨ large
+ 626, 626, // Ð large
+ 658, 658, // ð large
+ 374, 374, // ´ tiny
+ 378, 378, // ¸ tiny
+ 150, 150, // ´ medium
+ 154, 154, // ¸ medium
+ 598, 598, // ´ large
+ 602, 602, // ¸ large
+ 640, 640, // Þ large
+ 672, 672, // þ large
+ 380, 380, // º tiny
+ 156, 156, // º medium
+ 604, 604, // º large
+ 0xffff,
+};
+
static byte _sprite_page_to_load = 0xFF;
static void LoadSpriteTables(void)
@@ -212,7 +315,10 @@ static void LoadSpriteTables(void)
files = _use_dos_palette? &files_dos : &files_win;
- for (i = 0; files->basic[i].filename != NULL; i++) {
+ LoadGrfIndexed(files->basic[0].filename, trg1idx, 0);
+ load_index = 4793;
+
+ for (i = 1; files->basic[i].filename != NULL; i++) {
load_index += LoadGrfFile(files->basic[i].filename, load_index, i);
}
diff --git a/strgen/strgen.c b/strgen/strgen.c
index c4155d760..abe879f68 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -474,15 +474,14 @@ static const CmdStruct _cmd_structs[] = {
{"CROSS", EmitSingleByte, 0xAD, 0},
{"RIGHTARROW", EmitSingleByte, 0xAF, 0},
- {"TRAIN", EmitSingleByte, 0xb4, 0},
- {"LORRY", EmitSingleByte, 0xb5, 0},
- {"BUS", EmitSingleByte, 0xb6, 0},
- {"PLANE", EmitSingleByte, 0xb7, 0},
- {"SHIP", EmitSingleByte, 0xb8, 0},
-
- {"SMALLUPARROW", EmitSingleByte, 0xBC, 0},
- {"SMALLDOWNARROW", EmitSingleByte, 0xBD, 0},
- {"THREE_FOURTH", EmitSingleByte, 0xBE, 0},
+ {"TRAIN", EmitSingleByte, 0x94, 0},
+ {"LORRY", EmitSingleByte, 0x95, 0},
+ {"BUS", EmitSingleByte, 0x96, 0},
+ {"PLANE", EmitSingleByte, 0x97, 0},
+ {"SHIP", EmitSingleByte, 0x98, 0},
+
+ {"SMALLUPARROW", EmitSingleByte, 0x90, 0},
+ {"SMALLDOWNARROW", EmitSingleByte, 0x91, 0},
};
diff --git a/strings.c b/strings.c
index 72709dae2..aca393b00 100644
--- a/strings.c
+++ b/strings.c
@@ -764,11 +764,11 @@ static char *FormatString(char *buff, const char *str, const int32 *argv, uint c
static char *StationGetSpecialString(char *buff, int x)
{
- if (x & 0x01) *buff++ = '\xB4';
- if (x & 0x02) *buff++ = '\xB5';
- if (x & 0x04) *buff++ = '\xB6';
- if (x & 0x08) *buff++ = '\xB7';
- if (x & 0x10) *buff++ = '\xB8';
+ if (x & 0x01) *buff++ = '\x94';
+ if (x & 0x02) *buff++ = '\x95';
+ if (x & 0x04) *buff++ = '\x96';
+ if (x & 0x08) *buff++ = '\x97';
+ if (x & 0x10) *buff++ = '\x98';
*buff = '\0';
return buff;
}