Changeset - r18876:3403b9c464f9
[Not reviewed]
master
! ! !
rubidium - 13 years ago 2012-01-03 20:26:05
rubidium@openttd.org
(svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
71 files changed with 28 insertions and 76 deletions:
0 comments (0 inline, 0 general)
src/ai/ai.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file ai.hpp Base functions for all AIs. */
 

	
 
#ifndef AI_HPP
 
#define AI_HPP
 

	
 
#include "../script/api/script_event_types.hpp"
 
#include "../date_type.h"
 
#include "../core/string_compare_type.hpp"
 
#include <map>
 

	
 
/** A list that maps AI names to their AIInfo object. */
 
typedef std::map<const char *, class ScriptInfo *, StringCompare> ScriptInfoList;
 

	
src/ai/ai_config.hpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file ai_config.hpp AIConfig stores the configuration settings of every AI. */
 

	
 
#ifndef AI_CONFIG_HPP
 
#define AI_CONFIG_HPP
 

	
 
#include "../script/script_config.hpp"
 
#include "../company_type.h"
 

	
 
class AIConfig : public ScriptConfig {
 
public:
 
	/**
 
	 * Get the config of a company.
 
	 */
src/ai/ai_info.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file ai_info.hpp AIInfo keeps track of all information of an AI, like Author, Description, ... */
 

	
 
#ifndef AI_INFO_HPP
 
#define AI_INFO_HPP
 

	
 
#include "../script/script_info.hpp"
 
#include "../script/script_config.hpp"
 

	
 
/** All static information from an AI like name, version, etc. */
 
class AIInfo : public ScriptInfo {
 
public:
 
	AIInfo();
 
	~AIInfo();
src/ai/ai_instance.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file ai_instance.hpp The AIInstance tracks an AI. */
 

	
 
#ifndef AI_INSTANCE_HPP
 
#define AI_INSTANCE_HPP
 

	
 
#include <squirrel.h>
 
#include "../script/script_instance.hpp"
 

	
 
/** Runtime information about an AI like a pointer to the squirrel vm and the current state. */
 
class AIInstance : public ScriptInstance {
 
public:
 
	AIInstance();
src/autoreplace_func.h
Show inline comments
 
@@ -11,14 +11,12 @@
 

	
 
#ifndef AUTOREPLACE_FUNC_H
 
#define AUTOREPLACE_FUNC_H
 

	
 
#include "command_type.h"
 
#include "company_base.h"
 
#include "engine_type.h"
 
#include "group_type.h"
 

	
 
void RemoveAllEngineReplacement(EngineRenewList *erl);
 
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group);
 
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags);
 
CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, GroupID group, DoCommandFlag flags);
 

	
src/autoslope.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef AUTOSLOPE_H
 
#define AUTOSLOPE_H
 

	
 
#include "company_func.h"
 
#include "depot_func.h"
 
#include "slope_func.h"
 
#include "tile_map.h"
 

	
 
/**
 
 * Autoslope check for tiles with an entrance on an edge.
 
 * E.g. depots and non-drive-through-road-stops.
 
 *
src/cmd_helper.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file cmd_helper.h Helper functions to extract data from command parameters. */
 

	
 
#ifndef CMD_HELPER_H
 
#define CMD_HELPER_H
 

	
 
#include "core/enum_type.hpp"
 
#include "core/bitmath_func.hpp"
 

	
 
/**
 
 * Extracts a given type from a value.
 
 * @tparam T The type of data we're looking for.
 
 * @tparam S The offset in the data.
 
 * @tparam N The amount of bits to read.
src/company_base.h
Show inline comments
 
@@ -9,18 +9,15 @@
 

	
 
/** @file company_base.h Definition of stuff that is very close to a company, like the company struct itself. */
 

	
 
#ifndef COMPANY_BASE_H
 
#define COMPANY_BASE_H
 

	
 
#include "core/pool_type.hpp"
 
#include "road_type.h"
 
#include "rail_type.h"
 
#include "livery.h"
 
#include "autoreplace_type.h"
 
#include "economy_type.h"
 
#include "tile_type.h"
 
#include "settings_type.h"
 
#include "group.h"
 

	
 
struct CompanyEconomyEntry {
 
	Money income;
src/company_func.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef COMPANY_FUNC_H
 
#define COMPANY_FUNC_H
 

	
 
#include "command_type.h"
 
#include "company_type.h"
 
#include "tile_type.h"
 
#include "gfx_type.h"
 

	
 
bool MayCompanyTakeOver(CompanyID cbig, CompanyID small);
 
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
 
void GetNameOfOwner(Owner owner, TileIndex tile);
 
void SetLocalCompany(CompanyID new_company);
src/depot_func.h
Show inline comments
 
@@ -9,16 +9,14 @@
 

	
 
/** @file depot_func.h Functions related to depots. */
 

	
 
#ifndef DEPOT_FUNC_H
 
#define DEPOT_FUNC_H
 

	
 
#include "tile_type.h"
 
#include "vehicle_type.h"
 
#include "direction_type.h"
 
#include "slope_type.h"
 
#include "slope_func.h"
 

	
 
void ShowDepotWindow(TileIndex tile, VehicleType type);
 

	
 
void DeleteDepotHighlightOfVehicle(const Vehicle *v);
 

	
 
/**
src/effectvehicle_base.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file effectvehicle_base.h Base class for all effect vehicles. */
 

	
 
#ifndef EFFECTVEHICLE_BASE_H
 
#define EFFECTVEHICLE_BASE_H
 

	
 
#include "vehicle_base.h"
 
#include "transparency.h"
 

	
 
/**
 
 * A special vehicle is one of the following:
 
 *  - smoke
 
 *  - electric sparks for trains
 
 *  - explosions
src/engine_base.h
Show inline comments
 
@@ -9,17 +9,15 @@
 

	
 
/** @file engine_base.h Base class for engines. */
 

	
 
#ifndef ENGINE_BASE_H
 
#define ENGINE_BASE_H
 

	
 
#include "company_type.h"
 
#include "engine_type.h"
 
#include "vehicle_type.h"
 
#include "core/pool_type.hpp"
 
#include "core/smallvec_type.hpp"
 
#include "newgrf_commons.h"
 

	
 
typedef Pool<Engine, EngineID, 64, 64000> EnginePool;
 
extern EnginePool _engine_pool;
 

	
 
struct Engine : EnginePool::PoolItem<&_engine_pool> {
src/engine_gui.h
Show inline comments
 
@@ -12,12 +12,13 @@
 
#ifndef ENGINE_GUI_H
 
#define ENGINE_GUI_H
 

	
 
#include "engine_type.h"
 
#include "sortlist_type.h"
 
#include "gfx_type.h"
 
#include "vehicle_type.h"
 

	
 
typedef GUIList<EngineID, CargoID> GUIEngineList;
 

	
 
typedef int CDECL EngList_SortTypeFunction(const EngineID*, const EngineID*); ///< argument type for #EngList_Sort.
 
void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare);
 
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items);
src/game/game_info.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file game_info.hpp GameInfo keeps track of all information of an Game, like Author, Description, ... */
 

	
 
#ifndef GAME_INFO_HPP
 
#define GAME_INFO_HPP
 

	
 
#include "../script/script_info.hpp"
 
#include "../script/script_config.hpp"
 

	
 
/** All static information from an Game like name, version, etc. */
 
class GameInfo : public ScriptInfo {
 
public:
 
	GameInfo();
 
	~GameInfo();
src/goal_base.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file goal_base.h %Goal base class. */
 

	
 
#ifndef GOAL_BASE_H
 
#define GOAL_BASE_H
 

	
 
#include "cargo_type.h"
 
#include "company_type.h"
 
#include "goal_type.h"
 
#include "core/pool_type.hpp"
 

	
 
typedef Pool<Goal, GoalID, 1, 256> GoalPool;
 
extern GoalPool _goal_pool;
src/goal_type.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file goal_type.h basic types related to goals */
 

	
 
#ifndef GOAL_TYPE_H
 
#define GOAL_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 

	
 
enum {
 
	GOAL_QUESTION_BUTTON_COUNT = 18, ///< Amount of buttons available.
 
};
 

	
 
/** Types of goal destinations */
 
enum GoalType {
src/ground_vehicle.hpp
Show inline comments
 
@@ -13,12 +13,13 @@
 
#define GROUND_VEHICLE_HPP
 

	
 
#include "vehicle_base.h"
 
#include "vehicle_gui.h"
 
#include "landscape.h"
 
#include "window_func.h"
 
#include "widgets/vehicle_widget.h"
 

	
 
/** What is the status of our acceleration? */
 
enum AccelStatus {
 
	AS_ACCEL, ///< We want to go faster, if possible of course.
 
	AS_BRAKE, ///< We want to stop.
 
};
src/gui.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#define GUI_H
 

	
 
#include "vehicle_type.h"
 
#include "gfx_type.h"
 
#include "economy_type.h"
 
#include "tile_type.h"
 
#include "strings_type.h"
 
#include "transport_type.h"
 

	
 
struct Window;
 

	
 
/* main_gui.cpp */
 
void HandleOnEditText(const char *str);
src/house.h
Show inline comments
 
@@ -9,15 +9,13 @@
 

	
 
/** @file house.h definition of HouseSpec and accessors */
 

	
 
#ifndef HOUSE_H
 
#define HOUSE_H
 

	
 
#include "strings_type.h"
 
#include "cargo_type.h"
 
#include "economy_type.h"
 
#include "date_type.h"
 
#include "house_type.h"
 
#include "newgrf_animation_type.h"
 
#include "newgrf_commons.h"
 

	
 
/**
src/industry.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file industry.h Base of all industries. */
 

	
 
#ifndef INDUSTRY_H
 
#define INDUSTRY_H
 

	
 
#include "core/pool_type.hpp"
 
#include "newgrf_storage.h"
 
#include "subsidy_type.h"
 
#include "industry_map.h"
 
#include "tilearea_type.h"
 

	
 

	
src/industrytype.h
Show inline comments
 
@@ -9,18 +9,16 @@
 

	
 
/** @file industrytype.h %Industry type specs. */
 

	
 
#ifndef INDUSTRYTYPE_H
 
#define INDUSTRYTYPE_H
 

	
 
#include "economy_type.h"
 
#include "map_type.h"
 
#include "slope_type.h"
 
#include "industry_type.h"
 
#include "landscape_type.h"
 
#include "strings_type.h"
 
#include "cargo_type.h"
 
#include "newgrf_animation_type.h"
 
#include "newgrf_commons.h"
 

	
 
enum IndustryCleanupType {
 
	CLEAN_RANDOMSOUNDS,    ///< Free the dynamically allocated sounds table
src/landscape.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef LANDSCAPE_H
 
#define LANDSCAPE_H
 

	
 
#include "core/geometry_type.hpp"
 
#include "tile_cmd.h"
 
#include "zoom_type.h"
 

	
 
static const uint SNOW_LINE_MONTHS = 12; ///< Number of months in the snow line table.
 
static const uint SNOW_LINE_DAYS   = 32; ///< Number of days in each month in the snow line table.
 

	
 
/**
 
 * Structure describing the height of the snow line each day of the year
src/newgrf_airport.h
Show inline comments
 
@@ -11,16 +11,14 @@
 

	
 
#ifndef NEWGRF_AIRPORT_H
 
#define NEWGRF_AIRPORT_H
 

	
 
#include "airport.h"
 
#include "date_type.h"
 
#include "map_type.h"
 
#include "newgrf_class.h"
 
#include "newgrf_commons.h"
 
#include "gfx_type.h"
 
#include "tilearea_type.h"
 

	
 
/** Copy from station_map.h */
 
typedef byte StationGfx;
 

	
 
/** Tile-offset / AirportTileID pair. */
src/newgrf_animation_base.h
Show inline comments
 
@@ -14,12 +14,13 @@
 
#include "animated_tile_func.h"
 
#include "core/random_func.hpp"
 
#include "date_func.h"
 
#include "viewport_func.h"
 
#include "newgrf_animation_type.h"
 
#include "newgrf_callbacks.h"
 
#include "tile_map.h"
 

	
 
/**
 
 * Helper class for a unified approach to NewGRF animation.
 
 * @tparam Tbase       Instantiation of this class.
 
 * @tparam Tspec       NewGRF specification related to the animated tile.
 
 * @tparam Tobj        Object related to the animated tile.
src/newgrf_canal.h
Show inline comments
 
@@ -9,15 +9,14 @@
 

	
 
/** @file newgrf_canal.h Handling of NewGRF canals. */
 

	
 
#ifndef NEWGRF_CANAL_H
 
#define NEWGRF_CANAL_H
 

	
 
#include "gfx_type.h"
 
#include "newgrf.h"
 
#include "tile_type.h"
 
#include "newgrf_generic.h"
 

	
 
/** Flags controlling the display of canals. */
 
enum CanalFeatureFlag {
 
	CFF_HAS_FLAT_SPRITE = 0, ///< Additional flat ground sprite in the beginning.
 
};
 

	
src/newgrf_commons.h
Show inline comments
 
@@ -12,13 +12,12 @@
 
 * loading/saving and mapping of grf entities.
 
 */
 

	
 
#ifndef NEWGRF_COMMONS_H
 
#define NEWGRF_COMMONS_H
 

	
 
#include "tile_type.h"
 
#include "sprite.h"
 
#include "core/alloc_type.hpp"
 
#include "core/smallvec_type.hpp"
 
#include "command_type.h"
 
#include "direction_type.h"
 
#include "company_type.h"
src/newgrf_generic.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file newgrf_generic.h Functions related to generic callbacks. */
 

	
 
#ifndef NEWGRF_GENERIC_H
 
#define NEWGRF_GENERIC_H
 

	
 
#include "cargo_type.h"
 
#include "industry_type.h"
 
#include "newgrf.h"
 
#include "tile_type.h"
 

	
 
struct SpriteGroup;
 

	
src/newgrf_industries.h
Show inline comments
 
@@ -9,14 +9,12 @@
 

	
 
/** @file newgrf_industries.h Functions for NewGRF industries. */
 

	
 
#ifndef NEWGRF_INDUSTRIES_H
 
#define NEWGRF_INDUSTRIES_H
 

	
 
#include "command_type.h"
 
#include "company_type.h"
 
#include "newgrf_spritegroup.h"
 

	
 
/** When should the industry(tile) be triggered for random bits? */
 
enum IndustryTrigger {
 
	/** Triggered each tile loop */
 
	INDUSTRY_TRIGGER_TILELOOP_PROCESS = 1,
src/newgrf_industrytiles.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file newgrf_industrytiles.h NewGRF handling of industry tiles. */
 

	
 
#ifndef NEWGRF_INDUSTRYTILES_H
 
#define NEWGRF_INDUSTRYTILES_H
 

	
 
#include "tile_cmd.h"
 
#include "newgrf_animation_type.h"
 
#include "newgrf_industries.h"
 
#include "core/random_func.hpp"
 

	
 
bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds);
 
uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile);
src/newgrf_object.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "newgrf_sound.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_town.h"
 
#include "object_base.h"
 
#include "object_map.h"
 
#include "sprite.h"
 
#include "tile_cmd.h"
 
#include "town.h"
 
#include "viewport_func.h"
 
#include "water.h"
 
#include "newgrf_animation_base.h"
 

	
 
/** The override manager for our objects. */
src/newgrf_object.h
Show inline comments
 
@@ -11,13 +11,13 @@
 

	
 
#ifndef NEWGRF_OBJECT_H
 
#define NEWGRF_OBJECT_H
 

	
 
#include "newgrf_callbacks.h"
 
#include "economy_func.h"
 
#include "tile_cmd.h"
 
#include "date_type.h"
 
#include "object_type.h"
 
#include "newgrf_animation_type.h"
 
#include "newgrf_class.h"
 
#include "newgrf_commons.h"
 

	
 
/** Various object behaviours. */
src/newgrf_spritegroup.h
Show inline comments
 
@@ -10,15 +10,13 @@
 
/** @file newgrf_spritegroup.h Action 2 handling. */
 

	
 
#ifndef NEWGRF_SPRITEGROUP_H
 
#define NEWGRF_SPRITEGROUP_H
 

	
 
#include "town_type.h"
 
#include "gfx_type.h"
 
#include "engine_type.h"
 
#include "core/pool_type.hpp"
 
#include "house_type.h"
 

	
 
#include "newgrf_callbacks.h"
 
#include "newgrf_generic.h"
 
#include "newgrf_storage.h"
 
#include "newgrf_commons.h"
src/newgrf_station.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#define NEWGRF_STATION_H
 

	
 
#include "newgrf_animation_type.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_class.h"
 
#include "newgrf_commons.h"
 
#include "sprite.h"
 
#include "cargo_type.h"
 
#include "station_type.h"
 
#include "rail_type.h"
 

	
 
enum StationClassID {
 
	STAT_CLASS_BEGIN = 0,    ///< the lowest valid value
src/newgrf_storage.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file newgrf_storage.h Functionality related to the temporary and persistent storage arrays for NewGRFs. */
 

	
 
#ifndef NEWGRF_STORAGE_H
 
#define NEWGRF_STORAGE_H
 

	
 
#include "core/alloc_func.hpp"
 
#include "core/pool_type.hpp"
 

	
 
/**
 
 * Base class for all NewGRF storage arrays. Nothing fancy, only here
 
 * so we have a generalised class to use.
 
 */
src/newgrf_town.h
Show inline comments
 
@@ -14,10 +14,10 @@
 

	
 
#include "town_type.h"
 

	
 
/* Currently there is no direct town resolver; we only need to get town
 
 * variable results from inside stations, house tiles and industries,
 
 * and to check the town's persistent storage. */
 
uint32 TownGetVariable(byte variable, uint32 parameter, bool *available, Town *t, const GRFFile *caller_grffile);
 
void TownStorePSA(Town *t, const GRFFile *caller_grffile, uint pos, int32 value);
 
uint32 TownGetVariable(byte variable, uint32 parameter, bool *available, Town *t, const struct GRFFile *caller_grffile);
 
void TownStorePSA(Town *t, const struct GRFFile *caller_grffile, uint pos, int32 value);
 

	
 
#endif /* NEWGRF_TOWN_H */
src/object_base.h
Show inline comments
 
@@ -14,13 +14,12 @@
 

	
 
#include "core/pool_type.hpp"
 
#include "object_type.h"
 
#include "tilearea_type.h"
 
#include "town_type.h"
 
#include "date_type.h"
 
#include "core/smallvec_type.hpp"
 

	
 
typedef Pool<Object, ObjectID, 64, 64000> ObjectPool;
 
extern ObjectPool _object_pool;
 

	
 
/** An object, such as transmitter, on the map. */
 
struct Object : ObjectPool::PoolItem<&_object_pool> {
src/rail.h
Show inline comments
 
@@ -17,13 +17,12 @@
 
#include "gfx_type.h"
 
#include "core/bitmath_func.hpp"
 
#include "economy_func.h"
 
#include "slope_type.h"
 
#include "strings_type.h"
 
#include "date_type.h"
 
#include "core/math_func.hpp"
 

	
 
/** Railtype flags. */
 
enum RailTypeFlags {
 
	RTF_CATENARY          = 0,                           ///< Bit number for drawing a catenary.
 
	RTF_NO_LEVEL_CROSSING = 1,                           ///< Bit number for disallowing level crossings.
 

	
src/road_func.h
Show inline comments
 
@@ -11,15 +11,12 @@
 

	
 
#ifndef ROAD_FUNC_H
 
#define ROAD_FUNC_H
 

	
 
#include "core/bitmath_func.hpp"
 
#include "road_type.h"
 
#include "direction_type.h"
 
#include "company_type.h"
 
#include "tile_type.h"
 
#include "economy_func.h"
 

	
 
/**
 
 * Iterate through each set RoadType in a RoadTypes value.
 
 * For more informations see FOR_EACH_SET_BIT_EX.
 
 *
src/script/api/script_basestation.cpp
Show inline comments
 
@@ -8,12 +8,13 @@
 
 */
 

	
 
/** @file script_basestation.cpp Implementation of ScriptBaseStation. */
 

	
 
#include "../../stdafx.h"
 
#include "script_basestation.hpp"
 
#include "script_error.hpp"
 
#include "../../station_base.h"
 
#include "../../string_func.h"
 
#include "../../strings_func.h"
 
#include "table/strings.h"
 

	
 
/* static */ bool ScriptBaseStation::IsValidBaseStation(StationID station_id)
src/script/api/script_basestation.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_basestation.hpp Base for stations/waypoint handling. */
 

	
 
#ifndef SCRIPT_BASESTATION_HPP
 
#define SCRIPT_BASESTATION_HPP
 

	
 
#include "script_error.hpp"
 
#include "script_text.hpp"
 

	
 
/**
 
 * Base class for stations and waypoints.
 
 * @api ai game
 
 */
src/script/api/script_cargo.hpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef SCRIPT_CARGO_HPP
 
#define SCRIPT_CARGO_HPP
 

	
 
#include "script_object.hpp"
 
#include "../../cargotype.h"
 
#include "../../cargo_type.h"
 

	
 
/**
 
 * Class that handles all cargo related functions.
 
 * @api ai game
 
 */
 
class ScriptCargo : public ScriptObject {
src/script/api/script_company.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_company.hpp Everything to query a company's financials and statistics or build company related buildings. */
 

	
 
#ifndef SCRIPT_COMPANY_HPP
 
#define SCRIPT_COMPANY_HPP
 

	
 
#include "script_object.hpp"
 
#include "script_text.hpp"
 

	
 
/**
 
 * Class that handles all company related functions.
 
 * @api ai game
 
 */
src/script/api/script_controller.hpp
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/** @file script_controller.hpp The controller of the AI. */
 

	
 
#ifndef SCRIPT_CONTROLLER_HPP
 
#define SCRIPT_CONTROLLER_HPP
 

	
 
#include "../../company_type.h"
 
#include "script_types.hpp"
 
#include "../../core/string_compare_type.hpp"
 
#include <map>
 

	
 
/**
 
 * The Controller, the class each Script should extend. It creates the Script,
 
 *  makes sure the logic kicks in correctly, and that GetTick() has a valid
src/script/api/script_event_types.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file script_event_types.hpp The detailed types of all events. */
 

	
 
#ifndef SCRIPT_EVENT_TYPES_HPP
 
#define SCRIPT_EVENT_TYPES_HPP
 

	
 
#include "script_event.hpp"
 
#include "script_company.hpp"
 
#include "script_goal.hpp"
 
#include "script_window.hpp"
 

	
 
/**
 
 * Event Vehicle Crash, indicating a vehicle of yours is crashed.
 
 *  It contains the crash site, the crashed vehicle and the reason for the crash.
src/script/api/script_gamesettings.cpp
Show inline comments
 
@@ -9,12 +9,13 @@
 

	
 
/** @file script_gamesettings.cpp Implementation of ScriptGameSettings. */
 

	
 
#include "../../stdafx.h"
 
#include "script_gamesettings.hpp"
 
#include "../../settings_internal.h"
 
#include "../../settings_type.h"
 
#include "../../command_type.h"
 

	
 
/* static */ bool ScriptGameSettings::IsValid(const char *setting)
 
{
 
	uint i;
 
	const SettingDesc *sd = GetSettingFromName(setting, &i);
src/script/api/script_goal.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_goal.hpp Everything to manipulate the current running goal. */
 

	
 
#ifndef SCRIPT_GOAL_HPP
 
#define SCRIPT_GOAL_HPP
 

	
 
#include "script_object.hpp"
 
#include "script_company.hpp"
 
#include "../../goal_type.h"
 

	
 
/**
 
 * Class that handles some goal related functions.
 
 * @api game
src/script/api/script_infrastructure.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_infrastructure.hpp Everything to query a company's infrastructure. */
 

	
 
#ifndef SCRIPT_INFRASTRUCTURE_HPP
 
#define SCRIPT_INFRASTRUCTURE_HPP
 

	
 
#include "script_object.hpp"
 
#include "script_road.hpp"
 
#include "script_rail.hpp"
 

	
 
/**
 
 * Class that handles all company infrastructure related functions.
 
 * @api ai game
src/script/api/script_news.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file script_news.hpp Everything to handle news messages. */
 

	
 
#ifndef SCRIPT_NEWS_HPP
 
#define SCRIPT_NEWS_HPP
 

	
 
#include "script_company.hpp"
 
#include "script_text.hpp"
 
#include "../../news_type.h"
 

	
 
/**
 
 * Class that handles news messages.
 
 * @api game
 
 */
src/script/api/script_order.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_order.hpp Everything to query and build orders. */
 

	
 
#ifndef SCRIPT_ORDER_HPP
 
#define SCRIPT_ORDER_HPP
 

	
 
#include "script_error.hpp"
 
#include "script_vehicle.hpp"
 
#include "../../order_type.h"
 

	
 
/**
 
 * Class that handles all order related functions.
 
 * @api ai
src/script/api/script_town.hpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef SCRIPT_TOWN_HPP
 
#define SCRIPT_TOWN_HPP
 

	
 
#include "script_cargo.hpp"
 
#include "script_company.hpp"
 
#include "script_text.hpp"
 
#include "../../town_type.h"
 

	
 
/**
 
 * Class that handles all town related functions.
 
 * @api ai game
 
 */
src/script/api/script_viewport.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file script_viewport.hpp Everything to manipulate the users viewport. */
 

	
 
#ifndef SCRIPT_VIEWPORT_HPP
 
#define SCRIPT_VIEWPORT_HPP
 

	
 
#include <string>
 
#include "script_object.hpp"
 

	
 
/**
 
 * Class that manipultes the users viewport.
 
 * @api game
 
 */
src/script/api/script_waypoint.hpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file script_waypoint.hpp Everything to query and build waypoints. */
 

	
 
#ifndef SCRIPT_WAYPOINT_HPP
 
#define SCRIPT_WAYPOINT_HPP
 

	
 
#include "script_basestation.hpp"
 
#include "script_error.hpp"
 
#include "../../station_type.h"
 

	
 
/**
 
 * Class that handles all waypoint related functions.
 
 * @api ai game
 
 */
src/script/script_config.hpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#define SCRIPT_CONFIG_HPP
 

	
 
#include <map>
 
#include <list>
 
#include "../core/smallmap_type.hpp"
 
#include "../core/string_compare_type.hpp"
 
#include "../company_type.h"
 

	
 
/** Bitmask of flags for Script settings. */
 
enum ScriptConfigFlags {
 
	SCRIPTCONFIG_NONE      = 0x0, ///< No flags set.
 
	SCRIPTCONFIG_RANDOM    = 0x1, ///< When randomizing the Script, pick any value between min_value and max_value when on custom difficulty setting.
 
	SCRIPTCONFIG_BOOLEAN   = 0x2, ///< This value is a boolean (either 0 (false) or 1 (true) ).
src/script/script_instance.hpp
Show inline comments
 
@@ -13,12 +13,13 @@
 
#define SCRIPT_INSTANCE_HPP
 

	
 
#include <squirrel.h>
 
#include "script_suspend.hpp"
 

	
 
#include "../command_type.h"
 
#include "../company_type.h"
 

	
 
static const uint SQUIRREL_MAX_DEPTH = 25; ///< The maximum recursive depth for items stored in the savegame.
 

	
 
/** Runtime information about a script like a pointer to the squirrel vm and the current state. */
 
class ScriptInstance {
 
public:
src/script/squirrel_helper.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file squirrel_helper.hpp declarations and parts of the implementation of the class for convert code */
 

	
 
#ifndef SQUIRREL_HELPER_HPP
 
#define SQUIRREL_HELPER_HPP
 

	
 
#include "squirrel.hpp"
 
#include "../core/math_func.hpp"
 
#include "../core/smallvec_type.hpp"
 
#include "../economy_type.h"
 
#include "../string_func.h"
 
#include "squirrel_helper_type.hpp"
 

	
 
template <class CL, ScriptType ST> const char *GetClassName();
src/settings_internal.h
Show inline comments
 
@@ -10,14 +10,12 @@
 
/** @file settings_internal.h Functions and types used internally for the settings configurations. */
 

	
 
#ifndef SETTINGS_INTERNAL_H
 
#define SETTINGS_INTERNAL_H
 

	
 
#include "saveload/saveload.h"
 
#include "settings_type.h"
 
#include "strings_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
src/station_base.h
Show inline comments
 
@@ -14,13 +14,12 @@
 

	
 
#include "base_station_base.h"
 
#include "newgrf_airport.h"
 
#include "cargopacket.h"
 
#include "industry_type.h"
 
#include "newgrf_storage.h"
 
#include "town.h"
 

	
 
typedef Pool<BaseStation, StationID, 32, 64000> StationPool;
 
extern StationPool _station_pool;
 

	
 
static const byte INITIAL_STATION_RATING = 175;
 

	
src/station_cmd.cpp
Show inline comments
 
@@ -49,12 +49,13 @@
 
#include "company_base.h"
 
#include "table/airporttile_ids.h"
 
#include "newgrf_airporttiles.h"
 
#include "order_backup.h"
 
#include "newgrf_house.h"
 
#include "company_gui.h"
 
#include "widgets/station_widget.h"
 

	
 
#include "table/strings.h"
 

	
 
/**
 
 * Check whether the given tile is a hangar.
 
 * @param t the tile to of whether it is a hangar.
src/station_func.h
Show inline comments
 
@@ -9,18 +9,15 @@
 

	
 
/** @file station_func.h Functions related to stations. */
 

	
 
#ifndef STATION_FUNC_H
 
#define STATION_FUNC_H
 

	
 
#include "station_type.h"
 
#include "sprite.h"
 
#include "rail_type.h"
 
#include "road_type.h"
 
#include "cargo_type.h"
 
#include "company_type.h"
 
#include "economy_func.h"
 

	
 
void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius);
 

	
 
void FindStationsAroundTiles(const TileArea &location, StationList *stations);
 

	
src/station_gui.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#define STATION_GUI_H
 

	
 
#include "command_type.h"
 
#include "tilearea_type.h"
 
#include "window_type.h"
 

	
 
#include "widgets/station_widget.h"
 

	
 
/** Types of cargo to display for station coverage. */
 
enum StationCoverageType {
 
	SCT_PASSENGERS_ONLY,     ///< Draw only passenger class cargoes.
 
	SCT_NON_PASSENGERS_ONLY, ///< Draw all non-passenger class cargoes.
 
	SCT_ALL,                 ///< Draw all cargoes.
src/strgen/strgen.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file strgen.h Structures related to strgen. */
 

	
 
#ifndef STRGEN_H
 
#define STRGEN_H
 

	
 
#include "../language.h"
 

	
 
/** Container for the different cases of a string. */
 
struct Case {
 
	int caseidx;  ///< The index of the case.
 
	char *string; ///< The translation of the case.
 
	Case *next;   ///< The next, chained, case.
 

	
src/tar_type.h
Show inline comments
 
@@ -12,12 +12,14 @@
 
#ifndef TAR_TYPE_H
 
#define TAR_TYPE_H
 

	
 
#include <map>
 
#include <string>
 

	
 
#include "fileio_type.h"
 

	
 
/** The define of a TarList. */
 
struct TarListEntry {
 
	const char *filename;
 
	const char *dirname;
 

	
 
	/* MSVC goes copying around this struct after initialisation, so it tries
src/textbuf_gui.h
Show inline comments
 
@@ -12,13 +12,12 @@
 
#ifndef TEXTBUF_GUI_H
 
#define TEXTBUF_GUI_H
 

	
 
#include "window_type.h"
 
#include "string_type.h"
 
#include "strings_type.h"
 
#include "core/enum_type.hpp"
 

	
 
/** Helper/buffer for input fields. */
 
struct Textbuf {
 
	char *buf;                ///< buffer in which text is saved
 
	uint16 max_bytes;         ///< the maximum size of the buffer in bytes (including terminating '\0')
 
	uint16 max_chars;         ///< the maximum size of the buffer in characters (including terminating '\0')
src/tilematrix_type.hpp
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/** @file tilematrix_type.hpp Template for storing a value per area of the map. */
 

	
 
#ifndef TILEMATRIX_TYPE_HPP
 
#define TILEMATRIX_TYPE_HPP
 

	
 
#include "core/mem_func.hpp"
 
#include "core/alloc_func.hpp"
 
#include "tilearea_type.h"
 

	
 
/**
 
 * A simple matrix that stores one value per N*N square of the map.
 
 * Storage is only allocated for the part of the map that has values
 
 * assigned.
src/town.h
Show inline comments
 
@@ -9,15 +9,13 @@
 

	
 
/** @file town.h Base of the town class. */
 

	
 
#ifndef TOWN_H
 
#define TOWN_H
 

	
 
#include "core/pool_type.hpp"
 
#include "viewport_type.h"
 
#include "command_type.h"
 
#include "town_map.h"
 
#include "subsidy_type.h"
 
#include "newgrf_storage.h"
 
#include "cargotype.h"
 
#include "tilematrix_type.hpp"
 
#include <list>
src/vehicle_func.h
Show inline comments
 
@@ -18,13 +18,12 @@
 
#include "vehicle_type.h"
 
#include "engine_type.h"
 
#include "transport_type.h"
 
#include "newgrf_config.h"
 
#include "track_type.h"
 
#include "livery.h"
 
#include "cargotype.h"
 

	
 
#define is_custom_sprite(x) (x >= 0xFD)
 
#define IS_CUSTOM_FIRSTHEAD_SPRITE(x) (x == 0xFD)
 
#define IS_CUSTOM_SECONDHEAD_SPRITE(x) (x == 0xFE)
 

	
 
static const int VEHICLE_PROFIT_MIN_AGE = DAYS_IN_YEAR * 2; ///< Only vehicles older than this have a meaningful profit.
src/vehicle_gui.h
Show inline comments
 
@@ -15,13 +15,12 @@
 
#include "window_type.h"
 
#include "vehicle_type.h"
 
#include "order_type.h"
 
#include "station_type.h"
 
#include "engine_type.h"
 
#include "company_type.h"
 
#include "widgets/vehicle_widget.h"
 

	
 
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit = false);
 

	
 
/** The tabs in the train details window */
 
enum TrainDetailsWindowTabs {
 
	TDW_TAB_CARGO = 0, ///< Tab with cargo carried by the vehicles
src/water.h
Show inline comments
 
@@ -9,18 +9,14 @@
 

	
 
/** @file water.h Functions related to water (management) */
 

	
 
#ifndef WATER_H
 
#define WATER_H
 

	
 
#include "tile_type.h"
 
#include "company_type.h"
 
#include "slope_type.h"
 
#include "water_map.h"
 
#include "economy_func.h"
 
#include "core/math_func.hpp"
 

	
 
/**
 
 * Describes the behaviour of a tile during flooding.
 
 */
 
enum FloodingBehaviour {
 
	FLOOD_NONE,    ///< The tile does not flood neighboured tiles.
src/water_cmd.cpp
Show inline comments
 
@@ -35,12 +35,13 @@
 
#include "game/game.hpp"
 
#include "core/random_func.hpp"
 
#include "core/backup_type.hpp"
 
#include "date_func.h"
 
#include "company_base.h"
 
#include "company_gui.h"
 
#include "newgrf_generic.h"
 

	
 
#include "table/strings.h"
 

	
 
/**
 
 * Describes from which directions a specific slope can be flooded (if the tile is floodable at all).
 
 */
src/widgets/ai_widget.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file ai_widget.h Types related to the ai widgets. */
 

	
 
#ifndef WIDGETS_AI_WIDGET_H
 
#define WIDGETS_AI_WIDGET_H
 

	
 
#include "../company_type.h"
 

	
 
/** Widgets of the #AIListWindow class. */
 
enum AIListWidgets {
 
	WID_AIL_CAPTION,   ///< Caption of the window.
 
	WID_AIL_LIST,      ///< The matrix with all available AIs.
 
	WID_AIL_SCROLLBAR, ///< Scrollbar next to the AI list.
 
	WID_AIL_INFO_BG,   ///< Panel to draw some AI information on.
src/widgets/graph_widget.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file graph_widget.h Types related to the graph widgets. */
 

	
 
#ifndef WIDGETS_GRAPH_WIDGET_H
 
#define WIDGETS_GRAPH_WIDGET_H
 

	
 
#include "../economy_type.h"
 
#include "../company_type.h"
 

	
 
/** Widgets of the #GraphLegendWindow class. */
 
enum GraphLegendWidgets {
 
	WID_GL_BACKGROUND,    ///< Background of the window.
 

	
 
	WID_GL_FIRST_COMPANY, ///< First company in the legend.
0 comments (0 inline, 0 general)