summaryrefslogtreecommitdiff
path: root/gfxinit.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-20 18:14:32 +0000
committertron <tron@openttd.org>2005-08-20 18:14:32 +0000
commitae49d487cc7cae0c0b47834aba94bdb801ba8c06 (patch)
tree637f2195ee283059cdbf3ca7e4fbfcf41df234b8 /gfxinit.c
parentc1f4acd4a0aa1f8811cb50add8fe244adac68526 (diff)
downloadopenttd-ae49d487cc7cae0c0b47834aba94bdb801ba8c06.tar.xz
(svn r2879) Major step twoards ISO-8859-15
Add several missing chars: - Š/š (S with hacek, all sizes) - Ž/ž (Z with hacek, all sizes) - Œ/œ (OE ligature, all sizes) - Ð/ð (eth, large font was missing) - Þ/þ (thorn, large font was missing) - º (male ordinal sign, all sizes) Also move Ÿ (Y with umlaut, all sizes) to the correct position in the charset To add some chars it was necessary to shuffle some OTTD specific chars (arrows, transport type markers) around
Diffstat (limited to 'gfxinit.c')
-rw-r--r--gfxinit.c140
1 files changed, 123 insertions, 17 deletions
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);
}