diff options
author | rubidium <rubidium@openttd.org> | 2007-03-08 16:27:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-08 16:27:54 +0000 |
commit | ce919e8c719f0f698ac86dcaa528368316f2e52d (patch) | |
tree | e32a4dc6207efbaacc5af4e5c41a353b98b9a897 /src/autoreplace_gui.cpp | |
parent | aca3fb2b6ef69ae571b167d3071edd46d0ed383c (diff) | |
download | openttd-ce919e8c719f0f698ac86dcaa528368316f2e52d.tar.xz |
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index d531b24e6..6ef7c7d30 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -80,12 +80,12 @@ static CargoID EngineCargo(EngineID engine) switch (GetEngine(engine)->type) { default: NOT_REACHED(); - case VEH_Train: + case VEH_TRAIN: if (RailVehInfo(engine)->capacity == 0) return CT_INVALID; // no capacity -> can't carry cargo return RailVehInfo(engine)->cargo_type; - case VEH_Road: return RoadVehInfo(engine)->cargo_type; - case VEH_Ship: return ShipVehInfo(engine)->cargo_type; - case VEH_Aircraft: return CT_PASSENGERS; // all planes are build with passengers by default + case VEH_ROAD: return RoadVehInfo(engine)->cargo_type; + case VEH_SHIP: return ShipVehInfo(engine)->cargo_type; + case VEH_AIRCRAFT: return CT_PASSENGERS; // all planes are build with passengers by default } } @@ -147,7 +147,7 @@ static void GenerateReplaceVehList(Window *w, bool draw_left) EngList_RemoveAll(list); FOR_ALL_ENGINEIDS_OF_TYPE(e, type) { - if (type == VEH_Train && !GenerateReplaceRailList(e, draw_left, WP(w, replaceveh_d).wagon_btnstate)) continue; // special rules for trains + if (type == VEH_TRAIN && !GenerateReplaceRailList(e, draw_left, WP(w, replaceveh_d).wagon_btnstate)) continue; // special rules for trains if (draw_left) { /* Skip drawing the engines we don't have any of and haven't set for replacement */ @@ -255,7 +255,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) /* now the actual drawing of the window itself takes place */ SetDParam(0, _vehicle_type_names[w->window_number]); - if (w->window_number == VEH_Train) { + if (w->window_number == VEH_TRAIN) { /* set on/off for renew_keep_length */ SetDParam(1, p->renew_keep_length ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF); @@ -269,7 +269,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) DrawWindowWidgets(w); - if (w->window_number == VEH_Train) { + if (w->window_number == VEH_TRAIN) { /* Draw the selected railtype in the pulldown menu */ RailType railtype = _railtype_selected_in_replace_gui; DrawString(157, w->widget[14].top + 1, _rail_types_list[railtype], 0x10); @@ -487,19 +487,19 @@ void ShowReplaceVehicleWindow(byte vehicletype) DeleteWindowById(WC_REPLACE_VEHICLE, vehicletype); switch (vehicletype) { - case VEH_Train: + case VEH_TRAIN: w = AllocateWindowDescFront(&_replace_rail_vehicle_desc, vehicletype); w->vscroll.cap = 8; w->resize.step_height = 14; WP(w, replaceveh_d).wagon_btnstate = true; break; - case VEH_Road: + case VEH_ROAD: w = AllocateWindowDescFront(&_replace_road_vehicle_desc, vehicletype); w->vscroll.cap = 8; w->resize.step_height = 14; break; - case VEH_Ship: - case VEH_Aircraft: + case VEH_SHIP: + case VEH_AIRCRAFT: w = AllocateWindowDescFront(&_replace_ship_aircraft_vehicle_desc, vehicletype); w->vscroll.cap = 4; w->resize.step_height = 24; |