Changeset - r8270:c2ec53375c9d
[Not reviewed]
src/ai/default/default.cpp
Show inline comments
 
@@ -20,24 +20,25 @@
 
#include "../../airport.h"
 
#include "../../depot.h"
 
#include "../../variables.h"
 
#include "../../bridge.h"
 
#include "../../date_func.h"
 
#include "../../tunnelbridge_map.h"
 
#include "../../window_func.h"
 
#include "../../vehicle_func.h"
 
#include "../../functions.h"
 
#include "../../saveload.h"
 
#include "../../player_func.h"
 
#include "../../player_base.h"
 
#include "../../settings_type.h"
 
#include "default.h"
 

	
 
#include "../../table/ai_rail.h"
 

	
 
// remove some day perhaps?
 
static uint _ai_service_interval;
 
PlayerAI _players_ai[MAX_PLAYERS];
 

	
 
typedef void AiStateAction(Player *p);
 

	
 
enum {
 
	AIS_0                            =  0,
src/aircraft_cmd.cpp
Show inline comments
 
@@ -26,24 +26,25 @@
 
#include "strings_func.h"
 
#include "command_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "functions.h"
 
#include "variables.h"
 
#include "autoreplace_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
void Aircraft::UpdateDeltaXY(Direction direction)
 
{
 
	uint32 x;
 
#define MKIT(a, b, c, d) ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | ((d & 0xFF) << 0)
 
	switch (this->subtype) {
 
		default: NOT_REACHED();
 
		case AIR_AIRCRAFT:
 
		case AIR_HELICOPTER:
src/airport.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file airport.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "airport.h"
 
#include "variables.h"
 
#include "airport_movement.h"
 
#include "core/bitmath_func.hpp"
 
#include "core/alloc_func.hpp"
 
#include "date_func.h"
 
#include "settings_type.h"
 

	
 
/* Uncomment this to print out a full report of the airport-structure
 
 * You should either use
 
 * - true: full-report, print out every state and choice with string-names
 
 * OR
 
 * - false: give a summarized report which only shows current and next position */
 
//#define DEBUG_AIRPORT false
 

	
 
static AirportFTAClass *DummyAirport;
 
static AirportFTAClass *CountryAirport;
 
static AirportFTAClass *CityAirport;
 
static AirportFTAClass *Oilrig;
src/airport_gui.cpp
Show inline comments
 
@@ -5,25 +5,25 @@
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "window_gui.h"
 
#include "gui.h"
 
#include "station_gui.h"
 
#include "terraform_gui.h"
 
#include "command_func.h"
 
#include "station.h"
 
#include "airport.h"
 
#include "depot.h"
 
#include "sound_func.h"
 
#include "window_func.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "player_func.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static byte _selected_airport_type;
 

	
 
static void ShowBuildAirportPicker();
 

	
 

	
src/clear_cmd.cpp
Show inline comments
 
@@ -8,24 +8,25 @@
 
#include "command_func.h"
 
#include "bridge.h"
 
#include "landscape.h"
 
#include "variables.h"
 
#include "unmovable_map.h"
 
#include "genworld.h"
 
#include "industry.h"
 
#include "water_map.h"
 
#include "tile_cmd.h"
 
#include "functions.h"
 
#include "economy_func.h"
 
#include "viewport_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 
#include "table/clear_land.h"
 

	
 
static CommandCost ClearTile_Clear(TileIndex tile, byte flags)
 
{
 
	static const Money* clear_price_table[] = {
 
		&_price.clear_grass,
 
		&_price.clear_roughland,
 
		&_price.clear_rocks,
 
		&_price.clear_fields,
src/console_cmds.cpp
Show inline comments
 
@@ -23,24 +23,25 @@
 
#include "genworld.h"
 
#include "network/network.h"
 
#include "strings_func.h"
 
#include "viewport_func.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "map_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "string_func.h"
 
#include "player_func.h"
 
#include "player_base.h"
 
#include "settings_type.h"
 

	
 
#ifdef ENABLE_NETWORK
 
	#include "table/strings.h"
 
#endif /* ENABLE_NETWORK */
 

	
 
// ** scriptfile handling ** //
 
static FILE *_script_file;
 
static bool _script_running;
 

	
 
// ** console command / variable defines ** //
 
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
 
#define DEF_CONSOLE_HOOK(function) static bool function()
src/currency.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file currency.cpp **/
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "currency.h"
 
#include "news.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "date_func.h"
 

	
 
#include "table/strings.h"
 

	
 
	//   exchange rate    prefix             symbol_pos
 
	//   |  separator        |     postfix   |
 
	//   |   |    Euro year  |       |       |    name
 
	//   |   |    |          |       |       |    |
 
static const CurrencySpec origin_currency_specs[NUM_CURRENCY] = {
 
	{    1, ',', CF_NOEURO, "£",    "",      0,  STR_CURR_GBP    }, ///< british pounds
 
	{    2, ',', CF_NOEURO, "$",    "",      0,  STR_CURR_USD    }, ///< us dollars
 
	{    2, ',', CF_ISEURO, "€",    "",      0,  STR_CURR_EUR    }, ///< Euro
src/date.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file date.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "network/network.h"
 
#include "network/network_data.h"
 
#include "network/network_server.h"
 
#include "currency.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "debug.h"
 
#ifdef DEBUG_DUMP_COMMANDS
 
#include "saveload.h"
 
#include "town_map.h"
src/disaster_cmd.cpp
Show inline comments
 
@@ -23,24 +23,25 @@
 
#include "industry_map.h"
 
#include "station_map.h"
 
#include "command_func.h"
 
#include "tile_cmd.h"
 
#include "news.h"
 
#include "station.h"
 
#include "waypoint.h"
 
#include "town.h"
 
#include "industry.h"
 
#include "player_func.h"
 
#include "airport.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
enum DisasterSubType {
 
	ST_Zeppeliner,
src/dock_gui.cpp
Show inline comments
 
@@ -2,25 +2,25 @@
 

	
 
/** @file dock_gui.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "tile_map.h"
 
#include "station.h"
 
#include "gui.h"
 
#include "terraform_gui.h"
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "command_func.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "water.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "player_func.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static void ShowBuildDockStationPicker();
src/elrail.cpp
Show inline comments
 
@@ -40,25 +40,25 @@
 
 * that are impossible (because the pylon would be situated on the track) and
 
 * some that are preferred (because the pylon would be rectangular to the track).
 
 *
 
 * <img src="../../elrail_tile.png">
 
 * <img src="../../elrail_track.png">
 
 *
 
 */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "station_map.h"
 
#include "viewport_func.h"
 
#include "variables.h" /* ... same here */
 
#include "settings_type.h"
 
#include "landscape.h"
 
#include "rail_type.h"
 
#include "debug.h"
 
#include "tunnel_map.h"
 
#include "road_map.h"
 
#include "bridge_map.h"
 
#include "bridge.h"
 
#include "rail_map.h"
 
#include "train.h"
 
#include "rail_gui.h"
 
#include "transparency.h"
 
#include "tunnelbridge_map.h"
src/engine.cpp
Show inline comments
 
@@ -16,24 +16,25 @@
 
#include "aircraft.h"
 
#include "newgrf_cargo.h"
 
#include "group.h"
 
#include "misc/autoptr.hpp"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "autoreplace_base.h"
 
#include "autoreplace_gui.h"
 
#include "string_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/engines.h"
 

	
 
Engine _engines[TOTAL_NUM_ENGINES];
 
EngineInfo _engine_info[TOTAL_NUM_ENGINES];
 
RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
 
ShipVehicleInfo _ship_vehicle_info[NUM_SHIP_ENGINES];
 
AircraftVehicleInfo _aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
 
RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES];
 

	
 
enum {
src/genworld.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "gfxinit.h"
 
#include "window_func.h"
 
#include "network/network.h"
 
#include "debug.h"
 
#include "settings_func.h"
 
#include "heightmap.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "map_func.h"
 
#include "date_func.h"
 
#include "core/random_func.hpp"
 
#include "engine.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
void GenerateClearTile();
 
void GenerateIndustries();
 
void GenerateUnmovables();
 
bool GenerateTowns();
 
void GenerateTrees();
 

	
 
void StartupEconomy();
 
void StartupPlayers();
 
void StartupDisasters();
src/genworld_gui.cpp
Show inline comments
 
@@ -15,24 +15,25 @@
 
#include "debug.h"
 
#include "genworld.h"
 
#include "network/network.h"
 
#include "thread.h"
 
#include "newgrf_config.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 
#include "fios.h"
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
/**
 
 * In what 'mode' the GenerateLandscapeWindowProc is.
 
 */
 
enum glwp_modes {
 
	GLWP_GENERATE,
 
	GLWP_HEIGHTMAP,
 
	GLWP_SCENARIO,
 
	GLWP_END
src/gfx.cpp
Show inline comments
 
@@ -7,24 +7,25 @@
 
#include "gfx_func.h"
 
#include "spritecache.h"
 
#include "variables.h"
 
#include "fontcache.h"
 
#include "genworld.h"
 
#include "debug.h"
 
#include "zoom_func.h"
 
#include "texteff.hpp"
 
#include "blitter/factory.hpp"
 
#include "video/video_driver.hpp"
 
#include "strings_func.h"
 
#include "core/math_func.hpp"
 
#include "settings_type.h"
 

	
 
#include "table/palettes.h"
 
#include "table/sprites.h"
 
#include "table/control_codes.h"
 

	
 
byte _dirkeys;        ///< 1 = left, 2 = up, 4 = right, 8 = down
 
bool _fullscreen;
 
CursorVars _cursor;
 
bool _ctrl_pressed;   ///< Is Ctrl pressed?
 
bool _shift_pressed;  ///< Is Shift pressed?
 
byte _fast_forward;
 
bool _left_button_down;
src/gfxinit.cpp
Show inline comments
 
@@ -8,24 +8,25 @@
 
#include "gfxinit.h"
 
#include "spritecache.h"
 
#include "fileio.h"
 
#include "fios.h"
 
#include "newgrf.h"
 
#include "md5.h"
 
#include "variables.h"
 
#include "fontcache.h"
 
#include "gfx_func.h"
 
#include "core/alloc_func.hpp"
 
#include "core/bitmath_func.hpp"
 
#include <string.h>
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
struct MD5File {
 
	const char * filename;     ///< filename
 
	uint8 hash[16];            ///< md5 sum of the file
 
};
 

	
 
struct FileList {
 
	MD5File basic[2];     ///< GRF files that always have to be loaded
 
	MD5File landscape[3]; ///< Landscape specific grf files
 
	MD5File sound;        ///< Sound samples
src/heightmap.cpp
Show inline comments
 
@@ -6,24 +6,25 @@
 
#include "openttd.h"
 
#include "variables.h"
 
#include "heightmap.h"
 
#include "clear_map.h"
 
#include "void_map.h"
 
#include "debug.h"
 
#include "gui.h"
 
#include "saveload.h"
 
#include "bmp.h"
 
#include "gfx_func.h"
 
#include "core/alloc_func.hpp"
 
#include "fios.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
/**
 
 * Convert RGB colors to Grayscale using 29.9% Red, 58.7% Green, 11.4% Blue
 
 *  (average luminosity formula) -- Dalestan
 
 * This in fact is the NTSC Color Space -- TrueLight
 
 */
 
static inline byte RGBToGrayscale(byte red, byte green, byte blue)
 
{
 
	/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
 
	 *  divide by it to normalize the value to a byte again. */
src/industry_gui.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "gfx_func.h"
 
#include "industry.h"
 
#include "town.h"
 
#include "variables.h"
 
#include "cargotype.h"
 
#include "newgrf.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_text.h"
 
#include "strings_func.h"
 
#include "map_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
bool _ignore_restrictions;
 

	
 
/** Names of the widgets of the dynamic place industries gui */
 
enum DynamicPlaceIndustriesWidgets {
 
	DPIW_CLOSEBOX = 0,
 
	DPIW_CAPTION,
 
	DPIW_MATRIX_WIDGET,
 
	DPIW_SCROLLBAR,
src/intro_gui.cpp
Show inline comments
 
@@ -8,24 +8,25 @@
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "network/network.h"
 
#include "variables.h"
 
#include "heightmap.h"
 
#include "genworld.h"
 
#include "network/network_gui.h"
 
#include "newgrf.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "fios.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
static const Widget _select_game_widgets[] = {
 
{    WWT_CAPTION, RESIZE_NONE, 13,   0, 335,   0,  13, STR_0307_OPENTTD,         STR_NULL},
 
{      WWT_PANEL, RESIZE_NONE, 13,   0, 335,  14, 194, 0x0,                      STR_NULL},
 
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12,  10, 167,  22,  33, STR_0140_NEW_GAME,        STR_02FB_START_A_NEW_GAME},
 
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325,  22,  33, STR_0141_LOAD_GAME,       STR_02FC_LOAD_A_SAVED_GAME},
 
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12,  10, 167,  40,  51, STR_029A_PLAY_SCENARIO,   STR_0303_START_A_NEW_GAME_USING},
 
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325,  40,  51, STR_PLAY_HEIGHTMAP,       STR_PLAY_HEIGHTMAP_HINT},
 
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12,  10, 167,  58,  69, STR_SCENARIO_EDITOR,      STR_02FE_CREATE_A_CUSTOMIZED_GAME},
src/landscape.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "variables.h"
 
#include "void_map.h"
 
#include "water_map.h"
 
#include "tgp.h"
 
#include "genworld.h"
 
#include "tile_cmd.h"
 
#include "core/alloc_func.hpp"
 
#include "fios.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
extern const TileTypeProcs
 
	_tile_type_clear_procs,
 
	_tile_type_rail_procs,
 
	_tile_type_road_procs,
 
	_tile_type_town_procs,
 
	_tile_type_trees_procs,
 
	_tile_type_station_procs,
 
	_tile_type_water_procs,
 
	_tile_type_dummy_procs,
src/main_gui.cpp
Show inline comments
 
@@ -34,24 +34,25 @@
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "fios.h"
 
#include "terraform_gui.h"
 
#include "industry.h"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "string_func.h"
 
#include "player_base.h"
 
#include "player_func.h"
 
#include "player_gui.h"
 
#include "settings_type.h"
 

	
 
#include "network/network.h"
 
#include "network/network_data.h"
 
#include "network/network_client.h"
 
#include "network/network_server.h"
 
#include "network/network_gui.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static int _rename_id = 1;
 
static int _rename_what = -1;
src/misc_cmd.cpp
Show inline comments
 
@@ -12,24 +12,25 @@
 
#include "network/network.h"
 
#include "variables.h"
 
#include "livery.h"
 
#include "player_face.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "string_func.h"
 
#include "player_func.h"
 
#include "player_base.h"
 
#include "player_gui.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
/** Change the player's face.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 unused
 
 * @param p2 face bitmasked
 
 */
 
CommandCost CmdSetPlayerFace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	PlayerFace pf = (PlayerFace)p2;
src/misc_gui.cpp
Show inline comments
 
@@ -30,24 +30,25 @@
 
#include "player_face.h"
 
#include "strings_func.h"
 
#include "fileio.h"
 
#include "fios.h"
 
#include "tile_cmd.h"
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 
#include "string_func.h"
 
#include "player_gui.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 
#include "table/tree_land.h"
 

	
 
/* Variables to display file lists */
 
FiosItem *_fios_list;
 
SaveLoadDialogMode _saveload_mode;
 

	
 

	
 
static bool _fios_path_changed;
 
static bool _savegame_sort_dirty;
src/network/network.cpp
Show inline comments
 
@@ -23,24 +23,25 @@ extern const char _openttd_revision[];
 
#include "core/tcp.h"
 
#include "core/core.h"
 
#include "network_gui.h"
 
#include "../console.h" /* IConsoleCmdExec */
 
#include <stdarg.h> /* va_list */
 
#include "../md5.h"
 
#include "../fileio.h"
 
#include "../texteff.hpp"
 
#include "../core/random_func.hpp"
 
#include "../window_func.h"
 
#include "../string_func.h"
 
#include "../player_func.h"
 
#include "../settings_type.h"
 
#ifdef DEBUG_DUMP_COMMANDS
 
	#include "../core/alloc_func.hpp"
 
#endif /* DEBUG_DUMP_COMMANDS */
 

	
 
#include "table/strings.h"
 

	
 
bool _network_reload_cfg;
 

	
 
/* Check whether NETWORK_NUM_LANDSCAPES is still in sync with NUM_LANDSCAPE */
 
assert_compile((int)NETWORK_NUM_LANDSCAPES == (int)NUM_LANDSCAPE);
 

	
 
// global variables (declared in network_data.h)
src/network/network_gui.cpp
Show inline comments
 
@@ -16,24 +16,25 @@
 
#include "../textbuf_gui.h"
 
#include "../variables.h"
 
#include "network_server.h"
 
#include "network_udp.h"
 
#include "../town.h"
 
#include "../newgrf.h"
 
#include "../functions.h"
 
#include "../window_func.h"
 
#include "../core/alloc_func.hpp"
 
#include "../string_func.h"
 
#include "../gfx_func.h"
 
#include "../player_func.h"
 
#include "../settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "../table/sprites.h"
 

	
 
#define BGC 5
 
#define BTC 15
 

	
 
struct chatquerystr_d : public querystr_d {
 
	int dest;
 
};
 
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(chatquerystr_d));
 

	
src/network/network_server.cpp
Show inline comments
 
@@ -16,24 +16,25 @@
 
#include "../console.h"
 
#include "../command_func.h"
 
#include "../saveload.h"
 
#include "../station.h"
 
#include "../variables.h"
 
#include "../genworld.h"
 
#include "../core/alloc_func.hpp"
 
#include "../fileio.h"
 
#include "../string_func.h"
 
#include "../player_base.h"
 
#include "../player_func.h"
 
#include "../player_gui.h"
 
#include "../settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
// This file handles all the server-commands
 

	
 
static void NetworkHandleCommandQueue(NetworkTCPSocketHandler* cs);
 

	
 
// **********
 
// Sending functions
 
//   DEF_SERVER_SEND_COMMAND has parameter: NetworkTCPSocketHandler *cs
 
// **********
 

	
src/network/network_udp.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "../debug.h"
 
#include "network_data.h"
 
#include "../date_func.h"
 
#include "../map_func.h"
 
#include "network_gamelist.h"
 
#include "network_udp.h"
 
#include "../variables.h"
 
#include "../newgrf_config.h"
 
#include "../core/endian_func.hpp"
 
#include "../string_func.h"
 
#include "../player_base.h"
 
#include "../player_func.h"
 
#include "../settings_type.h"
 

	
 
#include "core/udp.h"
 

	
 
enum {
 
	ADVERTISE_NORMAL_INTERVAL = 30000, // interval between advertising in ticks (15 minutes)
 
	ADVERTISE_RETRY_INTERVAL  =   300, // readvertise when no response after this many ticks (9 seconds)
 
	ADVERTISE_RETRY_TIMES     =     3  // give up readvertising after this much failed retries
 
};
 

	
 
NetworkUDPSocketHandler *_udp_client_socket; ///< udp client socket
 
NetworkUDPSocketHandler *_udp_server_socket; ///< udp server socket
 
NetworkUDPSocketHandler *_udp_master_socket; ///< udp master socket
src/newgrf.cpp
Show inline comments
 
@@ -34,24 +34,25 @@
 
#include "newgrf_industries.h"
 
#include "gfxinit.h"
 
#include "fios.h"
 
#include "rail.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "string_func.h"
 
#include "road_func.h"
 
#include "player_base.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 
#include "table/town_land.h"
 
#include "table/build_industry.h"
 
#include "table/landscape_sprite.h"
 

	
 
/* TTDPatch extended GRF format codec
 
 * (c) Petr Baudis 2004 (GPL'd)
 
 * Changes by Florian octo Forster are (c) by the OpenTTD development team.
 
 *
 
 * Contains portions of documentation by TTDPatch team.
src/newgrf_commons.cpp
Show inline comments
 
@@ -5,24 +5,25 @@
 
 */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "landscape.h"
 
#include "town.h"
 
#include "industry.h"
 
#include "newgrf.h"
 
#include "newgrf_commons.h"
 
#include "tile_map.h"
 
#include "station_map.h"
 
#include "settings_type.h"
 

	
 
/** Constructor of generic class
 
 * @param offset end of original data for this entity. i.e: houses = 110
 
 * @param maximum of entities this manager can deal with. i.e: houses = 512
 
 * @param invalid is the ID used to identify an invalid entity id
 
 */
 
OverrideManagerBase::OverrideManagerBase(uint16 offset, uint16 maximum, uint16 invalid)
 
{
 
	max_offset = offset;
 
	max_new_entities = maximum;
 
	invalid_ID = invalid;
 

	
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -2,24 +2,25 @@
 

	
 
/** @file newgrf_spritegroup.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "landscape.h"
 
#include "oldpool.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_spritegroup.h"
 
#include "sprite.h"
 
#include "date_func.h"
 
#include "settings_type.h"
 

	
 
static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item);
 

	
 
static uint _spritegroup_count = 0;
 
STATIC_OLD_POOL(SpriteGroup, SpriteGroup, 9, 250, NULL, SpriteGroupPoolCleanBlock)
 

	
 
static void DestroySpriteGroup(SpriteGroup *group)
 
{
 
	/* Free dynamically allocated memory */
 
	/* XXX Cast away the consts due to MSVC being buggy... */
 
	switch (group->type) {
 
		case SGT_REAL:
src/newgrf_town.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file newgrf_town.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "debug.h"
 
#include "core/bitmath_func.hpp"
 
#include "town.h"
 

	
 
/** This function implements the town variables that newGRF defines.
 
 * @param variable that is queried
 
 * @param parameter unused
 
 * @param available will return false if ever the variable asked for does not exist
 
 * @param t is of course the town we are inquiring
 
 * @return the value stored in the corresponding variable*/
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t)
 
{
src/news.h
Show inline comments
 
@@ -41,24 +41,26 @@ typedef StringID GetNewsStringCallbackPr
 
 * @see NewsType
 
 * @see NewsCallback
 
 * @see AddNewsItem
 
 */
 
#define NEWS_FLAGS(mode, flag, type, cb) ((cb) << 24 | (type) << 16 | (flag) << 8 | (mode))
 

	
 
void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b);
 
void NewsLoop();
 
void DrawNewsBorder(const Window *w);
 
void InitNewsItemStructs();
 

	
 
extern NewsItem _statusbar_news_item;
 
extern uint32 _news_display_opt;
 
extern bool _news_ticker_sound;
 

	
 
/** Type of news. */
 
enum NewsType {
 
	NT_ARRIVAL_PLAYER,  ///< Cargo arrived for player
 
	NT_ARRIVAL_OTHER,   ///< Cargo arrived for competitor
 
	NT_ACCIDENT,        ///< An accident or disaster has occurred
 
	NT_COMPANY_INFO,    ///< Company info (new companies, bankrupcy messages)
 
	NT_OPENCLOSE,       ///< Opening and closing of industries
 
	NT_ECONOMY,         ///< Economic changes (recession, industry up/dowm)
 
	NT_INDUSTRY_PLAYER, ///< Production changes of industry serviced by local player
 
	NT_INDUSTRY_OTHER,  ///< Production changes of industry serviced by competitor(s)
 
	NT_INDUSTRY_NOBODY, ///< Other industry production changes
src/news_gui.cpp
Show inline comments
 
/* $Id$ */
 

	
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "viewport_func.h"
 
#include "news.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 
#include "string_func.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
/** @file news_gui.cpp
 
@@ -43,24 +43,26 @@
 
 * (MAX_NEWS - O) + L news items
 
 * \endverbatim
 
 */
 

	
 
/** Number of news items in the FIFO queue */
 
#define MAX_NEWS 30
 
#define NB_WIDG_PER_SETTING 4
 

	
 
typedef byte NewsID;
 
#define INVALID_NEWS 255
 

	
 
NewsItem _statusbar_news_item;
 
uint32 _news_display_opt;
 
bool _news_ticker_sound;
 
static NewsItem _news_items[MAX_NEWS];      ///< The news FIFO queue
 
static NewsID _current_news = INVALID_NEWS; ///< points to news item that should be shown next
 
static NewsID _oldest_news = 0;             ///< points to first item in fifo queue
 
static NewsID _latest_news = INVALID_NEWS;  ///< points to last item in fifo queue
 

	
 
/** Forced news item.
 
 * Users can force an item by accessing the history or "last message".
 
 * If the message being shown was forced by the user, its index is stored in
 
 * _forced_news. Otherwise, \a _forced_news variable is INVALID_NEWS. */
 
static NewsID _forced_news = INVALID_NEWS;
 

	
 
static byte _total_news = 0; ///< Number of news items in FIFO queue @see _news_items
src/pathfind.cpp
Show inline comments
 
@@ -4,25 +4,25 @@
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "bridge_map.h"
 
#include "station_map.h"
 
#include "depot.h"
 
#include "tile_cmd.h"
 
#include "landscape.h"
 
#include "pathfind.h"
 
#include "rail_type.h"
 
#include "debug.h"
 
#include "tunnel_map.h"
 
#include "variables.h"
 
#include "settings_type.h"
 
#include "depot.h"
 
#include "tunnelbridge_map.h"
 
#include "core/random_func.hpp"
 

	
 
/* remember which tiles we have already visited so we don't visit them again. */
 
static bool TPFSetTileBit(TrackPathFinder *tpf, TileIndex tile, int dir)
 
{
 
	uint hash, val, offs;
 
	TrackPathFinderLink *link, *new_link;
 
	uint bits = 1 << dir;
 

	
 
	if (tpf->disable_tile_hash)
src/player_gui.cpp
Show inline comments
 
@@ -18,24 +18,25 @@
 
#include "train.h"
 
#include "aircraft.h"
 
#include "newgrf.h"
 
#include "network/network_data.h"
 
#include "network/network_client.h"
 
#include "network/network_gui.h"
 
#include "player_face.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "string_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
/* player face selection window */
 
struct facesel_d {
 
	PlayerFace face; // player face bits
 
	bool advanced;   // advance player face selection window
 
};
 
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(facesel_d));
 

	
 
static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied);
src/rail_gui.cpp
Show inline comments
 
@@ -17,24 +17,25 @@
 
#include "waypoint.h"
 
#include "debug.h"
 
#include "variables.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_station.h"
 
#include "train.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "sound_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "bridge_map.h"
 
#include "rail_map.h"
 
#include "road_map.h"
 
#include "station_map.h"
 
#include "tunnel_map.h"
 
#include "tunnelbridge_map.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static RailType _cur_railtype;
src/road_gui.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "command_func.h"
 
#include "variables.h"
 
#include "road_type.h"
 
#include "road_cmd.h"
 
#include "road_map.h"
 
#include "station_map.h"
 
#include "station.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static void ShowRVStationPicker(RoadStop::Type rs);
 
static void ShowRoadDepotPicker();
 

	
 
static bool _remove_button_clicked;
 
static bool _one_way_button_clicked;
 

	
 
/**
 
 * Define the values of the RoadFlags
src/roadveh_cmd.cpp
Show inline comments
 
@@ -32,24 +32,25 @@
 
#include "yapf/yapf.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "tunnelbridge_map.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "variables.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
static const uint16 _roadveh_images[63] = {
 
	0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14,
 
	0xD24, 0xD1C, 0xD2C, 0xD04, 0xD1C, 0xD24, 0xD6C, 0xD74,
 
	0xD7C, 0xC14, 0xC1C, 0xC24, 0xC2C, 0xC34, 0xC3C, 0xC4C,
 
	0xC54, 0xC64, 0xC5C, 0xC6C, 0xC44, 0xC5C, 0xC64, 0xCAC,
 
	0xCB4, 0xCBC, 0xD94, 0xD9C, 0xDA4, 0xDAC, 0xDB4, 0xDBC,
 
	0xDCC, 0xDD4, 0xDE4, 0xDDC, 0xDEC, 0xDC4, 0xDDC, 0xDE4,
 
	0xE2C, 0xE34, 0xE3C, 0xC14, 0xC1C, 0xC2C, 0xC3C, 0xC4C,
 
	0xC5C, 0xC64, 0xC6C, 0xC74, 0xC84, 0xC94, 0xCA4
src/settings_internal.h
Show inline comments
 
/* $Id$ */
 

	
 
/** @file settings_internal.h Functions and types used internally for the settings configurations. */
 

	
 
#ifndef SETTINGS_INTERNAL_H
 
#define SETTINGS_INTERNAL_H
 

	
 
#include "saveload.h"
 
#include "settings_type.h"
 

	
 
/** Convention/Type of settings. This is then further specified if necessary
 
 * with the SLE_ (SLE_VAR/SLE_FILE) enums in saveload.h
 
 * @see VarTypes
 
 * @see SettingDescBase */
 
enum SettingDescTypeLong {
 
	/* 4 bytes allocated a maximum of 16 types for GenericType */
 
	SDT_BEGIN       = 0,
 
	SDT_NUMX        = 0, ///< any number-type
 
	SDT_BOOLX       = 1, ///< a boolean number
 
	SDT_ONEOFMANY   = 2, ///< bitmasked number where only ONE bit may be set
 
	SDT_MANYOFMANY  = 3, ///< bitmasked number where MULTIPLE bits may be set
src/ship_cmd.cpp
Show inline comments
 
@@ -28,24 +28,25 @@
 
#include "newgrf_sound.h"
 
#include "spritecache.h"
 
#include "misc/autoptr.hpp"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "variables.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D};
 

	
 
static const TrackBits _ship_sometracks[4] = {
 
	TRACK_BIT_X | TRACK_BIT_LOWER | TRACK_BIT_LEFT,  // 0x19, // DIAGDIR_NE
 
	TRACK_BIT_Y | TRACK_BIT_UPPER | TRACK_BIT_LEFT,  // 0x16, // DIAGDIR_SE
 
	TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT, // 0x25, // DIAGDIR_SW
 
	TRACK_BIT_Y | TRACK_BIT_LOWER | TRACK_BIT_RIGHT, // 0x2A, // DIAGDIR_NW
 
};
 

	
src/smallmap_gui.cpp
Show inline comments
 
@@ -18,24 +18,25 @@
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "player_base.h"
 
#include "town.h"
 
#include "variables.h"
 
#include "blitter/factory.hpp"
 
#include "tunnelbridge_map.h"
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "core/endian_func.hpp"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
static const Widget _smallmap_widgets[] = {
 
{  WWT_CLOSEBOX,   RESIZE_NONE,    13,     0,    10,     0,    13, STR_00C5,                STR_018B_CLOSE_WINDOW},
 
{   WWT_CAPTION,  RESIZE_RIGHT,    13,    11,   337,     0,    13, STR_00B0_MAP,            STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{ WWT_STICKYBOX,     RESIZE_LR,    13,   338,   349,     0,    13, 0x0,                     STR_STICKY_BUTTON},
 
{     WWT_PANEL,     RESIZE_RB,    13,     0,   349,    14,   157, 0x0,                     STR_NULL},
 
{     WWT_INSET,     RESIZE_RB,    13,     2,   347,    16,   155, 0x0,                     STR_NULL},
 
{    WWT_IMGBTN,   RESIZE_LRTB,    13,   284,   305,   158,   179, SPR_IMG_SHOW_COUNTOURS,  STR_0191_SHOW_LAND_CONTOURS_ON_MAP},
 
{    WWT_IMGBTN,   RESIZE_LRTB,    13,   306,   327,   158,   179, SPR_IMG_SHOW_VEHICLES,   STR_0192_SHOW_VEHICLES_ON_MAP},
src/station.cpp
Show inline comments
 
@@ -20,24 +20,25 @@
 
#include "industry_map.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_station.h"
 
#include "yapf/yapf.h"
 
#include "cargotype.h"
 
#include "roadveh.h"
 
#include "station_gui.h"
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "variables.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
Station::Station(TileIndex tile)
 
{
 
	DEBUG(station, cDebugCtorLevel, "I+%3d", index);
 

	
 
	xy = tile;
 
	airport_tile = dock_tile = train_tile = 0;
 
	bus_stops = truck_stops = NULL;
 
	had_vehicle_of_type = 0;
src/strings.cpp
Show inline comments
 
@@ -26,24 +26,25 @@
 
#include "spritecache.h"
 
#include "fontcache.h"
 
#include "gui.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "core/endian_func.hpp"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "string_func.h"
 
#include "player_func.h"
 
#include "player_base.h"
 
#include "fios.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/control_codes.h"
 

	
 
DynamicLanguages _dynlang;
 
char _userstring[128];
 
uint64 _decode_parameters[20];
 

	
 
static char *StationGetSpecialString(char *buff, int x, const char* last);
 
static char *GetSpecialTownNameString(char *buff, int ind, uint32 seed, const char* last);
 
static char *GetSpecialPlayerNameString(char *buff, int ind, const int64 *argv, const char* last);
 

	
src/terraform_gui.cpp
Show inline comments
 
@@ -12,24 +12,25 @@
 
#include "window_gui.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "signs.h"
 
#include "variables.h"
 
#include "functions.h"
 
#include "sound_func.h"
 
#include "station.h"
 
#include "unmovable_map.h"
 
#include "textbuf_gui.h"
 
#include "genworld.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (success) {
 
		SndPlayTileFx(SND_1F_SPLAT, tile);
 
	} else {
 
		extern TileIndex _terraform_err_tile;
 
		SetRedErrorSquare(_terraform_err_tile);
 
	}
src/texteff.cpp
Show inline comments
 
@@ -10,24 +10,25 @@
 
#include "saveload.h"
 
#include "console.h"
 
#include "variables.h"
 
#include "blitter/factory.hpp"
 
#include "texteff.hpp"
 
#include "video/video_driver.hpp"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "core/alloc_func.hpp"
 
#include "date_func.h"
 
#include "functions.h"
 
#include "viewport_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
#include <stdarg.h> /* va_list */
 

	
 
enum {
 
	MAX_TEXTMESSAGE_LENGTH = 200,
 
	INIT_NUM_TEXT_MESSAGES =  20,
 
	MAX_CHAT_MESSAGES      =  10,
 
};
 

	
 
struct TextEffect {
src/tgp.cpp
Show inline comments
 
@@ -5,24 +5,25 @@
 
#include "stdafx.h"
 
#include <math.h>
 
#include "openttd.h"
 
#include "clear_map.h"
 
#include "clear_map.h"
 
#include "variables.h"
 
#include "void_map.h"
 
#include "tgp.h"
 
#include "console.h"
 
#include "genworld.h"
 
#include "core/alloc_func.hpp"
 
#include "core/random_func.hpp"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
/*
 
 *
 
 * Quickie guide to Perlin Noise
 
 * Perlin noise is a predictable pseudo random number sequence. By generating
 
 * it in 2 dimensions, it becomes a useful random map, that for a given seed
 
 * and starting X & Y is entirely predictable. On the face of it, that may not
 
 * be useful. However, it means that if you want to replay a map in a different
 
 * terrain, or just vary the sea level, you just re-run the generator with the
 
 * same seed. The seed is an int32, and is randomised on each run of New Game.
src/timetable_cmd.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file timetable_cmd.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "command_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "vehicle_base.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time, bool is_journey)
 
{
 
	Order *order = GetVehicleOrder(v, order_number);
 

	
 
	if (is_journey) {
 
		order->travel_time = time;
 
	} else {
 
		order->wait_time = time;
 
	}
src/timetable_gui.cpp
Show inline comments
 
@@ -8,24 +8,25 @@
 
#include "command_func.h"
 
#include "engine.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "cargotype.h"
 
#include "depot.h"
 
#include "strings_func.h"
 
#include "vehicle_base.h"
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
static int GetOrderFromTimetableWndPt(Window *w, int y, const Vehicle *v)
 
{
 
	/*
 
	 * Calculation description:
 
	 * 15 = 14 (w->widget[ORDER_WIDGET_ORDER_LIST].top) + 1 (frame-line)
 
	 * 10 = order text hight
 
	 */
 
	int sel = (y - 15) / 10;
 

	
src/town_gui.cpp
Show inline comments
 
@@ -11,24 +11,25 @@
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "player_func.h"
 
#include "player_base.h"
 
#include "player_gui.h"
 
#include "network/network.h"
 
#include "variables.h"
 
#include "strings_func.h"
 
#include "economy_func.h"
 
#include "core/alloc_func.hpp"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
enum TownAuthorityWidget {
 
	TWA_CLOSEBOX = 0,
 
	TWA_CAPTION,
 
	TWA_RATING_INFO,
 
	TWA_COMMAND_LIST,
 
	TWA_SCROLLBAR,
 
	TWA_ACTION_INFO,
 
	TWA_EXECUTE,
src/train_cmd.cpp
Show inline comments
 
@@ -37,24 +37,25 @@
 
#include "table/sprites.h"
 
#include "tunnelbridge_map.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "signal_func.h"
 
#include "variables.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/train_cmd.h"
 

	
 
static bool TrainCheckIfLineEnds(Vehicle *v);
 
static void TrainController(Vehicle *v, bool update_image);
 

	
 
static const byte _vehicle_initial_x_fract[4] = {10, 8, 4,  8};
 
static const byte _vehicle_initial_y_fract[4] = { 8, 4, 8, 10};
 

	
 

	
 
/**
src/tree_cmd.cpp
Show inline comments
 
@@ -10,24 +10,25 @@
 
#include "landscape.h"
 
#include "tree_map.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "economy_func.h"
 
#include "town.h"
 
#include "variables.h"
 
#include "genworld.h"
 
#include "transparency.h"
 
#include "functions.h"
 
#include "player_func.h"
 
#include "sound_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 
#include "table/tree_land.h"
 

	
 
/**
 
 * List of tree placer algorithm.
 
 *
 
 * This enumeration defines all possible tree placer algorithm in the game.
 
 */
 
enum TreePlacer {
 
	TP_NONE,     ///< No tree placer algorithm
src/variables.h
Show inline comments
 
/* $Id$ */
 

	
 
/** @file variables.h */
 

	
 
#ifndef VARIABLES_H
 
#define VARIABLES_H
 

	
 
#include "settings_type.h"
 
#include "tile_type.h"
 
#include "strings_type.h"
 

	
 
/* Amount of game ticks */
 
VARDEF uint16 _tick_counter;
 

	
 
/* Skip aging of cargo? */
 
VARDEF byte _age_cargo_skip_counter;
 

	
 
/* Position in tile loop */
 
VARDEF TileIndex _cur_tileloop_tile;
 

	
 
@@ -70,26 +69,24 @@ VARDEF int _palette_animation_counter;
 

	
 

	
 
VARDEF uint32 _frame_counter;
 
VARDEF uint32 _realtime_tick;
 

	
 
VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..)
 

	
 
VARDEF bool _do_autosave;
 
VARDEF int _autosave_ctr;
 

	
 
VARDEF byte _display_opt;
 
VARDEF int _caret_timer;
 
VARDEF uint32 _news_display_opt;
 
VARDEF bool _news_ticker_sound;
 

	
 
VARDEF StringID _error_message;
 

	
 
VARDEF bool _rightclick_emulate;
 

	
 
/* IN/OUT parameters to commands */
 
VARDEF TileIndex _build_tunnel_endtile;
 
VARDEF bool _generating_world;
 

	
 
/* Used when switching from the intro menu. */
 
VARDEF byte _switch_mode;
 
VARDEF StringID _switch_mode_errorstr;
src/vehicle.cpp
Show inline comments
 
@@ -38,24 +38,25 @@
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "signal_func.h"
 
#include "sound_func.h"
 
#include "variables.h"
 
#include "autoreplace_func.h"
 
#include "autoreplace_gui.h"
 
#include "string_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
#define INVALID_COORD (0x7fffffff)
 
#define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6))
 

	
 
VehicleID _vehicle_id_ctr_day;
 
Vehicle *_place_clicked_vehicle;
 
VehicleID _new_vehicle_id;
 
uint16 _returned_refit_capacity;
 

	
src/vehicle_gui.cpp
Show inline comments
 
@@ -25,24 +25,25 @@
 
#include "roadveh.h"
 
#include "depot.h"
 
#include "cargotype.h"
 
#include "group.h"
 
#include "group_gui.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "autoreplace_gui.h"
 
#include "core/alloc_func.hpp"
 
#include "string_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
struct Sorting {
 
	Listing aircraft;
 
	Listing roadveh;
 
	Listing ship;
 
	Listing train;
 
};
 

	
 
static Sorting _sorting;
src/viewport.cpp
Show inline comments
 
@@ -15,24 +15,25 @@
 
#include "signs.h"
 
#include "waypoint.h"
 
#include "variables.h"
 
#include "train.h"
 
#include "roadveh.h"
 
#include "vehicle_gui.h"
 
#include "blitter/factory.hpp"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "vehicle_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
#define VIEWPORT_DRAW_MEM (65536 * 2)
 

	
 
PlaceProc *_place_proc;
 
Point _tile_fract_coords;
 
ZoomLevel _saved_scrollpos_zoom;
 

	
 
/**
 
 * The maximum number of viewports depends on the maximum number
src/water_cmd.cpp
Show inline comments
 
@@ -23,24 +23,25 @@
 
#include "industry_map.h"
 
#include "newgrf.h"
 
#include "newgrf_canal.h"
 
#include "misc/autoptr.hpp"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "variables.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
static Vehicle *FindFloodableVehicleOnTile(TileIndex tile);
 
static void FloodVehicle(Vehicle *v);
 

	
 
/**
 
 * Makes a tile canal or water depending on the surroundings.
 
 * This as for example docks and shipdepots do not store
 
 * whether the tile used to be canal or 'normal' water.
 
 * @param t the tile to change.
src/waypoint.cpp
Show inline comments
 
@@ -21,24 +21,25 @@
 
#include "misc/autoptr.hpp"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "economy_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "vehicle_base.h"
 
#include "string_func.h"
 
#include "signal_func.h"
 
#include "player_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/strings.h"
 

	
 
enum {
 
	MAX_WAYPOINTS_PER_TOWN = 64,
 
};
 

	
 
DEFINE_OLD_POOL_GENERIC(Waypoint, Waypoint)
 

	
 

	
 
/**
 
 * Update the sign for the waypoint
src/window.cpp
Show inline comments
 
@@ -9,24 +9,25 @@
 
#include "player_func.h"
 
#include "gfx_func.h"
 
#include "console.h"
 
#include "viewport_func.h"
 
#include "variables.h"
 
#include "genworld.h"
 
#include "blitter/factory.hpp"
 
#include "window_gui.h"
 
#include "zoom_func.h"
 
#include "core/alloc_func.hpp"
 
#include "map_func.h"
 
#include "vehicle_base.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
/* delta between mouse cursor and upper left corner of dragged window */
 
static Point _drag_delta;
 

	
 
static Window _windows[MAX_NUMBER_OF_WINDOWS];
 
Window *_z_windows[lengthof(_windows)];
 
Window **_last_z_window; ///< always points to the next free space in the z-array
 

	
 
Point _cursorpos_drag_start;
 

	
0 comments (0 inline, 0 general)