author | truebrain |
Wed, 27 Feb 2008 21:07:31 +0000 | |
branch | noai |
changeset 9792 | e1222f4674c2 |
parent 9778 | 38560cd27070 |
permissions | -rw-r--r-- |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
1 |
#include "ai_stationlist_valuator.hpp" |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
2 |
|
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
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 AIStationList_vLocation 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 <> AIStationList_vLocation *GetParam(ForceType<AIStationList_vLocation *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vLocation *)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 <> AIStationList_vLocation &GetParam(ForceType<AIStationList_vLocation &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vLocation *)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 AIStationList_vLocation *GetParam(ForceType<const AIStationList_vLocation *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vLocation *)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 AIStationList_vLocation &GetParam(ForceType<const AIStationList_vLocation &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vLocation *)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<AIStationList_vLocation *>(HSQUIRRELVM vm, AIStationList_vLocation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_vLocation", res, NULL, DefSQDestructorCallback<AIStationList_vLocation>); return 1; } |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
10 |
}; // namespace SQConvert |
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
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 SQAIStationList_vLocation_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 <AIStationList_vLocation> SQAIStationList_vLocation("AIStationList_vLocation"); |
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 |
SQAIStationList_vLocation.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 |
SQAIStationList_vLocation.AddConstructor<void (AIStationList_vLocation::*)(), 1>(engine, "x"); |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
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 |
SQAIStationList_vLocation.DefSQStaticMethod(engine, &AIStationList_vLocation::GetClassName, "GetClassName", 1, "x"); |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
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 |
SQAIStationList_vLocation.PostRegister(engine); |
9636
1005ffccf641
(svn r10527) [NoAI] -Add: AIStationList(), which lists all your stations; useful to maintain routes
truelight
parents:
diff
changeset
|
20 |
} |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
diff
changeset
|
21 |
|
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
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 AIStationList_vCargoWaiting 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 <> AIStationList_vCargoWaiting *GetParam(ForceType<AIStationList_vCargoWaiting *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vCargoWaiting *)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 <> AIStationList_vCargoWaiting &GetParam(ForceType<AIStationList_vCargoWaiting &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vCargoWaiting *)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 AIStationList_vCargoWaiting *GetParam(ForceType<const AIStationList_vCargoWaiting *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vCargoWaiting *)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 AIStationList_vCargoWaiting &GetParam(ForceType<const AIStationList_vCargoWaiting &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vCargoWaiting *)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<AIStationList_vCargoWaiting *>(HSQUIRRELVM vm, AIStationList_vCargoWaiting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_vCargoWaiting", res, NULL, DefSQDestructorCallback<AIStationList_vCargoWaiting>); return 1; } |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
diff
changeset
|
29 |
}; // namespace SQConvert |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
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 SQAIStationList_vCargoWaiting_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 <AIStationList_vCargoWaiting> SQAIStationList_vCargoWaiting("AIStationList_vCargoWaiting"); |
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 |
SQAIStationList_vCargoWaiting.PreRegister(engine); |
9778
38560cd27070
(svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents:
9753
diff
changeset
|
34 |
SQAIStationList_vCargoWaiting.AddConstructor<void (AIStationList_vCargoWaiting::*)(CargoID cargo_id), 2>(engine, "xi"); |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
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 |
SQAIStationList_vCargoWaiting.DefSQStaticMethod(engine, &AIStationList_vCargoWaiting::GetClassName, "GetClassName", 1, "x"); |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
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 |
SQAIStationList_vCargoWaiting.PostRegister(engine); |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9636
diff
changeset
|
39 |
} |
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:
9648
diff
changeset
|
40 |
|
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:
9648
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 AIStationList_vCargoRating 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 <> AIStationList_vCargoRating *GetParam(ForceType<AIStationList_vCargoRating *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vCargoRating *)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 <> AIStationList_vCargoRating &GetParam(ForceType<AIStationList_vCargoRating &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vCargoRating *)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 AIStationList_vCargoRating *GetParam(ForceType<const AIStationList_vCargoRating *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_vCargoRating *)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 AIStationList_vCargoRating &GetParam(ForceType<const AIStationList_vCargoRating &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_vCargoRating *)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<AIStationList_vCargoRating *>(HSQUIRRELVM vm, AIStationList_vCargoRating *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_vCargoRating", res, NULL, DefSQDestructorCallback<AIStationList_vCargoRating>); 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:
9648
diff
changeset
|
48 |
}; // 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:
9648
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 SQAIStationList_vCargoRating_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 <AIStationList_vCargoRating> SQAIStationList_vCargoRating("AIStationList_vCargoRating"); |
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 |
SQAIStationList_vCargoRating.PreRegister(engine); |
9778
38560cd27070
(svn r12273) [NoAI] -Documentation: big change of many list-related comments. It is now more readable, more explaining, and all unneeded things (API-wise) are removed
truebrain
parents:
9753
diff
changeset
|
53 |
SQAIStationList_vCargoRating.AddConstructor<void (AIStationList_vCargoRating::*)(CargoID cargo_id), 2>(engine, "xi"); |
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:
9648
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 |
SQAIStationList_vCargoRating.DefSQStaticMethod(engine, &AIStationList_vCargoRating::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:
9648
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 |
SQAIStationList_vCargoRating.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:
9648
diff
changeset
|
58 |
} |
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:
9648
diff
changeset
|
59 |
|
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:
9648
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 AIStationList_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
|
62 |
template <> AIStationList_vDistanceManhattanToTile *GetParam(ForceType<AIStationList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_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
|
63 |
template <> AIStationList_vDistanceManhattanToTile &GetParam(ForceType<AIStationList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_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
|
64 |
template <> const AIStationList_vDistanceManhattanToTile *GetParam(ForceType<const AIStationList_vDistanceManhattanToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_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
|
65 |
template <> const AIStationList_vDistanceManhattanToTile &GetParam(ForceType<const AIStationList_vDistanceManhattanToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_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
|
66 |
template <> int Return<AIStationList_vDistanceManhattanToTile *>(HSQUIRRELVM vm, AIStationList_vDistanceManhattanToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_vDistanceManhattanToTile", res, NULL, DefSQDestructorCallback<AIStationList_vDistanceManhattanToTile>); 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:
9648
diff
changeset
|
67 |
}; // 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:
9648
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 SQAIStationList_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
|
70 |
DefSQClass <AIStationList_vDistanceManhattanToTile> SQAIStationList_vDistanceManhattanToTile("AIStationList_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
|
71 |
SQAIStationList_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
|
72 |
SQAIStationList_vDistanceManhattanToTile.AddConstructor<void (AIStationList_vDistanceManhattanToTile::*)(TileIndex tile), 2>(engine, "xi"); |
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:
9648
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 |
SQAIStationList_vDistanceManhattanToTile.DefSQStaticMethod(engine, &AIStationList_vDistanceManhattanToTile::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:
9648
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 |
SQAIStationList_vDistanceManhattanToTile.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:
9648
diff
changeset
|
77 |
} |
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
|
78 |
|
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
|
79 |
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
|
80 |
/* Allow AIStationList_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
|
81 |
template <> AIStationList_vDistanceSquareToTile *GetParam(ForceType<AIStationList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_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
|
82 |
template <> AIStationList_vDistanceSquareToTile &GetParam(ForceType<AIStationList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_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
|
83 |
template <> const AIStationList_vDistanceSquareToTile *GetParam(ForceType<const AIStationList_vDistanceSquareToTile *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList_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
|
84 |
template <> const AIStationList_vDistanceSquareToTile &GetParam(ForceType<const AIStationList_vDistanceSquareToTile &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList_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
|
85 |
template <> int Return<AIStationList_vDistanceSquareToTile *>(HSQUIRRELVM vm, AIStationList_vDistanceSquareToTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_vDistanceSquareToTile", res, NULL, DefSQDestructorCallback<AIStationList_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
|
86 |
}; // 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
|
87 |
|
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 SQAIStationList_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
|
89 |
DefSQClass <AIStationList_vDistanceSquareToTile> SQAIStationList_vDistanceSquareToTile("AIStationList_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
|
90 |
SQAIStationList_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
|
91 |
SQAIStationList_vDistanceSquareToTile.AddConstructor<void (AIStationList_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
|
92 |
|
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 |
SQAIStationList_vDistanceSquareToTile.DefSQStaticMethod(engine, &AIStationList_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
|
94 |
|
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 |
SQAIStationList_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
|
96 |
} |