2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file engine_func.h Functions related to engines. */
|
2007-02-23 18:55:07 +00:00
|
|
|
|
2010-12-22 11:46:41 +00:00
|
|
|
#ifndef ENGINE_FUNC_H
|
|
|
|
#define ENGINE_FUNC_H
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2008-03-28 18:00:38 +00:00
|
|
|
#include "engine_type.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "vehicle_type.h"
|
|
|
|
#include "company_type.h"
|
2023-04-24 18:33:18 +00:00
|
|
|
#include "timer/timer_game_calendar.h"
|
2006-01-12 15:52:18 +00:00
|
|
|
|
2008-01-08 18:25:51 +00:00
|
|
|
void SetupEngines();
|
2007-03-07 11:47:46 +00:00
|
|
|
void StartupEngines();
|
2013-07-02 18:57:26 +00:00
|
|
|
void CheckEngines();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2008-04-29 21:31:29 +00:00
|
|
|
/* Original engine data counts and offsets */
|
2023-05-08 17:01:06 +00:00
|
|
|
extern const uint8_t _engine_counts[4];
|
|
|
|
extern const uint8_t _engine_offsets[4];
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
|
2008-12-16 22:02:12 +00:00
|
|
|
bool IsEngineRefittable(EngineID engine);
|
2009-01-08 21:48:59 +00:00
|
|
|
void SetYearEngineAgingStops();
|
2022-12-09 01:40:55 +00:00
|
|
|
void CalcEngineReliability(Engine *e, bool new_month);
|
2023-05-08 17:01:06 +00:00
|
|
|
void StartupOneEngine(Engine *e, TimerGameCalendar::Date aging_date, uint32_t seed);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2009-10-06 19:52:38 +00:00
|
|
|
uint GetTotalCapacityOfArticulatedParts(EngineID engine);
|
2009-03-10 21:17:00 +00:00
|
|
|
|
2010-12-22 11:46:41 +00:00
|
|
|
#endif /* ENGINE_FUNC_H */
|