(svn r11700) -Codechange: reduce the amount of unnecessary includes.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 17 years ago
parent 6cb68b9144
commit aac835171e

@ -6,6 +6,7 @@
#define AIRPORT_H
#include "direction_type.h"
#include "map.h"
enum {MAX_TERMINALS = 10};
enum {MAX_HELIPADS = 4};

@ -12,6 +12,7 @@
#define AYSTAR_H
#include "queue.h"
#include "tile_type.h"
//#define AYSTAR_DEBUG
enum {

@ -6,6 +6,7 @@
#define BRIDGE_H
#include "gfx_type.h"
#include "tile_cmd.h"
enum {
MAX_BRIDGES = 13

@ -24,6 +24,7 @@
#include "tile_cmd.h"
#include "vehicle.h"
#include "functions.h"
#include "economy_func.h"
/*
* In one terraforming command all four corners of a initial tile can be raised/lowered (though this is not available to the player).

@ -9,6 +9,7 @@
#include "economy_type.h"
#include "cargo_type.h"
#include "vehicle_type.h"
#include "tile_type.h"
struct Player;

@ -8,6 +8,8 @@
#include "core/random_func.hpp"
#include "command_type.h"
#include "openttd.h"
#include "tile_cmd.h"
#include "map.h"
/* clear_land.cpp */
void DrawHillyLandTile(const TileInfo *ti);

@ -19,6 +19,7 @@
#include "heightmap.h"
#include "date.h"
#include "viewport.h"
#include "map.h"
void GenerateClearTile();
void GenerateIndustries();

@ -9,6 +9,7 @@
#include "vehicle_type.h"
#include "gfx_type.h"
#include "economy_type.h"
#include "tile_type.h"
/* main_gui.cpp */
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2);
@ -52,10 +53,12 @@ void ShowTerraformToolbar(Window *link = NULL);
void ShowGenerateLandscape();
void ShowHeightmapLoad();
typedef void PlaceProc(TileIndex tile);
void PlaceProc_DemolishArea(TileIndex tile);
void PlaceProc_LevelLand(TileIndex tile);
void PlaceProc_BuyLand(TileIndex tile);
bool GUIPlaceProcDragXY(const WindowEvent *e);
VARDEF PlaceProc *_place_proc;
/** Drag and drop selection process, or, what to do with an area of land when
* you've selected it. */
@ -121,7 +124,6 @@ void ShowMusicWindow();
/* main_gui.cpp */
void HandleOnEditText(const char *str);
VARDEF bool _station_show_coverage;
VARDEF PlaceProc *_place_proc;
void InitializeGUI();

@ -10,6 +10,8 @@
#include "newgrf_storage.h"
#include "cargo_type.h"
#include "economy_type.h"
#include "map.h"
#include "slope_type.h"
typedef uint16 IndustryGfx;
typedef uint8 IndustryType;

@ -6,6 +6,9 @@
#define LANDSCAPE_H
#include "core/geometry_type.hpp"
#include "tile_cmd.h"
#include "slope_type.h"
#include "direction_type.h"
enum {
SNOW_LINE_MONTHS = 12,

@ -186,17 +186,6 @@ static inline TileIndex TileVirtXY(uint x, uint y)
}
enum {
INVALID_TILE = (TileIndex)-1 ///< The very nice invalid tile marker
};
enum {
TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size
TILE_PIXELS = 32, ///< a tile is 32x32 pixels
TILE_HEIGHT = 8, ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
};
/**
* Get the X component of a tile
* @param tile the tile to get the X component of

@ -7,6 +7,7 @@
#include "window_type.h"
#include "vehicle_type.h"
#include "tile_type.h"
struct NewsItem {
StringID string_id; ///< Message text (sometimes also used for storing other info)

@ -8,11 +8,9 @@
#define VARDEF extern
#endif
#include "core/enum_type.hpp"
#include "strings_type.h"
#include "map.h"
#include "slope_type.h"
// Forward declarations of structs.
struct Depot;
struct Waypoint;
@ -144,15 +142,6 @@ template <> struct EnumPropsT<TransportType> : MakeEnumPropsT<TransportType, byt
typedef TinyEnumT<TransportType> TransportTypeByte;
struct TileInfo {
uint x;
uint y;
Slope tileh;
TileIndex tile;
uint z;
};
/* Display Options */
enum {
DO_SHOW_TOWN_NAMES = 0,
@ -216,21 +205,12 @@ struct GameDifficulty {
GDType town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff
};
struct TileDesc {
StringID str;
Owner owner;
Date build_date;
uint64 dparam[2];
};
struct ViewportSign {
int32 left;
int32 top;
byte width_1, width_2;
};
typedef void PlaceProc(TileIndex tile);
enum {
SORT_ASCENDING = 0,
SORT_DESCENDING = 1,

@ -9,6 +9,7 @@
#include "core/bitmath_func.hpp"
#include "cargo_type.h"
#include "vehicle_type.h"
#include "tile_type.h"
enum {
INVALID_VEH_ORDER_ID = 0xFF,

@ -12,6 +12,7 @@
#include "core/bitmath_func.hpp"
#include "economy_func.h"
#include "variables.h"
#include "tile_cmd.h"
/** This struct contains all the info that is needed to draw and construct tracks.
*/
@ -97,42 +98,6 @@ enum {
NUM_SSD_STACK = 32, ///< max amount of blocks to check recursively
};
/*
* Functions to map tracks to the corresponding bits in the signal
* presence/status bytes in the map. You should not use these directly, but
* wrapper functions below instead. XXX: Which are these?
*/
/**
* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction along with the trackdir.
*/
static inline byte SignalAlongTrackdir(Trackdir trackdir)
{
extern const byte _signal_along_trackdir[TRACKDIR_END];
return _signal_along_trackdir[trackdir];
}
/**
* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction against the trackdir.
*/
static inline byte SignalAgainstTrackdir(Trackdir trackdir)
{
extern const byte _signal_against_trackdir[TRACKDIR_END];
return _signal_against_trackdir[trackdir];
}
/**
* Maps a Track to the bits that store the status of the two signals that can
* be present on the given track.
*/
static inline byte SignalOnTrack(Track track)
{
extern const byte _signal_on_track[TRACK_END];
return _signal_on_track[track];
}
/**

@ -5,9 +5,10 @@
#ifndef RAIL_MAP_H
#define RAIL_MAP_H
#include "rail_type.h"
#include "signal_func.h"
#include "direction_func.h"
#include "track_func.h"
#include "rail.h"
#include "tile_map.h"

@ -7,6 +7,7 @@
#include "core/bitmath_func.hpp"
#include "road_type.h"
#include "direction_func.h"
/**
* Whether the given roadtype is valid.

@ -5,6 +5,8 @@
#ifndef ROAD_INTERNAL_H
#define ROAD_INTERNAL_H
#include "tile_cmd.h"
/**
* Clean up unneccesary RoadBits of a planed tile.
* @param tile current tile

@ -17,6 +17,7 @@
#include "zoom_func.h"
#include "core/alloc_func.hpp"
#include "core/endian_func.hpp"
#include "map.h"
char _screenshot_format_name[8];
uint _num_screenshot_formats;

@ -0,0 +1,40 @@
/* $Id$ */
/** @file signal_func.h Functions related to signals. */
#ifndef SIGNAL_FUNC_H
#define SIGNAL_FUNC_H
#include "track_type.h"
/**
* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction along with the trackdir.
*/
static inline byte SignalAlongTrackdir(Trackdir trackdir)
{
extern const byte _signal_along_trackdir[TRACKDIR_END];
return _signal_along_trackdir[trackdir];
}
/**
* Maps a trackdir to the bit that stores its status in the map arrays, in the
* direction against the trackdir.
*/
static inline byte SignalAgainstTrackdir(Trackdir trackdir)
{
extern const byte _signal_against_trackdir[TRACKDIR_END];
return _signal_against_trackdir[trackdir];
}
/**
* Maps a Track to the bits that store the status of the two signals that can
* be present on the given track.
*/
static inline byte SignalOnTrack(Track track)
{
extern const byte _signal_on_track[TRACK_END];
return _signal_on_track[track];
}
#endif /* SIGNAL_FUNC_H */

@ -8,6 +8,7 @@
#include "core/math_func.hpp"
#include "slope_type.h"
#include "direction_type.h"
#include "tile_type.h"
/**
* Rangecheck for Corner enumeration.

@ -7,6 +7,7 @@
#include "core/enum_type.hpp"
#include "vehicle_type.h"
#include "tile_type.h"
struct MusicFileSettings {
byte playlist;

@ -8,6 +8,7 @@
#include "rail_map.h"
#include "road_map.h"
#include "station.h"
#include "rail.h"
typedef byte StationGfx;

@ -6,9 +6,11 @@
#define TILE_CMD_H
#include "slope_type.h"
#include "tile_type.h"
#include "command_type.h"
#include "vehicle_type.h"
#include "cargo_type.h"
#include "strings_type.h"
/** The returned bits of VehicleEnterTile. */
enum VehicleEnterTileStatus {
@ -31,6 +33,21 @@ enum VehicleEnterTileStatus {
};
DECLARE_ENUM_AS_BIT_SET(VehicleEnterTileStatus);
struct TileInfo {
uint x;
uint y;
Slope tileh;
TileIndex tile;
uint z;
};
struct TileDesc {
StringID str;
Owner owner;
Date build_date;
uint64 dparam[2];
};
typedef void DrawTileProc(TileInfo *ti);
typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y);
typedef CommandCost ClearTileProc(TileIndex tile, byte flags);

@ -7,11 +7,15 @@
#include "core/enum_type.hpp"
/** Maximum allowed tile height */
#define MAX_TILE_HEIGHT 15
enum {
TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size
TILE_PIXELS = 32, ///< a tile is 32x32 pixels
TILE_HEIGHT = 8, ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
MAX_TILE_HEIGHT = 15, ///< Maximum allowed tile height
MAX_SNOWLINE_HEIGHT = (MAX_TILE_HEIGHT - 2), ///< Maximum allowed snowline height
};
/** Maximum allowed snowline height */
#define MAX_SNOWLINE_HEIGHT (MAX_TILE_HEIGHT - 2)
/**
* The different type of a tile.
@ -51,4 +55,9 @@ enum TropicZone {
*/
typedef uint32 TileIndex;
/**
* The very nice invalid tile marker
*/
static const TileIndex INVALID_TILE = (TileIndex)-1;
#endif /* TILE_TYPE_H */

@ -8,6 +8,7 @@
#include "oldpool.h"
#include "core/random_func.hpp"
#include "cargo_type.h"
#include "tile_type.h"
enum {
HOUSE_NO_CLASS = 0,

@ -7,6 +7,8 @@
#include "yapf/yapf_settings.h"
#include "openttd.h"
#include "tile_type.h"
#include "strings_type.h"
/* ********* START OF SAVE REGION */

@ -10,6 +10,7 @@
#include "rail_type.h"
#include "road_type.h"
#include "cargo_type.h"
#include "direction_type.h"
#include "window_type.h"
#include "gfx_type.h"
#include "command_type.h"

@ -9,6 +9,7 @@
#include "window_type.h"
#include "vehicle_type.h"
#include "gfx_func.h"
#include "gui.h"
struct ViewPort {
int left,top; // screen coordinates for the viewport

@ -10,6 +10,7 @@
#include "map.h"
#include "order.h"
#include "rail_map.h"
#include "rail.h"
#include "bridge_map.h"
#include "saveload.h"
#include "station.h"
@ -27,6 +28,7 @@
#include "viewport.h"
#include "functions.h"
#include "window_func.h"
#include "economy_func.h"
enum {
MAX_WAYPOINTS_PER_TOWN = 64,

Loading…
Cancel
Save