equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
2 |
2 |
3 /** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */ |
3 /** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */ |
4 |
4 |
5 #include "ai_bridgelist.hpp" |
5 #include "ai_bridgelist.hpp" |
|
6 #include "ai_bridge.hpp" |
6 #include "../../openttd.h" |
7 #include "../../openttd.h" |
7 #include "../../bridge.h" |
8 #include "../../bridge.h" |
8 #include "../../date_func.h" |
9 #include "../../date_func.h" |
9 |
10 |
10 AIBridgeList::AIBridgeList() |
11 AIBridgeList::AIBridgeList() |
17 |
18 |
18 AIBridgeList_Length::AIBridgeList_Length(uint length) |
19 AIBridgeList_Length::AIBridgeList_Length(uint length) |
19 { |
20 { |
20 for (byte j = 0; j < MAX_BRIDGES; j++) |
21 for (byte j = 0; j < MAX_BRIDGES; j++) |
21 if (::GetBridgeSpec(j)->avail_year <= _cur_year) |
22 if (::GetBridgeSpec(j)->avail_year <= _cur_year) |
22 if (length >= ::GetBridgeSpec(j)->min_length && length <= ::GetBridgeSpec(j)->max_length) |
23 if (length >= (uint)AIBridge::GetMinLength(j) && length <= (uint)AIBridge::GetMaxLength(j)) |
23 this->AddItem(j); |
24 this->AddItem(j); |
24 } |
25 } |