mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r7254) -Fix (r7250): move unicode glyph map initialisation to just before newgrf files are loaded, else newgrf glyphs will be cleared out too. (thanks Hadez)
This commit is contained in:
parent
c079c83eb6
commit
1955d1acd6
3
gfx.c
3
gfx.c
|
@ -1613,9 +1613,6 @@ void LoadStringWidthTable(void)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
/* Initialize the unicode to sprite mapping table */
|
|
||||||
InitializeUnicodeGlyphMap();
|
|
||||||
|
|
||||||
/* Normal font */
|
/* Normal font */
|
||||||
for (i = 0; i != 224; i++) {
|
for (i = 0; i != 224; i++) {
|
||||||
_stringwidth_table[FS_NORMAL][i] = GetGlyphWidth(FS_NORMAL, i + 32);
|
_stringwidth_table[FS_NORMAL][i] = GetGlyphWidth(FS_NORMAL, i + 32);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "newgrf.h"
|
#include "newgrf.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "fontcache.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct MD5File {
|
typedef struct MD5File {
|
||||||
|
@ -372,6 +373,9 @@ static void LoadSpriteTables(void)
|
||||||
assert(load_index == SPR_AIRPORTX_BASE);
|
assert(load_index == SPR_AIRPORTX_BASE);
|
||||||
load_index += LoadGrfFile("airports.grf", load_index, i++);
|
load_index += LoadGrfFile("airports.grf", load_index, i++);
|
||||||
|
|
||||||
|
/* Initialize the unicode to sprite mapping table */
|
||||||
|
InitializeUnicodeGlyphMap();
|
||||||
|
|
||||||
LoadNewGRF(load_index, i);
|
LoadNewGRF(load_index, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue