summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-13 18:04:01 +0000
committertron <tron@openttd.org>2005-07-13 18:04:01 +0000
commita4bf608d406442a5edab837ca100e654b616e1ff (patch)
treeb36523450a7bccf37ca126b6f857d1529d44c67b /order_gui.c
parentfd0780eeef43e6a8aefc943f7f470e409e0db93b (diff)
downloadopenttd-a4bf608d406442a5edab837ca100e654b616e1ff.tar.xz
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/order_gui.c b/order_gui.c
index 8f960ce64..a125403be 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -194,7 +194,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
switch (GetTileType(tile)) {
case MP_RAILWAY:
if (v->type == VEH_Train && IsTileOwner(tile, _local_player)) {
- if ((_map5[tile]&0xFC)==0xC0) {
+ if ((_m[tile].m5&0xFC)==0xC0) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
order.station = GetDepotByTile(tile)->index;
@@ -204,7 +204,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
break;
case MP_STREET:
- if ((_map5[tile] & 0xF0) == 0x20 && v->type == VEH_Road && IsTileOwner(tile, _local_player)) {
+ if ((_m[tile].m5 & 0xF0) == 0x20 && v->type == VEH_Road && IsTileOwner(tile, _local_player)) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
order.station = GetDepotByTile(tile)->index;
@@ -217,7 +217,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
if (IsAircraftHangarTile(tile) && IsTileOwner(tile, _local_player)) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS | OF_NON_STOP; //XXX - whats the nonstop stuff doing here?
- order.station = _map2[tile];
+ order.station = _m[tile].m2;
return order;
}
break;
@@ -226,7 +226,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
if (v->type != VEH_Ship) break;
if (IsTileDepotType(tile, TRANSPORT_WATER) &&
IsTileOwner(tile, _local_player)) {
- switch (_map5[tile]) {
+ switch (_m[tile].m5) {
case 0x81: tile -= TileDiffXY(1, 0); break;
case 0x83: tile -= TileDiffXY(0, 1); break;
}
@@ -245,7 +245,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
if (IsTileType(tile, MP_RAILWAY) &&
v->type == VEH_Train &&
IsTileOwner(tile, _local_player) &&
- (_map5[tile] & 0xFE) == 0xC4) {
+ (_m[tile].m5 & 0xFE) == 0xC4) {
order.type = OT_GOTO_WAYPOINT;
order.flags = 0;
order.station = GetWaypointByTile(tile)->index;
@@ -253,7 +253,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, TileIndex tile)
}
if (IsTileType(tile, MP_STATION)) {
- st = GetStation(st_index = _map2[tile]);
+ st = GetStation(st_index = _m[tile].m2);
if (st->owner == _current_player || st->owner == OWNER_NONE) {
byte facil;