Changeset - r8140:9424f012f6a2
[Not reviewed]
master
! ! !
rubidium - 17 years ago 2007-12-26 13:50:40
rubidium@openttd.org
(svn r11702) -Codechange: move all date related stuff to date*.
76 files changed with 134 insertions and 133 deletions:
0 comments (0 inline, 0 general)
src/ai/default/default.cpp
Show inline comments
 
@@ -23,7 +23,7 @@
 
#include "../../depot.h"
 
#include "../../variables.h"
 
#include "../../bridge.h"
 
#include "../../date.h"
 
#include "../../date_func.h"
 
#include "../../tunnelbridge_map.h"
 
#include "../../window_func.h"
 
#include "../../functions.h"
src/ai/trolly/trolly.cpp
Show inline comments
 
@@ -32,7 +32,7 @@
 
#include "../../gui.h"
 
#include "../../depot.h"
 
#include "../../vehicle.h"
 
#include "../../date.h"
 
#include "../../date_func.h"
 
#include "../ai.h"
 
#include "../../order.h"
 

	
src/aircraft_cmd.cpp
Show inline comments
 
@@ -26,12 +26,12 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_text.h"
 
#include "newgrf_sound.h"
 
#include "date.h"
 
#include "spritecache.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "command_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "functions.h"
 

	
 
void Aircraft::UpdateDeltaXY(Direction direction)
src/airport.cpp
Show inline comments
 
@@ -8,9 +8,9 @@
 
#include "airport.h"
 
#include "variables.h"
 
#include "airport_movement.h"
 
#include "date.h"
 
#include "core/bitmath_func.hpp"
 
#include "core/alloc_func.hpp"
 
#include "date_func.h"
 

	
 
/* Uncomment this to print out a full report of the airport-structure
 
 * You should either use
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -23,12 +23,12 @@
 
#include "airport.h"
 
#include "vehicle_gui.h"
 
#include "newgrf_engine.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "group.h"
 
#include "road_map.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 

	
 
enum BuildVehicleWidgets {
src/console_cmds.cpp
Show inline comments
 
@@ -23,13 +23,13 @@
 
#include "station.h"
 
#include "screenshot.h"
 
#include "genworld.h"
 
#include "date.h"
 
#include "network/network.h"
 
#include "strings_func.h"
 
#include "viewport.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "map_func.h"
 
#include "date_func.h"
 

	
 
// ** scriptfile handling ** //
 
static FILE *_script_file;
src/currency.cpp
Show inline comments
 
@@ -8,7 +8,7 @@
 
#include "news.h"
 
#include "variables.h"
 
#include "table/strings.h"
 
#include "date.h"
 
#include "date_func.h"
 

	
 
	//   exchange rate    prefix             symbol_pos
 
	//   |  separator        |     postfix   |
src/currency.h
Show inline comments
 
@@ -5,6 +5,8 @@
 
#ifndef CURRENCY_H
 
#define CURRENCY_H
 

	
 
#include "date_type.h"
 

	
 
enum {
 
	CF_NOEURO = 0,
 
	CF_ISEURO = 1,
src/date.cpp
Show inline comments
 
@@ -4,7 +4,6 @@
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "date.h"
 
#include "variables.h"
 
#include "vehicle.h"
 
#include "network/network.h"
 
@@ -13,6 +12,7 @@
 
#include "currency.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 
#ifdef DEBUG_DUMP_COMMANDS
 
#include "saveload.h"
 
#endif
src/date.h
Show inline comments
 
deleted file
src/date_func.h
Show inline comments
 
new file 100644
 
/* $Id$ */
 

	
 
/** @file date_func.h Functions related to dates. */
 

	
 
#ifndef DATE_FUNC_H
 
#define DATE_FUNC_H
 

	
 
#include "date_type.h"
 

	
 
extern Year      _cur_year;
 
extern Month     _cur_month;
 
extern Date      _date;
 
extern DateFract _date_fract;
 

	
 
void SetDate(Date date);
 
void ConvertDateToYMD(Date date, YearMonthDay *ymd);
 
Date ConvertYMDToDate(Year year, Month month, Day day);
 

	
 
#endif /* DATE_FUNC_H */
src/date_type.h
Show inline comments
 
new file 100644
 
/* $Id$ */
 

	
 
/** @file date_type.h Types related to the dates in OpenTTD. */
 

	
 
#ifndef DATE_TYPE_H
 
#define DATE_TYPE_H
 

	
 
/**
 
 * 1 day is 74 ticks; _date_fract used to be uint16 and incremented by 885. On
 
 *                    an overflow the new day begun and 65535 / 885 = 74.
 
 * 1 tick is approximately 30 ms.
 
 * 1 day is thus about 2 seconds (74 * 30 = 2220) on a machine that can run OpenTTD normally
 
 */
 
#define DAY_TICKS 74
 

	
 
/*
 
 * ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR and DAYS_TILL_ORIGINAL_BASE_YEAR are
 
 * primarily used for loading newgrf and savegame data and returning some
 
 * newgrf (callback) functions that were in the original (TTD) inherited
 
 * format, where '_date == 0' meant that it was 1920-01-01.
 
 */
 

	
 
/** The minimum starting year/base year of the original TTD */
 
#define ORIGINAL_BASE_YEAR 1920
 
/** The maximum year of the original TTD */
 
#define ORIGINAL_MAX_YEAR 2090
 

	
 
/**
 
 * The offset in days from the '_date == 0' till
 
 * 'ConvertYMDToDate(ORIGINAL_BASE_YEAR, 0, 1)'
 
 */
 
#define DAYS_TILL_ORIGINAL_BASE_YEAR (365 * ORIGINAL_BASE_YEAR + ORIGINAL_BASE_YEAR / 4 - ORIGINAL_BASE_YEAR / 100 + ORIGINAL_BASE_YEAR / 400)
 

	
 
/* The absolute minimum & maximum years in OTTD */
 
#define MIN_YEAR 0
 
/* MAX_YEAR, nicely rounded value of the number of years that can
 
 * be encoded in a single 32 bits date, about 2^31 / 366 years. */
 
#define MAX_YEAR 5000000
 

	
 
typedef int32  Date;
 
typedef uint16 DateFract;
 

	
 
typedef int32  Year;
 
typedef uint8  Month;
 
typedef uint8  Day;
 

	
 
struct YearMonthDay {
 
	Year  year;
 
	Month month;
 
	Day   day;
 
};
 

	
 
static const Year INVALID_YEAR = -1;
 
static const Date INVALID_DATE = -1;
 

	
 
#endif /* DATE_TYPE_H */
src/disaster_cmd.cpp
Show inline comments
 
@@ -36,8 +36,8 @@
 
#include "sound.h"
 
#include "variables.h"
 
#include "table/sprites.h"
 
#include "date.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "functions.h"
 

	
 
enum DisasterSubType {
src/economy.cpp
Show inline comments
 
@@ -32,7 +32,6 @@
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "unmovable.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "player_face.h"
 
#include "group.h"
 
@@ -40,6 +39,7 @@
 
#include "tile_cmd.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
/**
 
 * Multiply two integer values and shift the results to right.
src/engine.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "train.h"
 
#include "aircraft.h"
 
#include "newgrf_cargo.h"
 
#include "date.h"
 
#include "table/engines.h"
 
#include "group.h"
 
#include "string.h"
 
@@ -25,6 +24,7 @@
 
#include "viewport.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
EngineInfo _engine_info[TOTAL_NUM_ENGINES];
 
RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
src/engine.h
Show inline comments
 
@@ -11,6 +11,7 @@
 
#include "vehicle_type.h"
 
#include "command_type.h"
 
#include "gfx_type.h"
 
#include "date_type.h"
 
#include "sound.h"
 

	
 
enum RailVehicleTypes {
src/genworld.cpp
Show inline comments
 
@@ -17,9 +17,9 @@
 
#include "debug.h"
 
#include "settings.h"
 
#include "heightmap.h"
 
#include "date.h"
 
#include "viewport.h"
 
#include "map_func.h"
 
#include "date_func.h"
 

	
 
void GenerateClearTile();
 
void GenerateIndustries();
src/genworld_gui.cpp
Show inline comments
 
@@ -21,10 +21,10 @@
 
#include "genworld.h"
 
#include "network/network.h"
 
#include "thread.h"
 
#include "date.h"
 
#include "newgrf_config.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
/**
 
 * In what 'mode' the GenerateLandscapeWindowProc is.
src/graph_gui.cpp
Show inline comments
 
@@ -11,11 +11,11 @@
 
#include "player.h"
 
#include "economy_func.h"
 
#include "variables.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "core/alloc_func.hpp"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
/* Bitmasks of player and cargo indices that shouldn't be drawn. */
 
static uint _legend_excluded_players;
src/group_gui.cpp
Show inline comments
 
@@ -15,7 +15,6 @@
 
#include "vehicle_gui.h"
 
#include "depot.h"
 
#include "train.h"
 
#include "date.h"
 
#include "group.h"
 
#include "viewport.h"
 
#include "debug.h"
src/industry.h
Show inline comments
 
@@ -12,6 +12,7 @@
 
#include "economy_type.h"
 
#include "map_type.h"
 
#include "slope_type.h"
 
#include "date_type.h"
 

	
 
typedef uint16 IndustryGfx;
 
typedef uint8 IndustryType;
src/industry_cmd.cpp
Show inline comments
 
@@ -23,7 +23,6 @@
 
#include "table/industry_land.h"
 
#include "table/build_industry.h"
 
#include "genworld.h"
 
#include "date.h"
 
#include "water_map.h"
 
#include "tree_map.h"
 
#include "cargotype.h"
 
@@ -40,6 +39,7 @@
 
#include "tile_cmd.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
void ShowIndustryViewWindow(int industry);
 
void BuildOilRig(TileIndex tile);
src/industry_gui.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_text.h"
 
#include "date.h"
 
#include "strings_func.h"
 
#include "map_func.h"
 

	
src/landscape.cpp
Show inline comments
 
@@ -5,7 +5,6 @@
 
#include "bridge_map.h"
 
#include "heightmap.h"
 
#include "clear_map.h"
 
#include "date.h"
 
#include "player.h"
 
#include "spritecache.h"
 
#include "table/sprites.h"
 
@@ -24,6 +23,7 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 

	
 
extern const TileTypeProcs
 
	_tile_type_clear_procs,
src/main_gui.cpp
Show inline comments
 
@@ -34,12 +34,12 @@
 
#include "screenshot.h"
 
#include "genworld.h"
 
#include "settings.h"
 
#include "date.h"
 
#include "vehicle_gui.h"
 
#include "transparency_gui.h"
 
#include "newgrf_config.h"
 
#include "rail_gui.h"
 
#include "road_gui.h"
 
#include "date_func.h"
 
#include "functions.h"
 

	
 
#include "network/network_data.h"
src/misc.cpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
#include "variables.h"
 
#include "ai/ai.h"
 
#include "newgrf_house.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "group.h"
 
#include "viewport.h"
 
@@ -26,6 +25,7 @@
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "map_func.h"
 
#include "date_func.h"
 

	
 
char _name_array[512][32];
 

	
src/misc_gui.cpp
Show inline comments
 
@@ -31,7 +31,6 @@
 
#include "train.h"
 
#include "tgp.h"
 
#include "settings.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "player_face.h"
 
#include "strings_func.h"
 
@@ -41,6 +40,7 @@
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
/* Variables to display file lists */
 
FiosItem *_fios_list;
src/network/core/game.h
Show inline comments
 
@@ -11,8 +11,8 @@
 
#ifdef ENABLE_NETWORK
 

	
 
#include "config.h"
 
#include "../../date.h"
 
#include "../../newgrf_config.h"
 
#include "../../date_type.h"
 

	
 
/**
 
 * This is the struct used by both client and server
src/network/core/udp.cpp
Show inline comments
 
@@ -11,6 +11,7 @@
 
#include "../../core/bitmath_func.hpp"
 
#include "../../core/math_func.hpp"
 
#include "../../core/alloc_func.hpp"
 
#include "../../date_func.h"
 
#include "packet.h"
 
#include "udp.h"
 

	
src/network/network.cpp
Show inline comments
 
@@ -14,7 +14,7 @@ extern const char _openttd_revision[];
 
#include "../map_func.h"
 
#include "../command_func.h"
 
#include "../variables.h"
 
#include "../date.h"
 
#include "../date_func.h"
 
#include "../newgrf_config.h"
 
#include "table/strings.h"
 
#include "network_client.h"
src/network/network_client.cpp
Show inline comments
 
@@ -8,7 +8,6 @@
 
#include "../openttd.h"
 
#include "network_data.h"
 
#include "core/tcp.h"
 
#include "../date.h"
 
#include "table/strings.h"
 
#include "network_client.h"
 
#include "network_gamelist.h"
src/network/network_gui.cpp
Show inline comments
 
@@ -7,7 +7,7 @@
 
#include "../strings_func.h"
 
#include "../table/sprites.h"
 
#include "network.h"
 
#include "../date.h"
 
#include "../date_func.h"
 

	
 
#include "../fios.h"
 
#include "table/strings.h"
src/network/network_server.cpp
Show inline comments
 
@@ -11,7 +11,7 @@
 
#include "core/tcp.h"
 
#include "../train.h"
 
#include "../aircraft.h"
 
#include "../date.h"
 
#include "../date_func.h"
 
#include "table/strings.h"
 
#include "network_server.h"
 
#include "network_udp.h"
src/network/network_udp.cpp
Show inline comments
 
@@ -13,7 +13,7 @@
 
#include "../debug.h"
 
#include "../string.h"
 
#include "network_data.h"
 
#include "../date.h"
 
#include "../date_func.h"
 
#include "../map_func.h"
 
#include "network_gamelist.h"
 
#include "network_udp.h"
src/newgrf.cpp
Show inline comments
 
@@ -24,7 +24,6 @@
 
#include "newgrf_text.h"
 
#include "table/sprites.h"
 
#include "fontcache.h"
 
#include "date.h"
 
#include "currency.h"
 
#include "landscape.h"
 
#include "sound.h"
 
@@ -46,6 +45,7 @@
 
#include "rail.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 

	
 
/* TTDPatch extended GRF format codec
 
 * (c) Petr Baudis 2004 (GPL'd)
src/newgrf_engine.cpp
Show inline comments
 
@@ -17,8 +17,8 @@
 
#include "newgrf_station.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_cargo.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "date_func.h"
 

	
 

	
 
int _traininfo_vehicle_pitch = 0;
src/newgrf_house.cpp
Show inline comments
 
@@ -8,7 +8,6 @@
 
#include "debug.h"
 
#include "viewport.h"
 
#include "landscape.h"
 
#include "date.h"
 
#include "town.h"
 
#include "town_map.h"
 
#include "sound.h"
src/newgrf_industries.cpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
#include "newgrf_commons.h"
 
#include "newgrf_text.h"
 
#include "newgrf_town.h"
 
#include "date.h"
 
#include "window_func.h"
 

	
 
/* Since the industry IDs defined by the GRF file don't necessarily correlate
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -9,8 +9,8 @@
 
#include "oldpool.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_spritegroup.h"
 
#include "date.h"
 
#include "sprite.h"
 
#include "date_func.h"
 

	
 
static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item);
 

	
src/newgrf_station.cpp
Show inline comments
 
@@ -18,11 +18,11 @@
 
#include "newgrf_commons.h"
 
#include "newgrf_station.h"
 
#include "newgrf_spritegroup.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "town_map.h"
 
#include "newgrf_town.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 

	
 
static StationClass station_classes[STAT_CLASS_MAX];
 

	
src/newgrf_text.cpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
#include "newgrf.h"
 
#include "newgrf_text.h"
 
#include "table/control_codes.h"
 
#include "date.h"
 
#include "strings_func.h"
 

	
 
#define GRFTAB  28
src/news.h
Show inline comments
 
@@ -8,6 +8,7 @@
 
#include "window_type.h"
 
#include "vehicle_type.h"
 
#include "tile_type.h"
 
#include "date_type.h"
 

	
 
struct NewsItem {
 
	StringID string_id; ///< Message text (sometimes also used for storing other info)
src/news_gui.cpp
Show inline comments
 
@@ -12,11 +12,11 @@
 
#include "vehicle.h"
 
#include "sound.h"
 
#include "variables.h"
 
#include "date.h"
 
#include "string.h"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
/** @file news_gui.cpp
 
 *
src/oldloader.cpp
Show inline comments
 
@@ -21,9 +21,9 @@
 
#include "depot.h"
 
#include "newgrf_config.h"
 
#include "ai/ai.h"
 
#include "date.h"
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 

	
 
enum {
 
	HEADER_SIZE = 49,
src/openttd.cpp
Show inline comments
 
@@ -46,7 +46,6 @@
 
#include "yapf/yapf.h"
 
#include "settings.h"
 
#include "genworld.h"
 
#include "date.h"
 
#include "clear_map.h"
 
#include "fontcache.h"
 
#include "newgrf.h"
 
@@ -62,6 +61,7 @@
 
#include "video/video_driver.hpp"
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "date_func.h"
 

	
 
#include "bridge_map.h"
 
#include "clear_map.h"
src/openttd.h
Show inline comments
 
@@ -49,15 +49,6 @@ assert_compile(sizeof(DestinationID) == 
 
assert_compile(sizeof(DestinationID) == sizeof(WaypointID));
 
assert_compile(sizeof(DestinationID) == sizeof(StationID));
 

	
 

	
 
enum {
 
	INVALID_YEAR = -1,
 
	INVALID_DATE = -1,
 
};
 

	
 
typedef int32 Year;
 
typedef int32 Date;
 

	
 
typedef uint32 PlayerFace; ///< player face bits, info see in player_face.h
 

	
 
enum GameModes {
src/player.h
Show inline comments
 
@@ -11,6 +11,7 @@
 
#include "road_func.h"
 
#include "cargo_type.h"
 
#include "command_type.h"
 
#include "date_type.h"
 
#include "engine.h"
 
#include "livery.h"
 
#include "genworld.h"
src/player_gui.cpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
#include "roadveh.h"
 
#include "train.h"
 
#include "aircraft.h"
 
#include "date.h"
 
#include "newgrf.h"
 
#include "network/network_data.h"
 
#include "network/network_client.h"
 
@@ -27,6 +26,7 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied);
 
static void DoSelectPlayerFace(PlayerID player, bool show_big);
src/players.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "variables.h"
 
#include "engine.h"
 
#include "ai/ai.h"
 
#include "date.h"
 
#include "player_face.h"
 
#include "group.h"
 
#include "settings.h"
 
@@ -29,6 +28,7 @@
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 

	
 
/**
 
 * Sets the local player and updates the patch settings that are set on a
src/rail_gui.cpp
Show inline comments
 
@@ -8,7 +8,6 @@
 
#include "table/strings.h"
 
#include "tile_cmd.h"
 
#include "landscape.h"
 
#include "date.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "station_gui.h"
 
@@ -26,6 +25,7 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
#include "bridge_map.h"
 
#include "rail_map.h"
src/roadveh_cmd.cpp
Show inline comments
 
@@ -32,12 +32,12 @@
 
#include "newgrf_text.h"
 
#include "newgrf_sound.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "tunnelbridge_map.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 

	
 
static const uint16 _roadveh_images[63] = {
src/screenshot.cpp
Show inline comments
 
@@ -9,7 +9,6 @@
 
#include "player.h"
 
#include "screenshot.h"
 
#include "variables.h"
 
#include "date.h"
 
#include "string.h"
 
#include "blitter/factory.hpp"
 
#include "fileio.h"
 
@@ -18,6 +17,7 @@
 
#include "core/alloc_func.hpp"
 
#include "core/endian_func.hpp"
 
#include "map_func.h"
 
#include "date_func.h"
 

	
 
char _screenshot_format_name[8];
 
uint _num_screenshot_formats;
src/settings.cpp
Show inline comments
 
@@ -36,7 +36,6 @@
 
#include "newgrf.h"
 
#include "newgrf_config.h"
 
#include "genworld.h"
 
#include "date.h"
 
#include "rail.h"
 
#include "train.h"
 
#include "news.h"
src/settings_gui.cpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "variables.h"
 
#include "settings.h"
 
#include "vehicle.h"
 
#include "date.h"
 
#include "newgrf_townname.h"
 
#include "strings_func.h"
 
#include "functions.h"
src/ship_cmd.cpp
Show inline comments
 
@@ -28,12 +28,12 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_text.h"
 
#include "newgrf_sound.h"
 
#include "date.h"
 
#include "spritecache.h"
 
#include "misc/autoptr.hpp"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

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

	
src/station.cpp
Show inline comments
 
@@ -25,13 +25,13 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_station.h"
 
#include "yapf/yapf.h"
 
#include "date.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"
 

	
 
Station::Station(TileIndex tile)
 
{
src/station_cmd.cpp
Show inline comments
 
@@ -32,7 +32,6 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_station.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "misc/autoptr.hpp"
 
#include "road_type.h"
 
#include "road_internal.h" /* For drawing catenary/checking road removal */
 
@@ -44,6 +43,7 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 
DEFINE_OLD_POOL_GENERIC(Station, Station)
 
DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop)
src/station_gui.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "command_func.h"
 
#include "variables.h"
 
#include "vehicle_gui.h"
 
#include "date.h"
 
#include "vehicle.h"
 
#include "table/sprites.h"
 
#include "cargotype.h"
src/strings.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "newgrf_text.h"
 
#include "table/control_codes.h"
 
#include "music.h"
 
#include "date.h"
 
#include "industry.h"
 
#include "fileio.h"
 
#include "cargotype.h"
 
@@ -35,6 +34,7 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "core/endian_func.hpp"
 
#include "date_func.h"
 

	
 
/* for opendir/readdir/closedir */
 
# include "fios.h"
src/subsidy_gui.cpp
Show inline comments
 
@@ -11,10 +11,10 @@
 
#include "player.h"
 
#include "economy_func.h"
 
#include "variables.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "window_gui.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 

	
 
static void HandleSubsidyClick(int y)
 
{
src/texteff.cpp
Show inline comments
 
@@ -14,12 +14,12 @@
 
#include "table/sprites.h"
 
#include "blitter/factory.hpp"
 
#include <stdarg.h> /* va_list */
 
#include "date.h"
 
#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"
 

	
 
enum {
src/tile_cmd.h
Show inline comments
 
@@ -11,6 +11,7 @@
 
#include "vehicle_type.h"
 
#include "cargo_type.h"
 
#include "strings_type.h"
 
#include "date_type.h"
 

	
 
/** The returned bits of VehicleEnterTile. */
 
enum VehicleEnterTileStatus {
src/timetable_cmd.cpp
Show inline comments
 
@@ -7,7 +7,6 @@
 
#include "variables.h"
 
#include "table/strings.h"
 
#include "command_func.h"
 
#include "date.h"
 
#include "player.h"
 
#include "vehicle.h"
 
#include "functions.h"
src/timetable_gui.cpp
Show inline comments
 
@@ -7,7 +7,6 @@
 
#include "variables.h"
 
#include "table/strings.h"
 
#include "command_func.h"
 
#include "date.h"
 
#include "engine.h"
 
#include "gui.h"
 
#include "window_gui.h"
src/town.h
Show inline comments
 
@@ -9,6 +9,7 @@
 
#include "core/random_func.hpp"
 
#include "cargo_type.h"
 
#include "tile_type.h"
 
#include "date_type.h"
 

	
 
enum {
 
	HOUSE_NO_CLASS   = 0,
src/town_cmd.cpp
Show inline comments
 
@@ -28,7 +28,6 @@
 
#include "variables.h"
 
#include "bridge.h"
 
#include "bridge_map.h"
 
#include "date.h"
 
#include "table/town_land.h"
 
#include "genworld.h"
 
#include "newgrf.h"
src/town_map.h
Show inline comments
 
@@ -6,7 +6,7 @@
 
#define TOWN_MAP_H
 

	
 
#include "town.h"
 
#include "date.h"
 
#include "date_func.h"
 
#include "tile_map.h"
 
#include "functions.h"
 

	
src/train_cmd.cpp
Show inline comments
 
@@ -35,7 +35,6 @@
 
#include "newgrf_text.h"
 
#include "direction_func.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "cargotype.h"
 
#include "group.h"
 
#include "table/sprites.h"
 
@@ -43,6 +42,7 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 

	
 

	
 
static bool TrainCheckIfLineEnds(Vehicle *v);
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -27,13 +27,13 @@
 
#include "train.h"
 
#include "water_map.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "newgrf_sound.h"
 
#include "autoslope.h"
 
#include "transparency.h"
 
#include "tunnelbridge_map.h"
 
#include "table/bridge_land.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "functions.h"
 

	
 

	
src/variables.h
Show inline comments
 
@@ -9,6 +9,7 @@
 
#include "openttd.h"
 
#include "tile_type.h"
 
#include "strings_type.h"
 
#include "date_type.h"
 

	
 
/* ********* START OF SAVE REGION */
 

	
src/vehicle.cpp
Show inline comments
 
@@ -33,7 +33,6 @@
 
#include "water_map.h"
 
#include "network/network.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_sound.h"
 
@@ -42,6 +41,7 @@
 
#include "strings_func.h"
 
#include "zoom_func.h"
 
#include "functions.h"
 
#include "date_func.h"
 
#include "window_func.h"
 

	
 
#define INVALID_COORD (0x7fffffff)
src/vehicle.h
Show inline comments
 
@@ -14,6 +14,7 @@
 
#include "window_type.h"
 
#include "gfx_type.h"
 
#include "command_type.h"
 
#include "date_type.h"
 
#include "oldpool.h"
 
#include "order.h"
 
#include "cargopacket.h"
src/vehicle_gui.cpp
Show inline comments
 
@@ -22,7 +22,6 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_text.h"
 
#include "date.h"
 
#include "ship.h"
 
#include "aircraft.h"
 
#include "roadveh.h"
src/waypoint.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "table/strings.h"
 
#include "vehicle.h"
 
#include "yapf/yapf.h"
 
#include "date.h"
 
#include "newgrf.h"
 
#include "string.h"
 
#include "misc/autoptr.hpp"
 
@@ -28,6 +27,7 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "economy_func.h"
 
#include "date_func.h"
 

	
 
enum {
 
	MAX_WAYPOINTS_PER_TOWN = 64,
src/yapf/yapf.hpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "../bridge.h"
 
#include "../station.h"
 
#include "../station_map.h"
 
#include "../date.h"
 
#include "../tile_cmd.h"
 
#include "../landscape.h"
 
#include "yapf.h"
src/yapf/yapf_costcache.hpp
Show inline comments
 
@@ -5,6 +5,7 @@
 
#ifndef  YAPF_COSTCACHE_HPP
 
#define  YAPF_COSTCACHE_HPP
 

	
 
#include "../date_func.h"
 

	
 
/** CYapfSegmentCostCacheNoneT - the formal only yapf cost cache provider that implements
 
 * PfNodeCacheFetch() and PfNodeCacheFlush() callbacks. Used when nodes don't have CachedData
0 comments (0 inline, 0 general)