~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/ai/api/ai_error.hpp.sq

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: ai_error.hpp.sq 15535 2009-02-21 00:43:18Z glx $ */
 
2
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
 
3
 
 
4
#include "ai_error.hpp"
 
5
 
 
6
namespace SQConvert {
 
7
        /* Allow enums to be used as Squirrel parameters */
 
8
        template <> AIError::ErrorCategories GetParam(ForceType<AIError::ErrorCategories>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIError::ErrorCategories)tmp; }
 
9
        template <> int Return<AIError::ErrorCategories>(HSQUIRRELVM vm, AIError::ErrorCategories res) { sq_pushinteger(vm, (int32)res); return 1; }
 
10
        template <> AIError::ErrorMessages GetParam(ForceType<AIError::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIError::ErrorMessages)tmp; }
 
11
        template <> int Return<AIError::ErrorMessages>(HSQUIRRELVM vm, AIError::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; }
 
12
 
 
13
        /* Allow AIError to be used as Squirrel parameter */
 
14
        template <> AIError *GetParam(ForceType<AIError *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIError *)instance; }
 
15
        template <> AIError &GetParam(ForceType<AIError &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIError *)instance; }
 
16
        template <> const AIError *GetParam(ForceType<const AIError *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIError *)instance; }
 
17
        template <> const AIError &GetParam(ForceType<const AIError &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIError *)instance; }
 
18
        template <> int Return<AIError *>(HSQUIRRELVM vm, AIError *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIError", res, NULL, DefSQDestructorCallback<AIError>); return 1; }
 
19
}; // namespace SQConvert
 
20
 
 
21
void SQAIError_Register(Squirrel *engine) {
 
22
        DefSQClass <AIError> SQAIError("AIError");
 
23
        SQAIError.PreRegister(engine);
 
24
        SQAIError.AddConstructor<void (AIError::*)(), 1>(engine, "x");
 
25
 
 
26
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_NONE,                     "ERR_CAT_NONE");
 
27
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_GENERAL,                  "ERR_CAT_GENERAL");
 
28
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_VEHICLE,                  "ERR_CAT_VEHICLE");
 
29
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_STATION,                  "ERR_CAT_STATION");
 
30
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_BRIDGE,                   "ERR_CAT_BRIDGE");
 
31
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_TUNNEL,                   "ERR_CAT_TUNNEL");
 
32
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_TILE,                     "ERR_CAT_TILE");
 
33
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_SIGN,                     "ERR_CAT_SIGN");
 
34
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_RAIL,                     "ERR_CAT_RAIL");
 
35
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_ROAD,                     "ERR_CAT_ROAD");
 
36
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_ORDER,                    "ERR_CAT_ORDER");
 
37
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_MARINE,                   "ERR_CAT_MARINE");
 
38
        SQAIError.DefSQConst(engine, AIError::ERR_CAT_BIT_SIZE,                 "ERR_CAT_BIT_SIZE");
 
39
        SQAIError.DefSQConst(engine, AIError::ERR_NONE,                         "ERR_NONE");
 
40
        SQAIError.DefSQConst(engine, AIError::ERR_UNKNOWN,                      "ERR_UNKNOWN");
 
41
        SQAIError.DefSQConst(engine, AIError::ERR_PRECONDITION_FAILED,          "ERR_PRECONDITION_FAILED");
 
42
        SQAIError.DefSQConst(engine, AIError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
 
43
        SQAIError.DefSQConst(engine, AIError::ERR_NEWGRF_SUPPLIED_ERROR,        "ERR_NEWGRF_SUPPLIED_ERROR");
 
44
        SQAIError.DefSQConst(engine, AIError::ERR_GENERAL_BASE,                 "ERR_GENERAL_BASE");
 
45
        SQAIError.DefSQConst(engine, AIError::ERR_NOT_ENOUGH_CASH,              "ERR_NOT_ENOUGH_CASH");
 
46
        SQAIError.DefSQConst(engine, AIError::ERR_LOCAL_AUTHORITY_REFUSES,      "ERR_LOCAL_AUTHORITY_REFUSES");
 
47
        SQAIError.DefSQConst(engine, AIError::ERR_ALREADY_BUILT,                "ERR_ALREADY_BUILT");
 
48
        SQAIError.DefSQConst(engine, AIError::ERR_AREA_NOT_CLEAR,               "ERR_AREA_NOT_CLEAR");
 
49
        SQAIError.DefSQConst(engine, AIError::ERR_OWNED_BY_ANOTHER_COMPANY,     "ERR_OWNED_BY_ANOTHER_COMPANY");
 
50
        SQAIError.DefSQConst(engine, AIError::ERR_NAME_IS_NOT_UNIQUE,           "ERR_NAME_IS_NOT_UNIQUE");
 
51
        SQAIError.DefSQConst(engine, AIError::ERR_FLAT_LAND_REQUIRED,           "ERR_FLAT_LAND_REQUIRED");
 
52
        SQAIError.DefSQConst(engine, AIError::ERR_LAND_SLOPED_WRONG,            "ERR_LAND_SLOPED_WRONG");
 
53
        SQAIError.DefSQConst(engine, AIError::ERR_VEHICLE_IN_THE_WAY,           "ERR_VEHICLE_IN_THE_WAY");
 
54
        SQAIError.DefSQConst(engine, AIError::ERR_SITE_UNSUITABLE,              "ERR_SITE_UNSUITABLE");
 
55
        SQAIError.DefSQConst(engine, AIError::ERR_TOO_CLOSE_TO_EDGE,            "ERR_TOO_CLOSE_TO_EDGE");
 
56
        SQAIError.DefSQConst(engine, AIError::ERR_STATION_TOO_SPREAD_OUT,       "ERR_STATION_TOO_SPREAD_OUT");
 
57
 
 
58
        AIError::RegisterErrorMap(STR_0003_NOT_ENOUGH_CASH_REQUIRES,        AIError::ERR_NOT_ENOUGH_CASH);
 
59
        AIError::RegisterErrorMap(STR_2009_LOCAL_AUTHORITY_REFUSES,         AIError::ERR_LOCAL_AUTHORITY_REFUSES);
 
60
        AIError::RegisterErrorMap(STR_1007_ALREADY_BUILT,                   AIError::ERR_ALREADY_BUILT);
 
61
        AIError::RegisterErrorMap(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST,      AIError::ERR_ALREADY_BUILT);
 
62
        AIError::RegisterErrorMap(STR_2004_BUILDING_MUST_BE_DEMOLISHED,     AIError::ERR_AREA_NOT_CLEAR);
 
63
        AIError::RegisterErrorMap(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST,      AIError::ERR_AREA_NOT_CLEAR);
 
64
        AIError::RegisterErrorMap(STR_300B_MUST_DEMOLISH_RAILROAD,          AIError::ERR_AREA_NOT_CLEAR);
 
65
        AIError::RegisterErrorMap(STR_300E_MUST_DEMOLISH_AIRPORT_FIRST,     AIError::ERR_AREA_NOT_CLEAR);
 
66
        AIError::RegisterErrorMap(STR_MUST_DEMOLISH_CARGO_TRAM_STATION,     AIError::ERR_AREA_NOT_CLEAR);
 
67
        AIError::RegisterErrorMap(STR_3047_MUST_DEMOLISH_TRUCK_STATION,     AIError::ERR_AREA_NOT_CLEAR);
 
68
        AIError::RegisterErrorMap(STR_MUST_DEMOLISH_PASSENGER_TRAM_STATION, AIError::ERR_AREA_NOT_CLEAR);
 
69
        AIError::RegisterErrorMap(STR_3046_MUST_DEMOLISH_BUS_STATION,       AIError::ERR_AREA_NOT_CLEAR);
 
70
        AIError::RegisterErrorMap(STR_306A_BUOY_IN_THE_WAY,                 AIError::ERR_AREA_NOT_CLEAR);
 
71
        AIError::RegisterErrorMap(STR_304D_MUST_DEMOLISH_DOCK_FIRST,        AIError::ERR_AREA_NOT_CLEAR);
 
72
        AIError::RegisterErrorMap(STR_4800_IN_THE_WAY,                      AIError::ERR_AREA_NOT_CLEAR);
 
73
        AIError::RegisterErrorMap(STR_5804_COMPANY_HEADQUARTERS_IN,         AIError::ERR_AREA_NOT_CLEAR);
 
74
        AIError::RegisterErrorMap(STR_5800_OBJECT_IN_THE_WAY,               AIError::ERR_AREA_NOT_CLEAR);
 
75
        AIError::RegisterErrorMap(STR_1801_MUST_REMOVE_ROAD_FIRST,          AIError::ERR_AREA_NOT_CLEAR);
 
76
        AIError::RegisterErrorMap(STR_1008_MUST_REMOVE_RAILROAD_TRACK,      AIError::ERR_AREA_NOT_CLEAR);
 
77
        AIError::RegisterErrorMap(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST,      AIError::ERR_AREA_NOT_CLEAR);
 
78
        AIError::RegisterErrorMap(STR_5006_MUST_DEMOLISH_TUNNEL_FIRST,      AIError::ERR_AREA_NOT_CLEAR);
 
79
        AIError::RegisterErrorMap(STR_1002_EXCAVATION_WOULD_DAMAGE,         AIError::ERR_AREA_NOT_CLEAR);
 
80
        AIError::RegisterErrorMap(STR_1024_AREA_IS_OWNED_BY_ANOTHER,        AIError::ERR_OWNED_BY_ANOTHER_COMPANY);
 
81
        AIError::RegisterErrorMap(STR_013B_OWNED_BY,                        AIError::ERR_OWNED_BY_ANOTHER_COMPANY);
 
82
        AIError::RegisterErrorMap(STR_NAME_MUST_BE_UNIQUE,                  AIError::ERR_NAME_IS_NOT_UNIQUE);
 
83
        AIError::RegisterErrorMap(STR_0007_FLAT_LAND_REQUIRED,              AIError::ERR_FLAT_LAND_REQUIRED);
 
84
        AIError::RegisterErrorMap(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION,  AIError::ERR_LAND_SLOPED_WRONG);
 
85
        AIError::RegisterErrorMap(STR_8803_TRAIN_IN_THE_WAY,                AIError::ERR_VEHICLE_IN_THE_WAY);
 
86
        AIError::RegisterErrorMap(STR_9000_ROAD_VEHICLE_IN_THE_WAY,         AIError::ERR_VEHICLE_IN_THE_WAY);
 
87
        AIError::RegisterErrorMap(STR_980E_SHIP_IN_THE_WAY,                 AIError::ERR_VEHICLE_IN_THE_WAY);
 
88
        AIError::RegisterErrorMap(STR_A015_AIRCRAFT_IN_THE_WAY,             AIError::ERR_VEHICLE_IN_THE_WAY);
 
89
        AIError::RegisterErrorMap(STR_0239_SITE_UNSUITABLE,                 AIError::ERR_SITE_UNSUITABLE);
 
90
        AIError::RegisterErrorMap(STR_304B_SITE_UNSUITABLE,                 AIError::ERR_SITE_UNSUITABLE);
 
91
        AIError::RegisterErrorMap(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP,        AIError::ERR_TOO_CLOSE_TO_EDGE);
 
92
        AIError::RegisterErrorMap(STR_306C_STATION_TOO_SPREAD_OUT,          AIError::ERR_STATION_TOO_SPREAD_OUT);
 
93
 
 
94
        AIError::RegisterErrorMapString(AIError::ERR_NONE,                         "ERR_NONE");
 
95
        AIError::RegisterErrorMapString(AIError::ERR_UNKNOWN,                      "ERR_UNKNOWN");
 
96
        AIError::RegisterErrorMapString(AIError::ERR_PRECONDITION_FAILED,          "ERR_PRECONDITION_FAILED");
 
97
        AIError::RegisterErrorMapString(AIError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
 
98
        AIError::RegisterErrorMapString(AIError::ERR_NEWGRF_SUPPLIED_ERROR,        "ERR_NEWGRF_SUPPLIED_ERROR");
 
99
        AIError::RegisterErrorMapString(AIError::ERR_NOT_ENOUGH_CASH,              "ERR_NOT_ENOUGH_CASH");
 
100
        AIError::RegisterErrorMapString(AIError::ERR_LOCAL_AUTHORITY_REFUSES,      "ERR_LOCAL_AUTHORITY_REFUSES");
 
101
        AIError::RegisterErrorMapString(AIError::ERR_ALREADY_BUILT,                "ERR_ALREADY_BUILT");
 
102
        AIError::RegisterErrorMapString(AIError::ERR_AREA_NOT_CLEAR,               "ERR_AREA_NOT_CLEAR");
 
103
        AIError::RegisterErrorMapString(AIError::ERR_OWNED_BY_ANOTHER_COMPANY,     "ERR_OWNED_BY_ANOTHER_COMPANY");
 
104
        AIError::RegisterErrorMapString(AIError::ERR_NAME_IS_NOT_UNIQUE,           "ERR_NAME_IS_NOT_UNIQUE");
 
105
        AIError::RegisterErrorMapString(AIError::ERR_FLAT_LAND_REQUIRED,           "ERR_FLAT_LAND_REQUIRED");
 
106
        AIError::RegisterErrorMapString(AIError::ERR_LAND_SLOPED_WRONG,            "ERR_LAND_SLOPED_WRONG");
 
107
        AIError::RegisterErrorMapString(AIError::ERR_VEHICLE_IN_THE_WAY,           "ERR_VEHICLE_IN_THE_WAY");
 
108
        AIError::RegisterErrorMapString(AIError::ERR_SITE_UNSUITABLE,              "ERR_SITE_UNSUITABLE");
 
109
        AIError::RegisterErrorMapString(AIError::ERR_TOO_CLOSE_TO_EDGE,            "ERR_TOO_CLOSE_TO_EDGE");
 
110
        AIError::RegisterErrorMapString(AIError::ERR_STATION_TOO_SPREAD_OUT,       "ERR_STATION_TOO_SPREAD_OUT");
 
111
 
 
112
        SQAIError.DefSQStaticMethod(engine, &AIError::GetErrorCategory,   "GetErrorCategory",   1, ".");
 
113
        SQAIError.DefSQStaticMethod(engine, &AIError::GetLastError,       "GetLastError",       1, ".");
 
114
        SQAIError.DefSQStaticMethod(engine, &AIError::GetLastErrorString, "GetLastErrorString", 1, ".");
 
115
 
 
116
        SQAIError.PostRegister(engine);
 
117
}