Mercurial > hg > openttd
annotate src/engine_gui.h @ 14258:a899d4e5ee1a draft
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 15 Jan 2010 16:41:15 +0000 |
parents | 706013b8e441 |
children | 72cb3c72d619 |
rev | line source |
---|---|
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
2 |
12778
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
3 /* |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
4 * This file is part of OpenTTD. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
8 */ |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11662
diff
changeset
|
9 |
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
10 /** @file engine_gui.h Engine GUI functions, used by build_vehicle_gui and autoreplace_gui */ |
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
11 |
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
12 #ifndef ENGINE_GUI_H |
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
13 #define ENGINE_GUI_H |
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
14 |
14258
a899d4e5ee1a
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
rubidium <rubidium@openttd.org>
parents:
13597
diff
changeset
|
15 #include "engine_type.h" |
9403
a6c2188b725a
(svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
peter1138 <peter1138@openttd.org>
parents:
9380
diff
changeset
|
16 #include "sortlist_type.h" |
14258
a899d4e5ee1a
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
rubidium <rubidium@openttd.org>
parents:
13597
diff
changeset
|
17 #include "gfx_type.h" |
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
18 |
11662
9463dadd8ee5
(svn r16042) -Feature [FS#1941]: Allow filtering of vehicle purchase lists by cargo. Based on patch by sbr.
frosch <frosch@openttd.org>
parents:
9403
diff
changeset
|
19 typedef GUIList<EngineID, CargoID> GUIEngineList; |
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
20 |
13032
dbc1aa7d826b
(svn r17530) -Codechange: use QSortT instead of qsort for sorting EngineIDs
rubidium <rubidium@openttd.org>
parents:
12838
diff
changeset
|
21 typedef int CDECL EngList_SortTypeFunction(const EngineID*, const EngineID*); ///< argument type for EngList_Sort() |
dbc1aa7d826b
(svn r17530) -Codechange: use QSortT instead of qsort for sorting EngineIDs
rubidium <rubidium@openttd.org>
parents:
12838
diff
changeset
|
22 void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare); ///< sort of the engine list |
dbc1aa7d826b
(svn r17530) -Codechange: use QSortT instead of qsort for sorting EngineIDs
rubidium <rubidium@openttd.org>
parents:
12838
diff
changeset
|
23 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< sort of specified portion of the engine list |
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
24 |
12837
a6a46b1b7ad9
(svn r17327) -Codechange: Allow external use of GetEngineCategoryName().
alberth <alberth@openttd.org>
parents:
12835
diff
changeset
|
25 StringID GetEngineCategoryName(EngineID engine); |
12838
7cdda3e6b6ff
(svn r17328) -Codechange: Get the vehicle technical data as string rather than having it printed.
alberth <alberth@openttd.org>
parents:
12837
diff
changeset
|
26 StringID GetEngineInfoString(EngineID engine); |
13597
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
27 |
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
28 void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, SpriteID pal); |
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
29 void DrawTrainEngine(int left, int right, int preferred_x, int y, EngineID engine, SpriteID pal); |
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
30 void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, SpriteID pal); |
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
31 void DrawShipEngine(int left, int right, int preferred_x, int y, EngineID engine, SpriteID pal); |
706013b8e441
(svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions
rubidium <rubidium@openttd.org>
parents:
13032
diff
changeset
|
32 void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, SpriteID pal); |
12835
0b809befe631
(svn r17325) -Codechange: Un-duplicate engine drawing routines.
alberth <alberth@openttd.org>
parents:
12778
diff
changeset
|
33 |
9380
90ab27a08510
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
peter1138 <peter1138@openttd.org>
parents:
diff
changeset
|
34 #endif /* ENGINE_GUI_H */ |