src/ai/api/ai_types.hpp
author truebrain
Thu, 24 Apr 2008 23:39:18 +0000
branchnoai
changeset 10339 ce6cd68d9eb8
child 10341 08f39ee90bdf
permissions -rw-r--r--
(svn r12880) [NoAI] -Add: introduces ai_types.hpp, which has all NNNId like VehicleID. This simplifies the include-mess, and avoids including tons of _type.h for just a single typedef.
-Note: this is perfectly safe; when a type changes, any sane compiler starts complaining about redefining the typedef to an other type
/* $Id$ */

/** @file ai_types.hpp Defines all the types of the game, like VehicleID, .... */

#ifndef AI_TYPES_HPP
#define AI_TYPES_HPP

#include "../../core/overflowsafe_type.hpp"
#include "../../player_type.h"

/* Define all types here, so we don't have to include the whole _type.h maze */
typedef uint BridgeType;
typedef byte CargoID;
class CommandCost;
typedef uint16 EngineID;
typedef uint16 IndustryID;
typedef OverflowSafeInt64 Money;
typedef uint16 SignID;
typedef uint16 StationID;
typedef uint16 StringID;
typedef uint32 TileIndex;
typedef uint16 TownID;
typedef uint16 VehicleID;

#ifndef _SQUIRREL_H_
/* Life becomes easier when we can tell about a function it needs the VM, but
 *  without really including 'squirrel.h'. */
typedef void *HSQUIRRELVM;
typedef int SQInteger;
#endif

#endif /* AI_TYPES_HPP */