(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.

This commit is contained in:
peter1138
2006-11-24 18:39:22 +00:00
parent 865b67c873
commit 763f32da2d
4 changed files with 9 additions and 15 deletions

View File

@@ -252,18 +252,19 @@ void GenerateWorld(int mode, uint size_x, uint size_y)
/* Make sure everything is done via OWNER_NONE */
_current_player = OWNER_NONE;
/* Load the right landscape stuff */
GfxLoadSprites();
LoadStringWidthTable();
InitializeGame(IG_DATE_RESET, _gw.size_x, _gw.size_y);
PrepareGenerateWorldProgress();
/* Re-init the windowing system */
ResetWindowSystem();
LoadStringWidthTable();
/* Create toolbars */
SetupColorsAndInitialWindow();
/* Load the right landscape stuff */
GfxLoadSprites();
if (_network_dedicated ||
(_gw.thread = OTTDCreateThread(&_GenerateWorld, NULL)) == NULL) {
DEBUG(misc, 1) ("[Sl] Cannot create savegame thread, reverting to single-threaded mode...");