~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/openttd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman
  • Date: 2009-06-09 21:46:28 UTC
  • mfrom: (1.1.7 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090609214628-6z5uodi6178z050l
[ Matthijs Kooijman ]
* New upstream release.
* Link against libicu to enable right-to-left language support. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: openttd.cpp 15718 2009-03-15 00:32:18Z rubidium $ */
 
1
/* $Id: openttd.cpp 16310 2009-05-15 10:24:13Z rubidium $ */
2
2
 
3
3
/** @file openttd.cpp Functions related to starting OpenTTD. */
4
4
 
50
50
#include "elrail_func.h"
51
51
#include "rev.h"
52
52
#include "highscore.h"
 
53
#include "thread.h"
53
54
 
54
55
#include "newgrf_commons.h"
55
56
 
299
300
 */
300
301
static void ShutdownGame()
301
302
{
302
 
        /* stop the AI */
303
 
        AI::Uninitialize(false);
304
 
 
305
303
        IConsoleFree();
306
304
 
307
305
        if (_network_available) NetworkShutDown(); // Shut down the network and close any open connections
310
308
 
311
309
        UnInitWindowSystem();
312
310
 
 
311
        /* stop the AI */
 
312
        AI::Uninitialize(false);
 
313
 
313
314
        /* Uninitialize airport state machines */
314
315
        UnInitializeAirports();
315
316
 
652
653
        InitializeGUI();
653
654
        IConsoleCmdExec("exec scripts/autoexec.scr 0");
654
655
 
 
656
        /* Take our initial lock on whatever we might want to do! */
 
657
        _genworld_paint_mutex->BeginCritical();
 
658
        _genworld_mapgen_mutex->BeginCritical();
 
659
 
655
660
        GenerateWorld(GW_EMPTY, 64, 64); // Make the viewport initialization happy
656
661
        WaitTillGeneratedWorld();
657
662
 
740
745
        /* Create a single company */
741
746
        DoStartupNewCompany(false);
742
747
 
 
748
        Company *c = GetCompany(COMPANY_FIRST);
 
749
        c->engine_renew = _settings_client.gui.autorenew;
 
750
        c->engine_renew_months = _settings_client.gui.autorenew_months;
 
751
        c->engine_renew_money = _settings_client.gui.autorenew_money;
 
752
 
743
753
        IConsoleCmdExec("exec scripts/game_start.scr 0");
744
754
 
745
755
        SetLocalCompany(COMPANY_FIRST);