Changeset - r14248:a9050881acd7
[Not reviewed]
master
! ! !
rubidium - 14 years ago 2010-01-15 16:41:15
rubidium@openttd.org
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
295 files changed with 308 insertions and 351 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_config.hpp
Show inline comments
 
@@ -12,12 +12,13 @@
 
#ifndef AI_CONFIG_HPP
 
#define AI_CONFIG_HPP
 

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

	
 
class AIConfig {
 
private:
 
	typedef std::map<const char *, int, StringCompare> SettingValueList;
 

	
 
public:
src/ai/ai_core.cpp
Show inline comments
 
@@ -14,13 +14,12 @@
 
#include "../company_base.h"
 
#include "../company_func.h"
 
#include "../debug.h"
 
#include "../network/network.h"
 
#include "../window_func.h"
 
#include "../command_func.h"
 
#include "ai.hpp"
 
#include "ai_scanner.hpp"
 
#include "ai_instance.hpp"
 
#include "ai_config.hpp"
 
#include "api/ai_error.hpp"
 

	
 
/* static */ uint AI::frame_counter = 0;
src/ai/ai_gui.hpp
Show inline comments
 
@@ -9,10 +9,12 @@
 

	
 
/** @file ai_gui.hpp Window for configuring the AIs  */
 

	
 
#ifndef AI_GUI_HPP
 
#define AI_GUI_HPP
 

	
 
#include "../company_type.h"
 

	
 
void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY);
 
void ShowAIConfigWindow();
 

	
 
#endif /* AI_GUI_HPP */
src/ai/ai_info.cpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#include "../stdafx.h"
 

	
 
#include <squirrel.h>
 
#include "../script/squirrel.hpp"
 
#include "../script/squirrel_helper.hpp"
 
#include "ai.hpp"
 
#include "ai_info.hpp"
 
#include "ai_scanner.hpp"
 
#include "../settings_type.h"
 
#include "../openttd.h"
 
#include "../debug.h"
 
#include "../rev.h"
src/ai/ai_instance.cpp
Show inline comments
 
@@ -8,16 +8,14 @@
 
 */
 

	
 
/** @file ai_instance.cpp Implementation of AIInstance. */
 

	
 
#include "../stdafx.h"
 
#include "../debug.h"
 
#include "../vehicle_base.h"
 
#include "../saveload/saveload.h"
 
#include "../gui.h"
 
#include "table/strings.h"
 

	
 
#include <squirrel.h>
 
#include "../script/squirrel.hpp"
 
#include "../script/squirrel_helper.hpp"
 
#include "../script/squirrel_class.hpp"
 

	
 
@@ -76,12 +74,13 @@
 
#include "api/ai_tunnel.hpp.sq"
 
#include "api/ai_vehicle.hpp.sq"
 
#include "api/ai_vehiclelist.hpp.sq"
 
#include "api/ai_waypoint.hpp.sq"
 
#include "api/ai_waypointlist.hpp.sq"
 

	
 
#include "../company_base.h"
 
#include "../fileio_func.h"
 

	
 
AIStorage::~AIStorage()
 
{
 
	/* Free our pointers */
 
	if (event_data != NULL) AIEventController::FreeEventPointer();
src/ai/ai_instance.hpp
Show inline comments
 
@@ -9,12 +9,14 @@
 

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

	
 
#ifndef AI_INSTANCE_HPP
 
#define AI_INSTANCE_HPP
 

	
 
#include <squirrel.h>
 

	
 
/**
 
 * The callback function when an AI suspends.
 
 */
 
typedef void (AISuspendCallbackProc)(class AIInstance *instance);
 

	
 
/**
src/ai/ai_scanner.cpp
Show inline comments
 
@@ -16,13 +16,12 @@
 
#include "../core/random_func.hpp"
 

	
 
#include <squirrel.h>
 
#include "../script/squirrel.hpp"
 
#include "../script/squirrel_helper.hpp"
 
#include "../script/squirrel_class.hpp"
 
#include "ai.hpp"
 
#include "ai_info.hpp"
 
#include "ai_scanner.hpp"
 
#include "api/ai_controller.hpp"
 

	
 
void AIScanner::RescanAIDir()
 
{
src/ai/ai_scanner.hpp
Show inline comments
 
@@ -9,14 +9,16 @@
 

	
 
/** @file ai_scanner.hpp declarations of the class for AI scanner */
 

	
 
#ifndef AI_SCANNER_HPP
 
#define AI_SCANNER_HPP
 

	
 
#include <squirrel.h>
 
#include "../script/script_scanner.hpp"
 
#include "../core/string_compare_type.hpp"
 
#include "ai.hpp"
 
#include <map>
 

	
 
class AIScanner : public ScriptScanner {
 
public:
 
	AIScanner();
 
	~AIScanner();
src/ai/ai_storage.hpp
Show inline comments
 
@@ -16,14 +16,16 @@
 
#include "../map_func.h"
 
#include "../network/network.h"
 
#include "../company_func.h"
 
#include "../signs_func.h"
 
#include "../tunnelbridge.h"
 
#include "../vehicle_func.h"
 
#include "../road_type.h"
 
#include "../group.h"
 

	
 
#include "table/strings.h"
 
#include <vector>
 

	
 
/**
 
 * The callback function for Mode-classes.
 
 */
 
typedef bool (AIModeProc)();
src/ai/api/ai_abstractlist.cpp
Show inline comments
 
@@ -6,13 +6,12 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_abstractlist.cpp Implementation of AIAbstractList. */
 

	
 
#include <squirrel.h>
 
#include "ai_abstractlist.hpp"
 
#include "../../debug.h"
 
#include "../../script/squirrel.hpp"
 

	
 
/**
 
 * Base class for any AIAbstractList sorter.
src/ai/api/ai_controller.cpp
Show inline comments
 
@@ -10,15 +10,13 @@
 
/** @file ai_controller.cpp Implementation of AIControler. */
 

	
 
#include "../../stdafx.h"
 
#include "../../string_func.h"
 
#include "../../company_base.h"
 
#include "../../rev.h"
 
#include "table/strings.h"
 

	
 
#include "../ai.hpp"
 
#include "ai_controller.hpp"
 
#include "../ai_storage.hpp"
 
#include "../ai_instance.hpp"
 
#include "../ai_config.hpp"
 
#include "ai_log.hpp"
 

	
src/ai/api/ai_engine.cpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#include "ai_engine.hpp"
 
#include "ai_cargo.hpp"
 
#include "../../company_func.h"
 
#include "../../company_base.h"
 
#include "../../strings_func.h"
 
#include "../../settings_type.h"
 
#include "../../rail.h"
 
#include "../../engine_base.h"
 
#include "../../articulated_vehicles.h"
 
#include "table/strings.h"
 

	
 
/* static */ bool AIEngine::IsValidEngine(EngineID engine_id)
src/ai/api/ai_execmode.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_execmode.cpp Implementation of AIExecMode. */
 

	
 
#include "ai_execmode.hpp"
 
#include "../../command_type.h"
 
#include "../../company_base.h"
 
#include "../../company_func.h"
 
#include "../ai_instance.hpp"
 

	
 
bool AIExecMode::ModeProc()
 
{
src/ai/api/ai_group.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "ai_engine.hpp"
 
#include "../ai_instance.hpp"
 
#include "../../company_func.h"
 
#include "../../group.h"
 
#include "../../string_func.h"
 
#include "../../strings_func.h"
 
#include "../../command_func.h"
 
#include "../../autoreplace_func.h"
 
#include "../../settings_func.h"
 
#include "table/strings.h"
 

	
 
/* static */ bool AIGroup::IsValidGroup(GroupID group_id)
 
{
src/ai/api/ai_industrytype.cpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#include "ai_industrytype.hpp"
 
#include "ai_map.hpp"
 
#include "../../command_type.h"
 
#include "../../strings_func.h"
 
#include "../../industry.h"
 
#include "../../core/random_func.hpp"
 

	
 
/* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type)
 
{
 
	if (industry_type >= NUM_INDUSTRYTYPES) return false;
 

	
 
	return ::GetIndustrySpec(industry_type)->enabled;
src/ai/api/ai_list.cpp
Show inline comments
 
@@ -6,13 +6,12 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_list.cpp Implementation of AIList. */
 

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

	
 
void AIList::AddItem(int32 item, int32 value)
 
{
 
	AIAbstractList::AddItem(item);
 
	this->SetValue(item, value);
src/ai/api/ai_map.cpp
Show inline comments
 
@@ -6,13 +6,12 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_map.cpp Implementation of AIMap. */
 

	
 
#include "../../stdafx.h"
 
#include "ai_map.hpp"
 
#include "../../tile_map.h"
 

	
 
/* static */ bool AIMap::IsValidTile(TileIndex t)
 
{
 
	return ::IsValidTile(t);
src/ai/api/ai_object.cpp
Show inline comments
 
@@ -11,14 +11,12 @@
 

	
 
#include "../../stdafx.h"
 
#include <squirrel.h>
 
#include "../../script/squirrel.hpp"
 
#include "../../company_base.h"
 

	
 
#include "table/strings.h"
 
#include "../ai.hpp"
 
#include "../ai_storage.hpp"
 
#include "../ai_instance.hpp"
 
#include "ai_error.hpp"
 

	
 
static AIStorage *GetStorage()
 
{
src/ai/api/ai_rail.cpp
Show inline comments
 
@@ -13,12 +13,13 @@
 
#include "ai_map.hpp"
 
#include "ai_station.hpp"
 
#include "../../command_type.h"
 
#include "../../debug.h"
 
#include "../../station_base.h"
 
#include "../../company_func.h"
 
#include "../../newgrf.h"
 
#include "../../newgrf_generic.h"
 
#include "../../newgrf_station.h"
 

	
 
/* static */ bool AIRail::IsRailTile(TileIndex tile)
 
{
 
	if (!::IsValidTile(tile)) return false;
src/ai/api/ai_road.cpp
Show inline comments
 
@@ -6,13 +6,12 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_road.cpp Implementation of AIRoad. */
 

	
 
#include "../../stdafx.h"
 
#include "ai_map.hpp"
 
#include "ai_station.hpp"
 
#include "ai_cargo.hpp"
 
#include "../../station_base.h"
 
#include "../../command_type.h"
 
#include "../../company_func.h"
src/ai/api/ai_station.cpp
Show inline comments
 
@@ -6,13 +6,12 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_station.cpp Implementation of AIStation. */
 

	
 
#include "../../stdafx.h"
 
#include "ai_station.hpp"
 
#include "ai_cargo.hpp"
 
#include "ai_map.hpp"
 
#include "ai_town.hpp"
 
#include "../../debug.h"
 
#include "../../station_base.h"
src/ai/api/ai_testmode.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_testmode.cpp Implementation of AITestMode. */
 

	
 
#include "ai_testmode.hpp"
 
#include "../../command_type.h"
 
#include "../../company_base.h"
 
#include "../../company_func.h"
 
#include "../ai_instance.hpp"
 

	
 
bool AITestMode::ModeProc()
 
{
src/ai/api/ai_tile.cpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#include "ai_tile.hpp"
 
#include "ai_map.hpp"
 
#include "ai_town.hpp"
 
#include "../../station_func.h"
 
#include "../../company_func.h"
 
#include "../../road_map.h"
 
#include "../../water_map.h"
 
#include "../../clear_map.h"
 
#include "../../tree_map.h"
 
#include "../../town.h"
 
#include "../../landscape.h"
 

	
src/ai/api/ai_vehicle.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "../../string_func.h"
 
#include "../../strings_func.h"
 
#include "../../command_func.h"
 
#include "../../roadveh.h"
 
#include "../../train.h"
 
#include "../../vehicle_func.h"
 
#include "../../engine_base.h"
 
#include "table/strings.h"
 

	
 
/* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
 
{
 
	const Vehicle *v = ::Vehicle::GetIfValid(vehicle_id);
 
	return v != NULL && v->owner == _current_company && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()));
src/aircraft.h
Show inline comments
 
@@ -11,14 +11,12 @@
 

	
 
#ifndef AIRCRAFT_H
 
#define AIRCRAFT_H
 

	
 
#include "station_map.h"
 
#include "vehicle_base.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 

	
 
struct Aircraft;
 

	
 
/** An aircraft can be one ot those types */
 
enum AircraftSubType {
 
	AIR_HELICOPTER = 0, ///< an helicopter
src/aircraft_cmd.cpp
Show inline comments
 
@@ -24,20 +24,21 @@
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "functions.h"
 
#include "cheat_type.h"
 
#include "autoreplace_func.h"
 
#include "company_base.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "ai/ai.hpp"
 
#include "company_func.h"
 
#include "effectvehicle_func.h"
 
#include "station_base.h"
 
#include "cargotype.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "core/random_func.hpp"
 

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

	
 
void Aircraft::UpdateDeltaXY(Direction direction)
 
{
src/aircraft_gui.cpp
Show inline comments
 
@@ -12,13 +12,12 @@
 
#include "stdafx.h"
 
#include "aircraft.h"
 
#include "vehicle_gui.h"
 
#include "newgrf_engine.h"
 
#include "strings_func.h"
 
#include "vehicle_func.h"
 
#include "gfx_func.h"
 
#include "window_gui.h"
 
#include "spritecache.h"
 

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

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

	
 
#ifndef AIRPORT_H
 
#define AIRPORT_H
 

	
 
#include "direction_type.h"
 
#include "map_type.h"
 
#include "tile_type.h"
 
#include "date_type.h"
 

	
 
/** Current limits for airports */
 
enum {
 
	MAX_TERMINALS =  10, ///< maximum number of terminals per airport
 
	MAX_HELIPADS  =   4, ///< maximum number of helipads per airport
src/airport_gui.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "strings_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "tilehighlight_func.h"
 
#include "company_base.h"
 
#include "station_type.h"
 

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

	
 
static byte _selected_airport_type;
 

	
src/articulated_vehicles.cpp
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#include "stdafx.h"
 
#include "train.h"
 
#include "roadveh.h"
 
#include "newgrf_engine.h"
 
#include "vehicle_func.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 

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

	
 
static const uint MAX_ARTICULATED_PARTS = 100; ///< Maximum of articulated parts per vehicle, i.e. when to abort calling the articulated vehicle callback.
 

	
src/autoreplace_base.h
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#ifndef AUTOREPLACE_BASE_H
 
#define AUTOREPLACE_BASE_H
 

	
 
#include "core/pool_type.hpp"
 
#include "autoreplace_type.h"
 
#include "engine_type.h"
 
#include "group_type.h"
 

	
 
typedef uint16 EngineRenewID;
 

	
 
/**
 
 * Memory pool for engine renew elements. DO NOT USE outside of engine.c. Is
 
 * placed here so the only exception to this rule, the saveload code, can use
src/autoreplace_cmd.cpp
Show inline comments
 
@@ -17,12 +17,13 @@
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "vehicle_func.h"
 
#include "functions.h"
 
#include "autoreplace_func.h"
 
#include "articulated_vehicles.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
extern void ChangeVehicleViewports(VehicleID from_index, VehicleID to_index);
 
extern void ChangeVehicleNews(VehicleID from_index, VehicleID to_index);
 
extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index);
src/autoreplace_func.h
Show inline comments
 
@@ -9,14 +9,16 @@
 

	
 
/** @file autoreplace_func.h Functions related to autoreplacing. */
 

	
 
#ifndef AUTOREPLACE_FUNC_H
 
#define AUTOREPLACE_FUNC_H
 

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

	
 
/**
 
 * Remove all engine replacement settings for the company.
 
 * @param  erl The renewlist for a given company.
 
 * @return The new renewlist for the company.
 
 */
src/autoreplace_gui.cpp
Show inline comments
 
@@ -15,19 +15,19 @@
 
#include "newgrf_engine.h"
 
#include "group.h"
 
#include "rail.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "autoreplace_func.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "engine_base.h"
 
#include "window_gui.h"
 
#include "engine_gui.h"
 
#include "settings_func.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
uint GetEngineListHeight(VehicleType type);
 
void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count, GroupID selected_group);
 

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

	
 
/** @file autoreplace_gui.h Functions related to the autoreplace GUIs*/
 

	
 
#ifndef AUTOREPLACE_GUI_H
 
#define AUTOREPLACE_GUI_H
 

	
 
#include "engine_type.h"
 
#include "group_type.h"
 
#include "vehicle_type.h"
 

	
 
/**
 
 * When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
 
 * @param type The type of engine
 
 */
src/autoslope.h
Show inline comments
 
@@ -9,16 +9,17 @@
 

	
 
/** @file autoslope.h Functions related to autoslope. */
 

	
 
#ifndef AUTOSLOPE_H
 
#define AUTOSLOPE_H
 

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

	
 
/**
 
 * Autoslope check for tiles with an entrance on an edge.
 
 * E.g. depots and non-drive-through-road-stops.
 
 *
 
 * The test succeeds if the slope is not steep and at least one corner of the entrance edge is on the TileMaxZ() level.
src/base_media_func.h
Show inline comments
 
@@ -7,14 +7,15 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file base_media_func.h Generic function implementations for base data (graphics, sounds). */
 

	
 
#include "base_media_base.h"
 
#include "debug.h"
 
#include "ini_type.h"
 
#include "string_func.h"
 
#include "ini_type.h"
 

	
 
template <class Tbase_set> /* static */ const char *BaseMedia<Tbase_set>::ini_set;
 
template <class Tbase_set> /* static */ const Tbase_set *BaseMedia<Tbase_set>::used_set;
 
template <class Tbase_set> /* static */ Tbase_set *BaseMedia<Tbase_set>::available_sets;
 

	
 
/**
src/base_station_base.h
Show inline comments
 
@@ -9,18 +9,13 @@
 

	
 
/** @file base_station_base.h Base classes/functions for base stations. */
 

	
 
#ifndef BASE_STATION_BASE_H
 
#define BASE_STATION_BASE_H
 

	
 
#include "station_type.h"
 
#include "core/pool_type.hpp"
 
#include "town_type.h"
 
#include "strings_type.h"
 
#include "date_type.h"
 
#include "company_type.h"
 
#include "viewport_type.h"
 
#include "station_map.h"
 

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

	
src/blitter/32bpp_anim.cpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
 */
 

	
 
/** @file 32bpp_anim.cpp Implementation of the optimized 32 bpp blitter with animation support. */
 

	
 
#include "../stdafx.h"
 
#include "../core/math_func.hpp"
 
#include "../gfx_func.h"
 
#include "../video/video_driver.hpp"
 
#include "32bpp_anim.hpp"
 

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

	
 
static FBlitter_32bppAnim iFBlitter_32bppAnim;
src/blitter/32bpp_anim.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file 32bpp_anim.hpp A 32 bpp blitter with animation support. */
 

	
 
#ifndef BLITTER_32BPP_ANIM_HPP
 
#define BLITTER_32BPP_ANIM_HPP
 

	
 
#include "32bpp_optimized.hpp"
 
#include "factory.hpp"
 

	
 
class Blitter_32bppAnim : public Blitter_32bppOptimized {
 
private:
 
	uint8 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
 
	int anim_buf_width;
 
	int anim_buf_height;
src/blitter/32bpp_base.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file 32bpp_base.cpp Implementation of base for 32 bpp blitters. */
 

	
 
#include "../stdafx.h"
 
#include "../gfx_func.h"
 
#include "32bpp_base.hpp"
 

	
 
void *Blitter_32bppBase::MoveTo(const void *video, int x, int y)
 
{
 
	return (uint32 *)video + x + y * _screen.pitch;
 
}
src/blitter/32bpp_base.hpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef BLITTER_32BPP_BASE_HPP
 
#define BLITTER_32BPP_BASE_HPP
 

	
 
#include "base.hpp"
 
#include "../core/bitmath_func.hpp"
 
#include "../gfx_func.h"
 

	
 
class Blitter_32bppBase : public Blitter {
 
public:
 
	/* virtual */ uint8 GetScreenDepth() { return 32; }
 
//	/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
 
//	/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
src/blitter/32bpp_optimized.cpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
 */
 

	
 
/** @file 32bpp_optimized.cpp Implementation of the optimized 32 bpp blitter. */
 

	
 
#include "../stdafx.h"
 
#include "../zoom_func.h"
 
#include "../gfx_func.h"
 
#include "../core/math_func.hpp"
 
#include "32bpp_optimized.hpp"
 

	
 
static FBlitter_32bppOptimized iFBlitter_32bppOptimized;
 

	
 
/**
src/blitter/32bpp_simple.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */
 

	
 
#include "../stdafx.h"
 
#include "../gfx_func.h"
 
#include "../zoom_func.h"
 
#include "32bpp_simple.hpp"
 

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

	
 
static FBlitter_32bppSimple iFBlitter_32bppSimple;
src/blitter/base.hpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef BLITTER_BASE_HPP
 
#define BLITTER_BASE_HPP
 

	
 
#include "../spritecache.h"
 
#include "../spriteloader/spriteloader.hpp"
 
#include "../zoom_type.h"
 

	
 
enum BlitterMode {
 
	BM_NORMAL,
 
	BM_COLOUR_REMAP,
 
	BM_TRANSPARENT,
 
};
src/bridge.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file bridge.h Header file for bridges */
 

	
 
#ifndef BRIDGE_H
 
#define BRIDGE_H
 

	
 
#include "gfx_type.h"
 
#include "direction_type.h"
 
#include "tile_cmd.h"
 

	
 
/** This enum is related to the definition of bridge pieces,
 
 * which is used to determine the proper sprite table to use
 
 * while drawing a given bridge part.
 
 */
src/bridge_gui.cpp
Show inline comments
 
@@ -8,23 +8,23 @@
 
 */
 

	
 
/** @file bridge_gui.cpp Graphical user interface for bridge construction */
 

	
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "command_func.h"
 
#include "economy_func.h"
 
#include "bridge.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "sound_func.h"
 
#include "gfx_func.h"
 
#include "tunnelbridge.h"
 
#include "sortlist_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
/** The type of the last built rail bridge */
 
static BridgeType _last_railbridge_type = 0;
 
/** The type of the last built road bridge */
src/bridge_map.h
Show inline comments
 
@@ -9,15 +9,12 @@
 

	
 
/** @file bridge_map.h Map accessor functions for bridges. */
 

	
 
#ifndef BRIDGE_MAP_H
 
#define BRIDGE_MAP_H
 

	
 
#include "direction_func.h"
 
#include "rail_type.h"
 
#include "transport_type.h"
 
#include "road_map.h"
 
#include "bridge.h"
 

	
 
/**
 
 * Checks if this is a bridge, instead of a tunnel
 
 * @param t The tile to analyze
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -6,16 +6,15 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file build_vehicle_gui.cpp GUI for building vehicles. */
 

	
 
#include "train.h"
 
#include "roadveh.h"
 
#include "ship.h"
 
#include "aircraft.h"
 
#include "stdafx.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "station_base.h"
 
#include "articulated_vehicles.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "company_func.h"
 
#include "vehicle_gui.h"
 
@@ -23,15 +22,13 @@
 
#include "newgrf_text.h"
 
#include "group.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "gfx_func.h"
 
#include "widgets/dropdown_func.h"
 
#include "window_gui.h"
 
#include "engine_gui.h"
 
#include "cargotype.h"
 

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

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

	
 
#ifndef CARGOPACKET_H
 
#define CARGOPACKET_H
 

	
 
#include "core/pool_type.hpp"
 
#include "economy_type.h"
 
#include "tile_type.h"
 
#include "station_type.h"
 
#include "cargo_type.h"
 
#include "vehicle_type.h"
 
#include <list>
 

	
 
/** Unique identifier for a single cargo packet. */
src/clear_cmd.cpp
Show inline comments
 
@@ -18,12 +18,13 @@
 
#include "genworld.h"
 
#include "landscape_type.h"
 
#include "functions.h"
 
#include "economy_func.h"
 
#include "viewport_func.h"
 
#include "water.h"
 
#include "core/random_func.hpp"
 

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

	
 
static CommandCost ClearTile_Clear(TileIndex tile, DoCommandFlag flags)
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 "company_type.h"
 
#include "core/pool_type.hpp"
 
#include "road_type.h"
 
#include "rail_type.h"
 
#include "date_type.h"
 
#include "engine_type.h"
 
#include "livery.h"
 
#include "autoreplace_type.h"
 
#include "economy_type.h"
 
#include "tile_type.h"
 
#include "settings_type.h"
 

	
src/company_cmd.cpp
Show inline comments
 
@@ -31,12 +31,13 @@
 
#include "autoreplace_gui.h"
 
#include "rail.h"
 
#include "core/pool_func.hpp"
 
#include "settings_func.h"
 
#include "vehicle_base.h"
 
#include "vehicle_func.h"
 
#include "sprite.h"
 

	
 
#include "table/strings.h"
 

	
 
CompanyByte _local_company;
 
CompanyByte _current_company;
 
/* NOSAVE: can be determined from company structs */
src/company_func.h
Show inline comments
 
@@ -9,16 +9,14 @@
 

	
 
/** @file company_func.h Functions related to companies. */
 

	
 
#ifndef COMPANY_FUNC_H
 
#define COMPANY_FUNC_H
 

	
 
#include "core/math_func.hpp"
 
#include "company_type.h"
 
#include "tile_type.h"
 
#include "strings_type.h"
 
#include "gfx_type.h"
 

	
 
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
 
void GetNameOfOwner(Owner owner, TileIndex tile);
 
void SetLocalCompany(CompanyID new_company);
 
void ShowBuyCompanyDialog(CompanyID company);
src/company_gui.cpp
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "command_func.h"
 
#include "network/network.h"
 
#include "network/network_gui.h"
 
#include "network/network_func.h"
 
#include "economy_func.h"
 
@@ -25,12 +24,15 @@
 
#include "newgrf.h"
 
#include "company_manager_face.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "tilehighlight_func.h"
 
#include "sprite.h"
 
#include "company_base.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
/** Company GUI constants. */
 
enum {
 
	FIRST_GUI_CALL = INT_MAX,  ///< default value to specify this is the first call of the resizable gui
src/console.cpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#include "stdafx.h"
 
#include "console_internal.h"
 
#include "network/network.h"
 
#include "network/network_func.h"
 
#include "debug.h"
 
#include "console_func.h"
 

	
 
#include <stdarg.h>
 

	
 
#define ICON_BUFFER 79
 
#define ICON_HISTORY_SIZE 20
 
#define ICON_LINE_HEIGHT 12
src/console_cmds.cpp
Show inline comments
 
@@ -31,12 +31,13 @@
 
#include "vehicle_func.h"
 
#include "company_func.h"
 
#include "company_base.h"
 
#include "gamelog.h"
 
#include "ai/ai.hpp"
 
#include "ai/ai_config.hpp"
 
#include "console_func.h"
 

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

	
 
/* scriptfile handling */
src/console_gui.cpp
Show inline comments
 
@@ -15,12 +15,13 @@
 
#include "console_gui.h"
 
#include "console_internal.h"
 
#include "window_func.h"
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
 
#include "console_func.h"
 
#include "rev.h"
 

	
 

	
 
enum {
 
	ICON_HISTORY_SIZE       = 20,
 
	ICON_LINE_SPACING       =  2,
src/console_internal.h
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/** @file console_internal.h Internally used functions for the console. */
 

	
 
#ifndef CONSOLE_INTERNAL_H
 
#define CONSOLE_INTERNAL_H
 

	
 
#include "console_func.h"
 
#include "console_type.h"
 

	
 
enum {
 
	ICON_CMDLN_SIZE     = 1024, ///< maximum length of a typed in command
 
	ICON_MAX_STREAMSIZE = 2048, ///< maximum length of a totally expanded command
 
};
 

	
src/core/mem_func.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file mem_func.hpp Functions related to memory operations. */
 

	
 
#ifndef MEM_FUNC_HPP
 
#define MEM_FUNC_HPP
 

	
 
#include <string.h>
 
#include "math_func.hpp"
 

	
 
/**
 
 * Type-safe version of memcpy().
 
 *
 
 * @param destination Pointer to the destination buffer
src/core/sort_func.hpp
Show inline comments
 
@@ -9,14 +9,12 @@
 

	
 
/** @file sort_func.hpp Functions related to sorting operations. */
 

	
 
#ifndef SORT_FUNC_HPP
 
#define SORT_FUNC_HPP
 

	
 
#include <stdlib.h>
 
#include "math_func.hpp"
 
#include "mem_func.hpp"
 

	
 
/**
 
 * Type safe qsort()
 
 *
 
 * @note Use this sort for irregular sorted data.
src/crashlog.cpp
Show inline comments
 
@@ -23,18 +23,16 @@
 
#include "video/video_driver.hpp"
 
#include "saveload/saveload.h"
 
#include "screenshot.h"
 
#include "gfx_func.h"
 
#include "network/network.h"
 

	
 
#include <squirrel.h>
 
#include "ai/ai_info.hpp"
 
#include "company_base.h"
 
#include "company_func.h"
 

	
 
#include <time.h>
 

	
 
/* static */ const char *CrashLog::message = NULL;
 
/* static */ char *CrashLog::gamelog_buffer = NULL;
 
/* static */ const char *CrashLog::gamelog_last = NULL;
 

	
 
/* virtual */ char *CrashLog::LogRegisters(char *buffer, const char *last) const
src/date_gui.cpp
Show inline comments
 
@@ -9,16 +9,16 @@
 

	
 
/** @file date_gui.cpp Graphical selection of a date. */
 

	
 
#include "stdafx.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "gfx_func.h"
 
#include "window_func.h"
 
#include "window_gui.h"
 
#include "date_gui.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "widgets/dropdown_type.h"
 

	
 
#include "table/strings.h"
 

	
 
/** Widgets used by the date window */
src/date_gui.h
Show inline comments
 
@@ -9,12 +9,15 @@
 

	
 
/** @file date_gui.h Functions related to the graphical selection of a date. */
 

	
 
#ifndef DATE_GUI_H
 
#define DATE_GUI_H
 

	
 
#include "date_type.h"
 
#include "window_type.h"
 

	
 
/**
 
 * Callback for when a date has been chosen
 
 * @param w the window that sends the callback
 
 * @param date the date that has been chosen
 
 */
 
typedef void SetDateCallback(const Window *w, Date date);
src/debug.cpp
Show inline comments
 
@@ -11,19 +11,19 @@
 

	
 
#include "stdafx.h"
 
#include <stdarg.h>
 
#include "console_func.h"
 
#include "debug.h"
 
#include "string_func.h"
 
#include "network/core/core.h"
 
#include "fileio_func.h"
 
#include "settings_type.h"
 

	
 
#include <time.h>
 

	
 
#if defined(ENABLE_NETWORK)
 
#include "network/core/os_abstraction.h"
 
SOCKET _debug_socket = INVALID_SOCKET;
 
#endif /* ENABLE_NETWORK */
 

	
 
int _debug_ai_level;
 
int _debug_driver_level;
 
int _debug_grf_level;
src/depot_base.h
Show inline comments
 
@@ -9,16 +9,14 @@
 

	
 
/** @file depot_base.h Base for all depots (except hangars) */
 

	
 
#ifndef DEPOT_BASE_H
 
#define DEPOT_BASE_H
 

	
 
#include "tile_type.h"
 
#include "depot_map.h"
 
#include "core/pool_type.hpp"
 
#include "town_type.h"
 

	
 
typedef Pool<Depot, DepotID, 64, 64000> DepotPool;
 
extern DepotPool _depot_pool;
 

	
 
struct Depot : DepotPool::PoolItem<&_depot_pool> {
 
	TileIndex xy;
src/depot_func.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

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

	
 
#ifndef DEPOT_FUNC_H
 
#define DEPOT_FUNC_H
 

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

	
 
void ShowDepotWindow(TileIndex tile, VehicleType type);
src/depot_gui.cpp
Show inline comments
 
@@ -6,20 +6,21 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file depot_gui.cpp The GUI for depots. */
 

	
 
#include "stdafx.h"
 
#include "engine_base.h"
 
#include "train.h"
 
#include "ship.h"
 
#include "aircraft.h"
 
#include "roadveh.h"
 
#include "gui.h"
 
#include "textbuf_gui.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "depot_base.h"
 
#include "vehicle_gui.h"
 
#include "newgrf_engine.h"
 
#include "spritecache.h"
 
#include "strings_func.h"
src/depot_map.h
Show inline comments
 
@@ -9,15 +9,12 @@
 

	
 
/** @file depot_map.h Map related accessors for depots. */
 

	
 
#ifndef DEPOT_MAP_H
 
#define DEPOT_MAP_H
 

	
 
#include "road_map.h"
 
#include "rail_map.h"
 
#include "water_map.h"
 
#include "station_map.h"
 

	
 
/**
 
 * Check if a tile is a depot and it is a depot of the given type.
 
 */
 
static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
src/disaster_cmd.cpp
Show inline comments
 
@@ -38,12 +38,14 @@
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "effectvehicle_func.h"
 
#include "roadveh.h"
 
#include "ai/ai.hpp"
 
#include "company_base.h"
 
#include "core/random_func.hpp"
 

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

	
 
enum DisasterSubType {
 
	ST_ZEPPELINER,
src/dock_gui.cpp
Show inline comments
 
@@ -23,12 +23,13 @@
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "slope_func.h"
 
#include "tilehighlight_func.h"
 
#include "company_base.h"
 
#include "station_type.h"
 

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

	
 
static void ShowBuildDockStationPicker(Window *parent);
 
static void ShowBuildDocksDepotPicker(Window *parent);
src/driver.cpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "sound/sound_driver.hpp"
 
#include "music/music_driver.hpp"
 
#include "video/video_driver.hpp"
 
#include "string_func.h"
 

	
 
VideoDriver *_video_driver;
 
char *_ini_videodriver;
 
int _num_resolutions;
 
Dimension _resolutions[32];
 
Dimension _cur_resolution;
src/driver.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef DRIVER_H
 
#define DRIVER_H
 

	
 
#include "core/enum_type.hpp"
 
#include "core/string_compare_type.hpp"
 
#include "string_func.h"
 
#include <map>
 

	
 
const char *GetDriverParam(const char * const *parm, const char *name);
 
bool GetDriverParamBool(const char * const *parm, const char *name);
 
int GetDriverParamInt(const char * const *parm, const char *name, int def);
 

	
src/economy.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file economy.cpp Handling of the economy. */
 

	
 
#include "stdafx.h"
 
#include "tile_cmd.h"
 
#include "company_func.h"
 
#include "command_func.h"
 
#include "industry.h"
 
#include "town.h"
 
#include "news_func.h"
 
#include "network/network.h"
 
@@ -33,22 +32,23 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "gfx_func.h"
 
#include "autoreplace_func.h"
 
#include "company_gui.h"
 
#include "signs_base.h"
 
#include "subsidy_base.h"
 
#include "subsidy_func.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "economy_base.h"
 
#include "core/pool_func.hpp"
 
#include "newgrf.h"
 
#include "engine_base.h"
 

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

	
 

	
src/economy_func.h
Show inline comments
 
@@ -9,22 +9,17 @@
 

	
 
/** @file economy_func.h Functions related to the economy. */
 

	
 
#ifndef ECONOMY_FUNC_H
 
#define ECONOMY_FUNC_H
 

	
 
#include "core/geometry_type.hpp"
 
#include "economy_type.h"
 
#include "station_type.h"
 
#include "cargo_type.h"
 
#include "vehicle_type.h"
 
#include "tile_type.h"
 
#include "town_type.h"
 
#include "industry_type.h"
 
#include "company_type.h"
 
#include "station_type.h"
 
#include "station_func.h"
 

	
 
void ResetPriceBaseMultipliers();
 
void SetPriceBaseMultiplier(Price price, int factor);
 

	
 
extern const ScoreInfo _score_info[];
 
extern int _score_part[MAX_COMPANIES][SCORE_END];
src/economy_type.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef ECONOMY_TYPE_H
 
#define ECONOMY_TYPE_H
 

	
 
#include "core/overflowsafe_type.hpp"
 
#include "core/enum_type.hpp"
 
#include "cargo_type.h"
 

	
 
typedef OverflowSafeInt64 Money;
 

	
 
struct Economy {
 
	Money max_loan;                       ///< NOSAVE: Maximum possible loan
 
	int16 fluct;                          ///< Economy fluctuation status
src/effectvehicle.cpp
Show inline comments
 
@@ -14,12 +14,13 @@
 
#include "core/random_func.hpp"
 
#include "industry_map.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "animated_tile_func.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 

	
 
#include "table/sprites.h"
 

	
 
static void ChimneySmokeInit(EffectVehicle *v)
 
{
 
	uint32 r = Random();
src/effectvehicle_func.h
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/** @file effectvehicle_func.h Functions related to effect vehicles. */
 

	
 
#ifndef EFFECTVEHICLE_FUNC_H
 
#define EFFECTVEHICLE_FUNC_H
 

	
 
#include "effectvehicle_base.h"
 
#include "vehicle_type.h"
 

	
 
/** Effect vehicle types */
 
enum EffectVehicleType {
 
	EV_CHIMNEY_SMOKE   = 0,
 
	EV_STEAM_SMOKE     = 1,
 
	EV_DIESEL_SMOKE    = 2,
src/elrail.cpp
Show inline comments
 
@@ -51,22 +51,22 @@
 
 * <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 "landscape.h"
 
#include "train.h"
 
#include "rail_gui.h"
 
#include "tunnelbridge_map.h"
 
#include "tunnelbridge.h"
 
#include "elrail_func.h"
 
#include "engine_base.h"
 
#include "company_base.h"
 

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

	
 
static inline TLG GetTLG(TileIndex t)
 
{
src/elrail_func.h
Show inline comments
 
@@ -10,15 +10,14 @@
 
/** @file elrail_func.h header file for electrified rail specific functions */
 

	
 
#ifndef ELRAIL_FUNC_H
 
#define ELRAIL_FUNC_H
 

	
 
#include "rail.h"
 
#include "tile_cmd.h"
 
#include "transparency.h"
 
#include "tile_cmd.h"
 
#include "settings_type.h"
 

	
 
/**
 
 * Test if a rail type has catenary
 
 * @param rt Rail type to test
 
 */
 
static inline bool HasCatenary(RailType rt)
src/engine.cpp
Show inline comments
 
@@ -15,21 +15,23 @@
 
#include "news_func.h"
 
#include "aircraft.h"
 
#include "newgrf.h"
 
#include "newgrf_engine.h"
 
#include "group.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "core/random_func.hpp"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "autoreplace_gui.h"
 
#include "string_func.h"
 
#include "ai/ai.hpp"
 
#include "core/pool_func.hpp"
 
#include "engine_gui.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 
#include "company_base.h"
 

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

	
 
EnginePool _engine_pool("Engine");
 
INSTANTIATE_POOL_METHODS(Engine)
src/engine_base.h
Show inline comments
 
@@ -9,14 +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 "economy_type.h"
 
#include "vehicle_type.h"
 
#include "core/pool_type.hpp"
 
#include "core/smallvec_type.hpp"
 

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

	
src/engine_func.h
Show inline comments
 
@@ -10,12 +10,14 @@
 
/** @file engine_func.h Functions related to engines. */
 

	
 
#ifndef ENGINE_H
 
#define ENGINE_H
 

	
 
#include "engine_type.h"
 
#include "vehicle_type.h"
 
#include "company_type.h"
 

	
 
void SetupEngines();
 
void StartupEngines();
 

	
 
/* Original engine data counts and offsets */
 
extern const uint8 _engine_counts[4];
src/engine_gui.h
Show inline comments
 
@@ -9,13 +9,15 @@
 

	
 
/** @file engine_gui.h Engine GUI functions, used by build_vehicle_gui and autoreplace_gui */
 

	
 
#ifndef ENGINE_GUI_H
 
#define ENGINE_GUI_H
 

	
 
#include "engine_type.h"
 
#include "sortlist_type.h"
 
#include "gfx_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);  ///< sort of the engine list
 
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< sort of specified portion of the engine list
src/engine_type.h
Show inline comments
 
@@ -12,17 +12,14 @@
 
#ifndef ENGINE_TYPE_H
 
#define ENGINE_TYPE_H
 

	
 
#include "economy_type.h"
 
#include "rail_type.h"
 
#include "cargo_type.h"
 
#include "vehicle_type.h"
 
#include "gfx_type.h"
 
#include "date_type.h"
 
#include "sound_type.h"
 
#include "company_type.h"
 
#include "strings_type.h"
 

	
 
typedef uint16 EngineID;
 

	
 
struct Engine;
 

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

	
 
/** @file fontcache.h Functions to read fonts from files and cache them. */
 

	
 
#ifndef FONTCACHE_H
 
#define FONTCACHE_H
 

	
 
#include "gfx_type.h"
 
#include "spritecache.h"
 

	
 
/** Get the SpriteID mapped to the given font size and key */
 
SpriteID GetUnicodeGlyph(FontSize size, uint32 key);
 

	
 
/** Map a SpriteID to the font size and key */
src/functions.h
Show inline comments
 
@@ -9,14 +9,12 @@
 

	
 
/** @file functions.h Some generic functions that actually shouldn't be here. */
 

	
 
#ifndef FUNCTIONS_H
 
#define FUNCTIONS_H
 

	
 
#include "core/random_func.hpp"
 
#include "command_type.h"
 
#include "tile_cmd.h"
 

	
 
/* clear_land.cpp */
 
void DrawHillyLandTile(const TileInfo *ti);
 
void DrawClearLandTile(const TileInfo *ti, byte set);
 
void DrawClearLandFence(const TileInfo *ti);
src/gamelog.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "openttd.h"
 
#include "saveload/saveload.h"
 
#include "core/alloc_func.hpp"
 
#include "variables.h"
 
#include "string_func.h"
 
#include "settings_type.h"
 
#include "gamelog.h"
 
#include "gamelog_internal.h"
 
#include "console_func.h"
 
#include "debug.h"
 
#include "rev.h"
 

	
 
#include <stdarg.h>
src/gamelog_internal.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file gamelog_internal.h Declaration shared among gamelog.cpp and saveload/gamelog_sl.cpp */
 

	
 
#ifndef GAMELOG_INTERNAL_H
 
#define GAMELOG_INTERNAL_H
 

	
 
#include "network/core/config.h"
 
#include "gamelog.h"
 

	
 
/** Type of logged change */
 
enum GamelogChangeType {
 
	GLCT_MODE,        ///< Scenario editor x Game, different landscape
 
	GLCT_REVISION,    ///< Changed game revision string
 
	GLCT_OLDVER,      ///< Loaded from savegame without logged data
src/genworld.cpp
Show inline comments
 
@@ -30,12 +30,13 @@
 
#include "blitter/factory.hpp"
 
#include "tilehighlight_func.h"
 
#include "saveload/saveload.h"
 
#include "void_map.h"
 
#include "town.h"
 
#include "newgrf.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/sprites.h"
 

	
 
void GenerateClearTile();
 
void GenerateIndustries();
 
void GenerateUnmovables();
src/genworld_gui.cpp
Show inline comments
 
@@ -20,20 +20,21 @@
 
#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 "widgets/dropdown_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "landscape_type.h"
 
#include "querystring_gui.h"
 
#include "town.h"
 
#include "thread/thread.h"
 
#include "settings_func.h"
 
#include "core/geometry_func.hpp"
 
#include "core/random_func.hpp"
 

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

	
 
/**
 
 * In what 'mode' the GenerateLandscapeWindowProc is.
src/gfx_type.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file gfx_type.h Types related to the graphics and/or input devices. */
 

	
 
#ifndef GFX_TYPE_H
 
#define GFX_TYPE_H
 

	
 
#include "core/endian_type.hpp"
 
#include "core/enum_type.hpp"
 
#include "core/geometry_type.hpp"
 
#include "zoom_type.h"
 

	
 
typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colourtables
 

	
 
/** Combination of a palette sprite and a 'real' sprite */
src/gfxinit.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file gfxinit.cpp Initializing of the (GRF) graphics. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "fios.h"
 
#include "newgrf.h"
 
#include "3rdparty/md5/md5.h"
 
#include "fontcache.h"
 
#include "gfx_func.h"
 
#include "settings_type.h"
src/graph_gui.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "gfx_func.h"
 
#include "sortlist_type.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
/* Bitmasks of company and cargo indices that shouldn't be drawn. */
 
static uint _legend_excluded_companies;
src/group_gui.cpp
Show inline comments
 
@@ -8,28 +8,28 @@
 
 */
 

	
 
/** @file group_gui.cpp GUI for the group window. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "vehicle_gui.h"
 
#include "vehicle_base.h"
 
#include "group.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "tilehighlight_func.h"
 
#include "vehicle_gui_base.h"
 
#include "core/geometry_func.hpp"
 
#include "company_base.h"
 

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

	
 
typedef GUIList<const Group*> GUIGroupList;
 

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

	
 
/** @file group_gui.h Functions/definitions that have something to do with groups. */
 

	
 
#ifndef GROUP_GUI_H
 
#define GROUP_GUI_H
 

	
 
#include "company_type.h"
 
#include "vehicle_type.h"
 

	
 
void ShowCompanyGroup(CompanyID company, VehicleType veh);
 
void DeleteGroupHighlightOfVehicle(const Vehicle *v);
 

	
 
#endif /* GROUP_GUI_H */
src/gui.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file gui.h GUI functions that shouldn't be here. */
 

	
 
#ifndef GUI_H
 
#define GUI_H
 

	
 
#include "window_type.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"
src/highscore.cpp
Show inline comments
 
@@ -6,12 +6,13 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file highscore.cpp Definition of functions used for highscore handling */
 

	
 
#include "stdafx.h"
 
#include "highscore.h"
 
#include "company_base.h"
 
#include "company_func.h"
 
#include "cheat_func.h"
 
#include "string_func.h"
 
#include "strings_func.h"
src/highscore.h
Show inline comments
 
@@ -9,15 +9,13 @@
 

	
 
/** @file highscore.h Declaration of functions and types defined in highscore.h and highscore_gui.h */
 

	
 
#ifndef HIGHSCORE_H
 
#define HIGHSCORE_H
 

	
 
#include "stdafx.h"
 
#include "strings_type.h"
 
#include "core/math_func.hpp"
 
#include "company_type.h"
 

	
 
struct HighScore {
 
	char company[100];
 
	StringID title; ///< NOSAVE, has troubles with changing string-numbers.
 
	uint16 score;   ///< do NOT change type, will break hs.dat
src/highscore_gui.cpp
Show inline comments
 
@@ -6,12 +6,13 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file highscore_gui.cpp Definition of the HighScore and EndGame windows */
 

	
 
#include "stdafx.h"
 
#include "highscore.h"
 
#include "table/strings.h"
 
#include "gfx_func.h"
 
#include "table/sprites.h"
 
#include "window_gui.h"
 
#include "window_func.h"
src/industry.h
Show inline comments
 
@@ -10,19 +10,13 @@
 
/** @file industry.h Base of all industries. */
 

	
 
#ifndef INDUSTRY_H
 
#define INDUSTRY_H
 

	
 
#include "core/pool_type.hpp"
 
#include "core/random_func.hpp"
 
#include "newgrf_storage.h"
 
#include "cargo_type.h"
 
#include "economy_type.h"
 
#include "map_type.h"
 
#include "industry_type.h"
 
#include "tile_type.h"
 
#include "subsidy_type.h"
 
#include "industry_map.h"
 
#include "tilearea_type.h"
 

	
 

	
 
typedef Pool<Industry, IndustryID, 64, 64000> IndustryPool;
src/industry_cmd.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file industry_cmd.cpp Handling of industry tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "clear_map.h"
 
#include "industry.h"
 
#include "station_base.h"
 
#include "train.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
@@ -27,22 +26,22 @@
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "autoslope.h"
 
#include "transparency.h"
 
#include "water.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 "animated_tile_func.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 
#include "ai/ai.hpp"
 
#include "core/pool_func.hpp"
 
#include "subsidy_func.h"
 

	
 
#include "table/strings.h"
 
#include "table/industry_land.h"
src/industry_gui.cpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file industry_gui.cpp GUIs related to industries. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "industry.h"
 
#include "town.h"
 
@@ -28,12 +27,14 @@
 
#include "company_func.h"
 
#include "tilehighlight_func.h"
 
#include "string_func.h"
 
#include "sortlist_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "company_base.h"
 
#include "core/geometry_func.hpp"
 
#include "core/random_func.hpp"
 

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

	
 
bool _ignore_restrictions;
 

	
src/industry_map.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file industry_map.h Accessors for industries */
 

	
 
#ifndef INDUSTRY_MAP_H
 
#define INDUSTRY_MAP_H
 

	
 
#include "industrytype.h"
 
#include "tile_map.h"
 
#include "water_map.h"
 

	
 

	
 
/**
 
 * The following enums are indices used to know what to draw for this industry tile.
 
 * They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h
src/industrytype.h
Show inline comments
 
@@ -9,19 +9,19 @@
 

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

	
 
#ifndef INDUSTRYTYPE_H
 
#define INDUSTRYTYPE_H
 

	
 
#include "core/enum_type.hpp"
 
#include "economy_type.h"
 
#include "map_type.h"
 
#include "slope_type.h"
 
#include "industry_type.h"
 
#include "landscape_type.h"
 
#include "tile_type.h"
 
#include "strings_type.h"
 
#include "cargo_type.h"
 

	
 
enum {
 
	CLEAN_RANDOMSOUNDS,    ///< Free the dynamically allocated sounds table
 
	CLEAN_TILELSAYOUT,     ///< Free the dynamically allocated tile layout structure
 
};
 

	
src/intro_gui.cpp
Show inline comments
 
@@ -22,12 +22,13 @@
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "fios.h"
 
#include "functions.h"
 
#include "ai/ai_gui.hpp"
 
#include "gfx_func.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
static inline void SetNewLandscapeType(byte landscape)
 
{
src/landscape.cpp
Show inline comments
 
@@ -26,12 +26,13 @@
 
#include "functions.h"
 
#include "date_func.h"
 
#include "water.h"
 
#include "effectvehicle_func.h"
 
#include "landscape_type.h"
 
#include "animated_tile_func.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/sprites.h"
 

	
 
extern const TileTypeProcs
 
	_tile_type_clear_procs,
 
	_tile_type_rail_procs,
src/landscape.h
Show inline comments
 
@@ -11,14 +11,12 @@
 

	
 
#ifndef LANDSCAPE_H
 
#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, ///< Number of months in the snow line table.
 
	SNOW_LINE_DAYS   = 32, ///< Number of days in each month in the snow line table.
 
};
 

	
src/main_gui.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file main_gui.cpp Handling of the main viewport. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "currency.h"
 
#include "spritecache.h"
 
#include "window_gui.h"
 
#include "window_func.h"
 
#include "textbuf_gui.h"
 
#include "viewport_func.h"
src/misc/array.hpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file array.hpp Array without an explicit maximum size. */
 

	
 
#ifndef  ARRAY_HPP
 
#define  ARRAY_HPP
 

	
 
#include "fixedsizearray.hpp"
 
#include "str.hpp"
 

	
 
/** Flexible array with size limit. Implemented as fixed size
 
 *  array of fixed size arrays */
 
template <class Titem_, int Tblock_size_ = 1024, int Tnum_blocks_ = Tblock_size_>
 
class CArrayT {
 
public:
src/misc/blob.hpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef BLOB_HPP
 
#define BLOB_HPP
 

	
 
#include "../core/alloc_func.hpp"
 
#include "../core/mem_func.hpp"
 
#include <new>
 

	
 
/** Base class for simple binary blobs.
 
 *  Item is byte.
 
 *  The word 'simple' means:
 
 *    - no configurable allocator type (always made from heap)
 
 *    - no smart deallocation - deallocation must be called from the same
src/misc/dbg_helpers.h
Show inline comments
 
@@ -9,19 +9,22 @@
 

	
 
/** @file dbg_helpers.h Functions to be used for debug printings. */
 

	
 
#ifndef DBG_HELPERS_H
 
#define DBG_HELPERS_H
 

	
 
#include <new>
 
#include <map>
 
#include <stack>
 

	
 
#include "blob.hpp"
 
#include "str.hpp"
 

	
 
#include "../direction_type.h"
 
#include "../signal_type.h"
 
#include "../tile_type.h"
 
#include "../track_type.h"
 

	
 
/** Helper template class that provides C array length and item type */
 
template <typename T> struct ArrayT;
 

	
 
/** Helper template class that provides C array length and item type */
 
template <typename T, size_t N> struct ArrayT<T[N]> {
 
	static const size_t length = N;
src/misc/fixedsizearray.hpp
Show inline comments
 
@@ -9,12 +9,13 @@
 

	
 
/** @file fixedsizearray.hpp A fixed size array that doesn't create items until needed. */
 

	
 
#ifndef  FIXEDSIZEARRAY_HPP
 
#define  FIXEDSIZEARRAY_HPP
 

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

	
 
/** fixed size array
 
 *  Upon construction it preallocates fixed size block of memory
 
 *  for all items, but doesn't construct them. Item's construction
 
 *  is delayed. */
 
template <class Titem_, int Tcapacity_>
src/misc/str.hpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef  STR_HPP
 
#define  STR_HPP
 

	
 
#include <errno.h>
 
#include <stdarg.h>
 
#include "blob.hpp"
 
#include "../string_func.h"
 

	
 
/** Blob based case sensitive ANSI/UTF-8 string */
 
struct CStrA : public CBlobT<char>
 
{
 
	typedef CBlobT<char> base;                    ///< base class
src/misc_gui.cpp
Show inline comments
 
@@ -30,12 +30,13 @@
 
#include "fileio_func.h"
 
#include "fios.h"
 
#include "zoom_func.h"
 
#include "window_func.h"
 
#include "tilehighlight_func.h"
 
#include "querystring_gui.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 

	
 
/**
 
 * Try to retrive the current clipboard contents.
src/music.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file music.cpp The songs that OpenTTD knows. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 

	
 
/* The type of set we're replacing */
 
#define SET_TYPE "music"
 
#include "base_media_func.h"
 

	
 
INSTANTIATE_BASE_MEDIA_METHODS(BaseMedia<MusicSet>, MusicSet)
src/music/extmidi.cpp
Show inline comments
 
@@ -9,12 +9,13 @@
 

	
 
/** @file extmidi.cpp Playing music via an external player. */
 

	
 
#ifndef __MORPHOS__
 
#include "../stdafx.h"
 
#include "../debug.h"
 
#include "../string_func.h"
 
#include "../sound/sound_driver.hpp"
 
#include "../video/video_driver.hpp"
 
#include "extmidi.h"
 
#include <fcntl.h>
 
#include <sys/types.h>
 
#include <sys/wait.h>
src/music/win32_m.cpp
Show inline comments
 
@@ -7,12 +7,13 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file win32_m.cpp Music playback for Windows. */
 

	
 
#include "../stdafx.h"
 
#include "../string_func.h"
 
#include "win32_m.h"
 
#include <windows.h>
 
#include <mmsystem.h>
 

	
 
static struct {
 
	bool stop_song;
src/music_gui.cpp
Show inline comments
 
@@ -8,22 +8,23 @@
 
 */
 

	
 
/** @file music_gui.cpp GUI for the music playback. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "fileio_func.h"
 
#include "base_media_base.h"
 
#include "music/music_driver.hpp"
 
#include "window_gui.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "sound_func.h"
 
#include "gfx_func.h"
 
#include "core/random_func.hpp"
 
#include "gui.h"
 
#include "core/geometry_func.hpp"
 
#include "string_func.h"
 

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

	
 
/**
 
 * Get the name of the song.
src/network/core/core.cpp
Show inline comments
 
@@ -12,12 +12,13 @@
 
 */
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../../stdafx.h"
 
#include "../../debug.h"
 
#include "os_abstraction.h"
 
#include "packet.h"
 

	
 

	
 
#ifdef __MORPHOS__
 
/* the library base is required here */
 
struct Library *SocketBase = NULL;
src/network/core/core.h
Show inline comments
 
@@ -11,13 +11,12 @@
 
 * @file core.h Base for all network types (UDP and TCP)
 
 */
 

	
 
#ifndef NETWORK_CORE_H
 
#define NETWORK_CORE_H
 

	
 
#include "os_abstraction.h"
 
#include "../../newgrf_config.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
bool NetworkCoreInitialize();
 
void NetworkCoreShutdown();
src/network/core/host.h
Show inline comments
 
@@ -11,9 +11,11 @@
 
 * @file host.h Resolving of hostnames/IPs
 
 */
 

	
 
#ifndef NETWORK_CORE_HOST_H
 
#define NETWORK_CORE_HOST_H
 

	
 
#include "address.h"
 

	
 
void NetworkFindBroadcastIPs(NetworkAddressList *broadcast);
 

	
 
#endif /* NETWORK_CORE_HOST_H */
src/network/core/tcp.h
Show inline comments
 
@@ -11,15 +11,13 @@
 
 * @file tcp.h Basic functions to receive and send TCP packets.
 
 */
 

	
 
#ifndef NETWORK_CORE_TCP_H
 
#define NETWORK_CORE_TCP_H
 

	
 
#include "os_abstraction.h"
 
#include "address.h"
 
#include "core.h"
 
#include "packet.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
/** Base socket handler for all TCP sockets */
 
class NetworkTCPSocketHandler : public NetworkSocketHandler {
src/network/core/tcp_game.cpp
Show inline comments
 
@@ -12,12 +12,13 @@
 
 */
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../../stdafx.h"
 

	
 
#include "../network.h"
 
#include "../network_internal.h"
 
#include "../../core/pool_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
/** Make very sure the preconditions given in network_type.h are actually followed */
src/network/core/tcp_game.h
Show inline comments
 
@@ -13,13 +13,13 @@
 

	
 
#ifndef NETWORK_CORE_TCP_GAME_H
 
#define NETWORK_CORE_TCP_GAME_H
 

	
 
#include "os_abstraction.h"
 
#include "tcp.h"
 
#include "packet.h"
 
#include "../network_type.h"
 
#include "../../core/pool_type.hpp"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
/**
 
 * Enum with all types of UDP packets.
src/network/core/udp.cpp
Show inline comments
 
@@ -12,12 +12,13 @@
 
 */
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../../stdafx.h"
 
#include "../../date_func.h"
 
#include "../../debug.h"
 
#include "udp.h"
 

	
 
/**
 
 * Create an UDP socket but don't listen yet.
 
 * @param bind the addresses to bind to.
 
 */
src/network/core/udp.h
Show inline comments
 
@@ -68,18 +68,15 @@
 
 *   1+       1       whether the server is dedicated (0 = no, 1 = yes)
 
 */
 

	
 
#ifndef NETWORK_CORE_UDP_H
 
#define NETWORK_CORE_UDP_H
 

	
 
#include "os_abstraction.h"
 
#include "address.h"
 
#include "core.h"
 
#include "game.h"
 
#include "packet.h"
 
#include "../../debug.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
/** Enum with all types of UDP packets. The order MUST not be changed **/
 
enum PacketUDPType {
 
	PACKET_UDP_CLIENT_FIND_SERVER,   ///< Queries a game server for game information
src/network/network.cpp
Show inline comments
 
@@ -13,18 +13,18 @@
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../strings_func.h"
 
#include "../command_func.h"
 
#include "../date_func.h"
 
#include "network_internal.h"
 
#include "network_client.h"
 
#include "network_server.h"
 
#include "network_content.h"
 
#include "network_udp.h"
 
#include "network_gamelist.h"
 
#include "network_base.h"
 
#include "core/udp.h"
 
#include "core/host.h"
 
#include "network_gui.h"
 
#include "../console_func.h"
 
#include "../3rdparty/md5/md5.h"
 
#include "../core/random_func.hpp"
src/network/network.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file network.h Basic functions/variables used all over the place. */
 

	
 
#ifndef NETWORK_H
 
#define NETWORK_H
 

	
 
#include "../company_type.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
void NetworkStartUp();
 
void NetworkShutDown();
 
void NetworkDrawChatMessage();
src/network/network_base.h
Show inline comments
 
@@ -12,13 +12,15 @@
 
#ifndef NETWORK_BASE_H
 
#define NETWORK_BASE_H
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "network_type.h"
 
#include "core/address.h"
 
#include "../core/pool_type.hpp"
 
#include "../company_type.h"
 

	
 
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientInfoPool;
 
extern NetworkClientInfoPool _networkclientinfo_pool;
 

	
 
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
 
	ClientID client_id;                             ///< Client identifier (same as ClientState->client_id)
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -21,14 +21,16 @@
 
#include "../console_func.h"
 
#include "../video/video_driver.hpp"
 
#include "../table/sprites.h"
 
#include "../querystring_gui.h"
 
#include "../town.h"
 
#include "../window_func.h"
 
#include "network_internal.h"
 
#include "../core/geometry_func.hpp"
 
#include "network.h"
 
#include "network_client.h"
 
#include "network_base.h"
 

	
 
#include "table/strings.h"
 

	
 
/* The draw buffer must be able to contain the chat message, client name and the "[All]" message,
 
 * some spaces and possible translations of [All] to other languages. */
 
assert_compile((int)DRAW_STRING_BUFFER >= (int)NETWORK_CHAT_LENGTH + NETWORK_NAME_LENGTH + 40);
src/network/network_client.cpp
Show inline comments
 
@@ -23,12 +23,14 @@
 
#include "../strings_func.h"
 
#include "../window_func.h"
 
#include "../company_func.h"
 
#include "../company_base.h"
 
#include "../company_gui.h"
 
#include "../rev.h"
 
#include "network.h"
 
#include "network_base.h"
 

	
 
#include "table/strings.h"
 

	
 
/* This file handles all the client-commands */
 

	
 

	
src/network/network_client.h
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#ifndef NETWORK_CLIENT_H
 
#define NETWORK_CLIENT_H
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "network_internal.h"
 

	
 
DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO);
 
DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO);
 
DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp);
 
DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_ERROR)(NetworkErrorCode errorno);
 
DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_QUIT)();
 
DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_CHAT)(NetworkAction action, DestType desttype, int dest, const char *msg, int64 data);
src/network/network_command.cpp
Show inline comments
 
@@ -10,19 +10,19 @@
 
/** @file network_command.cpp Command handling over network connections. */
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../stdafx.h"
 
#include "../debug.h"
 
#include "network_internal.h"
 
#include "network_client.h"
 
#include "network.h"
 
#include "../command_func.h"
 
#include "../company_func.h"
 

	
 
/** Table with all the callbacks we'll use for conversion*/
 
static const CommandCallback * const _callback_table[] = {
 
static CommandCallback * const _callback_table[] = {
 
	/* 0x00 */ NULL,
 
	/* 0x01 */ CcBuildPrimaryVehicle,
 
	/* 0x02 */ CcBuildAirport,
 
	/* 0x03 */ CcBuildBridge,
 
	/* 0x04 */ CcBuildCanal,
 
	/* 0x05 */ CcBuildDocks,
src/network/network_content.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file network_content.h Part of the network protocol handling content distribution. */
 

	
 
#ifndef NETWORK_CONTENT_H
 
#define NETWORK_CONTENT_H
 

	
 
#include "core/tcp_content.h"
 
#include "../core/smallvec_type.hpp"
 

	
 
#if defined(ENABLE_NETWORK)
 

	
 
/** Vector with content info */
 
typedef SmallVector<ContentInfo *, 16> ContentVector;
 
typedef SmallVector<const ContentInfo *, 16> ConstContentVector;
src/network/network_content_gui.cpp
Show inline comments
 
@@ -16,12 +16,13 @@
 
#include "../window_func.h"
 
#include "../gui.h"
 
#include "../ai/ai.hpp"
 
#include "../base_media_base.h"
 
#include "../sortlist_type.h"
 
#include "../querystring_gui.h"
 
#include "../core/geometry_func.hpp"
 
#include  "network_content.h"
 

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

	
 
/** Widgets used by this window */
src/network/network_func.h
Show inline comments
 
@@ -13,14 +13,14 @@
 
#define NETWORK_FUNC_H
 

	
 
#include "core/address.h"
 
#include "network_type.h"
 
#include "../console_type.h"
 
#include "../gfx_type.h"
 
#include "../core/smallvec_type.hpp"
 
#include "../openttd.h"
 
#include "../company_type.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
extern NetworkServerGameInfo _network_game_info;
 
extern NetworkCompanyState *_network_company_states;
 

	
src/network/network_gui.cpp
Show inline comments
 
@@ -11,25 +11,27 @@
 

	
 
#ifdef ENABLE_NETWORK
 
#include "../stdafx.h"
 
#include "../strings_func.h"
 
#include "../date_func.h"
 
#include "../fios.h"
 
#include "network_internal.h"
 
#include "network_client.h"
 
#include "network_gui.h"
 
#include "network_gamelist.h"
 
#include "network.h"
 
#include "network_base.h"
 
#include "../gui.h"
 
#include "network_udp.h"
 
#include "../window_func.h"
 
#include "../gfx_func.h"
 
#include "../widgets/dropdown_func.h"
 
#include "../querystring_gui.h"
 
#include "../sortlist_type.h"
 
#include "../company_base.h"
 
#include "../company_func.h"
 
#include "../core/geometry_func.hpp"
 

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

	
 

	
 
static void ShowNetworkStartServerWindow();
src/network/network_gui.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file network_gui.h GUIs related to networking. */
 

	
 
#ifndef NETWORK_GUI_H
 
#define NETWORK_GUI_H
 

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

	
 
#ifdef ENABLE_NETWORK
 

	
 
void ShowNetworkNeedPassword(NetworkPasswordType npt);
src/network/network_internal.h
Show inline comments
 
@@ -9,19 +9,13 @@
 

	
 
/** @file network_internal.h Variables and function used internally. */
 

	
 
#ifndef NETWORK_INTERNAL_H
 
#define NETWORK_INTERNAL_H
 

	
 
#include "network.h"
 
#include "network_func.h"
 
#include "network_base.h"
 
#include "core/os_abstraction.h"
 
#include "core/core.h"
 
#include "core/config.h"
 
#include "core/packet.h"
 
#include "core/tcp_game.h"
 

	
 
#include "../command_type.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
src/network/network_server.cpp
Show inline comments
 
@@ -11,18 +11,19 @@
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../stdafx.h"
 
#include "../debug.h"
 
#include "../strings_func.h"
 
#include "network_internal.h"
 
#include "../vehicle_base.h"
 
#include "../date_func.h"
 
#include "network_server.h"
 
#include "network_udp.h"
 
#include "network.h"
 
#include "network_base.h"
 
#include "../console_func.h"
 
#include "../company_base.h"
 
#include "../command_func.h"
 
#include "../saveload/saveload.h"
 
#include "../station_base.h"
 
#include "../genworld.h"
 
#include "../fileio_func.h"
 
#include "../company_func.h"
src/network/network_server.h
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#ifndef NETWORK_SERVER_H
 
#define NETWORK_SERVER_H
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "network_internal.h"
 

	
 
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP);
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno);
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error);
 
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN);
 
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME);
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command);
src/network/network_type.h
Show inline comments
 
@@ -9,15 +9,12 @@
 

	
 
/** @file network_type.h Types used for networking. */
 

	
 
#ifndef NETWORK_TYPE_H
 
#define NETWORK_TYPE_H
 

	
 
#include "../company_type.h"
 
#include "../economy_type.h"
 
#include "core/config.h"
 
#include "core/game.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
enum {
 
	/** How many clients can we have */
src/network/network_udp.cpp
Show inline comments
 
@@ -16,15 +16,17 @@
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../stdafx.h"
 
#include "../date_func.h"
 
#include "../map_func.h"
 
#include "../debug.h"
 
#include "network_gamelist.h"
 
#include "network_internal.h"
 
#include "network_udp.h"
 
#include "network.h"
 
#include "../core/endian_func.hpp"
 
#include "../company_base.h"
 
#include "../thread/thread.h"
 
#include "../rev.h"
 

	
 
#include "core/udp.h"
src/network/network_udp.h
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#ifndef NETWORK_UDP_H
 
#define NETWORK_UDP_H
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "core/address.h"
 

	
 
void NetworkUDPInitialize();
 
void NetworkUDPSearchGame();
 
void NetworkUDPQueryMasterServer();
 
void NetworkUDPQueryServer(NetworkAddress address, bool manually = false);
 
void NetworkUDPAdvertise();
 
void NetworkUDPRemoveAdvertise(bool blocking);
src/newgrf.cpp
Show inline comments
 
@@ -10,25 +10,25 @@
 
/** @file newgrf.cpp Base of all NewGRF support. */
 

	
 
#include "stdafx.h"
 

	
 
#include <stdarg.h>
 

	
 
#include "openttd.h"
 
#include "debug.h"
 
#include "fileio_func.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 
#include "variables.h"
 
#include "bridge.h"
 
#include "town.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_text.h"
 
#include "fontcache.h"
 
#include "currency.h"
 
#include "landscape.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_house.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_station.h"
 
#include "industry.h"
 
#include "newgrf_canal.h"
 
@@ -36,13 +36,12 @@
 
#include "newgrf_townname.h"
 
#include "newgrf_industries.h"
 
#include "rev.h"
 
#include "fios.h"
 
#include "rail.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 
#include "string_func.h"
 
#include "network/network.h"
 
#include <map>
 
#include "core/alloc_type.hpp"
 
#include "core/mem_func.hpp"
src/newgrf.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file newgrf.h Base for the NewGRF implementation. */
 

	
 
#ifndef NEWGRF_H
 
#define NEWGRF_H
 

	
 
#include "town_type.h"
 
#include "newgrf_config.h"
 
#include "cargotype.h"
 
#include "industry_type.h"
 
#include "station_type.h"
 
#include "rail_type.h"
 
#include "house_type.h"
src/newgrf_canal.cpp
Show inline comments
 
@@ -7,18 +7,16 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_canal.cpp Implementation of NewGRF canals. */
 

	
 
#include "stdafx.h"
 
#include "tile_type.h"
 
#include "debug.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_canal.h"
 
#include "tile_map.h"
 
#include "water_map.h"
 

	
 

	
 
/** Table of canal 'feature' sprite groups */
 
WaterFeature _water_feature[CF_END];
 

	
src/newgrf_canal.h
Show inline comments
 
@@ -9,12 +9,16 @@
 

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

	
 
#ifndef NEWGRF_CANAL_H
 
#define NEWGRF_CANAL_H
 

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

	
 
/** List of different canal 'features'.
 
 * Each feature gets an entry in the canal spritegroup table */
 
enum CanalFeature {
 
	CF_WATERSLOPE,
 
	CF_LOCKS,
 
	CF_DIKES,
src/newgrf_cargo.cpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file newgrf_cargo.cpp Implementation of NewGRF cargoes. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "newgrf.h"
 
#include "newgrf_spritegroup.h"
 
#include "core/bitmath_func.hpp"
 

	
 
static uint32 CargoGetRandomBits(const ResolverObject *object)
 
{
 
	return 0;
 
}
 

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

	
 
#ifndef NEWGRF_COMMONS_H
 
#define NEWGRF_COMMONS_H
 

	
 
#include "core/bitmath_func.hpp"
 
#include "tile_cmd.h"
 
#include "transparency.h"
 
#include "sprite.h"
 

	
 
#include "table/sprites.h"
 

	
src/newgrf_engine.cpp
Show inline comments
 
@@ -21,12 +21,14 @@
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "core/random_func.hpp"
 
#include "aircraft.h"
 
#include "core/smallmap_type.hpp"
 
#include "station_base.h"
 
#include "engine_base.h"
 
#include "company_base.h"
 

	
 
struct WagonOverride {
 
	EngineID *train_id;
 
	uint trains;
 
	CargoID cargo;
 
	const SpriteGroup *group;
src/newgrf_engine.h
Show inline comments
 
@@ -12,12 +12,15 @@
 
#ifndef NEWGRF_ENGINE_H
 
#define NEWGRF_ENGINE_H
 

	
 
#include "direction_type.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_properties.h"
 
#include "vehicle_type.h"
 
#include "engine_type.h"
 
#include "gfx_type.h"
 

	
 
enum {
 
	TRAININFO_DEFAULT_VEHICLE_WIDTH = 29,
 
	ROADVEHINFO_DEFAULT_VEHICLE_WIDTH = 28,
 
	VEHICLEINFO_FULL_VEHICLE_WIDTH = 32,
 
};
src/newgrf_generic.cpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file newgrf_generic.cpp Handling of generic feature callbacks. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "newgrf.h"
 
#include "newgrf_spritegroup.h"
 
#include "core/bitmath_func.hpp"
 
#include <list>
 

	
 

	
 
struct GenericCallback {
 
	const GRFFile *file;
 
	const SpriteGroup *group;
src/newgrf_generic.h
Show inline comments
 
@@ -9,12 +9,15 @@
 

	
 
/** @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"
 

	
 
enum AIConstructionEvent {
 
	AICE_TRAIN_CHECK_RAIL_ENGINE     = 0x00, ///< Check if we should build an engine
 
	AICE_TRAIN_CHECK_ELRAIL_ENGINE   = 0x01,
 
	AICE_TRAIN_CHECK_MONORAIL_ENGINE = 0x02,
 
	AICE_TRAIN_CHECK_MAGLEV_ENGINE   = 0x03,
 
	AICE_TRAIN_GET_RAIL_WAGON        = 0x08,
src/newgrf_gui.cpp
Show inline comments
 
@@ -11,20 +11,20 @@
 

	
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "newgrf.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "gfx_func.h"
 
#include "gamelog.h"
 
#include "settings_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "network/network.h"
 
#include "network/network_content.h"
 
#include "sortlist_type.h"
 
#include "querystring_gui.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
/**
 
 * Show the first NewGRF error we can find.
src/newgrf_house.cpp
Show inline comments
 
@@ -7,30 +7,28 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_house.cpp Implementation of NewGRF houses. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "debug.h"
 
#include "viewport_func.h"
 
#include "landscape.h"
 
#include "sprite.h"
 
#include "newgrf.h"
 
#include "newgrf_house.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_town.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_commons.h"
 
#include "transparency.h"
 
#include "functions.h"
 
#include "company_func.h"
 
#include "animated_tile_func.h"
 
#include "company_base.h"
 
#include "town.h"
 
#include "core/random_func.hpp"
 

	
 
static BuildingCounts<uint32> _building_counts;
 
static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX];
 

	
 
HouseOverrideManager _house_mngr(NEW_HOUSE_OFFSET, HOUSE_MAX, INVALID_HOUSE_ID);
 

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

	
 
/** @file newgrf_house.h Functions related to NewGRF houses. */
 

	
 
#ifndef NEWGRF_HOUSE_H
 
#define NEWGRF_HOUSE_H
 

	
 
#include "town_type.h"
 
#include "newgrf_callbacks.h"
 
#include "tile_cmd.h"
 
#include "house_type.h"
 

	
 
/**
 
 * Makes class IDs unique to each GRF file.
src/newgrf_industries.cpp
Show inline comments
 
@@ -8,25 +8,25 @@
 
 */
 

	
 
/** @file newgrf_industries.cpp Handling of NewGRF industries. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "strings_type.h"
 
#include "industry.h"
 
#include "newgrf.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_text.h"
 
#include "newgrf_town.h"
 
#include "window_func.h"
 
#include "town.h"
 
#include "company_base.h"
 
#include "command_func.h"
 
#include "gui.h"
 
#include "strings_func.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
static uint32 _industry_creation_random_bits;
 

	
 
/* Since the industry IDs defined by the GRF file don't necessarily correlate
src/newgrf_industries.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

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

	
 
#ifndef NEWGRF_INDUSTRIES_H
 
#define NEWGRF_INDUSTRIES_H
 

	
 
#include "industry_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.cpp
Show inline comments
 
@@ -7,27 +7,23 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

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

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "variables.h"
 
#include "debug.h"
 
#include "viewport_func.h"
 
#include "landscape.h"
 
#include "newgrf.h"
 
#include "core/random_func.hpp"
 
#include "newgrf_commons.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_text.h"
 
#include "industry.h"
 
#include "sprite.h"
 
#include "transparency.h"
 
#include "functions.h"
 
#include "town.h"
 
#include "command_func.h"
 
#include "animated_tile_func.h"
 
#include "water.h"
 

	
src/newgrf_industrytiles.h
Show inline comments
 
@@ -9,12 +9,17 @@
 

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

	
 
#ifndef NEWGRF_INDUSTRYTILES_H
 
#define NEWGRF_INDUSTRYTILES_H
 

	
 
#include "tile_cmd.h"
 
#include "industry_type.h"
 
#include "newgrf_callbacks.h"
 
#include "core/random_func.hpp"
 

	
 
enum IndustryAnimationTrigger {
 
	IAT_CONSTRUCTION_STATE_CHANGE,
 
	IAT_TILELOOP,
 
	IAT_INDUSTRY_TICK,
 
	IAT_INDUSTRY_RECEIVED_CARGO,
 
	IAT_INDUSTRY_DISTRIBUTES_CARGO,
src/newgrf_sound.h
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef NEWGRF_SOUND_H
 
#define NEWGRF_SOUND_H
 

	
 
#include "sound_type.h"
 
#include "tile_type.h"
 
#include "vehicle_type.h"
 

	
 
enum VehicleSoundEvent {
 
	VSE_START        = 1,
 
	VSE_TUNNEL       = 2,
 
	VSE_BREAKDOWN    = 3,
 
	VSE_RUNNING      = 4,
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file newgrf_spritegroup.cpp Handling of primarily NewGRF action 2. */
 

	
 
#include "stdafx.h"
 
#include "newgrf.h"
 
#include "newgrf_spritegroup.h"
 
#include "sprite.h"
 
#include "core/bitmath_func.hpp"
 
#include "core/pool_func.hpp"
 

	
 
SpriteGroupPool _spritegroup_pool("SpriteGroup");
 
INSTANTIATE_POOL_METHODS(SpriteGroup)
 

	
 
RealSpriteGroup::~RealSpriteGroup()
src/newgrf_spritegroup.h
Show inline comments
 
@@ -10,14 +10,12 @@
 
/** @file newgrf_spritegroup.h Action 2 handling. */
 

	
 
#ifndef NEWGRF_SPRITEGROUP_H
 
#define NEWGRF_SPRITEGROUP_H
 

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

	
src/newgrf_station.cpp
Show inline comments
 
@@ -20,19 +20,20 @@
 
#include "newgrf_commons.h"
 
#include "newgrf_station.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_sound.h"
 
#include "town.h"
 
#include "newgrf_town.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 
#include "company_func.h"
 
#include "animated_tile_func.h"
 
#include "functions.h"
 
#include "tunnelbridge_map.h"
 
#include "spritecache.h"
 
#include "newgrf.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
static StationClass _station_classes[STAT_CLASS_MAX];
 

	
 
enum {
src/newgrf_station.h
Show inline comments
 
@@ -9,20 +9,19 @@
 

	
 
/** @file newgrf_station.h Header file for NewGRF stations */
 

	
 
#ifndef NEWGRF_STATION_H
 
#define NEWGRF_STATION_H
 

	
 
#include "engine_type.h"
 
#include "newgrf_callbacks.h"
 
#include "tile_type.h"
 
#include "station_type.h"
 
#include "strings_type.h"
 
#include "sprite.h"
 
#include "direction_type.h"
 
#include "newgrf.h"
 
#include "cargo_type.h"
 
#include "strings_type.h"
 
#include "station_type.h"
 
#include "rail_type.h"
 

	
 
enum StationClassID {
 
	STAT_CLASS_BEGIN = 0,    ///< the lowest valid value
 
	STAT_CLASS_DFLT = 0,     ///< Default station class.
 
	STAT_CLASS_WAYP,         ///< Waypoint class.
 
	STAT_CLASS_MAX = 32,     ///< Maximum number of classes.
src/newgrf_text.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file newgrf_text.h Header of Action 04 "universal holder" structure and functions */
 

	
 
#ifndef NEWGRF_TEXT_H
 
#define NEWGRF_TEXT_H
 

	
 
#include "strings_type.h"
 

	
 
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
 
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
 
const char *GetGRFStringPtr(uint16 stringid);
 
void CleanUpStrings();
 
void SetCurrentGrfLangID(byte language_id);
 
char *TranslateTTDPatchCodes(uint32 grfid, const char *str);
src/newgrf_town.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file newgrf_town.h Functions to handle the town part of NewGRF towns. */
 

	
 
#ifndef NEWGRF_TOWN_H
 
#define NEWGRF_TOWN_H
 

	
 
#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 industry tiles. */
 

	
 
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t);
 

	
 
#endif /* NEWGRF_TOWN_H */
src/news_gui.cpp
Show inline comments
 
@@ -7,18 +7,15 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file news_gui.cpp GUI functions related to news messages. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "viewport_func.h"
 
#include "news_type.h"
 
#include "gfx_func.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "vehicle_func.h"
 
#include "station_base.h"
 
@@ -28,12 +25,13 @@
 
#include "string_func.h"
 
#include "widgets/dropdown_func.h"
 
#include "statusbar_gui.h"
 
#include "company_manager_face.h"
 
#include "company_func.h"
 
#include "engine_gui.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
const NewsItem *_statusbar_news_item = NULL;
 
bool _news_ticker_sound; ///< Make a ticker sound when a news item is published.
 

	
src/openttd.cpp
Show inline comments
 
@@ -57,12 +57,16 @@
 
#include "elrail_func.h"
 
#include "rev.h"
 
#include "highscore.h"
 
#include "thread/thread.h"
 
#include "station_base.h"
 
#include "crashlog.h"
 
#include "company_base.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "core/random_func.hpp"
 

	
 
#include "newgrf_commons.h"
 

	
 
#include "town.h"
 
#include "industry.h"
 

	
src/order_cmd.cpp
Show inline comments
 
@@ -23,13 +23,13 @@
 
#include "depot_base.h"
 
#include "core/pool_func.hpp"
 
#include "aircraft.h"
 
#include "roadveh.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "roadstop_base.h"
 
#include "company_base.h"
 

	
 
#include "table/strings.h"
 

	
 
/* DestinationID must be at least as large as every these below, because it can
 
 * be any of them
 
 */
src/order_func.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#define ORDER_FUNC_H
 

	
 
#include "order_type.h"
 
#include "vehicle_type.h"
 
#include "tile_type.h"
 
#include "group_type.h"
 
#include "date_type.h"
 
#include "company_type.h"
 

	
 
struct BackuppedOrders {
 
	BackuppedOrders() : order(NULL), name(NULL) { }
 
	~BackuppedOrders() { free(order); free(name); }
 

	
src/order_gui.cpp
Show inline comments
 
@@ -7,18 +7,15 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file order_gui.cpp GUI related to orders. */
 

	
 
#include "stdafx.h"
 
#include "window_gui.h"
 
#include "command_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "depot_base.h"
 
#include "vehicle_base.h"
 
#include "vehicle_gui.h"
 
#include "roadveh.h"
 
#include "timetable.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
@@ -28,12 +25,13 @@
 
#include "textbuf_gui.h"
 
#include "string_func.h"
 
#include "tilehighlight_func.h"
 
#include "network/network.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
/** Widget numbers of the order window. */
 
enum OrderWindowWidgets {
src/os/unix/unix.cpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file unix.cpp Implementation of Unix specific file handling. */
 

	
 
#include "../../stdafx.h"
 
#include "../../textbuf_gui.h"
 
#include "../../functions.h"
 
#include "../../crashlog.h"
 
#include "../../core/random_func.hpp"
 

	
 

	
 
#include <dirent.h>
 
#include <unistd.h>
 
#include <sys/stat.h>
 
#include <time.h>
src/pathfinder/follow_track.hpp
Show inline comments
 
@@ -9,19 +9,19 @@
 

	
 
/** @file follow_track.hpp Template function for track followers */
 

	
 
#ifndef  FOLLOW_TRACK_HPP
 
#define  FOLLOW_TRACK_HPP
 

	
 
#include "../depot_map.h"
 
#include "../pbs.h"
 
#include "../roadveh.h"
 
#include "../station_base.h"
 
#include "../train.h"
 
#include "../tunnelbridge.h"
 
#include "../tunnelbridge_map.h"
 
#include "../depot_map.h"
 
#include "pf_performance_timer.hpp"
 

	
 
/** Track follower helper template class (can serve pathfinders and vehicle
 
 *  controllers). See 6 different typedefs below for 3 different transport
 
 *  types w/ or w/o 90-deg turns allowed */
 
template <TransportType Ttr_type_, typename VehicleType, bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -9,21 +9,15 @@
 

	
 
/** @file npf.cpp Implementation of the NPF pathfinder. */
 

	
 
#include "../../stdafx.h"
 
#include "../../debug.h"
 
#include "../../landscape.h"
 
#include "../../depot_base.h"
 
#include "../../network/network.h"
 
#include "../../tunnelbridge_map.h"
 
#include "../../functions.h"
 
#include "../../tunnelbridge.h"
 
#include "../../pbs.h"
 
#include "../../roadveh.h"
 
#include "../../ship.h"
 
#include "../../train.h"
 
#include "../../roadstop_base.h"
 
#include "../pathfinder_func.h"
 
#include "../pathfinder_type.h"
 
#include "../follow_track.hpp"
 
#include "aystar.h"
 

	
src/pathfinder/npf/npf_func.h
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef NPF_FUNC_H
 
#define NPF_FUNC_H
 

	
 
#include "../../track_type.h"
 
#include "../../direction_type.h"
 
#include "../../vehicle_type.h"
 
#include "../pathfinder_type.h"
 

	
 
/**
 
 * Used when user sends road vehicle to the nearest depot or if road vehicle needs servicing using NPF.
 
 * @param v            vehicle that needs to go to some depot
 
 * @param max_penalty  max distance (in pathfinder penalty) from the current vehicle position
src/pathfinder/opf/opf_ship.cpp
Show inline comments
 
@@ -7,18 +7,16 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file pathfind.cpp Implementation of the oldest supported pathfinder. */
 

	
 
#include "../../stdafx.h"
 
#include "../../debug.h"
 
#include "../../tunnelbridge_map.h"
 
#include "../../tunnelbridge.h"
 
#include "../../ship.h"
 
#include "../../core/random_func.hpp"
 
#include "opf_ship.h"
 

	
 
struct RememberData {
 
	uint16 cur_length;
 
	byte depth;
 
	Track last_choosen_track;
 
};
src/pathfinder/opf/opf_ship.h
Show inline comments
 
@@ -9,12 +9,17 @@
 

	
 
/** @file opf_ship.h Original pathfinder for ships; very simple. */
 

	
 
#ifndef OPF_SHIP_H
 
#define OPF_SHIP_H
 

	
 
#include "../../direction_type.h"
 
#include "../../tile_type.h"
 
#include "../../track_type.h"
 
#include "../../vehicle_type.h"
 

	
 
/**
 
 * Finds the best path for given ship using OPF.
 
 * @param v        the ship that needs to find a path
 
 * @param tile     the tile to find the path from (should be next tile the ship is about to enter)
 
 * @param enterdir diagonal direction which the ship will enter this new tile from
 
 * @param tracks   available tracks on the new tile (to choose from)
src/pathfinder/pathfinder_func.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file pathfinder_func.h General functions related to pathfinders. */
 

	
 
#ifndef PATHFINDER_FUNC_H
 
#define PATHFINDER_FUNC_H
 

	
 
#include "../station_base.h"
 
#include "../waypoint_base.h"
 

	
 
/**
 
 * Calculates the tile of given station that is closest to a given tile
 
 * for this we assume the station is a rectangle,
 
 * as defined by its tile are (st->train_station)
src/pathfinder/pathfinder_type.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file pathfinder_type.h General types related to pathfinders. */
 

	
 
#ifndef PATHFINDER_TYPE_H
 
#define PATHFINDER_TYPE_H
 

	
 
#include "../tile_type.h"
 

	
 
/** Length (penalty) of one tile with NPF */
 
static const int NPF_TILE_LENGTH = 100;
 

	
 
/**
 
 * This penalty is the equivalent of "infite", which means that paths that
 
 * get this penalty will be chosen, but only if there is no other route
src/pathfinder/yapf/yapf.h
Show inline comments
 
@@ -11,12 +11,14 @@
 

	
 
#ifndef  YAPF_H
 
#define  YAPF_H
 

	
 
#include "../../direction_type.h"
 
#include "../../station_type.h"
 
#include "../../track_type.h"
 
#include "../../vehicle_type.h"
 
#include "../pathfinder_type.h"
 

	
 
/**
 
 * Finds the best path for given ship using YAPF.
 
 * @param v        the ship that needs to find a path
 
 * @param tile     the tile to find the path from (should be next tile the ship is about to enter)
src/pbs.cpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file pbs.cpp PBS support routines */
 

	
 
#include "stdafx.h"
 
#include "functions.h"
 
#include "vehicle_func.h"
 
#include "pathfinder/follow_track.hpp"
 
//#include "depot_map.h"
 

	
 
/**
 
 * Get the reserved trackbits for any tile, regardless of type.
 
 * @param t the tile
 
 * @return the reserved trackbits. TRACK_BIT_NONE on nothing reserved or
 
 *     a tile without rail.
src/rail.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef RAIL_H
 
#define RAIL_H
 

	
 
#include "rail_type.h"
 
#include "track_type.h"
 
#include "vehicle_type.h"
 
#include "gfx_type.h"
 
#include "core/bitmath_func.hpp"
 
#include "economy_func.h"
 
#include "slope_type.h"
 
#include "strings_type.h"
 

	
src/rail_cmd.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file rail_cmd.cpp Handling of rail tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "cmd_helper.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "engine_base.h"
 
#include "depot_base.h"
 
@@ -31,12 +30,13 @@
 
#include "sound_func.h"
 
#include "tunnelbridge.h"
 
#include "functions.h"
 
#include "elrail_func.h"
 
#include "town.h"
 
#include "pbs.h"
 
#include "company_base.h"
 

	
 
#include "table/strings.h"
 
#include "table/railtypes.h"
 
#include "table/track_land.h"
 

	
 
RailtypeInfo _railtypes[RAILTYPE_END];
src/rail_gui.cpp
Show inline comments
 
@@ -12,13 +12,12 @@
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "terraform_gui.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "waypoint_func.h"
 
#include "newgrf_station.h"
 
#include "company_base.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
@@ -27,12 +26,13 @@
 
#include "sound_func.h"
 
#include "company_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "tunnelbridge.h"
 
#include "tilehighlight_func.h"
 
#include "spritecache.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "station_map.h"
 
#include "tunnelbridge_map.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
src/rail_map.h
Show inline comments
 
@@ -12,13 +12,12 @@
 
#ifndef RAIL_MAP_H
 
#define RAIL_MAP_H
 

	
 
#include "rail_type.h"
 
#include "depot_type.h"
 
#include "signal_func.h"
 
#include "direction_func.h"
 
#include "track_func.h"
 
#include "tile_map.h"
 
#include "signal_type.h"
 

	
 

	
 
/** Different types of Rail-related tiles */
src/road_cmd.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file road_cmd.cpp Commands related to road tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "cmd_helper.h"
 
#include "road_internal.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "pathfinder/yapf/yapf_cache.h"
 
@@ -27,15 +26,18 @@
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "tunnelbridge.h"
 
#include "cheat_type.h"
 
#include "functions.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 
#include "elrail_func.h"
 
#include "roadveh.h"
 
#include "town.h"
 
#include "company_base.h"
 
#include "core/random_func.hpp"
 

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

	
 
/**
 
 * Verify whether a road vehicle is available.
src/road_cmd.h
Show inline comments
 
@@ -10,11 +10,12 @@
 
/** @file road_cmd.h Road related functions. */
 

	
 
#ifndef ROAD_CMD_H
 
#define ROAD_CMD_H
 

	
 
#include "direction_type.h"
 
#include "road_type.h"
 

	
 
void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt);
 
void UpdateNearestTownForRoadTiles(bool invalidate);
 

	
 
#endif /* ROAD_CMD_H */
src/road_func.h
Show inline comments
 
@@ -11,14 +11,15 @@
 

	
 
#ifndef ROAD_FUNC_H
 
#define ROAD_FUNC_H
 

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

	
 
/**
 
 * Whether the given roadtype is valid.
 
 * @param rt the roadtype to check for validness
 
 * @return true if and only if valid
 
 */
src/road_gui.cpp
Show inline comments
 
@@ -7,21 +7,18 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file road_gui.cpp GUI for building roads. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "station_gui.h"
 
#include "terraform_gui.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "road_type.h"
 
#include "road_cmd.h"
 
#include "road_map.h"
 
#include "station_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
src/road_internal.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file road_internal.h Functions used internally by the roads. */
 

	
 
#ifndef ROAD_INTERNAL_H
 
#define ROAD_INTERNAL_H
 

	
 
#include "tile_cmd.h"
 
#include "road_type.h"
 

	
 
/**
 
 * Clean up unneccesary RoadBits of a planed tile.
 
 * @param tile current tile
 
 * @param org_rb planed RoadBits
 
 * @return optimised RoadBits
src/road_map.h
Show inline comments
 
@@ -12,13 +12,12 @@
 
#ifndef ROAD_MAP_H
 
#define ROAD_MAP_H
 

	
 
#include "track_func.h"
 
#include "depot_type.h"
 
#include "rail_type.h"
 
#include "town_type.h"
 
#include "road_func.h"
 
#include "tile_map.h"
 

	
 

	
 
enum RoadTileType {
 
	ROAD_TILE_NORMAL,
src/roadstop_base.h
Show inline comments
 
@@ -12,12 +12,14 @@
 
#ifndef ROADSTOP_BASE_H
 
#define ROADSTOP_BASE_H
 

	
 
#include "station_type.h"
 
#include "core/pool_type.hpp"
 
#include "core/bitmath_func.hpp"
 
#include "direction_type.h"
 
#include "vehicle_type.h"
 

	
 
typedef Pool<RoadStop, RoadStopID, 32, 64000> RoadStopPool;
 
extern RoadStopPool _roadstop_pool;
 

	
 
/** A Stop for a Road Vehicle */
 
struct RoadStop : RoadStopPool::PoolItem<&_roadstop_pool> {
src/roadveh.h
Show inline comments
 
@@ -10,15 +10,13 @@
 
/** @file src/roadveh.h Road vehicle states */
 

	
 
#ifndef ROADVEH_H
 
#define ROADVEH_H
 

	
 
#include "vehicle_base.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 
#include "economy_func.h"
 
#include "road_type.h"
 

	
 
struct RoadVehicle;
 

	
 
/** Road vehicle states */
 
enum RoadVehicleStates {
 
	/*
src/roadveh_cmd.cpp
Show inline comments
 
@@ -27,20 +27,23 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "ai/ai.hpp"
 
#include "depot_map.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 
#include "roadstop_base.h"
 
#include "cargotype.h"
 
#include "spritecache.h"
 
#include "debug.h"
 
#include "core/random_func.hpp"
 
#include "engine_base.h"
 
#include "company_base.h"
 
#include "engine_func.h"
 

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

	
 
static const uint16 _roadveh_images[63] = {
 
	0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14,
src/saveload/afterload.cpp
Show inline comments
 
@@ -12,22 +12,19 @@
 
#include "../stdafx.h"
 
#include "../void_map.h"
 
#include "../signs_base.h"
 
#include "../depot_base.h"
 
#include "../window_func.h"
 
#include "../fios.h"
 
#include "../gamelog.h"
 
#include "../gamelog_internal.h"
 
#include "../network/network.h"
 
#include "../gfxinit.h"
 
#include "../functions.h"
 
#include "../industry.h"
 
#include "../clear_map.h"
 
#include "../vehicle_func.h"
 
#include "../newgrf_station.h"
 
#include "../openttd.h"
 
#include "../debug.h"
 
#include "../string_func.h"
 
#include "../date_func.h"
 
#include "../roadveh.h"
 
#include "../train.h"
 
#include "../station_base.h"
 
@@ -46,12 +43,16 @@
 
#include "../ai/ai.hpp"
 
#include "../town.h"
 
#include "../economy_base.h"
 
#include "../animated_tile_func.h"
 
#include "../subsidy_base.h"
 
#include "../subsidy_func.h"
 
#include "../company_base.h"
 
#include "../newgrf.h"
 
#include "../engine_base.h"
 
#include "../engine_func.h"
 

	
 
#include "table/strings.h"
 

	
 
#include "saveload_internal.h"
 

	
 
#include <signal.h>
src/saveload/autoreplace_sl.cpp
Show inline comments
 
@@ -7,14 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file autoreplace_sl.cpp Code handling saving and loading of autoreplace rules */
 

	
 
#include "../stdafx.h"
 
#include "../engine_type.h"
 
#include "../group_type.h"
 
#include "../autoreplace_base.h"
 

	
 
#include "saveload.h"
 

	
 
static const SaveLoad _engine_renew_desc[] = {
 
	    SLE_VAR(EngineRenew, from,     SLE_UINT16),
src/saveload/gamelog_sl.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file gamelog_sl.cpp Code handling saving and loading of gamelog data */
 

	
 
#include "../stdafx.h"
 
#include "../gamelog.h"
 
#include "../gamelog_internal.h"
 
#include "../core/alloc_func.hpp"
 

	
 
#include "saveload.h"
 

	
 
static const SaveLoad _glog_action_desc[] = {
src/saveload/industry_sl.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file industry_sl.cpp Code handling saving and loading of industries */
 

	
 
#include "../stdafx.h"
 
#include "../strings_type.h"
 
#include "../industry.h"
 
#include "../newgrf_commons.h"
 

	
 
#include "saveload.h"
 

	
 
static const SaveLoad _industry_desc[] = {
src/saveload/misc_sl.cpp
Show inline comments
 
@@ -17,13 +17,13 @@
 
#include "../vehicle_func.h"
 
#include "../window_gui.h"
 
#include "../window_func.h"
 
#include "../viewport_func.h"
 
#include "../gfx_func.h"
 
#include "../company_base.h"
 
#include "../town.h"
 
#include "../core/random_func.hpp"
 

	
 
#include "saveload.h"
 

	
 
extern TileIndex _cur_tileloop_tile;
 

	
 
/* Keep track of current game position */
src/saveload/oldloader.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file oldloader.h Declarations of strctures and function used in loader of old savegames */
 

	
 
#ifndef OLDLOADER_H
 
#define OLDLOADER_H
 

	
 
#include "saveload.h"
 
#include "../tile_type.h"
 

	
 
enum {
 
	BUFFER_SIZE = 4096,
 
	OLD_MAP_SIZE = 256 * 256,
 
};
 

	
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -19,19 +19,21 @@
 
#include "../train.h"
 
#include "../signs_base.h"
 
#include "../station_base.h"
 
#include "../subsidy_base.h"
 
#include "../debug.h"
 
#include "../depot_base.h"
 
#include "../zoom_func.h"
 
#include "../date_func.h"
 
#include "../vehicle_func.h"
 
#include "../variables.h"
 
#include "../effectvehicle_base.h"
 
#include "../core/mem_func.hpp"
 
#include "../core/alloc_type.hpp"
 
#include "../engine_base.h"
 
#include "../engine_func.h"
 
#include "../company_base.h"
 
#include "saveload_internal.h"
 
#include "oldloader.h"
 

	
 
#include "table/strings.h"
 
#include "../table/engines.h"
 
#include "../table/townname.h"
src/saveload/saveload.cpp
Show inline comments
 
@@ -18,33 +18,32 @@
 
 * <li>write all data byte-by-byte to the temporary buffer so it is endian-safe
 
 * <li>when the buffer is full; flush it to the output (eg save to file) (_sl.buf, _sl.bufp, _sl.bufe)
 
 * <li>repeat this until everything is done, and flush any remaining output to file
 
 * </ol>
 
 */
 
#include "../stdafx.h"
 
#include "../openttd.h"
 
#include "../debug.h"
 
#include "../station_base.h"
 
#include "../thread/thread.h"
 
#include "../town.h"
 
#include "../network/network.h"
 
#include "../variables.h"
 
#include "../window_func.h"
 
#include "../strings_func.h"
 
#include "../gfx_func.h"
 
#include "../core/endian_func.hpp"
 
#include "../vehicle_base.h"
 
#include "../company_func.h"
 
#include "../date_func.h"
 
#include "../autoreplace_base.h"
 
#include "../roadstop_base.h"
 
#include "../statusbar_gui.h"
 
#include "../fileio_func.h"
 
#include "../gamelog.h"
 
#include "../string_func.h"
 
#include "../engine_base.h"
 
#include "../company_base.h"
 

	
 
#include "table/strings.h"
 

	
 
#include "saveload_internal.h"
 

	
 
extern const uint16 SAVEGAME_VERSION = 136;
src/saveload/saveload_internal.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file saveload_internal.h Declaration of functions used in more save/load files */
 

	
 
#ifndef SAVELOAD_INTERNAL_H
 
#define SAVELOAD_INTERNAL_H
 

	
 
#include "../strings_type.h"
 
#include "../company_manager_face.h"
 
#include "../order_base.h"
 
#include "../engine_type.h"
 
#include "saveload.h"
 

	
 
void InitializeOldNames();
src/saveload/signs_sl.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file signs_sl.cpp Code handling saving and loading of economy data */
 

	
 
#include "../stdafx.h"
 
#include "../company_func.h"
 
#include "../signs_base.h"
 

	
 
#include "saveload.h"
 

	
 
static const SaveLoad _sign_desc[] = {
 
  SLE_CONDVAR(Sign, name,  SLE_NAME,                   0, 83),
src/saveload/station_sl.cpp
Show inline comments
 
@@ -12,13 +12,12 @@
 
#include "../stdafx.h"
 
#include "../station_base.h"
 
#include "../waypoint_base.h"
 
#include "../roadstop_base.h"
 
#include "../vehicle_base.h"
 
#include "../newgrf_station.h"
 
#include "../station_map.h"
 

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

	
 
/**
 
 * Update the buoy orders to be waypoint orders.
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -14,12 +14,13 @@
 
#include "../train.h"
 
#include "../roadveh.h"
 
#include "../ship.h"
 
#include "../aircraft.h"
 
#include "../station_base.h"
 
#include "../effectvehicle_base.h"
 
#include "../engine_base.h"
 

	
 
#include "saveload.h"
 

	
 
#include <map>
 

	
 
/*
src/saveload/waypoint_sl.cpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#include "../stdafx.h"
 
#include "../waypoint_base.h"
 
#include "../newgrf_station.h"
 
#include "../vehicle_base.h"
 
#include "../town.h"
 
#include "../newgrf.h"
 

	
 
#include "table/strings.h"
 

	
 
#include "saveload_internal.h"
 

	
 
/** Helper structure to convert from the old waypoint system. */
src/script/script_info.hpp
Show inline comments
 
@@ -9,12 +9,13 @@
 

	
 
/** @file script_info.hpp ScriptInfo keeps track of all information of a script, like Author, Description, ... */
 

	
 
#ifndef SCRIPT_INFO
 
#define SCRIPT_INFO
 

	
 
#include <squirrel.h>
 
#include "../misc/countedptr.hpp"
 

	
 
class ScriptFileInfo : public SimpleCountedObject {
 
public:
 
	ScriptFileInfo() :
 
		SQ_instance(NULL),
src/sdl.h
Show inline comments
 
@@ -17,13 +17,12 @@ void SdlClose(uint32 x);
 

	
 
#ifdef WIN32
 
	#define DYNAMICALLY_LOADED_SDL
 
#endif
 

	
 
#ifdef DYNAMICALLY_LOADED_SDL
 
	#include <SDL.h>
 

	
 
	struct SDLProcs {
 
		int (SDLCALL *SDL_Init)(Uint32);
 
		int (SDLCALL *SDL_InitSubSystem)(Uint32);
 
		char *(SDLCALL *SDL_GetError)();
 
		void (SDLCALL *SDL_QuitSubSystem)(Uint32);
src/settings.cpp
Show inline comments
 
@@ -54,16 +54,17 @@
 
#include "music/music_driver.hpp"
 
#include "blitter/factory.hpp"
 
#include "base_media_base.h"
 
#include "gamelog.h"
 
#include "settings_func.h"
 
#include "ini_type.h"
 
#include "ai/ai.hpp"
 
#include "ai/ai_config.hpp"
 
#include "newgrf.h"
 
#include "ship.h"
 
#include "company_base.h"
 
#include "engine_base.h"
 

	
 
#include "void_map.h"
 
#include "station_base.h"
 

	
 
#include "table/strings.h"
 
#include "table/settings.h"
src/settings_func.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file settings_func.h Functions related to setting/changing the settings. */
 

	
 
#ifndef SETTINGS_FUNC_H
 
#define SETTINGS_FUNC_H
 

	
 
#include "core/smallvec_type.hpp"
 
#include "company_type.h"
 

	
 
void IConsoleSetSetting(const char *name, const char *value);
 
void IConsoleSetSetting(const char *name, int32 value);
 
void IConsoleGetSetting(const char *name);
 
void IConsoleListSettings(const char *prefilter);
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -7,35 +7,33 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file settings_gui.cpp GUI for settings. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "currency.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "screenshot.h"
 
#include "network/network.h"
 
#include "town.h"
 
#include "settings_internal.h"
 
#include "newgrf_townname.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "widgets/dropdown_type.h"
 
#include "widgets/dropdown_func.h"
 
#include "station_func.h"
 
#include "openttd.h"
 
#include "highscore.h"
 
#include "base_media_base.h"
 
#include "company_base.h"
 
#include "company_func.h"
 
#include "viewport_func.h"
 
#include "core/geometry_func.hpp"
 
#include <map>
 

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

	
 
static const StringID _units_dropdown[] = {
src/settings_internal.h
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#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 */
 
enum SettingDescTypeLong {
src/ship.h
Show inline comments
 
@@ -10,15 +10,12 @@
 
/** @file ship.h Base for ships. */
 

	
 
#ifndef SHIP_H
 
#define SHIP_H
 

	
 
#include "vehicle_base.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 
#include "economy_func.h"
 

	
 
void RecalcShipStuff(Vehicle *v);
 
void GetShipSpriteSize(EngineID engine, uint &width, uint &height);
 

	
 
/**
 
 * All ships have this type.
src/ship_cmd.cpp
Show inline comments
 
@@ -28,17 +28,20 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 
#include "ai/ai.hpp"
 
#include "pathfinder/opf/opf_ship.h"
 
#include "landscape_type.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "company_base.h"
 

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

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

	
src/signal.cpp
Show inline comments
 
@@ -13,12 +13,13 @@
 
#include "debug.h"
 
#include "station_map.h"
 
#include "tunnelbridge_map.h"
 
#include "vehicle_func.h"
 
#include "functions.h"
 
#include "train.h"
 
#include "company_base.h"
 

	
 

	
 
/** these are the maximums used for updating signal blocks */
 
enum {
 
	SIG_TBU_SIZE    =  64, ///< number of signals entering to block
 
	SIG_TBD_SIZE    = 256, ///< number of intersections - open nodes in current block
src/signs_base.h
Show inline comments
 
@@ -11,14 +11,14 @@
 

	
 
#ifndef SIGNS_BASE_H
 
#define SIGNS_BASE_H
 

	
 
#include "signs_type.h"
 
#include "viewport_type.h"
 
#include "tile_type.h"
 
#include "core/pool_type.hpp"
 
#include "company_type.h"
 

	
 
typedef Pool<Sign, SignID, 16, 64000> SignPool;
 
extern SignPool _sign_pool;
 

	
 
struct Sign : SignPool::PoolItem<&_sign_pool> {
 
	char *name;
src/signs_func.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file signs_func.h Functions related to signs. */
 

	
 
#ifndef SIGNS_FUNC_H
 
#define SIGNS_FUNC_H
 

	
 
#include "signs_type.h"
 
#include "tile_type.h"
 

	
 
extern SignID _new_sign_id;
 

	
 
void UpdateAllSignVirtCoords();
 
void PlaceProc_Sign(TileIndex tile);
 

	
src/signs_gui.cpp
Show inline comments
 
@@ -21,12 +21,13 @@
 
#include "map_func.h"
 
#include "gfx_func.h"
 
#include "viewport_func.h"
 
#include "querystring_gui.h"
 
#include "sortlist_type.h"
 
#include "string_func.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
struct SignList {
 
	typedef GUIList<const Sign *> GUISignList;
src/smallmap_gui.cpp
Show inline comments
 
@@ -14,21 +14,21 @@
 
#include "industry.h"
 
#include "station_map.h"
 
#include "landscape.h"
 
#include "window_gui.h"
 
#include "tree_map.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "town.h"
 
#include "blitter/factory.hpp"
 
#include "tunnelbridge_map.h"
 
#include "strings_func.h"
 
#include "core/endian_func.hpp"
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 
#include "window_func.h"
 
#include "company_base.h"
 

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

	
 
/** Widget numbers of the small map window. */
 
enum SmallMapWindowWidgets {
src/sound.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "landscape.h"
 
#include "mixer.h"
 
#include "newgrf_sound.h"
 
#include "fios.h"
 
#include "window_gui.h"
 
#include "vehicle_base.h"
 
#include "debug.h"
 

	
 
/* The type of set we're replacing */
 
#define SET_TYPE "sounds"
 
#include "base_media_func.h"
 

	
 
static SoundEntry _original_sounds[ORIGINAL_SAMPLE_COUNT];
src/sound/allegro_s.cpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file allegro_s.cpp Playing sound via Allegro. */
 

	
 
#ifdef WITH_ALLEGRO
 

	
 
#include "../stdafx.h"
 

	
 
#include "../driver.h"
 
#include "../mixer.h"
 
#include "../debug.h"
 
#include "allegro_s.h"
 
#include <allegro.h>
 

	
 
static FSoundDriver_Allegro iFSoundDriver_Allegro;
src/sound/win32_s.cpp
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#include "../stdafx.h"
 
#include "../openttd.h"
 
#include "../driver.h"
 
#include "../mixer.h"
 
#include "../core/alloc_func.hpp"
 
#include "../core/bitmath_func.hpp"
 
#include "win32_s.h"
 
#include <windows.h>
 
#include <mmsystem.h>
 

	
 
static FSoundDriver_Win32 iFSoundDriver_Win32;
 

	
src/spritecache.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file spritecache.cpp Caching of sprites. */
 

	
 
#include "stdafx.h"
 
#include "gfx_type.h"
 
#include "fileio_func.h"
 
#include "spriteloader/grf.hpp"
 
#include "gfx_func.h"
 
#ifdef WITH_PNG
 
#include "spriteloader/png.hpp"
 
#endif /* WITH_PNG */
src/spriteloader/png.cpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file png.cpp Reading sprites from png files. */
 

	
 
#ifdef WITH_PNG
 

	
 
#include "../stdafx.h"
 
#include "../gfx_func.h"
 
#include "../fileio_func.h"
 
#include "../debug.h"
 
#include "png.hpp"
 
#include <png.h>
 

	
 
#define PNG_SLOT 62
src/spriteloader/spriteloader.hpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file spriteloader.hpp Base for loading sprites. */
 

	
 
#ifndef SPRITELOADER_HPP
 
#define SPRITELOADER_HPP
 

	
 
#include "../core/alloc_type.hpp"
 
#include "../gfx_type.h"
 

	
 
class SpriteLoader {
 
public:
 
	struct CommonPixel {
 
		uint8 r;  ///< Red-channel
 
		uint8 g;  ///< Green-channel
src/station.cpp
Show inline comments
 
@@ -20,12 +20,13 @@
 
#include "aircraft.h"
 
#include "vehicle_gui.h"
 
#include "core/pool_func.hpp"
 
#include "station_base.h"
 
#include "roadstop_base.h"
 
#include "industry.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
StationPool _station_pool("Station");
 
INSTANTIATE_POOL_METHODS(Station)
 

	
src/station_base.h
Show inline comments
 
@@ -12,16 +12,13 @@
 
#ifndef STATION_BASE_H
 
#define STATION_BASE_H
 

	
 
#include "base_station_base.h"
 
#include "airport.h"
 
#include "cargopacket.h"
 
#include "cargo_type.h"
 
#include "industry_type.h"
 
#include "core/geometry_type.hpp"
 
#include <list>
 

	
 
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
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file station_cmd.cpp Handling of station tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "aircraft.h"
 
#include "bridge_map.h"
 
#include "cmd_helper.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
@@ -42,12 +41,15 @@
 
#include "station_base.h"
 
#include "roadstop_base.h"
 
#include "waypoint_base.h"
 
#include "waypoint_func.h"
 
#include "pbs.h"
 
#include "debug.h"
 
#include "core/random_func.hpp"
 
#include "company_base.h"
 
#include "newgrf.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
 
@@ -13,16 +13,15 @@
 
#define STATION_FUNC_H
 

	
 
#include "station_type.h"
 
#include "sprite.h"
 
#include "rail_type.h"
 
#include "road_type.h"
 
#include "tile_type.h"
 
#include "cargo_type.h"
 
#include "vehicle_type.h"
 
#include "transparency.h"
 
#include "company_type.h"
 

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

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

	
 
void ShowStationViewWindow(StationID station);
src/station_gui.cpp
Show inline comments
 
@@ -7,32 +7,30 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file station_gui.cpp The GUI for stations. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "company_func.h"
 
#include "command_func.h"
 
#include "vehicle_gui.h"
 
#include "cargotype.h"
 
#include "station_gui.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "widgets/dropdown_func.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "tilehighlight_func.h"
 
#include "company_base.h"
 
#include "sortlist_type.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
/**
 
 * Draw a (multi)line of cargos seperated by commas, and prefixed with a string.
src/station_gui.h
Show inline comments
 
@@ -10,13 +10,14 @@
 
/** @file station_gui.h Contains enums and function declarations connected with stations GUI */
 

	
 
#ifndef STATION_GUI_H
 
#define STATION_GUI_H
 

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

	
 
/** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */
 
enum StationViewWidgets {
 
	SVW_CAPTION    =  0, ///< Caption of the window
 
	SVW_WAITING    =  1, ///< List of waiting cargo
 
	SVW_SCROLLBAR  =  2, ///< Scrollbar
src/station_type.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef STATION_TYPE_H
 
#define STATION_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 
#include "core/smallvec_type.hpp"
 
#include "tile_type.h"
 
#include "tilearea_type.h"
 

	
 
typedef uint16 StationID;
 
typedef uint16 RoadStopID;
 

	
 
struct BaseStation;
src/statusbar_gui.cpp
Show inline comments
 
@@ -22,12 +22,13 @@
 
#include "news_gui.h"
 
#include "company_gui.h"
 
#include "window_gui.h"
 
#include "variables.h"
 
#include "window_func.h"
 
#include "statusbar_gui.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
static bool DrawScrollingStatusText(const NewsItem *ni, int scroll_pos, int left, int right, int top, int bottom)
 
{
src/strings.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file strings.cpp Handling of translated strings. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "currency.h"
 
#include "station_base.h"
 
#include "town.h"
 
#include "screenshot.h"
 
#include "waypoint_base.h"
 
#include "industry.h"
 
@@ -26,17 +25,17 @@
 
#include "gui.h"
 
#include "strings_func.h"
 
#include "rev.h"
 
#include "core/endian_func.hpp"
 
#include "date_func.h"
 
#include "vehicle_base.h"
 
#include "video/video_driver.hpp"
 
#include "engine_base.h"
 
#include "strgen/strgen.h"
 
#include "gfx_func.h"
 
#include "townname_func.h"
 
#include "string_func.h"
 
#include "company_base.h"
 

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

	
 
DynamicLanguages _dynlang;     ///< Language information of the program.
 
uint64 _decode_parameters[20]; ///< Global array of string parameters. To access, use #SetDParam.
src/subsidy.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "subsidy_base.h"
 
#include "subsidy_func.h"
 
#include "core/pool_func.hpp"
 
#include "core/random_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
SubsidyPool _subsidy_pool("Subsidy");
 
INSTANTIATE_POOL_METHODS(Subsidy)
 

	
src/subsidy_func.h
Show inline comments
 
@@ -11,15 +11,14 @@
 

	
 
#ifndef SUBSIDY_FUNC_H
 
#define SUBSIDY_FUNC_H
 

	
 
#include "core/geometry_type.hpp"
 
#include "station_type.h"
 
#include "town_type.h"
 
#include "industry_type.h"
 
#include "company_type.h"
 
#include "cargo_type.h"
 

	
 
Pair SetupSubsidyDecodeParam(const struct Subsidy *s, bool mode);
 
void DeleteSubsidyWith(SourceType type, SourceID index);
 
bool CheckSubsidised(CargoID cargo_type, CompanyID company, SourceType src_type, SourceID src, const Station *st);
 
void SubsidyMonthlyHandler();
 
void RebuildSubsidisedSourceAndDestinationCache();
src/subsidy_gui.cpp
Show inline comments
 
@@ -7,23 +7,23 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file subsidy_gui.cpp GUI for subsidies. */
 

	
 
#include "stdafx.h"
 
#include "strings_type.h"
 
#include "industry.h"
 
#include "town.h"
 
#include "window_gui.h"
 
#include "strings_func.h"
 
#include "date_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "gui.h"
 
#include "subsidy_func.h"
 
#include "subsidy_base.h"
 
#include "core/geometry_func.hpp"
 

	
 
#include "table/strings.h"
 

	
 
/** Widget numbers for the subsidy list window. */
 
enum SubsidyListWidgets {
 
	SLW_PANEL,
src/terraform_gui.cpp
Show inline comments
 
@@ -7,21 +7,19 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file terraform_gui.cpp GUI related to terraforming the map. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "clear_map.h"
 
#include "company_func.h"
 
#include "company_base.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "window_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "signs_func.h"
 
#include "variables.h"
 
#include "functions.h"
 
#include "sound_func.h"
 
#include "base_station_base.h"
src/texteff.cpp
Show inline comments
 
@@ -7,19 +7,15 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file texteff.cpp Handling of text effects. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "strings_type.h"
 
#include "texteff.hpp"
 
#include "core/bitmath_func.hpp"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "core/alloc_func.hpp"
 
#include "core/smallvec_type.hpp"
 
#include "viewport_func.h"
 
#include "settings_type.h"
 

	
 
/** Container for all information about a text effect */
 
struct TextEffect : public ViewportSign{
src/texteff.hpp
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file texteff.hpp Functions related to text effects. */
 

	
 
#ifndef TEXTEFF_HPP
 
#define TEXTEFF_HPP
 

	
 
#include "gfx_type.h"
 
#include "strings_type.h"
 

	
 
/**
 
 * Text effect modes.
 
 */
 
enum TextEffectMode {
 
	TE_RISING, ///< Make the text effect slowly go upwards
src/tile_cmd.h
Show inline comments
 
@@ -9,23 +9,16 @@
 

	
 
/** @file tile_cmd.h Generic 'commands' that can be performed on all tiles. */
 

	
 
#ifndef TILE_CMD_H
 
#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"
 
#include "date_type.h"
 
#include "company_type.h"
 
#include "direction_type.h"
 
#include "track_type.h"
 
#include "transport_type.h"
 
#include "tile_map.h"
 

	
 
/** The returned bits of VehicleEnterTile. */
 
enum VehicleEnterTileStatus {
 
	VETS_ENTERED_STATION  = 1, ///< The vehicle entered a station
 
	VETS_ENTERED_WORMHOLE = 2, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel)
src/tile_map.h
Show inline comments
 
@@ -9,15 +9,13 @@
 

	
 
/** @file tile_map.h Map writing/reading functions for tiles. */
 

	
 
#ifndef TILE_MAP_H
 
#define TILE_MAP_H
 

	
 
#include "tile_type.h"
 
#include "slope_type.h"
 
#include "company_type.h"
 
#include "map_func.h"
 
#include "core/bitmath_func.hpp"
 
#include "settings_type.h"
 

	
 
/**
 
 * Returns the height of a tile
src/tile_type.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file tile_type.h Types related to tiles. */
 

	
 
#ifndef TILE_TYPE_H
 
#define TILE_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 

	
 
enum {
 
	TILE_SIZE      = 16,            ///< Tiles are 16x16 "units" in size
 
	TILE_UNIT_MASK = TILE_SIZE - 1, ///< for masking in/out the inner-tile units.
 
	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)
src/tilehighlight_func.h
Show inline comments
 
@@ -10,14 +10,12 @@
 
/** @file tilehighlight_func.h Functions related to tile highlights. */
 

	
 
#ifndef TILEHIGHLIGHT_FUNC_H
 
#define TILEHIGHLIGHT_FUNC_H
 

	
 
#include "gfx_type.h"
 
#include "window_type.h"
 
#include "viewport_type.h"
 
#include "tilehighlight_type.h"
 

	
 
typedef void PlaceProc(TileIndex tile);
 
void PlaceProc_DemolishArea(TileIndex tile);
 
bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
 

	
src/tilehighlight_type.h
Show inline comments
 
@@ -10,15 +10,15 @@
 
/** @file tilehighlight_type.h Types related to highlighting tiles. */
 

	
 
#ifndef TILEHIGHLIGHT_TYPE_H
 
#define TILEHIGHLIGHT_TYPE_H
 

	
 
#include "core/geometry_type.hpp"
 
#include "zoom_type.h"
 
#include "window_type.h"
 
#include "tile_type.h"
 
#include "viewport_type.h"
 

	
 
/** Highlighting draw styles */
 
enum HighLightStyle {
 
	HT_NONE      = 0x00, ///< default
 
	HT_RECT      = 0x10, ///< rectangle (stations, depots, ...)
 
	HT_POINT     = 0x20, ///< point (lower land, raise land, level land, ...)
src/timetable.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file timetable.h Functions related to time tabling. */
 

	
 
#ifndef TIMETABLE_H
 
#define TIMETABLE_H
 

	
 
#include "date_type.h"
 
#include "vehicle_type.h"
 

	
 
void ShowTimetableWindow(const Vehicle *v);
 
void UpdateVehicleTimetable(Vehicle *v, bool travelling);
 
void SetTimetableParams(int param1, int param2, Ticks ticks);
 

	
 
#endif /* TIMETABLE_H */
src/timetable_gui.cpp
Show inline comments
 
@@ -20,12 +20,13 @@
 
#include "string_func.h"
 
#include "gfx_func.h"
 
#include "company_func.h"
 
#include "date_func.h"
 
#include "date_gui.h"
 
#include "vehicle_gui.h"
 
#include "settings_type.h"
 

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

	
 
enum TimetableViewWindowWidgets {
 
	TTV_CAPTION,
src/toolbar_gui.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file toolbar_gui.cpp Code related to the (main) toolbar. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "window_func.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "variables.h"
 
@@ -38,12 +37,13 @@
 
#include "console_gui.h"
 
#include "news_gui.h"
 
#include "ai/ai_gui.hpp"
 
#include "tilehighlight_func.h"
 
#include "rail.h"
 
#include "widgets/dropdown_type.h"
 
#include "company_base.h"
 

	
 
#include "network/network.h"
 
#include "network/network_gui.h"
 
#include "network/network_func.h"
 

	
 
#include "table/strings.h"
src/town.h
Show inline comments
 
@@ -10,24 +10,13 @@
 
/** @file town.h Base of the town class. */
 

	
 
#ifndef TOWN_H
 
#define TOWN_H
 

	
 
#include "core/pool_type.hpp"
 
#include "core/bitmath_func.hpp"
 
#include "core/random_func.hpp"
 
#include "cargo_type.h"
 
#include "tile_type.h"
 
#include "date_type.h"
 
#include "town_type.h"
 
#include "company_type.h"
 
#include "settings_type.h"
 
#include "strings_type.h"
 
#include "viewport_type.h"
 
#include "economy_type.h"
 
#include "map_type.h"
 
#include "command_type.h"
 
#include "town_map.h"
 
#include "subsidy_type.h"
 

	
 
template <typename T>
 
struct BuildingCounts {
src/town_cmd.cpp
Show inline comments
 
@@ -7,14 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file town_cmd.cpp Handling of town tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "road_type.h"
 
#include "road_internal.h" /* Cleaning up road bits */
 
#include "road_cmd.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "industry.h"
 
@@ -27,13 +25,12 @@
 
#include "genworld.h"
 
#include "newgrf.h"
 
#include "newgrf_house.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_text.h"
 
#include "autoslope.h"
 
#include "transparency.h"
 
#include "tunnelbridge_map.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "string_func.h"
 
#include "newgrf_cargo.h"
 
#include "cheat_type.h"
 
@@ -43,12 +40,13 @@
 
#include "subsidy_func.h"
 
#include "core/smallmap_type.hpp"
 
#include "core/pool_func.hpp"
 
#include "town.h"
 
#include "townname_func.h"
 
#include "townname_type.h"
 
#include "core/random_func.hpp"
 

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

	
 
static Town *_cleared_town;
 
static int _cleared_town_rating;
src/town_gui.cpp
Show inline comments
 
@@ -30,12 +30,13 @@
 
#include "landscape.h"
 
#include "cargotype.h"
 
#include "querystring_gui.h"
 
#include "window_func.h"
 
#include "townname_func.h"
 
#include "townname_type.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
typedef GUIList<const Town*> GUITownList;
 

	
src/town_map.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file town_map.h Accessors for towns */
 

	
 
#ifndef TOWN_MAP_H
 
#define TOWN_MAP_H
 

	
 
#include "road_map.h"
 
#include "town_type.h"
 
#include "house.h"
 

	
 
/**
 
 * Get the index of which town this house/street is attached to.
 
 * @param t the tile
 
 * @pre IsTileType(t, MP_HOUSE) or IsTileType(t, MP_ROAD) but not a road depot
src/townname.cpp
Show inline comments
 
@@ -12,12 +12,13 @@
 
#include "stdafx.h"
 
#include "string_func.h"
 
#include "townname_type.h"
 
#include "town.h"
 
#include "core/alloc_func.hpp"
 
#include "strings_func.h"
 
#include "core/random_func.hpp"
 

	
 
#include "table/townname.h"
 

	
 

	
 
/**
 
 * Initializes this struct from town data
src/track_func.h
Show inline comments
 
@@ -11,13 +11,12 @@
 

	
 
#ifndef TRACK_FUNC_H
 
#define TRACK_FUNC_H
 

	
 
#include "core/bitmath_func.hpp"
 
#include "track_type.h"
 
#include "direction_type.h"
 
#include "slope_func.h"
 

	
 
/**
 
 * Convert an Axis to the corresponding Track
 
 * AXIS_X -> TRACK_X
 
 * AXIS_Y -> TRACK_Y
src/train.h
Show inline comments
 
@@ -9,14 +9,12 @@
 

	
 
/** @file train.h Base for the train class. */
 

	
 
#ifndef TRAIN_H
 
#define TRAIN_H
 

	
 
#include "stdafx.h"
 
#include "core/bitmath_func.hpp"
 
#include "vehicle_base.h"
 

	
 
struct Train;
 

	
 
enum VehicleRailFlags {
 
	VRF_REVERSING         = 0,
src/train_cmd.cpp
Show inline comments
 
@@ -12,14 +12,12 @@
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "articulated_vehicles.h"
 
#include "command_func.h"
 
#include "pathfinder/npf/npf_func.h"
 
#include "pathfinder/yapf/yapf.hpp"
 
#include "pathfinder/follow_track.hpp"
 
#include "openttd.h"
 
#include "news_func.h"
 
#include "company_func.h"
 
#include "vehicle_gui.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_text.h"
 
@@ -28,19 +26,24 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "ai/ai.hpp"
 
#include "newgrf_station.h"
 
#include "effectvehicle_func.h"
 
#include "effectvehicle_base.h"
 
#include "gamelog.h"
 
#include "network/network.h"
 
#include "spritecache.h"
 
#include "core/random_func.hpp"
 
#include "company_base.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 
#include "newgrf.h"
 

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

	
 
static Track ChooseTrainTrack(Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool force_res, bool *got_reservation, bool mark_stuck);
 
static bool TrainCheckIfLineEnds(Train *v);
src/train_gui.cpp
Show inline comments
 
@@ -16,12 +16,13 @@
 
#include "vehicle_gui.h"
 
#include "train.h"
 
#include "strings_func.h"
 
#include "vehicle_func.h"
 
#include "engine_base.h"
 
#include "window_func.h"
 
#include "settings_type.h"
 

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

	
 
void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
src/transparency_gui.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file transparency_gui.cpp The transparency GUI. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "window_gui.h"
 
#include "transparency.h"
 
#include "sound_func.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
src/tree_cmd.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file tree_cmd.cpp Handling of tree tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "clear_map.h"
 
#include "landscape.h"
 
#include "tree_map.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "economy_func.h"
 
@@ -25,12 +24,13 @@
 
#include "company_func.h"
 
#include "sound_func.h"
 
#include "water_map.h"
 
#include "water.h"
 
#include "landscape_type.h"
 
#include "company_base.h"
 
#include "core/random_func.hpp"
 

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

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

	
 
/** @file tree_map.h Map accessors for tree tiles. */
 

	
 
#ifndef TREE_MAP_H
 
#define TREE_MAP_H
 

	
 
#include "tile_map.h"
 

	
 
/**
 
 * List of tree types along all landscape types.
 
 *
 
 * This enumeration contains a list of the different tree types along
 
 * all landscape types. The values for the enumerations may be used for
 
 * offsets from the grfs files. These points to the start of
src/tunnel_map.h
Show inline comments
 
@@ -9,16 +9,12 @@
 

	
 
/** @file tunnel_map.h Map accessors for tunnels. */
 

	
 
#ifndef TUNNEL_MAP_H
 
#define TUNNEL_MAP_H
 

	
 
#include "direction_func.h"
 
#include "rail_type.h"
 
#include "road_type.h"
 
#include "transport_type.h"
 
#include "road_map.h"
 

	
 

	
 
/**
 
 * Is this a tunnel (entrance)?
 
 * @param t the tile that might be a tunnel
src/tunnelbridge.h
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/** @file tunnelbridge.h Header file for things common for tunnels and bridges */
 

	
 
#ifndef TUNNELBRIDGE_H
 
#define TUNNELBRIDGE_H
 

	
 
#include "tile_type.h"
 
#include "map_func.h"
 

	
 
/**
 
 * Calculates the length of a tunnel or a bridge (without end tiles)
 
 * @return length of bridge/tunnel middle
 
 */
 
static inline uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -10,13 +10,12 @@
 
/** @file tunnelbridge_cmd.cpp
 
 * This file deals with tunnels and bridges (non-gui stuff)
 
 * @todo seperate this file into two
 
 */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "rail_map.h"
 
#include "landscape.h"
 
#include "unmovable_map.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "town.h"
 
@@ -36,12 +35,14 @@
 
#include "sound_func.h"
 
#include "tunnelbridge.h"
 
#include "cheat_type.h"
 
#include "elrail_func.h"
 
#include "landscape_type.h"
 
#include "pbs.h"
 
#include "company_base.h"
 
#include "engine_base.h"
 

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

	
 
BridgeSpec _bridge[MAX_BRIDGES];
src/tunnelbridge_map.h
Show inline comments
 
@@ -9,19 +9,14 @@
 

	
 
/** @file tunnelbridge_map.h Functions that have tunnels and bridges in common */
 

	
 
#ifndef TUNNELBRIDGE_MAP_H
 
#define TUNNELBRIDGE_MAP_H
 

	
 
#include "direction_func.h"
 
#include "core/bitmath_func.hpp"
 
#include "tile_map.h"
 
#include "bridge_map.h"
 
#include "tunnel_map.h"
 
#include "transport_type.h"
 
#include "track_func.h"
 

	
 

	
 
/**
 
 * Get the direction pointing to the other end.
 
 *
 
 * Tunnel: Get the direction facing into the tunnel
src/unmovable.h
Show inline comments
 
@@ -9,15 +9,14 @@
 

	
 
/** @file unmovable.h Functions related to unmovable objects. */
 

	
 
#ifndef UNMOVABLE_H
 
#define UNMOVABLE_H
 

	
 
#include "unmovable_map.h"
 
#include "economy_type.h"
 
#include "economy_func.h"
 
#include "strings_type.h"
 

	
 
void UpdateCompanyHQ(Company *c, uint score);
 

	
 
struct UnmovableSpec {
 
	StringID name;
 
	uint8 buy_cost_multiplier;
src/unmovable_cmd.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file unmovable_cmd.cpp Handling of unmovable tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "landscape.h"
 
#include "command_func.h"
 
#include "viewport_func.h"
 
#include "company_base.h"
 
#include "town.h"
 
#include "bridge_map.h"
 
@@ -25,12 +24,15 @@
 
#include "vehicle_func.h"
 
#include "company_gui.h"
 
#include "cheat_type.h"
 
#include "landscape_type.h"
 
#include "unmovable.h"
 
#include "cargopacket.h"
 
#include "sprite.h"
 
#include "core/random_func.hpp"
 
#include "unmovable_map.h"
 

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

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

	
 
/** @file unmovable_map.h Map accessors for unmovable tiles. */
 

	
 
#ifndef UNMOVABLE_MAP_H
 
#define UNMOVABLE_MAP_H
 

	
 
#include "core/bitmath_func.hpp"
 
#include "tile_map.h"
 

	
 
/** Types of unmovable structure */
 
enum UnmovableType {
 
	UNMOVABLE_TRANSMITTER = 0,    ///< The large antenna
 
	UNMOVABLE_LIGHTHOUSE  = 1,    ///< The nice lighthouse
src/vehicle.cpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
 */
 

	
 
/** @file vehicle.cpp Base implementations of all vehicles. */
 

	
 
#include "stdafx.h"
 
#include "gui.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "roadveh.h"
 
#include "ship.h"
 
#include "spritecache.h"
 
#include "landscape.h"
 
#include "timetable.h"
 
@@ -44,12 +43,15 @@
 
#include "depot_func.h"
 
#include "network/network.h"
 
#include "core/pool_func.hpp"
 
#include "economy_base.h"
 
#include "articulated_vehicles.h"
 
#include "roadstop_base.h"
 
#include "core/random_func.hpp"
 
#include "engine_base.h"
 
#include "newgrf.h"
 

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

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

	
src/vehicle_base.h
Show inline comments
 
@@ -9,26 +9,18 @@
 

	
 
/** @file  vehicle_base.h Base class for all vehicles. */
 

	
 
#ifndef VEHICLE_BASE_H
 
#define VEHICLE_BASE_H
 

	
 
#include "vehicle_type.h"
 
#include "track_type.h"
 
#include "cargo_type.h"
 
#include "direction_type.h"
 
#include "gfx_type.h"
 
#include "command_type.h"
 
#include "date_type.h"
 
#include "company_base.h"
 
#include "company_type.h"
 
#include "core/pool_type.hpp"
 
#include "order_base.h"
 
#include "cargopacket.h"
 
#include "texteff.hpp"
 
#include "group_type.h"
 
#include "engine_type.h"
 
#include "order_func.h"
 
#include "transport_type.h"
 

	
 
enum VehStatus {
 
	VS_HIDDEN          = 0x01,
src/vehicle_cmd.cpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
 */
 

	
 
/** @file vehicle_cmd.cpp Commands for vehicles. */
 

	
 
#include "stdafx.h"
 
#include "roadveh.h"
 
#include "gfx_func.h"
 
#include "news_func.h"
 
#include "airport.h"
 
#include "command_func.h"
 
#include "company_func.h"
 
#include "vehicle_gui.h"
 
#include "train.h"
 
@@ -24,12 +23,13 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "string_func.h"
 
#include "depot_map.h"
 
#include "vehiclelist.h"
 
#include "engine_base.h"
 

	
 
#include "table/strings.h"
 

	
 
/* Tables used in vehicle.h to find the right command for a certain vehicle type */
 
const uint32 _veh_build_proc_table[] = {
 
	CMD_BUILD_RAIL_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN),
src/vehicle_func.h
Show inline comments
 
@@ -9,22 +9,20 @@
 

	
 
/** @file vehicle_func.h Functions related to vehicles. */
 

	
 
#ifndef VEHICLE_FUNC_H
 
#define VEHICLE_FUNC_H
 

	
 
#include "tile_type.h"
 
#include "strings_type.h"
 
#include "gfx_type.h"
 
#include "direction_type.h"
 
#include "cargo_type.h"
 
#include "command_type.h"
 
#include "vehicle_type.h"
 
#include "engine_type.h"
 
#include "transport_type.h"
 
#include "newgrf_config.h"
 
#include "company_type.h"
 

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

	
 
typedef Vehicle *VehicleFromPosProc(Vehicle *v, void *data);
src/vehicle_gui.cpp
Show inline comments
 
@@ -7,23 +7,20 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file vehicle_gui.cpp The base GUI for all vehicles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "company_func.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "textbuf_gui.h"
 
#include "command_func.h"
 
#include "vehicle_gui.h"
 
#include "vehicle_gui_base.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_text.h"
 
#include "waypoint_base.h"
 
#include "roadveh.h"
 
#include "train.h"
 
#include "aircraft.h"
 
@@ -37,12 +34,16 @@
 
#include "widgets/dropdown_func.h"
 
#include "timetable.h"
 
#include "vehiclelist.h"
 
#include "articulated_vehicles.h"
 
#include "cargotype.h"
 
#include "spritecache.h"
 
#include "core/geometry_func.hpp"
 
#include "company_base.h"
 
#include "engine_base.h"
 
#include "engine_func.h"
 

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

	
 
Sorting _sorting;
 

	
src/vehicle_gui.h
Show inline comments
 
@@ -14,13 +14,13 @@
 

	
 
#include "window_type.h"
 
#include "vehicle_type.h"
 
#include "order_type.h"
 
#include "station_type.h"
 
#include "engine_type.h"
 
#include "tile_type.h"
 
#include "company_type.h"
 

	
 
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent);
 

	
 
/** Constants of vehicle view widget indices */
 
enum VehicleViewWindowWidgets {
 
	VVW_WIDGET_CAPTION,
src/vehicle_gui_base.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file vehicle_gui_base.h Functions/classes shared between the different vehicle list GUIs. */
 

	
 
#ifndef VEHICLE_GUI_BASE_H
 
#define VEHICLE_GUI_BASE_H
 

	
 
#include "sortlist_type.h"
 
#include "window_gui.h"
 

	
 
typedef GUIList<const Vehicle*> GUIVehicleList;
 

	
 
struct BaseVehicleListWindow : public Window {
 
	GUIVehicleList vehicles;  ///< The list of vehicles
 
	Listing *sorting;         ///< Pointer to the vehicle type related sorting.
src/vehiclelist.h
Show inline comments
 
@@ -10,12 +10,15 @@
 
/** @file vehiclelist.h Functions and type for generating vehicle lists. */
 

	
 
#ifndef VEHICLELIST_H
 
#define VEHICLELIST_H
 

	
 
#include "core/smallvec_type.hpp"
 
#include "vehicle_type.h"
 
#include "company_type.h"
 
#include "tile_type.h"
 

	
 
typedef SmallVector<const Vehicle *, 32> VehicleList;
 

	
 
void GenerateVehicleSortList(VehicleList *list, VehicleType type, Owner owner, uint32 index, uint16 window_type);
 
void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine_list, VehicleList *wagon_list, bool individual_wagons = false);
 

	
src/video/allegro_v.cpp
Show inline comments
 
@@ -15,22 +15,19 @@
 
 */
 

	
 
#ifdef WITH_ALLEGRO
 

	
 
#include "../stdafx.h"
 
#include "../openttd.h"
 
#include "../debug.h"
 
#include "../gfx_func.h"
 
#include "../variables.h"
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../core/math_func.hpp"
 
#include "../core/random_func.hpp"
 
#include "../functions.h"
 
#include "../texteff.hpp"
 
#include "allegro_v.h"
 
#include <allegro.h>
 

	
 
#ifdef _DEBUG
 
/* Allegro replaces SEGV/ABRT signals meaning that the debugger will never
 
 * be triggered, so rereplace the signals and make the debugger userful. */
src/video/dedicated_v.cpp
Show inline comments
 
@@ -10,14 +10,14 @@
 
/** @file dedicated_v.cpp Dedicated server video 'driver'. */
 

	
 
#include "../stdafx.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../openttd.h"
 
#include "../gfx_func.h"
 
#include "../network/network.h"
 
#include "../network/network_internal.h"
 
#include "../console_func.h"
 
#include "../variables.h"
 
#include "../genworld.h"
 
#include "../fileio_type.h"
 
#include "../fios.h"
src/video/sdl_v.cpp
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "../rev.h"
 
#include "../blitter/factory.hpp"
 
#include "../network/network.h"
 
#include "../functions.h"
 
#include "../thread/thread.h"
 
#include "../genworld.h"
 
#include "../core/random_func.hpp"
 
#include "sdl_v.h"
 
#include <SDL.h>
 

	
 
static FVideoDriver_SDL iFVideoDriver_SDL;
 

	
 
static SDL_Surface *_sdl_screen;
src/viewport.cpp
Show inline comments
 
@@ -23,25 +23,23 @@
 
 *        /                       \              *
 
 *   X <                             > Y         *
 
 * \endverbatim
 
 */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "town.h"
 
#include "signs_base.h"
 
#include "signs_func.h"
 
#include "variables.h"
 
#include "vehicle_base.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 "company_func.h"
 
#include "waypoint_func.h"
 
#include "window_func.h"
src/water.h
Show inline comments
 
@@ -9,12 +9,16 @@
 

	
 
/** @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"
 

	
 
void TileLoop_Water(TileIndex tile);
 
bool FloodHalftile(TileIndex t);
 
void DoFloodTile(TileIndex target);
 

	
 
void ConvertGroundTilesIntoWaterTiles();
 

	
src/water_cmd.cpp
Show inline comments
 
@@ -7,42 +7,36 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file water_cmd.cpp Handling of water tiles. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "cmd_helper.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "town.h"
 
#include "news_func.h"
 
#include "depot_base.h"
 
#include "depot_func.h"
 
#include "vehicle_gui.h"
 
#include "train.h"
 
#include "roadveh.h"
 
#include "water.h"
 
#include "industry_map.h"
 
#include "cargotype.h"
 
#include "newgrf_canal.h"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "company_func.h"
 
#include "clear_map.h"
 
#include "tree_map.h"
 
#include "aircraft.h"
 
#include "effectvehicle_func.h"
 
#include "tunnelbridge_map.h"
 
#include "station_base.h"
 
#include "ai/ai.hpp"
 
#include "core/random_func.hpp"
 

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

	
 
/**
 
 * Describes the behaviour of a tile during flooding.
src/water_map.h
Show inline comments
 
@@ -11,12 +11,13 @@
 

	
 
#ifndef WATER_MAP_H
 
#define WATER_MAP_H
 

	
 
#include "core/math_func.hpp"
 
#include "depot_type.h"
 
#include "tile_map.h"
 

	
 
enum WaterTileType {
 
	WATER_TILE_CLEAR,
 
	WATER_TILE_COAST,
 
	WATER_TILE_LOCK,
 
	WATER_TILE_DEPOT,
src/waypoint_gui.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "window_gui.h"
 
#include "gui.h"
 
#include "textbuf_gui.h"
 
#include "vehicle_gui.h"
 
#include "viewport_func.h"
 
#include "strings_func.h"
 
#include "gfx_func.h"
 
#include "command_func.h"
 
#include "company_func.h"
 
#include "window_func.h"
 
#include "waypoint_base.h"
 

	
 
#include "table/strings.h"
src/widget.cpp
Show inline comments
 
@@ -7,19 +7,19 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file widget.cpp Handling of the default/simple widgets. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "company_func.h"
 
#include "window_gui.h"
 
#include "viewport_func.h"
 
#include "zoom_func.h"
 
#include "strings_func.h"
 
#include "transparency.h"
 
#include "core/geometry_func.hpp"
 

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

	
 
static const char *UPARROW   = "\xEE\x8A\xA0"; ///< String containing an upwards pointing arrow.
 
static const char *DOWNARROW = "\xEE\x8A\xAA"; ///< String containing a downwards pointing arrow.
src/widget_type.h
Show inline comments
 
@@ -9,15 +9,17 @@
 

	
 
/** @file widget_type.h Definitions about widgets. */
 

	
 
#ifndef WIDGET_TYPE_H
 
#define WIDGET_TYPE_H
 

	
 
#include "core/alloc_type.hpp"
 
#include "core/bitmath_func.hpp"
 
#include "strings_type.h"
 
#include "gfx_type.h"
 
#include "window_type.h"
 

	
 
enum {
 
	WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions
 
};
 

	
 
/** Bits of the #WWT_MATRIX widget data. */
src/widgets/dropdown.cpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file dropdown.cpp Implementation of the dropdown widget. */
 

	
 
#include "../stdafx.h"
 
#include "../window_gui.h"
 
#include "../strings_func.h"
 
#include "../gfx_func.h"
 
#include "../window_func.h"
 
#include "dropdown_type.h"
 

	
 

	
 
void DropDownListItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
 
{
src/widgets/dropdown_func.h
Show inline comments
 
@@ -9,12 +9,14 @@
 

	
 
/** @file dropdown_func.h Functions related to the drop down widget. */
 

	
 
#ifndef WIDGETS_DROPDOWN_FUNC_H
 
#define WIDGETS_DROPDOWN_FUNC_H
 

	
 
#include "../window_gui.h"
 

	
 
/* Show drop down menu containing a fixed list of strings */
 
void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width = 0);
 

	
 
/* Hide drop down menu of a parent window */
 
int HideDropDownMenu(Window *pw);
 

	
src/widgets/dropdown_type.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file dropdown_type.h Types related to the drop down widget. */
 

	
 
#ifndef WIDGETS_DROPDOWN_TYPE_H
 
#define WIDGETS_DROPDOWN_TYPE_H
 

	
 
#include "../window_type.h"
 
#include "../gfx_func.h"
 
#include <list>
 

	
 
/**
 
 * Base list item class from which others are derived. If placed in a list it
 
 * will appear as a horizontal line in the menu.
 
 */
src/window.cpp
Show inline comments
 
@@ -27,12 +27,13 @@
 
#include "window_func.h"
 
#include "tilehighlight_func.h"
 
#include "network/network.h"
 
#include "querystring_gui.h"
 
#include "widgets/dropdown_func.h"
 
#include "strings_func.h"
 
#include "settings_type.h"
 

	
 
#include "table/sprites.h"
 

	
 
static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window
 
static Window *_mouseover_last_w = NULL; ///< Window of the last MOUSEOVER event
 

	
src/window_gui.h
Show inline comments
 
@@ -9,19 +9,16 @@
 

	
 
/** @file window_gui.h Functions, definitions and such used only by the GUI. */
 

	
 
#ifndef WINDOW_GUI_H
 
#define WINDOW_GUI_H
 

	
 
#include "core/geometry_func.hpp"
 
#include "core/math_func.hpp"
 
#include "vehicle_type.h"
 
#include "viewport_type.h"
 
#include "company_type.h"
 
#include "core/alloc_type.hpp"
 
#include "window_type.h"
 
#include "tile_type.h"
 
#include "widget_type.h"
 

	
 
/**
 
 * Flags to describe the look of the frame
 
 */
src/window_type.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
/** @file window_type.h Types related to windows */
 

	
 
#ifndef WINDOW_TYPE_H
 
#define WINDOW_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 

	
 
/**
 
 * Window classes
 
 */
 
enum WindowClass {
 
	WC_NONE,
0 comments (0 inline, 0 general)