Changeset - r5037:f6c5a8815d61
[Not reviewed]
master
0 4 0
peter1138 - 18 years ago 2006-11-06 10:11:03
peter1138@openttd.org
(svn r7079) -Codechange: Move an array to the only place it is used.
4 files changed with 25 insertions and 25 deletions:
0 comments (0 inline, 0 general)
engine.c
Show inline comments
 
@@ -34,28 +34,6 @@ enum {
 
	YEAR_ENGINE_AGING_STOPS = 2050,
 
};
 

	
 
/** Bitmasked values of what type of cargo is refittable for the given vehicle-type.
 
 * This coupled with the landscape information (_landscape_global_cargo_mask) gives
 
 * us exactly what is refittable and what is not */
 
#define MC(cargo) (1 << cargo)
 
const uint32 _default_refitmasks[NUM_VEHICLE_TYPES] = {
 
	/* Trains */
 
	MC(GC_PASSENGERS) | MC(GC_COAL)      | MC(GC_MAIL)   | MC(GC_LIVESTOCK) | MC(GC_GOODS)        | MC(GC_GRAIN)      | MC(GC_WOOD)    | MC(GC_IRON_ORE)    |
 
	MC(GC_STEEL)      | MC(GC_VALUABLES) | MC(GC_PAPER)  | MC(GC_FOOD)      | MC(GC_FRUIT)        | MC(GC_COPPER_ORE) | MC(GC_WATER)   | MC(GC_SUGAR)       |
 
	MC(GC_TOYS)       | MC(GC_CANDY)     | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES)    | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Road vehicles (not refittable by default) */
 
	0,
 
	/* Ships */
 
	MC(GC_COAL)  | MC(GC_MAIL)   | MC(GC_LIVESTOCK) | MC(GC_GOODS)        | MC(GC_GRAIN)   | MC(GC_WOOD)    | MC(GC_IRON_ORE) | MC(GC_STEEL) | MC(GC_VALUABLES) |
 
	MC(GC_PAPER) | MC(GC_FOOD)   | MC(GC_FRUIT)     | MC(GC_COPPER_ORE)   | MC(GC_WATER)   | MC(GC_RUBBER)  | MC(GC_SUGAR)    | MC(GC_TOYS)  | MC(GC_BATTERIES) |
 
	MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Aircraft */
 
	MC(GC_PASSENGERS) | MC(GC_MAIL)  | MC(GC_GOODS)  | MC(GC_VALUABLES) | MC(GC_FOOD)         | MC(GC_FRUIT)   | MC(GC_SUGAR)   | MC(GC_TOYS) |
 
	MC(GC_BATTERIES)  | MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Special/Disaster */
 
	0,0
 
};
 
#undef MC
 

	
 
void ShowEnginePreviewWindow(EngineID engine);
 

	
engine.h
Show inline comments
 
@@ -128,8 +128,6 @@ void AddTypeToEngines(void);
 
void StartupEngines(void);
 

	
 

	
 
VARDEF const uint32 _default_refitmasks[NUM_VEHICLE_TYPES];
 

	
 
void DrawTrainEngine(int x, int y, EngineID engine, uint32 image_ormod);
 
void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod);
 
void DrawShipEngine(int x, int y, EngineID engine, uint32 image_ormod);
newgrf.c
Show inline comments
 
@@ -3305,6 +3305,31 @@ static void InitNewGRFFile(const GRFConf
 
	}
 
}
 

	
 

	
 
/** Bitmasked values of what type of cargo is refittable for the given vehicle-type.
 
 * This coupled with the landscape information (_landscape_global_cargo_mask) gives
 
 * us exactly what is refittable and what is not */
 
#define MC(cargo) (1 << cargo)
 
static const uint32 _default_refitmasks[NUM_VEHICLE_TYPES] = {
 
	/* Trains */
 
	MC(GC_PASSENGERS) | MC(GC_COAL)      | MC(GC_MAIL)   | MC(GC_LIVESTOCK) | MC(GC_GOODS)        | MC(GC_GRAIN)      | MC(GC_WOOD)    | MC(GC_IRON_ORE)    |
 
	MC(GC_STEEL)      | MC(GC_VALUABLES) | MC(GC_PAPER)  | MC(GC_FOOD)      | MC(GC_FRUIT)        | MC(GC_COPPER_ORE) | MC(GC_WATER)   | MC(GC_SUGAR)       |
 
	MC(GC_TOYS)       | MC(GC_CANDY)     | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES)    | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Road vehicles (not refittable by default) */
 
	0,
 
	/* Ships */
 
	MC(GC_COAL)  | MC(GC_MAIL)   | MC(GC_LIVESTOCK) | MC(GC_GOODS)        | MC(GC_GRAIN)   | MC(GC_WOOD)    | MC(GC_IRON_ORE) | MC(GC_STEEL) | MC(GC_VALUABLES) |
 
	MC(GC_PAPER) | MC(GC_FOOD)   | MC(GC_FRUIT)     | MC(GC_COPPER_ORE)   | MC(GC_WATER)   | MC(GC_RUBBER)  | MC(GC_SUGAR)    | MC(GC_TOYS)  | MC(GC_BATTERIES) |
 
	MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Aircraft */
 
	MC(GC_PASSENGERS) | MC(GC_MAIL)  | MC(GC_GOODS)  | MC(GC_VALUABLES) | MC(GC_FOOD)         | MC(GC_FRUIT)   | MC(GC_SUGAR)   | MC(GC_TOYS) |
 
	MC(GC_BATTERIES)  | MC(GC_CANDY) | MC(GC_TOFFEE) | MC(GC_COLA)      | MC(GC_COTTON_CANDY) | MC(GC_BUBBLES) | MC(GC_PLASTIC) | MC(GC_FIZZY_DRINKS),
 
	/* Special/Disaster */
 
	0,0
 
};
 
#undef MC
 

	
 

	
 
/**
 
 * Precalculate refit masks from cargo classes for all vehicles.
 
 */
newgrf_engine.h
Show inline comments
 
@@ -13,7 +13,6 @@
 
extern int _traininfo_vehicle_pitch;
 
extern int _traininfo_vehicle_width;
 

	
 
VARDEF const uint32 _default_refitmasks[NUM_VEHICLE_TYPES];
 
extern const CargoID _global_cargo_id[NUM_LANDSCAPE][NUM_CARGO];
 
extern const uint32 _landscape_global_cargo_mask[NUM_LANDSCAPE];
 
extern const CargoID _local_cargo_id_ctype[NUM_GLOBAL_CID];
0 comments (0 inline, 0 general)