summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-14 11:05:30 +0000
committertron <tron@openttd.org>2006-06-14 11:05:30 +0000
commitd2f6cb9e2d26d8119bc59f5b8cfa52d20f7cd795 (patch)
treead23142e106dedc0fcb44dd7a183f059f36bbdb3 /vehicle_gui.c
parent17c15fab3efc4dfc7514bf89bbd9971abb178ea4 (diff)
downloadopenttd-d2f6cb9e2d26d8119bc59f5b8cfa52d20f7cd795.tar.xz
(svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but better than raw numbers
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 3ed835f2e..2d3edfd34 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -615,7 +615,7 @@ static void SetupScrollStuffForReplaceWindow(Window *w)
for (i = AIRCRAFT_ENGINES_INDEX; i < AIRCRAFT_ENGINES_INDEX + NUM_AIRCRAFT_ENGINES; i++) {
if (HASBIT(GetEngine(i)->player_avail, _local_player) &&
- HASBIT(subtype, 0) == HASBIT(AircraftVehInfo(i)->subtype, 0)) {
+ (subtype & AIR_CTOL) == (AircraftVehInfo(i)->subtype & AIR_CTOL)) {
if (sel[1] == count2) selected_id[1] = i;
count2++;
}
@@ -760,7 +760,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
}
sel[0]--;
}
- if (HASBIT(subtype, 0) == HASBIT(AircraftVehInfo(engine_id)->subtype, 0) &&
+ if ((subtype & AIR_CTOL) == (AircraftVehInfo(engine_id)->subtype & AIR_CTOL) &&
HASBIT(e->player_avail, _local_player)) {
if (sel[1] == 0) selected_id[1] = engine_id;
if (IS_INT_INSIDE(--pos2, -w->vscroll.cap, 0)) {