mirror of https://github.com/OpenTTD/OpenTTD
(svn r16151) -Codechange: move some includes around to prevent including half the AI api in non-noai related code.
parent
486e5b4bfe
commit
660f90d37b
|
@ -8,6 +8,7 @@
|
||||||
#include "api/ai_event_types.hpp"
|
#include "api/ai_event_types.hpp"
|
||||||
#include "../date_type.h"
|
#include "../date_type.h"
|
||||||
#include "../core/string_compare_type.hpp"
|
#include "../core/string_compare_type.hpp"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
typedef std::map<const char *, class AIInfo *, StringCompare> AIInfoList;
|
typedef std::map<const char *, class AIInfo *, StringCompare> AIInfoList;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "ai_scanner.hpp"
|
#include "ai_scanner.hpp"
|
||||||
#include "ai_instance.hpp"
|
#include "ai_instance.hpp"
|
||||||
#include "ai_config.hpp"
|
#include "ai_config.hpp"
|
||||||
|
#include "api/ai_error.hpp"
|
||||||
|
|
||||||
/* static */ uint AI::frame_counter = 0;
|
/* static */ uint AI::frame_counter = 0;
|
||||||
/* static */ AIScanner *AI::ai_scanner = NULL;
|
/* static */ AIScanner *AI::ai_scanner = NULL;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
/** @file ai_event_types.cpp Implementation of all EventTypes. */
|
/** @file ai_event_types.cpp Implementation of all EventTypes. */
|
||||||
|
|
||||||
#include "ai_event_types.hpp"
|
#include "ai_event_types.hpp"
|
||||||
|
#include "ai_vehicle.hpp"
|
||||||
#include "../../command_type.h"
|
#include "../../command_type.h"
|
||||||
#include "../../strings_func.h"
|
#include "../../strings_func.h"
|
||||||
#include "../../settings_type.h"
|
#include "../../settings_type.h"
|
||||||
|
@ -69,7 +70,7 @@ Money AIEventEnginePreview::GetRunningCost()
|
||||||
return ::GetEngine(engine)->GetRunningCost();
|
return ::GetEngine(engine)->GetRunningCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
AIVehicle::VehicleType AIEventEnginePreview::GetVehicleType()
|
int32 AIEventEnginePreview::GetVehicleType()
|
||||||
{
|
{
|
||||||
switch (::GetEngine(engine)->type) {
|
switch (::GetEngine(engine)->type) {
|
||||||
case VEH_ROAD: return AIVehicle::VT_ROAD;
|
case VEH_ROAD: return AIVehicle::VT_ROAD;
|
||||||
|
|
|
@ -7,10 +7,7 @@
|
||||||
|
|
||||||
#include "ai_object.hpp"
|
#include "ai_object.hpp"
|
||||||
#include "ai_event.hpp"
|
#include "ai_event.hpp"
|
||||||
#include "ai_town.hpp"
|
#include "ai_company.hpp"
|
||||||
#include "ai_industry.hpp"
|
|
||||||
#include "ai_engine.hpp"
|
|
||||||
#include "ai_subsidy.hpp"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event Vehicle Crash, indicating a vehicle of yours is crashed.
|
* Event Vehicle Crash, indicating a vehicle of yours is crashed.
|
||||||
|
@ -268,11 +265,15 @@ public:
|
||||||
*/
|
*/
|
||||||
Money GetRunningCost();
|
Money GetRunningCost();
|
||||||
|
|
||||||
|
#ifdef DOXYGEN_SKIP
|
||||||
/**
|
/**
|
||||||
* Get the type of the offered engine.
|
* Get the type of the offered engine.
|
||||||
* @return The type the engine has.
|
* @return The type the engine has.
|
||||||
*/
|
*/
|
||||||
AIVehicle::VehicleType GetVehicleType();
|
AIVehicle::VehicleType GetVehicleType();
|
||||||
|
#else
|
||||||
|
int32 GetVehicleType();
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accept the engine preview.
|
* Accept the engine preview.
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "../ai.hpp"
|
#include "../ai.hpp"
|
||||||
#include "../ai_storage.hpp"
|
#include "../ai_storage.hpp"
|
||||||
#include "../ai_instance.hpp"
|
#include "../ai_instance.hpp"
|
||||||
|
#include "ai_error.hpp"
|
||||||
|
|
||||||
static AIStorage *GetStorage()
|
static AIStorage *GetStorage()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue