Changeset - r13456:7f9200df57a3
[Not reviewed]
master
0 20 0
frosch - 15 years ago 2009-11-05 19:46:17
frosch@openttd.org
(svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h
20 files changed with 21 insertions and 28 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_cargo.cpp
Show inline comments
 
@@ -14,7 +14,6 @@
 
#include "../../economy_func.h"
 
#include "../../core/alloc_func.hpp"
 
#include "../../core/bitmath_func.hpp"
 
#include "../../newgrf_cargo.h"
 

	
 
/* static */ bool AICargo::IsValidCargo(CargoID cargo_type)
 
{
src/aircraft_cmd.cpp
Show inline comments
 
@@ -35,7 +35,6 @@
 
#include "effectvehicle_func.h"
 
#include "station_base.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -31,7 +31,6 @@
 
#include "window_gui.h"
 
#include "engine_gui.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
src/cargotype.cpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
/** @file cargotype.cpp Implementation of cargos. */
 

	
 
#include "stdafx.h"
 
#include "newgrf_cargo.h"
 
#include "cargotype.h"
 
#include "core/bitmath_func.hpp"
 

	
src/cargotype.h
Show inline comments
 
@@ -29,6 +29,20 @@ enum TownEffect {
 
	TE_FOOD,
 
};
 

	
 
enum CargoClass {
 
	CC_NOAVAILABLE  = 0,       ///< No cargo class has been specified
 
	CC_PASSENGERS   = 1 <<  0, ///< Passengers
 
	CC_MAIL         = 1 <<  1, ///< Mail
 
	CC_EXPRESS      = 1 <<  2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
 
	CC_ARMOURED     = 1 <<  3, ///< Armoured cargo (Valuables, Gold, Diamonds)
 
	CC_BULK         = 1 <<  4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
 
	CC_PIECE_GOODS  = 1 <<  5, ///< Piece goods (Livestock, Wood, Steel, Paper)
 
	CC_LIQUID       = 1 <<  6, ///< Liquids (Oil, Water, Rubber)
 
	CC_REFRIGERATED = 1 <<  7, ///< Refrigerated cargo (Food, Fruit)
 
	CC_HAZARDOUS    = 1 <<  8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
 
	CC_COVERED      = 1 <<  9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
 
	CC_SPECIAL      = 1 << 15  ///< Special bit used for livery refit tricks instead of normal cargoes.
 
};
 

	
 
static const byte INVALID_CARGO = 0xFF;
 

	
 
@@ -115,7 +129,7 @@ SpriteID GetCargoSprite(CargoID i);
 
CargoID GetCargoIDByLabel(CargoLabel cl);
 
CargoID GetCargoIDByBitnum(uint8 bitnum);
 

	
 
static inline bool IsCargoInClass(CargoID c, uint16 cc)
 
static inline bool IsCargoInClass(CargoID c, CargoClass cc)
 
{
 
	return (CargoSpec::Get(c)->classes & cc) != 0;
 
}
src/economy.cpp
Show inline comments
 
@@ -23,6 +23,7 @@
 
#include "ai/ai.hpp"
 
#include "aircraft.h"
 
#include "train.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_industries.h"
src/industry_cmd.cpp
Show inline comments
 
@@ -25,6 +25,7 @@
 
#include "genworld.h"
 
#include "tree_map.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
src/misc_gui.cpp
Show inline comments
 
@@ -33,7 +33,6 @@
 
#include "fios.h"
 
#include "zoom_func.h"
 
#include "window_func.h"
 
#include "newgrf_cargo.h"
 
#include "tilehighlight_func.h"
 
#include "querystring_gui.h"
 

	
src/newgrf.cpp
Show inline comments
 
@@ -27,6 +27,7 @@
 
#include "fontcache.h"
 
#include "currency.h"
 
#include "landscape.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_house.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_station.h"
src/newgrf_cargo.h
Show inline comments
 
@@ -16,21 +16,6 @@
 
#include "cargo_type.h"
 
#include "gfx_type.h"
 

	
 
enum CargoClass {
 
	CC_NOAVAILABLE  = 0,       ///< No cargo class has been specified
 
	CC_PASSENGERS   = 1 <<  0, ///< Passengers
 
	CC_MAIL         = 1 <<  1, ///< Mail
 
	CC_EXPRESS      = 1 <<  2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
 
	CC_ARMOURED     = 1 <<  3, ///< Armoured cargo (Valuables, Gold, Diamonds)
 
	CC_BULK         = 1 <<  4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
 
	CC_PIECE_GOODS  = 1 <<  5, ///< Piece goods (Livestock, Wood, Steel, Paper)
 
	CC_LIQUID       = 1 <<  6, ///< Liquids (Oil, Water, Rubber)
 
	CC_REFRIGERATED = 1 <<  7, ///< Refrigerated cargo (Food, Fruit)
 
	CC_HAZARDOUS    = 1 <<  8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
 
	CC_COVERED      = 1 <<  9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
 
	CC_SPECIAL      = 1 << 15  ///< Special bit used for livery refit tricks instead of normal cargoes.
 
};
 

	
 
static const CargoID CT_DEFAULT      = NUM_CARGO + 0;
 
static const CargoID CT_PURCHASE     = NUM_CARGO + 1;
 
static const CargoID CT_DEFAULT_NA   = NUM_CARGO + 2;
src/newgrf_engine.cpp
Show inline comments
 
@@ -15,6 +15,7 @@
 
#include "roadveh.h"
 
#include "company_func.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_spritegroup.h"
 
#include "date_func.h"
src/newgrf_spritegroup.h
Show inline comments
 
@@ -21,7 +21,6 @@
 
#include "core/pool_type.hpp"
 
#include "house_type.h"
 

	
 
#include "newgrf_cargo.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_generic.h"
 
#include "newgrf_storage.h"
src/newgrf_station.cpp
Show inline comments
 
@@ -16,6 +16,7 @@
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "roadstop_base.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_station.h"
 
#include "newgrf_spritegroup.h"
src/newgrf_station.h
Show inline comments
 
@@ -14,7 +14,6 @@
 

	
 
#include "engine_type.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_cargo.h"
 
#include "tile_type.h"
 
#include "station_type.h"
 
#include "strings_type.h"
src/order_cmd.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "newgrf_cargo.h"
 
#include "timetable.h"
 
#include "vehicle_func.h"
 
#include "depot_base.h"
src/order_gui.cpp
Show inline comments
 
@@ -23,7 +23,6 @@
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "company_func.h"
 
#include "newgrf_cargo.h"
 
#include "widgets/dropdown_func.h"
 
#include "textbuf_gui.h"
 
#include "string_func.h"
src/roadveh_cmd.cpp
Show inline comments
 
@@ -36,7 +36,6 @@
 
#include "effectvehicle_func.h"
 
#include "roadstop_base.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
src/station_cmd.cpp
Show inline comments
 
@@ -22,6 +22,7 @@
 
#include "train.h"
 
#include "roadveh.h"
 
#include "industry.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_station.h"
 
#include "newgrf_commons.h"
 
#include "yapf/yapf.h"
src/water_cmd.cpp
Show inline comments
 
@@ -36,7 +36,6 @@
 
#include "clear_map.h"
 
#include "tree_map.h"
 
#include "aircraft.h"
 
#include "newgrf_cargo.h"
 
#include "effectvehicle_func.h"
 
#include "tunnelbridge_map.h"
 
#include "station_base.h"
src/yapf/yapf_road.cpp
Show inline comments
 
@@ -12,7 +12,6 @@
 
#include "../stdafx.h"
 
#include "../roadstop_base.h"
 
#include "../cargotype.h"
 
#include "../newgrf_cargo.h"
 

	
 
#include "yapf.hpp"
 
#include "yapf_node_road.hpp"
0 comments (0 inline, 0 general)