author | truebrain |
Sun, 24 Feb 2008 23:00:00 +0000 | |
branch | noai |
changeset 9756 | 7e637829cbd3 |
parent 9753 | 7209db94ad12 |
child 9771 | 769496a7b02e |
permissions | -rw-r--r-- |
9596
8af5a1399842
(svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff
changeset
|
1 |
#include "ai_tilelist_valuator.hpp" |
8af5a1399842
(svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff
changeset
|
2 |
|
8af5a1399842
(svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff
changeset
|
3 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
4 |
/* Allow AITileList_vBuildable to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
5 |
template <> AITileList_vBuildable *GetParam(ForceType<AITileList_vBuildable *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vBuildable *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
6 |
template <> AITileList_vBuildable &GetParam(ForceType<AITileList_vBuildable &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vBuildable *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
7 |
template <> const AITileList_vBuildable *GetParam(ForceType<const AITileList_vBuildable *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vBuildable *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
8 |
template <> const AITileList_vBuildable &GetParam(ForceType<const AITileList_vBuildable &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vBuildable *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
9 |
template <> int Return<AITileList_vBuildable *>(HSQUIRRELVM vm, AITileList_vBuildable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vBuildable", res, NULL, DefSQDestructorCallback<AITileList_vBuildable>); return 1; } |
9698
1d50fe99b7e9
(svn r10939) [NoAI] -Add: added AITileList valuator Water
truelight
parents:
9680
diff
changeset
|
10 |
}; // namespace SQConvert |
1d50fe99b7e9
(svn r10939) [NoAI] -Add: added AITileList valuator Water
truelight
parents:
9680
diff
changeset
|
11 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
12 |
void SQAITileList_vBuildable_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
13 |
DefSQClass <AITileList_vBuildable> SQAITileList_vBuildable("AITileList_vBuildable"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
14 |
SQAITileList_vBuildable.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
15 |
SQAITileList_vBuildable.AddConstructor<void (AITileList_vBuildable::*)(), 1>(engine, "x"); |
9657
f2c6e332d8bc
(svn r10564) [NoAI] -Add: added a AITileList valuator that checks for a NxM buildable spot with the entry from the AITileList as top-left tile
truelight
parents:
9655
diff
changeset
|
16 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
17 |
SQAITileList_vBuildable.DefSQStaticMethod(engine, &AITileList_vBuildable::GetClassName, "GetClassName", 1, "x"); |
9657
f2c6e332d8bc
(svn r10564) [NoAI] -Add: added a AITileList valuator that checks for a NxM buildable spot with the entry from the AITileList as top-left tile
truelight
parents:
9655
diff
changeset
|
18 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
19 |
SQAITileList_vBuildable.PostRegister(engine); |
9611
5cf58c6571b7
(svn r9776) [NoAI] -Add: added AITileListSlope as valuator to see if tiles are flat or not
truelight
parents:
9610
diff
changeset
|
20 |
} |
5cf58c6571b7
(svn r9776) [NoAI] -Add: added AITileListSlope as valuator to see if tiles are flat or not
truelight
parents:
9610
diff
changeset
|
21 |
|
5cf58c6571b7
(svn r9776) [NoAI] -Add: added AITileListSlope as valuator to see if tiles are flat or not
truelight
parents:
9610
diff
changeset
|
22 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
23 |
/* Allow AITileList_vWater to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
24 |
template <> AITileList_vWater *GetParam(ForceType<AITileList_vWater *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vWater *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
25 |
template <> AITileList_vWater &GetParam(ForceType<AITileList_vWater &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vWater *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
26 |
template <> const AITileList_vWater *GetParam(ForceType<const AITileList_vWater *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vWater *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
27 |
template <> const AITileList_vWater &GetParam(ForceType<const AITileList_vWater &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vWater *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
28 |
template <> int Return<AITileList_vWater *>(HSQUIRRELVM vm, AITileList_vWater *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vWater", res, NULL, DefSQDestructorCallback<AITileList_vWater>); return 1; } |
9700
e442ce398e83
(svn r10941) [NoAI] -Add: added AITile::GetHeight and AITileList valuator Height
truelight
parents:
9698
diff
changeset
|
29 |
}; // namespace SQConvert |
e442ce398e83
(svn r10941) [NoAI] -Add: added AITile::GetHeight and AITileList valuator Height
truelight
parents:
9698
diff
changeset
|
30 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
31 |
void SQAITileList_vWater_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
32 |
DefSQClass <AITileList_vWater> SQAITileList_vWater("AITileList_vWater"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
33 |
SQAITileList_vWater.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
34 |
SQAITileList_vWater.AddConstructor<void (AITileList_vWater::*)(), 1>(engine, "x"); |
9700
e442ce398e83
(svn r10941) [NoAI] -Add: added AITile::GetHeight and AITileList valuator Height
truelight
parents:
9698
diff
changeset
|
35 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
36 |
SQAITileList_vWater.DefSQStaticMethod(engine, &AITileList_vWater::GetClassName, "GetClassName", 1, "x"); |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
37 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
38 |
SQAITileList_vWater.PostRegister(engine); |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
39 |
} |
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
40 |
|
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
41 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
42 |
/* Allow AITileList_vBuildableRectangle to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
43 |
template <> AITileList_vBuildableRectangle *GetParam(ForceType<AITileList_vBuildableRectangle *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vBuildableRectangle *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
44 |
template <> AITileList_vBuildableRectangle &GetParam(ForceType<AITileList_vBuildableRectangle &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vBuildableRectangle *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
45 |
template <> const AITileList_vBuildableRectangle *GetParam(ForceType<const AITileList_vBuildableRectangle *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vBuildableRectangle *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
46 |
template <> const AITileList_vBuildableRectangle &GetParam(ForceType<const AITileList_vBuildableRectangle &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vBuildableRectangle *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
47 |
template <> int Return<AITileList_vBuildableRectangle *>(HSQUIRRELVM vm, AITileList_vBuildableRectangle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vBuildableRectangle", res, NULL, DefSQDestructorCallback<AITileList_vBuildableRectangle>); return 1; } |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
48 |
}; // namespace SQConvert |
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
49 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
50 |
void SQAITileList_vBuildableRectangle_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
51 |
DefSQClass <AITileList_vBuildableRectangle> SQAITileList_vBuildableRectangle("AITileList_vBuildableRectangle"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
52 |
SQAITileList_vBuildableRectangle.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
53 |
SQAITileList_vBuildableRectangle.AddConstructor<void (AITileList_vBuildableRectangle::*)(uint width, uint height), 3>(engine, "xii"); |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
54 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
55 |
SQAITileList_vBuildableRectangle.DefSQStaticMethod(engine, &AITileList_vBuildableRectangle::GetClassName, "GetClassName", 1, "x"); |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
56 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
57 |
SQAITileList_vBuildableRectangle.PostRegister(engine); |
9603
49323bf80ebd
(svn r9747) [NoAI] -Add: added AITileListRoadTile and AITileListNeighbourRoad as Valuators for AITileList
truelight
parents:
9596
diff
changeset
|
58 |
} |
9609
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
59 |
|
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
60 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
61 |
/* Allow AITileList_vSlope to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
62 |
template <> AITileList_vSlope *GetParam(ForceType<AITileList_vSlope *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vSlope *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
63 |
template <> AITileList_vSlope &GetParam(ForceType<AITileList_vSlope &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vSlope *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
64 |
template <> const AITileList_vSlope *GetParam(ForceType<const AITileList_vSlope *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vSlope *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
65 |
template <> const AITileList_vSlope &GetParam(ForceType<const AITileList_vSlope &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vSlope *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
66 |
template <> int Return<AITileList_vSlope *>(HSQUIRRELVM vm, AITileList_vSlope *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vSlope", res, NULL, DefSQDestructorCallback<AITileList_vSlope>); return 1; } |
9609
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
67 |
}; // namespace SQConvert |
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
68 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
69 |
void SQAITileList_vSlope_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
70 |
DefSQClass <AITileList_vSlope> SQAITileList_vSlope("AITileList_vSlope"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
71 |
SQAITileList_vSlope.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
72 |
SQAITileList_vSlope.AddConstructor<void (AITileList_vSlope::*)(), 1>(engine, "x"); |
9609
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
73 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
74 |
SQAITileList_vSlope.DefSQStaticMethod(engine, &AITileList_vSlope::GetClassName, "GetClassName", 1, "x"); |
9609
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
75 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
76 |
SQAITileList_vSlope.PostRegister(engine); |
9609
f0dbf5850145
(svn r9767) [NoAI] -Add: add support for params in the constructor (via C++ templates)
truelight
parents:
9603
diff
changeset
|
77 |
} |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
78 |
|
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
79 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
80 |
/* Allow AITileList_vHeight to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
81 |
template <> AITileList_vHeight *GetParam(ForceType<AITileList_vHeight *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vHeight *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
82 |
template <> AITileList_vHeight &GetParam(ForceType<AITileList_vHeight &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vHeight *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
83 |
template <> const AITileList_vHeight *GetParam(ForceType<const AITileList_vHeight *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vHeight *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
84 |
template <> const AITileList_vHeight &GetParam(ForceType<const AITileList_vHeight &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vHeight *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
85 |
template <> int Return<AITileList_vHeight *>(HSQUIRRELVM vm, AITileList_vHeight *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vHeight", res, NULL, DefSQDestructorCallback<AITileList_vHeight>); return 1; } |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
86 |
}; // namespace SQConvert |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
87 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
88 |
void SQAITileList_vHeight_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
89 |
DefSQClass <AITileList_vHeight> SQAITileList_vHeight("AITileList_vHeight"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
90 |
SQAITileList_vHeight.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
91 |
SQAITileList_vHeight.AddConstructor<void (AITileList_vHeight::*)(), 1>(engine, "x"); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
92 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
93 |
SQAITileList_vHeight.DefSQStaticMethod(engine, &AITileList_vHeight::GetClassName, "GetClassName", 1, "x"); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
94 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
95 |
SQAITileList_vHeight.PostRegister(engine); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
96 |
} |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
97 |
|
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
98 |
namespace SQConvert { |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
99 |
/* Allow AITileList_vNeighbourRoadCount to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
100 |
template <> AITileList_vNeighbourRoadCount *GetParam(ForceType<AITileList_vNeighbourRoadCount *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vNeighbourRoadCount *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
101 |
template <> AITileList_vNeighbourRoadCount &GetParam(ForceType<AITileList_vNeighbourRoadCount &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vNeighbourRoadCount *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
102 |
template <> const AITileList_vNeighbourRoadCount *GetParam(ForceType<const AITileList_vNeighbourRoadCount *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vNeighbourRoadCount *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
103 |
template <> const AITileList_vNeighbourRoadCount &GetParam(ForceType<const AITileList_vNeighbourRoadCount &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vNeighbourRoadCount *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
104 |
template <> int Return<AITileList_vNeighbourRoadCount *>(HSQUIRRELVM vm, AITileList_vNeighbourRoadCount *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vNeighbourRoadCount", res, NULL, DefSQDestructorCallback<AITileList_vNeighbourRoadCount>); return 1; } |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
105 |
}; // namespace SQConvert |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
106 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
107 |
void SQAITileList_vNeighbourRoadCount_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
108 |
DefSQClass <AITileList_vNeighbourRoadCount> SQAITileList_vNeighbourRoadCount("AITileList_vNeighbourRoadCount"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
109 |
SQAITileList_vNeighbourRoadCount.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
110 |
SQAITileList_vNeighbourRoadCount.AddConstructor<void (AITileList_vNeighbourRoadCount::*)(), 1>(engine, "x"); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
111 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
112 |
SQAITileList_vNeighbourRoadCount.DefSQStaticMethod(engine, &AITileList_vNeighbourRoadCount::GetClassName, "GetClassName", 1, "x"); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
113 |
|
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
114 |
SQAITileList_vNeighbourRoadCount.PostRegister(engine); |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9635
diff
changeset
|
115 |
} |
9753
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
116 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
117 |
namespace SQConvert { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
118 |
/* Allow AITileList_vRoadTile to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
119 |
template <> AITileList_vRoadTile *GetParam(ForceType<AITileList_vRoadTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vRoadTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
120 |
template <> AITileList_vRoadTile &GetParam(ForceType<AITileList_vRoadTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vRoadTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
121 |
template <> const AITileList_vRoadTile *GetParam(ForceType<const AITileList_vRoadTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vRoadTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
122 |
template <> const AITileList_vRoadTile &GetParam(ForceType<const AITileList_vRoadTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vRoadTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
123 |
template <> int Return<AITileList_vRoadTile *>(HSQUIRRELVM vm, AITileList_vRoadTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vRoadTile", res, NULL, DefSQDestructorCallback<AITileList_vRoadTile>); return 1; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
124 |
}; // namespace SQConvert |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
125 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
126 |
void SQAITileList_vRoadTile_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
127 |
DefSQClass <AITileList_vRoadTile> SQAITileList_vRoadTile("AITileList_vRoadTile"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
128 |
SQAITileList_vRoadTile.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
129 |
SQAITileList_vRoadTile.AddConstructor<void (AITileList_vRoadTile::*)(), 1>(engine, "x"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
130 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
131 |
SQAITileList_vRoadTile.DefSQStaticMethod(engine, &AITileList_vRoadTile::GetClassName, "GetClassName", 1, "x"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
132 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
133 |
SQAITileList_vRoadTile.PostRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
134 |
} |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
135 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
136 |
namespace SQConvert { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
137 |
/* Allow AITileList_vCargoAcceptance to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
138 |
template <> AITileList_vCargoAcceptance *GetParam(ForceType<AITileList_vCargoAcceptance *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vCargoAcceptance *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
139 |
template <> AITileList_vCargoAcceptance &GetParam(ForceType<AITileList_vCargoAcceptance &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vCargoAcceptance *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
140 |
template <> const AITileList_vCargoAcceptance *GetParam(ForceType<const AITileList_vCargoAcceptance *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vCargoAcceptance *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
141 |
template <> const AITileList_vCargoAcceptance &GetParam(ForceType<const AITileList_vCargoAcceptance &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vCargoAcceptance *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
142 |
template <> int Return<AITileList_vCargoAcceptance *>(HSQUIRRELVM vm, AITileList_vCargoAcceptance *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vCargoAcceptance", res, NULL, DefSQDestructorCallback<AITileList_vCargoAcceptance>); return 1; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
143 |
}; // namespace SQConvert |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
144 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
145 |
void SQAITileList_vCargoAcceptance_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
146 |
DefSQClass <AITileList_vCargoAcceptance> SQAITileList_vCargoAcceptance("AITileList_vCargoAcceptance"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
147 |
SQAITileList_vCargoAcceptance.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
148 |
SQAITileList_vCargoAcceptance.AddConstructor<void (AITileList_vCargoAcceptance::*)(CargoID cargo_type, uint width, uint height, uint radius), 5>(engine, "xiiii"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
149 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
150 |
SQAITileList_vCargoAcceptance.DefSQStaticMethod(engine, &AITileList_vCargoAcceptance::GetClassName, "GetClassName", 1, "x"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
151 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
152 |
SQAITileList_vCargoAcceptance.PostRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
153 |
} |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
154 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
155 |
namespace SQConvert { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
156 |
/* Allow AITileList_vDistanceManhattanToTile to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
157 |
template <> AITileList_vDistanceManhattanToTile *GetParam(ForceType<AITileList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vDistanceManhattanToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
158 |
template <> AITileList_vDistanceManhattanToTile &GetParam(ForceType<AITileList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vDistanceManhattanToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
159 |
template <> const AITileList_vDistanceManhattanToTile *GetParam(ForceType<const AITileList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vDistanceManhattanToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
160 |
template <> const AITileList_vDistanceManhattanToTile &GetParam(ForceType<const AITileList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vDistanceManhattanToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
161 |
template <> int Return<AITileList_vDistanceManhattanToTile *>(HSQUIRRELVM vm, AITileList_vDistanceManhattanToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vDistanceManhattanToTile", res, NULL, DefSQDestructorCallback<AITileList_vDistanceManhattanToTile>); return 1; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
162 |
}; // namespace SQConvert |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
163 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
164 |
void SQAITileList_vDistanceManhattanToTile_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
165 |
DefSQClass <AITileList_vDistanceManhattanToTile> SQAITileList_vDistanceManhattanToTile("AITileList_vDistanceManhattanToTile"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
166 |
SQAITileList_vDistanceManhattanToTile.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
167 |
SQAITileList_vDistanceManhattanToTile.AddConstructor<void (AITileList_vDistanceManhattanToTile::*)(TileIndex tile), 2>(engine, "xi"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
168 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
169 |
SQAITileList_vDistanceManhattanToTile.DefSQStaticMethod(engine, &AITileList_vDistanceManhattanToTile::GetClassName, "GetClassName", 1, "x"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
170 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
171 |
SQAITileList_vDistanceManhattanToTile.PostRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
172 |
} |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
173 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
174 |
namespace SQConvert { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
175 |
/* Allow AITileList_vDistanceSquareToTile to be used as Squirrel parameter */ |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
176 |
template <> AITileList_vDistanceSquareToTile *GetParam(ForceType<AITileList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vDistanceSquareToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
177 |
template <> AITileList_vDistanceSquareToTile &GetParam(ForceType<AITileList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vDistanceSquareToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
178 |
template <> const AITileList_vDistanceSquareToTile *GetParam(ForceType<const AITileList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITileList_vDistanceSquareToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
179 |
template <> const AITileList_vDistanceSquareToTile &GetParam(ForceType<const AITileList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_vDistanceSquareToTile *)instance; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
180 |
template <> int Return<AITileList_vDistanceSquareToTile *>(HSQUIRRELVM vm, AITileList_vDistanceSquareToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_vDistanceSquareToTile", res, NULL, DefSQDestructorCallback<AITileList_vDistanceSquareToTile>); return 1; } |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
181 |
}; // namespace SQConvert |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
182 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
183 |
void SQAITileList_vDistanceSquareToTile_Register(Squirrel *engine) { |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
184 |
DefSQClass <AITileList_vDistanceSquareToTile> SQAITileList_vDistanceSquareToTile("AITileList_vDistanceSquareToTile"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
185 |
SQAITileList_vDistanceSquareToTile.PreRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
186 |
SQAITileList_vDistanceSquareToTile.AddConstructor<void (AITileList_vDistanceSquareToTile::*)(TileIndex tile), 2>(engine, "xi"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
187 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
188 |
SQAITileList_vDistanceSquareToTile.DefSQStaticMethod(engine, &AITileList_vDistanceSquareToTile::GetClassName, "GetClassName", 1, "x"); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
189 |
|
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
190 |
SQAITileList_vDistanceSquareToTile.PostRegister(engine); |
7209db94ad12
(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
truebrain
parents:
9741
diff
changeset
|
191 |
} |