diff options
author | rubidium <rubidium@openttd.org> | 2007-05-18 17:31:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-18 17:31:41 +0000 |
commit | ba24c34f8558369cc0802c92963b40ff5c7b0bc2 (patch) | |
tree | 3eac526253ee6111911b7ea868ca46065b6d5889 /src/autoreplace_gui.cpp | |
parent | 2196abd71d687564597a0d4f6f9defc8679ba87b (diff) | |
download | openttd-ba24c34f8558369cc0802c92963b40ff5c7b0bc2.tar.xz |
(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 2915f8476..03c1610e8 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -62,7 +62,7 @@ void InvalidateAutoreplaceWindow(EngineID e) /** When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists * @param type The type of engine */ -void AddRemoveEngineFromAutoreplaceAndBuildWindows(byte type) +void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type) { _rebuild_left_list = false; // left list is only for the vehicles the player owns and is not related to being buildable _rebuild_right_list = true; @@ -202,7 +202,7 @@ static void GenerateLists(Window *w) } -void DrawEngineList(byte type, int x, int y, const EngineList eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count); +void DrawEngineList(VehicleType type, int x, int y, const EngineList eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count); static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) { @@ -296,7 +296,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) EngineID end = min((i == 0 ? w->vscroll.cap : w->vscroll2.cap) + start, EngList_Count(&list)); /* Do the actual drawing */ - DrawEngineList(w->window_number, x, 15, list, start, end, WP(w, replaceveh_d).sel_engine[i], i == 0); + DrawEngineList((VehicleType)w->window_number, x, 15, list, start, end, WP(w, replaceveh_d).sel_engine[i], i == 0); /* Also draw the details if an engine is selected */ if (WP(w, replaceveh_d).sel_engine[i] != INVALID_ENGINE) { @@ -480,7 +480,7 @@ static const WindowDesc _replace_ship_aircraft_vehicle_desc = { }; -void ShowReplaceVehicleWindow(byte vehicletype) +void ShowReplaceVehicleWindow(VehicleType vehicletype) { Window *w; |