summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-11-24 18:39:22 +0000
committerpeter1138 <peter1138@openttd.org>2006-11-24 18:39:22 +0000
commitc079c83eb65e8365680523f6fba676f9c41ec10a (patch)
tree55d15b28e028ea338db8ec11d3266151027da760 /openttd.c
parent8d175ccb136581de4fb77931b029841144fe3f52 (diff)
downloadopenttd-c079c83eb65e8365680523f6fba676f9c41ec10a.tar.xz
(svn r7250) -Codechange: Shuffle sprite loading and character width caching around a bit. This reduces the number of times the sprites are loaded from 5 to 2, just for the intro game.
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/openttd.c b/openttd.c
index 43fb5bc4f..b199b8b48 100644
--- a/openttd.c
+++ b/openttd.c
@@ -281,9 +281,6 @@ static void LoadIntroGame(void)
CLRBITS(_display_opt, DO_TRANS_BUILDINGS); // don't make buildings transparent in intro
_opt_ptr = &_opt_newgame;
- GfxLoadSprites();
- LoadStringWidthTable();
-
// Setup main window
ResetWindowSystem();
SetupColorsAndInitialWindow();
@@ -439,11 +436,6 @@ int ttd_main(int argc, char *argv[])
// This must be done early, since functions use the InvalidateWindow* calls
InitWindowSystem();
- GfxLoadSprites();
- /* Initialize the unicode to sprite mapping table */
- InitializeUnicodeGlyphMap();
- LoadStringWidthTable();
-
DEBUG(driver, 1) ("Loading drivers...");
LoadDriver(SOUND_DRIVER, _ini_sounddriver);
LoadDriver(MUSIC_DRIVER, _ini_musicdriver);
@@ -463,7 +455,6 @@ int ttd_main(int argc, char *argv[])
/* Make sure _patches is filled with _patches_newgame if we switch to a game directly */
if (_switch_mode != SM_NONE) {
_opt = _opt_newgame;
- GfxLoadSprites();
UpdatePatches();
}
@@ -655,11 +646,8 @@ static void StartScenario(void)
return;
}
- GfxLoadSprites();
-
// Reinitialize windows
ResetWindowSystem();
- LoadStringWidthTable();
SetupColorsAndInitialWindow();
@@ -1157,6 +1145,7 @@ bool AfterLoadGame(void)
// Load the sprites
GfxLoadSprites();
+ LoadStringWidthTable();
/* Connect front and rear engines of multiheaded trains and converts
* subtype to the new format */