annotate src/engine_gui.h @ 12835:0b809befe631 draft

(svn r17325) -Codechange: Un-duplicate engine drawing routines.
author alberth <alberth@openttd.org>
date Sun, 30 Aug 2009 17:38:28 +0000
parents bc7926153e19
children a6a46b1b7ad9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9403
a6c2188b725a (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
peter1138 <peter1138@openttd.org>
parents: 9380
diff changeset
15 #include "sortlist_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
16
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
17 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
18
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
19 typedef int CDECL EngList_SortTypeFunction(const void*, const void*); ///< argument type for EngList_Sort()
9403
a6c2188b725a (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
peter1138 <peter1138@openttd.org>
parents: 9380
diff changeset
20 void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare); ///< qsort of the engine list
a6c2188b725a (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList
peter1138 <peter1138@openttd.org>
parents: 9380
diff changeset
21 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< qsort 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
22
12835
0b809befe631 (svn r17325) -Codechange: Un-duplicate engine drawing routines.
alberth <alberth@openttd.org>
parents: 12778
diff changeset
23 void DrawVehicleEngine(int x, int y, EngineID engine, SpriteID pal);
0b809befe631 (svn r17325) -Codechange: Un-duplicate engine drawing routines.
alberth <alberth@openttd.org>
parents: 12778
diff changeset
24
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
25 #endif /* ENGINE_GUI_H */