summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2011-03-13 16:43:00 +0000
committeralberth <alberth@openttd.org>2011-03-13 16:43:00 +0000
commitbb4d83214685f5ae62ed8c9377c2f028e2e08c2b (patch)
tree2eec6c733284bf19d0e25230874a902d56496a31 /src/engine.cpp
parent911dfa52bbb92b1f3e1122b45f30227ff456a53b (diff)
downloadopenttd-bb4d83214685f5ae62ed8c9377c2f028e2e08c2b.tar.xz
(svn r22239) -Doc: Further engine doxyment additions.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 8774b0b3e..fa51e7c59 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -542,13 +542,21 @@ static void CheckRailIntroduction()
void ShowEnginePreviewWindow(EngineID engine);
-/* Determine if an engine type is a wagon (and not a loco) */
+/**
+ * Determine whether an engine type is a wagon (and not a loco).
+ * @param index %Engine getting queried.
+ * @return Whether the queried engine is a wagon.
+ */
static bool IsWagon(EngineID index)
{
const Engine *e = Engine::Get(index);
return e->type == VEH_TRAIN && e->u.rail.railveh_type == RAILVEH_WAGON;
}
+/**
+ * Update #reliability of engine \a e, (if needed) update the engine GUIs.
+ * @param e %Engine to update.
+ */
static void CalcEngineReliability(Engine *e)
{
uint age = e->age;
@@ -682,6 +690,11 @@ void StartupEngines()
InvalidateWindowClassesData(WC_BUILD_VEHICLE);
}
+/**
+ * Company \a company accepts engine \a eid for preview.
+ * @param eid Engine being accepted (is under preview).
+ * @param company Current company previewing the engine.
+ */
static void AcceptEnginePreview(EngineID eid, CompanyID company)
{
Engine *e = Engine::Get(eid);