author | rubidium |
Wed, 07 May 2008 21:45:27 +0000 | |
changeset 10457 | ea18877d8eba |
parent 10453 | 9dcddad4df48 |
child 10533 | 24b0b6e1e8e9 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
10382
diff
changeset
|
3 |
/** @file engine_func.h Functions related to engines. */ |
6451
7baba06b4b85
(svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
belugas
parents:
6206
diff
changeset
|
4 |
|
0 | 5 |
#ifndef ENGINE_H |
6 |
#define ENGINE_H |
|
7 |
||
9273
ca5e00698c01
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium
parents:
9270
diff
changeset
|
8 |
#include "engine_type.h" |
2848 | 9 |
|
8717
de56e5ec3aec
(svn r11784) -Codechange: set up initial engine data in one place
peter1138
parents:
8708
diff
changeset
|
10 |
void SetupEngines(); |
6573 | 11 |
void StartupEngines(); |
0 | 12 |
|
10382
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
13 |
Engine *GetTempDataEngine(EngineID index); |
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
14 |
void CopyTempEngineData(); |
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
15 |
|
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
16 |
/* Original engine data counts and offsets */ |
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
17 |
extern const uint8 _engine_counts[4]; |
d1d4452acbfc
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138
parents:
10255
diff
changeset
|
18 |
extern const uint8 _engine_offsets[4]; |
0 | 19 |
|
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
20 |
void DrawTrainEngine(int x, int y, EngineID engine, SpriteID pal); |
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
21 |
void DrawRoadVehEngine(int x, int y, EngineID engine, SpriteID pal); |
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
22 |
void DrawShipEngine(int x, int y, EngineID engine, SpriteID pal); |
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
23 |
void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal); |
0 | 24 |
|
6573 | 25 |
void LoadCustomEngineNames(); |
26 |
void DeleteCustomEngineNames(); |
|
0 | 27 |
|
8975
303deb99982d
(svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types...
peter1138
parents:
8945
diff
changeset
|
28 |
bool IsEngineBuildable(EngineID engine, VehicleType type, PlayerID player); |
7001
d5f19455d650
(svn r9688) -Codechange: Created a function to get default cargo type for a cargo type
bjarni
parents:
6984
diff
changeset
|
29 |
CargoID GetEngineCargoType(EngineID engine); |
0 | 30 |
|
5187
d1f4e447a7eb
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
KUDr
parents:
5037
diff
changeset
|
31 |
typedef int CDECL EngList_SortTypeFunction(const void*, const void*); ///< argument type for EngList_Sort() |
10453
9dcddad4df48
(svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT
smatz
parents:
10429
diff
changeset
|
32 |
void EngList_Sort(EngineList *el, EngList_SortTypeFunction compare); ///< qsort of the engine list |
5187
d1f4e447a7eb
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
KUDr
parents:
5037
diff
changeset
|
33 |
void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< qsort of specified portion of the engine list |
d1f4e447a7eb
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
KUDr
parents:
5037
diff
changeset
|
34 |
|
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2331
diff
changeset
|
35 |
#endif /* ENGINE_H */ |