src/engine_func.h
author Tero Marttila <terom@fixme.fi>
Tue, 22 Jul 2008 21:51:14 +0300
changeset 11180 982e9f814f97
parent 10737 0f704b9afd93
permissions -rw-r--r--
scan for tarfiles in CACHE_DIR, remember what Subdirectory a tar was found in, set the GCF_FLAG on GRFs loaded from there, and hide those in the NewGRF GUI
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     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
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
#ifndef ENGINE_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
#define ENGINE_H
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     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
cb4b1cc0bf65 (svn r3396) - Autoreplace changes:
peter1138
parents: 2840
diff changeset
     9
8717
de56e5ec3aec (svn r11784) -Codechange: set up initial engine data in one place
peter1138
parents: 8708
diff changeset
    10
void SetupEngines();
6573
7624f942237f (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6519
diff changeset
    11
void StartupEngines();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    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
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    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
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    24
6573
7624f942237f (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6519
diff changeset
    25
void LoadCustomEngineNames();
7624f942237f (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6519
diff changeset
    26
void DeleteCustomEngineNames();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    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);
10533
24b0b6e1e8e9 (svn r13077) -Codechange: move function that updates cached num_engines to engine.cpp, make it run only 1 loop
smatz
parents: 10453
diff changeset
    30
void SetCachedEngineCounts();
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    31
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
    32
#endif /* ENGINE_H */