author | truebrain |
Sun, 24 Feb 2008 23:00:00 +0000 | |
branch | noai |
changeset 9756 | 7e637829cbd3 |
parent 9753 | 7209db94ad12 |
permissions | -rw-r--r-- |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
1 |
#include "ai_enginelist_valuator.hpp" |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
2 |
|
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
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 AIEngineList_vCargoType 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 <> AIEngineList_vCargoType *GetParam(ForceType<AIEngineList_vCargoType *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vCargoType *)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 <> AIEngineList_vCargoType &GetParam(ForceType<AIEngineList_vCargoType &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vCargoType *)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 AIEngineList_vCargoType *GetParam(ForceType<const AIEngineList_vCargoType *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vCargoType *)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 AIEngineList_vCargoType &GetParam(ForceType<const AIEngineList_vCargoType &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vCargoType *)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<AIEngineList_vCargoType *>(HSQUIRRELVM vm, AIEngineList_vCargoType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList_vCargoType", res, NULL, DefSQDestructorCallback<AIEngineList_vCargoType>); return 1; } |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
10 |
}; // namespace SQConvert |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
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 SQAIEngineList_vCargoType_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 <AIEngineList_vCargoType> SQAIEngineList_vCargoType("AIEngineList_vCargoType"); |
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 |
SQAIEngineList_vCargoType.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 |
SQAIEngineList_vCargoType.AddConstructor<void (AIEngineList_vCargoType::*)(), 1>(engine, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
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 |
SQAIEngineList_vCargoType.DefSQStaticMethod(engine, &AIEngineList_vCargoType::GetClassName, "GetClassName", 1, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
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 |
SQAIEngineList_vCargoType.PostRegister(engine); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
20 |
} |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
21 |
|
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 AIEngineList_vCapacity 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 <> AIEngineList_vCapacity *GetParam(ForceType<AIEngineList_vCapacity *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vCapacity *)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 <> AIEngineList_vCapacity &GetParam(ForceType<AIEngineList_vCapacity &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vCapacity *)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 AIEngineList_vCapacity *GetParam(ForceType<const AIEngineList_vCapacity *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vCapacity *)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 AIEngineList_vCapacity &GetParam(ForceType<const AIEngineList_vCapacity &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vCapacity *)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<AIEngineList_vCapacity *>(HSQUIRRELVM vm, AIEngineList_vCapacity *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList_vCapacity", res, NULL, DefSQDestructorCallback<AIEngineList_vCapacity>); return 1; } |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
29 |
}; // namespace SQConvert |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 SQAIEngineList_vCapacity_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 <AIEngineList_vCapacity> SQAIEngineList_vCapacity("AIEngineList_vCapacity"); |
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 |
SQAIEngineList_vCapacity.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 |
SQAIEngineList_vCapacity.AddConstructor<void (AIEngineList_vCapacity::*)(), 1>(engine, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vCapacity.DefSQStaticMethod(engine, &AIEngineList_vCapacity::GetClassName, "GetClassName", 1, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vCapacity.PostRegister(engine); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
39 |
} |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
40 |
|
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 AIEngineList_vReliability 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 <> AIEngineList_vReliability *GetParam(ForceType<AIEngineList_vReliability *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vReliability *)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 <> AIEngineList_vReliability &GetParam(ForceType<AIEngineList_vReliability &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vReliability *)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 AIEngineList_vReliability *GetParam(ForceType<const AIEngineList_vReliability *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vReliability *)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 AIEngineList_vReliability &GetParam(ForceType<const AIEngineList_vReliability &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vReliability *)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<AIEngineList_vReliability *>(HSQUIRRELVM vm, AIEngineList_vReliability *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList_vReliability", res, NULL, DefSQDestructorCallback<AIEngineList_vReliability>); return 1; } |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
48 |
}; // namespace SQConvert |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 SQAIEngineList_vReliability_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 <AIEngineList_vReliability> SQAIEngineList_vReliability("AIEngineList_vReliability"); |
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 |
SQAIEngineList_vReliability.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 |
SQAIEngineList_vReliability.AddConstructor<void (AIEngineList_vReliability::*)(), 1>(engine, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vReliability.DefSQStaticMethod(engine, &AIEngineList_vReliability::GetClassName, "GetClassName", 1, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vReliability.PostRegister(engine); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
58 |
} |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
59 |
|
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 AIEngineList_vMaxSpeed 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 <> AIEngineList_vMaxSpeed *GetParam(ForceType<AIEngineList_vMaxSpeed *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vMaxSpeed *)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 <> AIEngineList_vMaxSpeed &GetParam(ForceType<AIEngineList_vMaxSpeed &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vMaxSpeed *)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 AIEngineList_vMaxSpeed *GetParam(ForceType<const AIEngineList_vMaxSpeed *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vMaxSpeed *)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 AIEngineList_vMaxSpeed &GetParam(ForceType<const AIEngineList_vMaxSpeed &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vMaxSpeed *)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<AIEngineList_vMaxSpeed *>(HSQUIRRELVM vm, AIEngineList_vMaxSpeed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList_vMaxSpeed", res, NULL, DefSQDestructorCallback<AIEngineList_vMaxSpeed>); return 1; } |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
diff
changeset
|
67 |
}; // namespace SQConvert |
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 SQAIEngineList_vMaxSpeed_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 <AIEngineList_vMaxSpeed> SQAIEngineList_vMaxSpeed("AIEngineList_vMaxSpeed"); |
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 |
SQAIEngineList_vMaxSpeed.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 |
SQAIEngineList_vMaxSpeed.AddConstructor<void (AIEngineList_vMaxSpeed::*)(), 1>(engine, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vMaxSpeed.DefSQStaticMethod(engine, &AIEngineList_vMaxSpeed::GetClassName, "GetClassName", 1, "x"); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 |
SQAIEngineList_vMaxSpeed.PostRegister(engine); |
9714
fdbdae7ea647
(svn r11298) [NoAI] -Add: added EngineList + Valuators for all common functions. This should replace all FindXXXEngine, which will be removed soon
truelight
parents:
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 AIEngineList_vPrice 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 <> AIEngineList_vPrice *GetParam(ForceType<AIEngineList_vPrice *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vPrice *)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 <> AIEngineList_vPrice &GetParam(ForceType<AIEngineList_vPrice &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vPrice *)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 AIEngineList_vPrice *GetParam(ForceType<const AIEngineList_vPrice *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEngineList_vPrice *)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 AIEngineList_vPrice &GetParam(ForceType<const AIEngineList_vPrice &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEngineList_vPrice *)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<AIEngineList_vPrice *>(HSQUIRRELVM vm, AIEngineList_vPrice *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList_vPrice", res, NULL, DefSQDestructorCallback<AIEngineList_vPrice>); 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 SQAIEngineList_vPrice_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 <AIEngineList_vPrice> SQAIEngineList_vPrice("AIEngineList_vPrice"); |
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 |
SQAIEngineList_vPrice.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 |
SQAIEngineList_vPrice.AddConstructor<void (AIEngineList_vPrice::*)(), 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
|
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 |
SQAIEngineList_vPrice.DefSQStaticMethod(engine, &AIEngineList_vPrice::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 |
SQAIEngineList_vPrice.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 |
} |