src/genworld.cpp
changeset 10770 c1e1fb4bd561
parent 10703 2c998f3776d1
child 10775 7061477bfbcf
equal deleted inserted replaced
10769:a005e45d1f09 10770:c1e1fb4bd561
    37 
    37 
    38 void StartupEconomy();
    38 void StartupEconomy();
    39 void StartupPlayers();
    39 void StartupPlayers();
    40 void StartupDisasters();
    40 void StartupDisasters();
    41 
    41 
    42 void InitializeGame(int mode, uint size_x, uint size_y);
    42 void InitializeGame(uint size_x, uint size_y, bool reset_date);
    43 
    43 
    44 /* Please only use this variable in genworld.h and genworld.c and
    44 /* Please only use this variable in genworld.h and genworld.c and
    45  *  nowhere else. For speed improvements we need it to be global, but
    45  *  nowhere else. For speed improvements we need it to be global, but
    46  *  in no way the meaning of it is to use it anywhere else besides
    46  *  in no way the meaning of it is to use it anywhere else besides
    47  *  in the genworld.h and genworld.c! -- TrueLight */
    47  *  in the genworld.h and genworld.c! -- TrueLight */
   251  * Generate a world.
   251  * Generate a world.
   252  * @param mode The mode of world generation (see GenerateWorldModes).
   252  * @param mode The mode of world generation (see GenerateWorldModes).
   253  * @param size_x The X-size of the map.
   253  * @param size_x The X-size of the map.
   254  * @param size_y The Y-size of the map.
   254  * @param size_y The Y-size of the map.
   255  */
   255  */
   256 void GenerateWorld(int mode, uint size_x, uint size_y)
   256 void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y)
   257 {
   257 {
   258 	if (_gw.active) return;
   258 	if (_gw.active) return;
   259 	_gw.mode   = mode;
   259 	_gw.mode   = mode;
   260 	_gw.size_x = size_x;
   260 	_gw.size_x = size_x;
   261 	_gw.size_y = size_y;
   261 	_gw.size_y = size_y;
   277 
   277 
   278 	/* Load the right landscape stuff */
   278 	/* Load the right landscape stuff */
   279 	GfxLoadSprites();
   279 	GfxLoadSprites();
   280 	LoadStringWidthTable();
   280 	LoadStringWidthTable();
   281 
   281 
   282 	InitializeGame(IG_NONE, _gw.size_x, _gw.size_y);
   282 	InitializeGame(_gw.size_x, _gw.size_y, false);
   283 	PrepareGenerateWorldProgress();
   283 	PrepareGenerateWorldProgress();
   284 
   284 
   285 	/* Re-init the windowing system */
   285 	/* Re-init the windowing system */
   286 	ResetWindowSystem();
   286 	ResetWindowSystem();
   287 
   287