mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r3308) BAD
foo.h: int bar; GOOD foo.h: extern int bar; foo.c: int bar;
This commit is contained in:
parent
41c83a2efd
commit
49f0691c1a
2
bridge.h
2
bridge.h
@ -20,6 +20,6 @@ typedef struct Bridge {
|
|||||||
} Bridge;
|
} Bridge;
|
||||||
|
|
||||||
extern const Bridge orig_bridge[MAX_BRIDGES];
|
extern const Bridge orig_bridge[MAX_BRIDGES];
|
||||||
Bridge _bridge[MAX_BRIDGES];
|
extern Bridge _bridge[MAX_BRIDGES];
|
||||||
|
|
||||||
#endif /* BRIDGE_H */
|
#endif /* BRIDGE_H */
|
||||||
|
6
engine.c
6
engine.c
@ -19,6 +19,12 @@
|
|||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "train.h"
|
#include "train.h"
|
||||||
|
|
||||||
|
EngineInfo _engine_info[TOTAL_NUM_ENGINES];
|
||||||
|
RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
|
||||||
|
ShipVehicleInfo _ship_vehicle_info[NUM_SHIP_ENGINES];
|
||||||
|
AircraftVehicleInfo _aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
|
||||||
|
RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES];
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ENGINE_AVAILABLE = 1,
|
ENGINE_AVAILABLE = 1,
|
||||||
ENGINE_INTRODUCING = 2,
|
ENGINE_INTRODUCING = 2,
|
||||||
|
10
engine.h
10
engine.h
@ -251,11 +251,11 @@ extern const ShipVehicleInfo orig_ship_vehicle_info[NUM_SHIP_ENGINES];
|
|||||||
extern const AircraftVehicleInfo orig_aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
|
extern const AircraftVehicleInfo orig_aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
|
||||||
extern const RoadVehicleInfo orig_road_vehicle_info[NUM_ROAD_ENGINES];
|
extern const RoadVehicleInfo orig_road_vehicle_info[NUM_ROAD_ENGINES];
|
||||||
|
|
||||||
EngineInfo _engine_info[TOTAL_NUM_ENGINES];
|
extern EngineInfo _engine_info[TOTAL_NUM_ENGINES];
|
||||||
RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
|
extern RailVehicleInfo _rail_vehicle_info[NUM_TRAIN_ENGINES];
|
||||||
ShipVehicleInfo _ship_vehicle_info[NUM_SHIP_ENGINES];
|
extern ShipVehicleInfo _ship_vehicle_info[NUM_SHIP_ENGINES];
|
||||||
AircraftVehicleInfo _aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
|
extern AircraftVehicleInfo _aircraft_vehicle_info[NUM_AIRCRAFT_ENGINES];
|
||||||
RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES];
|
extern RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES];
|
||||||
|
|
||||||
static inline const RailVehicleInfo* RailVehInfo(EngineID e)
|
static inline const RailVehicleInfo* RailVehInfo(EngineID e)
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,9 @@ const Bridge orig_bridge[] = {
|
|||||||
{ 90, 2, 32, 510, 608, 0xA28 | PALETTE_TO_STRUCT_GREY , STR_BRIDGE_TUBULAR_SILICON , NULL, 0 }
|
{ 90, 2, 32, 510, 608, 0xA28 | PALETTE_TO_STRUCT_GREY , STR_BRIDGE_TUBULAR_SILICON , NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Bridge _bridge[MAX_BRIDGES];
|
||||||
|
|
||||||
|
|
||||||
// calculate the price factor for building a long bridge.
|
// calculate the price factor for building a long bridge.
|
||||||
// basically the cost delta is 1,1, 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, 6,6,6,6,6,6, 7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,
|
// basically the cost delta is 1,1, 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, 6,6,6,6,6,6, 7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,
|
||||||
int CalcBridgeLenCostFactor(int x)
|
int CalcBridgeLenCostFactor(int x)
|
||||||
|
Loading…
Reference in New Issue
Block a user