summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bridge.h6
-rw-r--r--src/bridge_gui.cpp4
-rw-r--r--src/newgrf.cpp2
-rw-r--r--src/table/bridge_land.h2
-rw-r--r--src/tunnelbridge_cmd.cpp6
5 files changed, 10 insertions, 10 deletions
diff --git a/src/bridge.h b/src/bridge.h
index 96526850d..fde98f57e 100644
--- a/src/bridge.h
+++ b/src/bridge.h
@@ -17,7 +17,7 @@ typedef uint BridgeType;
/** Struct containing information about a single bridge type
*/
-struct Bridge {
+struct BridgeSpec {
Year avail_year; ///< the year where it becomes available
byte min_length; ///< the minimum length (not counting start and end tile)
byte max_length; ///< the maximum length (not counting start and end tile)
@@ -32,12 +32,12 @@ struct Bridge {
byte flags; ///< bit 0 set: disable drawing of far pillars.
};
-extern Bridge _bridge[MAX_BRIDGES];
+extern BridgeSpec _bridge[MAX_BRIDGES];
Foundation GetBridgeFoundation(Slope tileh, Axis axis);
bool HasBridgeFlatRamp(Slope tileh, Axis axis);
-static inline const Bridge *GetBridgeSpec(BridgeType i)
+static inline const BridgeSpec *GetBridgeSpec(BridgeType i)
{
assert(i < lengthof(_bridge));
return &_bridge[i];
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 38a576a7e..bd1020956 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -79,7 +79,7 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e)
uint y = 15;
for (uint i = 0; (i < w->vscroll.cap) && ((i + w->vscroll.pos) < _bridgedata.count); i++) {
- const Bridge *b = GetBridgeSpec(_bridgedata.indexes[i + w->vscroll.pos]);
+ const BridgeSpec *b = GetBridgeSpec(_bridgedata.indexes[i + w->vscroll.pos]);
SetDParam(2, _bridgedata.costs[i + w->vscroll.pos]);
SetDParam(1, b->speed * 10 / 16);
@@ -191,7 +191,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type)
for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
if (CheckBridge_Stuff(brd_type, bridge_len)) {
/* bridge is accepted, add to list */
- const Bridge *b = GetBridgeSpec(brd_type);
+ const BridgeSpec *b = GetBridgeSpec(brd_type);
/* Add to terraforming & bulldozing costs the cost of the
* bridge itself (not computed with DC_QUERY_COST) */
_bridgedata.costs[j] = ret.GetCost() + (((int64)tot_bridgedata_len * _price.build_bridge * b->price) >> 8);
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index dae0185ab..e037f0114 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1177,7 +1177,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int
}
for (int i = 0; i < numinfo; i++) {
- Bridge *bridge = &_bridge[brid + i];
+ BridgeSpec *bridge = &_bridge[brid + i];
switch (prop) {
case 0x08: // Year of availability
diff --git a/src/table/bridge_land.h b/src/table/bridge_land.h
index 2eb5b273c..73045d3e8 100644
--- a/src/table/bridge_land.h
+++ b/src/table/bridge_land.h
@@ -723,7 +723,7 @@ static const PalSpriteID * const * const _bridge_sprite_table[MAX_BRIDGES] = {
#define MB(y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd) \
{y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd, NULL, 0}
-const Bridge _orig_bridge[] = {
+const BridgeSpec _orig_bridge[] = {
/*
year of availablity
| minimum length
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 53ac0012b..0773497a1 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -38,7 +38,7 @@
#include "table/strings.h"
#include "table/bridge_land.h"
-Bridge _bridge[MAX_BRIDGES];
+BridgeSpec _bridge[MAX_BRIDGES];
/** Reset the data been eventually changed by the grf loaded. */
void ResetBridges()
@@ -99,7 +99,7 @@ bool HasBridgeFlatRamp(Slope tileh, Axis axis)
static inline const PalSpriteID *GetBridgeSpriteTable(int index, byte table)
{
- const Bridge *bridge = GetBridgeSpec(index);
+ const BridgeSpec *bridge = GetBridgeSpec(index);
assert(table < 7);
if (bridge->sprite_table == NULL || bridge->sprite_table[table] == NULL) {
return _bridge_sprite_table[index][table];
@@ -153,7 +153,7 @@ static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, uint *z)
bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len)
{
- const Bridge *b = GetBridgeSpec(bridge_type);
+ const BridgeSpec *b = GetBridgeSpec(bridge_type);
uint max; // max possible length of a bridge (with patch 100)
if (bridge_type >= MAX_BRIDGES) return false;