Files
@ r11645:44e7d4260786
Branch filter:
Location: cpp/openttd-patchpack/source/src/misc.cpp - annotation
r11645:44e7d4260786
3.0 KiB
text/x-c
(svn r16030) -Update: WebTranslator2 update to 2009-04-11 17:38:26
serbian - 50 fixed by etran (50)
traditional_chinese - 6 fixed, 2 changed by josesun (8)
serbian - 50 fixed by etran (50)
traditional_chinese - 6 fixed, 2 changed by josesun (8)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | r5584:545d748cc681 r5584:545d748cc681 r9111:983de9c5a848 r6201:2e76eb9a1d7a r5584:545d748cc681 r5584:545d748cc681 r6453:b0b56773284a r8763:c2c776621d56 r5584:545d748cc681 r10696:8dfe83e30d01 r6332:7393965b5322 r6091:2faa7d307565 r6643:fa000ce7441e r8119:8fdb3a371896 r8131:7a50db7be0ff r8139:4fc34c1bc2fb r8140:9424f012f6a2 r8144:1432edd15267 r8144:1432edd15267 r8224:194097dc7288 r9457:ecfeb802c57a r9005:e59c0b10c56a r10696:8dfe83e30d01 r9127:933c13888121 r9898:bbef3303e005 r10911:571c959dc9ed r8224:194097dc7288 r8264:d493cb51fe8a r5584:545d748cc681 r8973:bd926d7578a7 r10696:8dfe83e30d01 r5584:545d748cc681 r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r10127:f89df6b20b16 r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r6247:96e840dbefcc r7010:fd8e3ec6f727 r10207:a1fc2f2a33db r8965:16f6e5e9ed36 r6247:96e840dbefcc r8987:5af9a103757a r5584:545d748cc681 r9409:e2f52fd75f31 r5584:545d748cc681 r10911:571c959dc9ed r10911:571c959dc9ed r10911:571c959dc9ed r10911:571c959dc9ed r5584:545d748cc681 r5584:545d748cc681 r7889:fe8fe2e0c904 r5584:545d748cc681 r6231:4cdf70b5a6ea r5584:545d748cc681 r5584:545d748cc681 r7018:50bc56022ec1 r5584:545d748cc681 r5584:545d748cc681 r10816:2ed0dff886de r10696:8dfe83e30d01 r5584:545d748cc681 r9409:e2f52fd75f31 r9413:fcf267325763 r9087:73455ed363b4 r5584:545d748cc681 r5584:545d748cc681 r10127:f89df6b20b16 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r6643:fa000ce7441e r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r7010:fd8e3ec6f727 r5584:545d748cc681 r6332:7393965b5322 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r10207:a1fc2f2a33db r10696:8dfe83e30d01 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r9898:bbef3303e005 r9898:bbef3303e005 r9898:bbef3303e005 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r9457:ecfeb802c57a r9457:ecfeb802c57a r9457:ecfeb802c57a r9457:ecfeb802c57a r9457:ecfeb802c57a r9457:ecfeb802c57a r9457:ecfeb802c57a r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r6201:2e76eb9a1d7a r5584:545d748cc681 r5584:545d748cc681 r6091:2faa7d307565 r5584:545d748cc681 r6350:7a0fb15b3676 r6091:2faa7d307565 r6091:2faa7d307565 r5584:545d748cc681 r5584:545d748cc681 | /* $Id$ */
/** @file misc.cpp Misc functions that shouldn't be here. */
#include "stdafx.h"
#include "openttd.h"
#include "landscape.h"
#include "news_func.h"
#include "variables.h"
#include "ai/ai.hpp"
#include "newgrf_house.h"
#include "cargotype.h"
#include "group.h"
#include "economy_func.h"
#include "functions.h"
#include "map_func.h"
#include "date_func.h"
#include "vehicle_func.h"
#include "texteff.hpp"
#include "gfx_func.h"
#include "gamelog.h"
#include "animated_tile_func.h"
#include "settings_type.h"
#include "tilehighlight_func.h"
#include "network/network_func.h"
#include "window_func.h"
#include "table/sprites.h"
extern TileIndex _cur_tileloop_tile;
extern void MakeNewgameSettingsLive();
void InitializeVehicles();
void InitializeWaypoints();
void InitializeDepots();
void InitializeEngineRenews();
void InitializeOrders();
void InitializeClearLand();
void InitializeRailGui();
void InitializeRoadGui();
void InitializeAirportGui();
void InitializeDockGui();
void InitializeIndustries();
void InitializeTowns();
void InitializeTrees();
void InitializeSigns();
void InitializeStations();
void InitializeCargoPackets();
void InitializeCompanies();
void InitializeCheats();
void InitializeNPF();
void InitializeOldNames();
void InitializeGame(uint size_x, uint size_y, bool reset_date)
{
/* Make sure there isn't any window that can influence anything
* related to the new game we're about to start/load. */
UnInitWindowSystem();
AllocateMap(size_x, size_y);
SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, VHM_NONE, WC_MAIN_WINDOW, 0);
_pause_game = 0;
_fast_forward = 0;
_tick_counter = 0;
_realtime_tick = 0;
_date_fract = 0;
_cur_tileloop_tile = 0;
_thd.redsq = INVALID_TILE;
MakeNewgameSettingsLive();
if (reset_date) {
SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
InitializeOldNames();
}
InitializeEngineRenews();
InitializeVehicles();
InitializeWaypoints();
InitializeDepots();
InitializeOrders();
InitializeGroup();
InitNewsItemStructs();
InitializeLandscape();
InitializeClearLand();
InitializeRailGui();
InitializeRoadGui();
InitializeAirportGui();
InitializeDockGui();
InitializeTowns();
InitializeTrees();
InitializeSigns();
InitializeStations();
InitializeCargoPackets();
InitializeIndustries();
InitializeBuildingCounts();
InitializeTrains();
InitializeNPF();
InitializeCompanies();
AI::Initialize();
InitializeCheats();
InitTextEffects();
#ifdef ENABLE_NETWORK
NetworkInitChatMessage();
#endif /* ENABLE_NETWORK */
InitializeAnimatedTiles();
InitializeLandscapeVariables(false);
ResetObjectToPlace();
GamelogReset();
GamelogStartAction(GLAT_START);
GamelogRevision();
GamelogMode();
GamelogGRFAddList(_grfconfig);
GamelogStopAction();
}
/* Calculate constants that depend on the landscape type. */
void InitializeLandscapeVariables(bool only_constants)
{
if (only_constants) return;
for (CargoID i = 0; i < NUM_CARGO; i++) {
_cargo_payment_rates[i] = GetCargo(i)->initial_payment;
_cargo_payment_rates_frac[i] = 0;
}
}
|