1
0
Fork 0

(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically

release/1.2
rubidium 2011-11-13 20:52:39 +00:00
parent b7a655bf4c
commit 3f7eb71b17
101 changed files with 183 additions and 256 deletions

View File

@ -28,6 +28,8 @@ void AIScanner::RescanAIDir()
this->Scan(PATHSEP "library.nut", AI_LIBRARY_DIR); this->Scan(PATHSEP "library.nut", AI_LIBRARY_DIR);
} }
template <> const char *GetClassName<AIInfo>() { return "AIInfo"; }
AIScanner::AIScanner() : AIScanner::AIScanner() :
ScriptScanner(), ScriptScanner(),
info_dummy(NULL) info_dummy(NULL)

View File

@ -29,9 +29,6 @@
*/ */
class AIAccounting : public AIObject { class AIAccounting : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIAccounting"; }
/** /**
* Creating instance of this class starts counting the costs of commands * Creating instance of this class starts counting the costs of commands
* from zero. Saves the current value of GetCosts so we can return to * from zero. Saves the current value of GetCosts so we can return to

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIAccounting *>(HSQUIRRELVM vm, AIAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAccounting", res, NULL, DefSQDestructorCallback<AIAccounting>); return 1; } template <> int Return<AIAccounting *>(HSQUIRRELVM vm, AIAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAccounting", res, NULL, DefSQDestructorCallback<AIAccounting>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIAccounting>() { return "AIAccounting"; }
void SQAIAccounting_Register(Squirrel *engine) void SQAIAccounting_Register(Squirrel *engine)
{ {
DefSQClass <AIAccounting> SQAIAccounting("AIAccounting"); DefSQClass <AIAccounting> SQAIAccounting("AIAccounting");

View File

@ -19,9 +19,6 @@
*/ */
class AIAirport : public AIObject { class AIAirport : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIAirport"; }
/** /**
* The types of airports available in the game. * The types of airports available in the game.
*/ */

View File

@ -26,6 +26,8 @@ namespace SQConvert {
template <> int Return<AIAirport *>(HSQUIRRELVM vm, AIAirport *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAirport", res, NULL, DefSQDestructorCallback<AIAirport>); return 1; } template <> int Return<AIAirport *>(HSQUIRRELVM vm, AIAirport *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAirport", res, NULL, DefSQDestructorCallback<AIAirport>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIAirport>() { return "AIAirport"; }
void SQAIAirport_Register(Squirrel *engine) void SQAIAirport_Register(Squirrel *engine)
{ {
DefSQClass <AIAirport> SQAIAirport("AIAirport"); DefSQClass <AIAirport> SQAIAirport("AIAirport");

View File

@ -25,9 +25,6 @@
*/ */
class AIBase : public AIObject { class AIBase : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBase"; }
/** /**
* Get a random value. * Get a random value.
* @return A random value between 0 and MAX(uint32). * @return A random value between 0 and MAX(uint32).

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIBase *>(HSQUIRRELVM vm, AIBase *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBase", res, NULL, DefSQDestructorCallback<AIBase>); return 1; } template <> int Return<AIBase *>(HSQUIRRELVM vm, AIBase *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBase", res, NULL, DefSQDestructorCallback<AIBase>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIBase>() { return "AIBase"; }
void SQAIBase_Register(Squirrel *engine) void SQAIBase_Register(Squirrel *engine)
{ {
DefSQClass <AIBase> SQAIBase("AIBase"); DefSQClass <AIBase> SQAIBase("AIBase");

View File

@ -19,9 +19,6 @@
*/ */
class AIBaseStation : public AIObject { class AIBaseStation : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBaseStation"; }
/** /**
* Special station IDs for building adjacent/new stations when * Special station IDs for building adjacent/new stations when
* the adjacent/distant join features are enabled. * the adjacent/distant join features are enabled.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIBaseStation *>(HSQUIRRELVM vm, AIBaseStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBaseStation", res, NULL, DefSQDestructorCallback<AIBaseStation>); return 1; } template <> int Return<AIBaseStation *>(HSQUIRRELVM vm, AIBaseStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBaseStation", res, NULL, DefSQDestructorCallback<AIBaseStation>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIBaseStation>() { return "AIBaseStation"; }
void SQAIBaseStation_Register(Squirrel *engine) void SQAIBaseStation_Register(Squirrel *engine)
{ {
DefSQClass <AIBaseStation> SQAIBaseStation("AIBaseStation"); DefSQClass <AIBaseStation> SQAIBaseStation("AIBaseStation");

View File

@ -39,9 +39,6 @@ public:
ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, // [STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT] ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, // [STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT]
}; };
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridge"; }
/** /**
* Checks whether the given bridge type is valid. * Checks whether the given bridge type is valid.
* @param bridge_id The bridge to check. * @param bridge_id The bridge to check.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIBridge *>(HSQUIRRELVM vm, AIBridge *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridge", res, NULL, DefSQDestructorCallback<AIBridge>); return 1; } template <> int Return<AIBridge *>(HSQUIRRELVM vm, AIBridge *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridge", res, NULL, DefSQDestructorCallback<AIBridge>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIBridge>() { return "AIBridge"; }
void SQAIBridge_Register(Squirrel *engine) void SQAIBridge_Register(Squirrel *engine)
{ {
DefSQClass <AIBridge> SQAIBridge("AIBridge"); DefSQClass <AIBridge> SQAIBridge("AIBridge");

View File

@ -20,8 +20,6 @@
*/ */
class AIBridgeList : public AIList { class AIBridgeList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridgeList"; }
AIBridgeList(); AIBridgeList();
}; };
@ -31,9 +29,6 @@ public:
*/ */
class AIBridgeList_Length : public AIList { class AIBridgeList_Length : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridgeList_Length"; }
/** /**
* @param length The length of the bridge you want to build. * @param length The length of the bridge you want to build.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIBridgeList *>(HSQUIRRELVM vm, AIBridgeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList", res, NULL, DefSQDestructorCallback<AIBridgeList>); return 1; } template <> int Return<AIBridgeList *>(HSQUIRRELVM vm, AIBridgeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList", res, NULL, DefSQDestructorCallback<AIBridgeList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIBridgeList>() { return "AIBridgeList"; }
void SQAIBridgeList_Register(Squirrel *engine) void SQAIBridgeList_Register(Squirrel *engine)
{ {
DefSQClass <AIBridgeList> SQAIBridgeList("AIBridgeList"); DefSQClass <AIBridgeList> SQAIBridgeList("AIBridgeList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIBridgeList_Length *>(HSQUIRRELVM vm, AIBridgeList_Length *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList_Length", res, NULL, DefSQDestructorCallback<AIBridgeList_Length>); return 1; } template <> int Return<AIBridgeList_Length *>(HSQUIRRELVM vm, AIBridgeList_Length *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList_Length", res, NULL, DefSQDestructorCallback<AIBridgeList_Length>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIBridgeList_Length>() { return "AIBridgeList_Length"; }
void SQAIBridgeList_Length_Register(Squirrel *engine) void SQAIBridgeList_Length_Register(Squirrel *engine)
{ {
DefSQClass <AIBridgeList_Length> SQAIBridgeList_Length("AIBridgeList_Length"); DefSQClass <AIBridgeList_Length> SQAIBridgeList_Length("AIBridgeList_Length");

View File

@ -19,9 +19,6 @@
*/ */
class AICargo : public AIObject { class AICargo : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargo"; }
/** /**
* The classes of cargo (from newgrf_cargo.h). * The classes of cargo (from newgrf_cargo.h).
*/ */

View File

@ -28,6 +28,8 @@ namespace SQConvert {
template <> int Return<AICargo *>(HSQUIRRELVM vm, AICargo *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargo", res, NULL, DefSQDestructorCallback<AICargo>); return 1; } template <> int Return<AICargo *>(HSQUIRRELVM vm, AICargo *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargo", res, NULL, DefSQDestructorCallback<AICargo>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICargo>() { return "AICargo"; }
void SQAICargo_Register(Squirrel *engine) void SQAICargo_Register(Squirrel *engine)
{ {
DefSQClass <AICargo> SQAICargo("AICargo"); DefSQClass <AICargo> SQAICargo("AICargo");

View File

@ -20,8 +20,6 @@
*/ */
class AICargoList : public AIList { class AICargoList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList"; }
AICargoList(); AICargoList();
}; };
@ -33,9 +31,6 @@ public:
*/ */
class AICargoList_IndustryAccepting : public AIList { class AICargoList_IndustryAccepting : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_IndustryAccepting"; }
/** /**
* @param industry_id The industry to get the list of cargos it accepts from. * @param industry_id The industry to get the list of cargos it accepts from.
*/ */
@ -48,9 +43,6 @@ public:
*/ */
class AICargoList_IndustryProducing : public AIList { class AICargoList_IndustryProducing : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_IndustryProducing"; }
/** /**
* @param industry_id The industry to get the list of cargos it produces from. * @param industry_id The industry to get the list of cargos it produces from.
*/ */
@ -63,9 +55,6 @@ public:
*/ */
class AICargoList_StationAccepting : public AIList { class AICargoList_StationAccepting : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_StationAccepting"; }
/** /**
* @param station_id The station to get the list of cargos it accepts from. * @param station_id The station to get the list of cargos it accepts from.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AICargoList *>(HSQUIRRELVM vm, AICargoList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList", res, NULL, DefSQDestructorCallback<AICargoList>); return 1; } template <> int Return<AICargoList *>(HSQUIRRELVM vm, AICargoList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList", res, NULL, DefSQDestructorCallback<AICargoList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICargoList>() { return "AICargoList"; }
void SQAICargoList_Register(Squirrel *engine) void SQAICargoList_Register(Squirrel *engine)
{ {
DefSQClass <AICargoList> SQAICargoList("AICargoList"); DefSQClass <AICargoList> SQAICargoList("AICargoList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AICargoList_IndustryAccepting *>(HSQUIRRELVM vm, AICargoList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AICargoList_IndustryAccepting>); return 1; } template <> int Return<AICargoList_IndustryAccepting *>(HSQUIRRELVM vm, AICargoList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AICargoList_IndustryAccepting>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICargoList_IndustryAccepting>() { return "AICargoList_IndustryAccepting"; }
void SQAICargoList_IndustryAccepting_Register(Squirrel *engine) void SQAICargoList_IndustryAccepting_Register(Squirrel *engine)
{ {
DefSQClass <AICargoList_IndustryAccepting> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting"); DefSQClass <AICargoList_IndustryAccepting> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> int Return<AICargoList_IndustryProducing *>(HSQUIRRELVM vm, AICargoList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryProducing", res, NULL, DefSQDestructorCallback<AICargoList_IndustryProducing>); return 1; } template <> int Return<AICargoList_IndustryProducing *>(HSQUIRRELVM vm, AICargoList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryProducing", res, NULL, DefSQDestructorCallback<AICargoList_IndustryProducing>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICargoList_IndustryProducing>() { return "AICargoList_IndustryProducing"; }
void SQAICargoList_IndustryProducing_Register(Squirrel *engine) void SQAICargoList_IndustryProducing_Register(Squirrel *engine)
{ {
DefSQClass <AICargoList_IndustryProducing> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing"); DefSQClass <AICargoList_IndustryProducing> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing");
@ -74,6 +80,8 @@ namespace SQConvert {
template <> int Return<AICargoList_StationAccepting *>(HSQUIRRELVM vm, AICargoList_StationAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_StationAccepting", res, NULL, DefSQDestructorCallback<AICargoList_StationAccepting>); return 1; } template <> int Return<AICargoList_StationAccepting *>(HSQUIRRELVM vm, AICargoList_StationAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_StationAccepting", res, NULL, DefSQDestructorCallback<AICargoList_StationAccepting>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICargoList_StationAccepting>() { return "AICargoList_StationAccepting"; }
void SQAICargoList_StationAccepting_Register(Squirrel *engine) void SQAICargoList_StationAccepting_Register(Squirrel *engine)
{ {
DefSQClass <AICargoList_StationAccepting> SQAICargoList_StationAccepting("AICargoList_StationAccepting"); DefSQClass <AICargoList_StationAccepting> SQAICargoList_StationAccepting("AICargoList_StationAccepting");

View File

@ -19,9 +19,6 @@
*/ */
class AICompany : public AIObject { class AICompany : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICompany"; }
/** The range of possible quarters to get company information of. */ /** The range of possible quarters to get company information of. */
enum Quarter { enum Quarter {
CURRENT_QUARTER = 0, ///< The current quarter. CURRENT_QUARTER = 0, ///< The current quarter.

View File

@ -28,6 +28,8 @@ namespace SQConvert {
template <> int Return<AICompany *>(HSQUIRRELVM vm, AICompany *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICompany", res, NULL, DefSQDestructorCallback<AICompany>); return 1; } template <> int Return<AICompany *>(HSQUIRRELVM vm, AICompany *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICompany", res, NULL, DefSQDestructorCallback<AICompany>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AICompany>() { return "AICompany"; }
void SQAICompany_Register(Squirrel *engine) void SQAICompany_Register(Squirrel *engine)
{ {
DefSQClass <AICompany> SQAICompany("AICompany"); DefSQClass <AICompany> SQAICompany("AICompany");

View File

@ -24,9 +24,6 @@ class AIController {
friend class AIInstance; friend class AIInstance;
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIController"; }
/** /**
* Initializer of the AIController. * Initializer of the AIController.
*/ */

View File

@ -9,6 +9,8 @@
#include "ai_controller.hpp" #include "ai_controller.hpp"
template <> const char *GetClassName<AIController>() { return "AIController"; }
void SQAIController_Register(Squirrel *engine) void SQAIController_Register(Squirrel *engine)
{ {
DefSQClass <AIController> SQAIController("AIController"); DefSQClass <AIController> SQAIController("AIController");

View File

@ -26,9 +26,6 @@
*/ */
class AIDate : public AIObject { class AIDate : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIDate"; }
/** /**
* Get the current date. * Get the current date.
* This is the number of days since epoch under the assumption that * This is the number of days since epoch under the assumption that

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIDate *>(HSQUIRRELVM vm, AIDate *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDate", res, NULL, DefSQDestructorCallback<AIDate>); return 1; } template <> int Return<AIDate *>(HSQUIRRELVM vm, AIDate *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDate", res, NULL, DefSQDestructorCallback<AIDate>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIDate>() { return "AIDate"; }
void SQAIDate_Register(Squirrel *engine) void SQAIDate_Register(Squirrel *engine)
{ {
DefSQClass <AIDate> SQAIDate("AIDate"); DefSQClass <AIDate> SQAIDate("AIDate");

View File

@ -21,9 +21,6 @@
*/ */
class AIDepotList : public AIList { class AIDepotList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIDepotList"; }
/** /**
* @param transport_type The type of transport to make a list of depots for. * @param transport_type The type of transport to make a list of depots for.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIDepotList *>(HSQUIRRELVM vm, AIDepotList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDepotList", res, NULL, DefSQDestructorCallback<AIDepotList>); return 1; } template <> int Return<AIDepotList *>(HSQUIRRELVM vm, AIDepotList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDepotList", res, NULL, DefSQDestructorCallback<AIDepotList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIDepotList>() { return "AIDepotList"; }
void SQAIDepotList_Register(Squirrel *engine) void SQAIDepotList_Register(Squirrel *engine)
{ {
DefSQClass <AIDepotList> SQAIDepotList("AIDepotList"); DefSQClass <AIDepotList> SQAIDepotList("AIDepotList");

View File

@ -21,9 +21,6 @@
*/ */
class AIEngine : public AIObject { class AIEngine : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEngine"; }
/** /**
* Checks whether the given engine type is valid. An engine is valid if you * Checks whether the given engine type is valid. An engine is valid if you
* have at least one vehicle of this engine or it's currently buildable. * have at least one vehicle of this engine or it's currently buildable.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIEngine *>(HSQUIRRELVM vm, AIEngine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngine", res, NULL, DefSQDestructorCallback<AIEngine>); return 1; } template <> int Return<AIEngine *>(HSQUIRRELVM vm, AIEngine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngine", res, NULL, DefSQDestructorCallback<AIEngine>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEngine>() { return "AIEngine"; }
void SQAIEngine_Register(Squirrel *engine) void SQAIEngine_Register(Squirrel *engine)
{ {
DefSQClass <AIEngine> SQAIEngine("AIEngine"); DefSQClass <AIEngine> SQAIEngine("AIEngine");

View File

@ -21,9 +21,6 @@
*/ */
class AIEngineList : public AIList { class AIEngineList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEngineList"; }
/** /**
* @param vehicle_type The type of vehicle to make a list of engines for. * @param vehicle_type The type of vehicle to make a list of engines for.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIEngineList *>(HSQUIRRELVM vm, AIEngineList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList", res, NULL, DefSQDestructorCallback<AIEngineList>); return 1; } template <> int Return<AIEngineList *>(HSQUIRRELVM vm, AIEngineList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList", res, NULL, DefSQDestructorCallback<AIEngineList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEngineList>() { return "AIEngineList"; }
void SQAIEngineList_Register(Squirrel *engine) void SQAIEngineList_Register(Squirrel *engine)
{ {
DefSQClass <AIEngineList> SQAIEngineList("AIEngineList"); DefSQClass <AIEngineList> SQAIEngineList("AIEngineList");

View File

@ -43,9 +43,6 @@
*/ */
class AIError : public AIObject { class AIError : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIError"; }
/** /**
* All categories errors can be divided in. * All categories errors can be divided in.
*/ */

View File

@ -26,6 +26,8 @@ namespace SQConvert {
template <> int Return<AIError *>(HSQUIRRELVM vm, AIError *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIError", res, NULL, DefSQDestructorCallback<AIError>); return 1; } template <> int Return<AIError *>(HSQUIRRELVM vm, AIError *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIError", res, NULL, DefSQDestructorCallback<AIError>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIError>() { return "AIError"; }
void SQAIError_Register(Squirrel *engine) void SQAIError_Register(Squirrel *engine)
{ {
DefSQClass <AIError> SQAIError("AIError"); DefSQClass <AIError> SQAIError("AIError");

View File

@ -21,9 +21,6 @@
*/ */
class AIEvent : public AIObject { class AIEvent : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEvent"; }
/** /**
* The type of event. Needed to lookup the detailed class. * The type of event. Needed to lookup the detailed class.
*/ */
@ -80,12 +77,6 @@ protected:
*/ */
class AIEventController : public AIObject { class AIEventController : public AIObject {
public: public:
/**
* The name of the class, needed by several sub-processes.
*/
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventController"; }
/** /**
* Check if there is an event waiting. * Check if there is an event waiting.
* @return true if there is an event on the stack. * @return true if there is an event on the stack.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIEvent *>(HSQUIRRELVM vm, AIEvent *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "AIEvent", res, NULL, DefSQDestructorCallback<AIEvent>); return 1; } template <> int Return<AIEvent *>(HSQUIRRELVM vm, AIEvent *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "AIEvent", res, NULL, DefSQDestructorCallback<AIEvent>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEvent>() { return "AIEvent"; }
void SQAIEvent_Register(Squirrel *engine) void SQAIEvent_Register(Squirrel *engine)
{ {
DefSQClass <AIEvent> SQAIEvent("AIEvent"); DefSQClass <AIEvent> SQAIEvent("AIEvent");
@ -68,6 +70,8 @@ namespace SQConvert {
template <> int Return<AIEventController *>(HSQUIRRELVM vm, AIEventController *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventController", res, NULL, DefSQDestructorCallback<AIEventController>); return 1; } template <> int Return<AIEventController *>(HSQUIRRELVM vm, AIEventController *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventController", res, NULL, DefSQDestructorCallback<AIEventController>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventController>() { return "AIEventController"; }
void SQAIEventController_Register(Squirrel *engine) void SQAIEventController_Register(Squirrel *engine)
{ {
DefSQClass <AIEventController> SQAIEventController("AIEventController"); DefSQClass <AIEventController> SQAIEventController("AIEventController");

View File

@ -21,9 +21,6 @@
*/ */
class AIEventVehicleCrashed : public AIEvent { class AIEventVehicleCrashed : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleCrashed"; }
/** /**
* The reasons for vehicle crashes * The reasons for vehicle crashes
*/ */
@ -84,9 +81,6 @@ private:
*/ */
class AIEventSubsidyOffer : public AIEvent { class AIEventSubsidyOffer : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyOffer"; }
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -117,9 +111,6 @@ private:
*/ */
class AIEventSubsidyOfferExpired : public AIEvent { class AIEventSubsidyOfferExpired : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyOfferExpired"; }
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -150,9 +141,6 @@ private:
*/ */
class AIEventSubsidyAwarded : public AIEvent { class AIEventSubsidyAwarded : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyAwarded"; }
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -183,9 +171,6 @@ private:
*/ */
class AIEventSubsidyExpired : public AIEvent { class AIEventSubsidyExpired : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyExpired"; }
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -218,9 +203,6 @@ private:
*/ */
class AIEventEnginePreview : public AIEvent { class AIEventEnginePreview : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventEnginePreview"; }
/** /**
* @param engine The engine offered to test. * @param engine The engine offered to test.
*/ */
@ -309,9 +291,6 @@ private:
*/ */
class AIEventCompanyNew : public AIEvent { class AIEventCompanyNew : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyNew"; }
/** /**
* @param owner The new company. * @param owner The new company.
*/ */
@ -343,9 +322,6 @@ private:
*/ */
class AIEventCompanyInTrouble : public AIEvent { class AIEventCompanyInTrouble : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyInTrouble"; }
/** /**
* @param owner The company that is in trouble. * @param owner The company that is in trouble.
*/ */
@ -376,9 +352,6 @@ private:
*/ */
class AIEventCompanyAskMerger : public AIEvent { class AIEventCompanyAskMerger : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyAskMerger"; }
/** /**
* @param owner The company that can be bough. * @param owner The company that can be bough.
* @param value The value/costs of buying the company. * @param value The value/costs of buying the company.
@ -426,9 +399,6 @@ private:
*/ */
class AIEventCompanyMerger : public AIEvent { class AIEventCompanyMerger : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyMerger"; }
/** /**
* @param old_owner The company bought off. * @param old_owner The company bought off.
* @param new_owner The company that bougth owner. * @param new_owner The company that bougth owner.
@ -471,9 +441,6 @@ private:
*/ */
class AIEventCompanyBankrupt : public AIEvent { class AIEventCompanyBankrupt : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyBankrupt"; }
/** /**
* @param owner The company that has gone bankrupt. * @param owner The company that has gone bankrupt.
*/ */
@ -504,9 +471,6 @@ private:
*/ */
class AIEventVehicleLost : public AIEvent { class AIEventVehicleLost : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleLost"; }
/** /**
* @param vehicle_id The vehicle that is lost. * @param vehicle_id The vehicle that is lost.
*/ */
@ -537,9 +501,6 @@ private:
*/ */
class AIEventVehicleWaitingInDepot : public AIEvent { class AIEventVehicleWaitingInDepot : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleWaitingInDepot"; }
/** /**
* @param vehicle_id The vehicle that is waiting in a depot. * @param vehicle_id The vehicle that is waiting in a depot.
*/ */
@ -570,9 +531,6 @@ private:
*/ */
class AIEventVehicleUnprofitable : public AIEvent { class AIEventVehicleUnprofitable : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleUnprofitable"; }
/** /**
* @param vehicle_id The vehicle that was unprofitable. * @param vehicle_id The vehicle that was unprofitable.
*/ */
@ -603,9 +561,6 @@ private:
*/ */
class AIEventIndustryOpen : public AIEvent { class AIEventIndustryOpen : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventIndustryOpen"; }
/** /**
* @param industry_id The new industry. * @param industry_id The new industry.
*/ */
@ -636,9 +591,6 @@ private:
*/ */
class AIEventIndustryClose : public AIEvent { class AIEventIndustryClose : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventIndustryClose"; }
/** /**
* @param industry_id The new industry. * @param industry_id The new industry.
*/ */
@ -669,9 +621,6 @@ private:
*/ */
class AIEventEngineAvailable : public AIEvent { class AIEventEngineAvailable : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventEngineAvailable"; }
/** /**
* @param engine The engine that is available. * @param engine The engine that is available.
*/ */
@ -702,9 +651,6 @@ private:
*/ */
class AIEventStationFirstVehicle : public AIEvent { class AIEventStationFirstVehicle : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventStationFirstVehicle"; }
/** /**
* @param station The station visited for the first time. * @param station The station visited for the first time.
* @param vehicle The vehicle visiting the station. * @param vehicle The vehicle visiting the station.
@ -744,9 +690,6 @@ private:
*/ */
class AIEventDisasterZeppelinerCrashed : public AIEvent { class AIEventDisasterZeppelinerCrashed : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventDisasterZeppelinerCrashed"; }
/** /**
* @param station The station containing the affected airport * @param station The station containing the affected airport
*/ */
@ -777,9 +720,6 @@ private:
*/ */
class AIEventDisasterZeppelinerCleared : public AIEvent { class AIEventDisasterZeppelinerCleared : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventDisasterZeppelinerCleared"; }
/** /**
* @param station The station containing the affected airport * @param station The station containing the affected airport
*/ */
@ -810,9 +750,6 @@ private:
*/ */
class AIEventTownFounded : public AIEvent { class AIEventTownFounded : public AIEvent {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventTownFounded"; }
/** /**
* @param town The town that was created. * @param town The town that was created.
*/ */

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIEventVehicleCrashed *>(HSQUIRRELVM vm, AIEventVehicleCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleCrashed", res, NULL, DefSQDestructorCallback<AIEventVehicleCrashed>); return 1; } template <> int Return<AIEventVehicleCrashed *>(HSQUIRRELVM vm, AIEventVehicleCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleCrashed", res, NULL, DefSQDestructorCallback<AIEventVehicleCrashed>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventVehicleCrashed>() { return "AIEventVehicleCrashed"; }
void SQAIEventVehicleCrashed_Register(Squirrel *engine) void SQAIEventVehicleCrashed_Register(Squirrel *engine)
{ {
DefSQClass <AIEventVehicleCrashed> SQAIEventVehicleCrashed("AIEventVehicleCrashed"); DefSQClass <AIEventVehicleCrashed> SQAIEventVehicleCrashed("AIEventVehicleCrashed");
@ -54,6 +56,8 @@ namespace SQConvert {
template <> int Return<AIEventSubsidyOffer *>(HSQUIRRELVM vm, AIEventSubsidyOffer *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOffer", res, NULL, DefSQDestructorCallback<AIEventSubsidyOffer>); return 1; } template <> int Return<AIEventSubsidyOffer *>(HSQUIRRELVM vm, AIEventSubsidyOffer *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOffer", res, NULL, DefSQDestructorCallback<AIEventSubsidyOffer>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventSubsidyOffer>() { return "AIEventSubsidyOffer"; }
void SQAIEventSubsidyOffer_Register(Squirrel *engine) void SQAIEventSubsidyOffer_Register(Squirrel *engine)
{ {
DefSQClass <AIEventSubsidyOffer> SQAIEventSubsidyOffer("AIEventSubsidyOffer"); DefSQClass <AIEventSubsidyOffer> SQAIEventSubsidyOffer("AIEventSubsidyOffer");
@ -75,6 +79,8 @@ namespace SQConvert {
template <> int Return<AIEventSubsidyOfferExpired *>(HSQUIRRELVM vm, AIEventSubsidyOfferExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOfferExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyOfferExpired>); return 1; } template <> int Return<AIEventSubsidyOfferExpired *>(HSQUIRRELVM vm, AIEventSubsidyOfferExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOfferExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyOfferExpired>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventSubsidyOfferExpired>() { return "AIEventSubsidyOfferExpired"; }
void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine) void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine)
{ {
DefSQClass <AIEventSubsidyOfferExpired> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired"); DefSQClass <AIEventSubsidyOfferExpired> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired");
@ -96,6 +102,8 @@ namespace SQConvert {
template <> int Return<AIEventSubsidyAwarded *>(HSQUIRRELVM vm, AIEventSubsidyAwarded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyAwarded", res, NULL, DefSQDestructorCallback<AIEventSubsidyAwarded>); return 1; } template <> int Return<AIEventSubsidyAwarded *>(HSQUIRRELVM vm, AIEventSubsidyAwarded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyAwarded", res, NULL, DefSQDestructorCallback<AIEventSubsidyAwarded>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventSubsidyAwarded>() { return "AIEventSubsidyAwarded"; }
void SQAIEventSubsidyAwarded_Register(Squirrel *engine) void SQAIEventSubsidyAwarded_Register(Squirrel *engine)
{ {
DefSQClass <AIEventSubsidyAwarded> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded"); DefSQClass <AIEventSubsidyAwarded> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded");
@ -117,6 +125,8 @@ namespace SQConvert {
template <> int Return<AIEventSubsidyExpired *>(HSQUIRRELVM vm, AIEventSubsidyExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyExpired>); return 1; } template <> int Return<AIEventSubsidyExpired *>(HSQUIRRELVM vm, AIEventSubsidyExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyExpired>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventSubsidyExpired>() { return "AIEventSubsidyExpired"; }
void SQAIEventSubsidyExpired_Register(Squirrel *engine) void SQAIEventSubsidyExpired_Register(Squirrel *engine)
{ {
DefSQClass <AIEventSubsidyExpired> SQAIEventSubsidyExpired("AIEventSubsidyExpired"); DefSQClass <AIEventSubsidyExpired> SQAIEventSubsidyExpired("AIEventSubsidyExpired");
@ -138,6 +148,8 @@ namespace SQConvert {
template <> int Return<AIEventEnginePreview *>(HSQUIRRELVM vm, AIEventEnginePreview *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEnginePreview", res, NULL, DefSQDestructorCallback<AIEventEnginePreview>); return 1; } template <> int Return<AIEventEnginePreview *>(HSQUIRRELVM vm, AIEventEnginePreview *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEnginePreview", res, NULL, DefSQDestructorCallback<AIEventEnginePreview>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventEnginePreview>() { return "AIEventEnginePreview"; }
void SQAIEventEnginePreview_Register(Squirrel *engine) void SQAIEventEnginePreview_Register(Squirrel *engine)
{ {
DefSQClass <AIEventEnginePreview> SQAIEventEnginePreview("AIEventEnginePreview"); DefSQClass <AIEventEnginePreview> SQAIEventEnginePreview("AIEventEnginePreview");
@ -166,6 +178,8 @@ namespace SQConvert {
template <> int Return<AIEventCompanyNew *>(HSQUIRRELVM vm, AIEventCompanyNew *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyNew", res, NULL, DefSQDestructorCallback<AIEventCompanyNew>); return 1; } template <> int Return<AIEventCompanyNew *>(HSQUIRRELVM vm, AIEventCompanyNew *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyNew", res, NULL, DefSQDestructorCallback<AIEventCompanyNew>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventCompanyNew>() { return "AIEventCompanyNew"; }
void SQAIEventCompanyNew_Register(Squirrel *engine) void SQAIEventCompanyNew_Register(Squirrel *engine)
{ {
DefSQClass <AIEventCompanyNew> SQAIEventCompanyNew("AIEventCompanyNew"); DefSQClass <AIEventCompanyNew> SQAIEventCompanyNew("AIEventCompanyNew");
@ -187,6 +201,8 @@ namespace SQConvert {
template <> int Return<AIEventCompanyInTrouble *>(HSQUIRRELVM vm, AIEventCompanyInTrouble *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyInTrouble", res, NULL, DefSQDestructorCallback<AIEventCompanyInTrouble>); return 1; } template <> int Return<AIEventCompanyInTrouble *>(HSQUIRRELVM vm, AIEventCompanyInTrouble *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyInTrouble", res, NULL, DefSQDestructorCallback<AIEventCompanyInTrouble>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventCompanyInTrouble>() { return "AIEventCompanyInTrouble"; }
void SQAIEventCompanyInTrouble_Register(Squirrel *engine) void SQAIEventCompanyInTrouble_Register(Squirrel *engine)
{ {
DefSQClass <AIEventCompanyInTrouble> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble"); DefSQClass <AIEventCompanyInTrouble> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble");
@ -208,6 +224,8 @@ namespace SQConvert {
template <> int Return<AIEventCompanyAskMerger *>(HSQUIRRELVM vm, AIEventCompanyAskMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyAskMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyAskMerger>); return 1; } template <> int Return<AIEventCompanyAskMerger *>(HSQUIRRELVM vm, AIEventCompanyAskMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyAskMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyAskMerger>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventCompanyAskMerger>() { return "AIEventCompanyAskMerger"; }
void SQAIEventCompanyAskMerger_Register(Squirrel *engine) void SQAIEventCompanyAskMerger_Register(Squirrel *engine)
{ {
DefSQClass <AIEventCompanyAskMerger> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger"); DefSQClass <AIEventCompanyAskMerger> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger");
@ -231,6 +249,8 @@ namespace SQConvert {
template <> int Return<AIEventCompanyMerger *>(HSQUIRRELVM vm, AIEventCompanyMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyMerger>); return 1; } template <> int Return<AIEventCompanyMerger *>(HSQUIRRELVM vm, AIEventCompanyMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyMerger>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventCompanyMerger>() { return "AIEventCompanyMerger"; }
void SQAIEventCompanyMerger_Register(Squirrel *engine) void SQAIEventCompanyMerger_Register(Squirrel *engine)
{ {
DefSQClass <AIEventCompanyMerger> SQAIEventCompanyMerger("AIEventCompanyMerger"); DefSQClass <AIEventCompanyMerger> SQAIEventCompanyMerger("AIEventCompanyMerger");
@ -253,6 +273,8 @@ namespace SQConvert {
template <> int Return<AIEventCompanyBankrupt *>(HSQUIRRELVM vm, AIEventCompanyBankrupt *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyBankrupt", res, NULL, DefSQDestructorCallback<AIEventCompanyBankrupt>); return 1; } template <> int Return<AIEventCompanyBankrupt *>(HSQUIRRELVM vm, AIEventCompanyBankrupt *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyBankrupt", res, NULL, DefSQDestructorCallback<AIEventCompanyBankrupt>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventCompanyBankrupt>() { return "AIEventCompanyBankrupt"; }
void SQAIEventCompanyBankrupt_Register(Squirrel *engine) void SQAIEventCompanyBankrupt_Register(Squirrel *engine)
{ {
DefSQClass <AIEventCompanyBankrupt> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt"); DefSQClass <AIEventCompanyBankrupt> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt");
@ -274,6 +296,8 @@ namespace SQConvert {
template <> int Return<AIEventVehicleLost *>(HSQUIRRELVM vm, AIEventVehicleLost *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleLost", res, NULL, DefSQDestructorCallback<AIEventVehicleLost>); return 1; } template <> int Return<AIEventVehicleLost *>(HSQUIRRELVM vm, AIEventVehicleLost *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleLost", res, NULL, DefSQDestructorCallback<AIEventVehicleLost>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventVehicleLost>() { return "AIEventVehicleLost"; }
void SQAIEventVehicleLost_Register(Squirrel *engine) void SQAIEventVehicleLost_Register(Squirrel *engine)
{ {
DefSQClass <AIEventVehicleLost> SQAIEventVehicleLost("AIEventVehicleLost"); DefSQClass <AIEventVehicleLost> SQAIEventVehicleLost("AIEventVehicleLost");
@ -295,6 +319,8 @@ namespace SQConvert {
template <> int Return<AIEventVehicleWaitingInDepot *>(HSQUIRRELVM vm, AIEventVehicleWaitingInDepot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleWaitingInDepot", res, NULL, DefSQDestructorCallback<AIEventVehicleWaitingInDepot>); return 1; } template <> int Return<AIEventVehicleWaitingInDepot *>(HSQUIRRELVM vm, AIEventVehicleWaitingInDepot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleWaitingInDepot", res, NULL, DefSQDestructorCallback<AIEventVehicleWaitingInDepot>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventVehicleWaitingInDepot>() { return "AIEventVehicleWaitingInDepot"; }
void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine) void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine)
{ {
DefSQClass <AIEventVehicleWaitingInDepot> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot"); DefSQClass <AIEventVehicleWaitingInDepot> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot");
@ -316,6 +342,8 @@ namespace SQConvert {
template <> int Return<AIEventVehicleUnprofitable *>(HSQUIRRELVM vm, AIEventVehicleUnprofitable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleUnprofitable", res, NULL, DefSQDestructorCallback<AIEventVehicleUnprofitable>); return 1; } template <> int Return<AIEventVehicleUnprofitable *>(HSQUIRRELVM vm, AIEventVehicleUnprofitable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleUnprofitable", res, NULL, DefSQDestructorCallback<AIEventVehicleUnprofitable>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventVehicleUnprofitable>() { return "AIEventVehicleUnprofitable"; }
void SQAIEventVehicleUnprofitable_Register(Squirrel *engine) void SQAIEventVehicleUnprofitable_Register(Squirrel *engine)
{ {
DefSQClass <AIEventVehicleUnprofitable> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable"); DefSQClass <AIEventVehicleUnprofitable> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable");
@ -337,6 +365,8 @@ namespace SQConvert {
template <> int Return<AIEventIndustryOpen *>(HSQUIRRELVM vm, AIEventIndustryOpen *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryOpen", res, NULL, DefSQDestructorCallback<AIEventIndustryOpen>); return 1; } template <> int Return<AIEventIndustryOpen *>(HSQUIRRELVM vm, AIEventIndustryOpen *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryOpen", res, NULL, DefSQDestructorCallback<AIEventIndustryOpen>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventIndustryOpen>() { return "AIEventIndustryOpen"; }
void SQAIEventIndustryOpen_Register(Squirrel *engine) void SQAIEventIndustryOpen_Register(Squirrel *engine)
{ {
DefSQClass <AIEventIndustryOpen> SQAIEventIndustryOpen("AIEventIndustryOpen"); DefSQClass <AIEventIndustryOpen> SQAIEventIndustryOpen("AIEventIndustryOpen");
@ -358,6 +388,8 @@ namespace SQConvert {
template <> int Return<AIEventIndustryClose *>(HSQUIRRELVM vm, AIEventIndustryClose *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryClose", res, NULL, DefSQDestructorCallback<AIEventIndustryClose>); return 1; } template <> int Return<AIEventIndustryClose *>(HSQUIRRELVM vm, AIEventIndustryClose *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryClose", res, NULL, DefSQDestructorCallback<AIEventIndustryClose>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventIndustryClose>() { return "AIEventIndustryClose"; }
void SQAIEventIndustryClose_Register(Squirrel *engine) void SQAIEventIndustryClose_Register(Squirrel *engine)
{ {
DefSQClass <AIEventIndustryClose> SQAIEventIndustryClose("AIEventIndustryClose"); DefSQClass <AIEventIndustryClose> SQAIEventIndustryClose("AIEventIndustryClose");
@ -379,6 +411,8 @@ namespace SQConvert {
template <> int Return<AIEventEngineAvailable *>(HSQUIRRELVM vm, AIEventEngineAvailable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEngineAvailable", res, NULL, DefSQDestructorCallback<AIEventEngineAvailable>); return 1; } template <> int Return<AIEventEngineAvailable *>(HSQUIRRELVM vm, AIEventEngineAvailable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEngineAvailable", res, NULL, DefSQDestructorCallback<AIEventEngineAvailable>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventEngineAvailable>() { return "AIEventEngineAvailable"; }
void SQAIEventEngineAvailable_Register(Squirrel *engine) void SQAIEventEngineAvailable_Register(Squirrel *engine)
{ {
DefSQClass <AIEventEngineAvailable> SQAIEventEngineAvailable("AIEventEngineAvailable"); DefSQClass <AIEventEngineAvailable> SQAIEventEngineAvailable("AIEventEngineAvailable");
@ -400,6 +434,8 @@ namespace SQConvert {
template <> int Return<AIEventStationFirstVehicle *>(HSQUIRRELVM vm, AIEventStationFirstVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventStationFirstVehicle", res, NULL, DefSQDestructorCallback<AIEventStationFirstVehicle>); return 1; } template <> int Return<AIEventStationFirstVehicle *>(HSQUIRRELVM vm, AIEventStationFirstVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventStationFirstVehicle", res, NULL, DefSQDestructorCallback<AIEventStationFirstVehicle>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventStationFirstVehicle>() { return "AIEventStationFirstVehicle"; }
void SQAIEventStationFirstVehicle_Register(Squirrel *engine) void SQAIEventStationFirstVehicle_Register(Squirrel *engine)
{ {
DefSQClass <AIEventStationFirstVehicle> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle"); DefSQClass <AIEventStationFirstVehicle> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle");
@ -422,6 +458,8 @@ namespace SQConvert {
template <> int Return<AIEventDisasterZeppelinerCrashed *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCrashed", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCrashed>); return 1; } template <> int Return<AIEventDisasterZeppelinerCrashed *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCrashed", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCrashed>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventDisasterZeppelinerCrashed>() { return "AIEventDisasterZeppelinerCrashed"; }
void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine) void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine)
{ {
DefSQClass <AIEventDisasterZeppelinerCrashed> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed"); DefSQClass <AIEventDisasterZeppelinerCrashed> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed");
@ -443,6 +481,8 @@ namespace SQConvert {
template <> int Return<AIEventDisasterZeppelinerCleared *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCleared *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCleared", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCleared>); return 1; } template <> int Return<AIEventDisasterZeppelinerCleared *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCleared *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCleared", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCleared>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventDisasterZeppelinerCleared>() { return "AIEventDisasterZeppelinerCleared"; }
void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine) void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine)
{ {
DefSQClass <AIEventDisasterZeppelinerCleared> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared"); DefSQClass <AIEventDisasterZeppelinerCleared> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared");
@ -464,6 +504,8 @@ namespace SQConvert {
template <> int Return<AIEventTownFounded *>(HSQUIRRELVM vm, AIEventTownFounded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventTownFounded", res, NULL, DefSQDestructorCallback<AIEventTownFounded>); return 1; } template <> int Return<AIEventTownFounded *>(HSQUIRRELVM vm, AIEventTownFounded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventTownFounded", res, NULL, DefSQDestructorCallback<AIEventTownFounded>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIEventTownFounded>() { return "AIEventTownFounded"; }
void SQAIEventTownFounded_Register(Squirrel *engine) void SQAIEventTownFounded_Register(Squirrel *engine)
{ {
DefSQClass <AIEventTownFounded> SQAIEventTownFounded("AIEventTownFounded"); DefSQClass <AIEventTownFounded> SQAIEventTownFounded("AIEventTownFounded");

View File

@ -22,10 +22,6 @@
* In Execute mode all commands you do are executed for real. * In Execute mode all commands you do are executed for real.
*/ */
class AIExecMode : public AIObject { class AIExecMode : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIExecMode"; }
private: private:
AIModeProc *last_mode; ///< The previous mode we were in. AIModeProc *last_mode; ///< The previous mode we were in.
AIObject *last_instance; ///< The previous instace of the mode. AIObject *last_instance; ///< The previous instace of the mode.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIExecMode *>(HSQUIRRELVM vm, AIExecMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIExecMode", res, NULL, DefSQDestructorCallback<AIExecMode>); return 1; } template <> int Return<AIExecMode *>(HSQUIRRELVM vm, AIExecMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIExecMode", res, NULL, DefSQDestructorCallback<AIExecMode>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIExecMode>() { return "AIExecMode"; }
void SQAIExecMode_Register(Squirrel *engine) void SQAIExecMode_Register(Squirrel *engine)
{ {
DefSQClass <AIExecMode> SQAIExecMode("AIExecMode"); DefSQClass <AIExecMode> SQAIExecMode("AIExecMode");

View File

@ -36,9 +36,6 @@
*/ */
class AIGameSettings : public AIObject { class AIGameSettings : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGameSettings"; }
/** /**
* Is the given game setting a valid setting for this instance of OpenTTD? * Is the given game setting a valid setting for this instance of OpenTTD?
* @param setting The setting to check for existence. * @param setting The setting to check for existence.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIGameSettings *>(HSQUIRRELVM vm, AIGameSettings *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGameSettings", res, NULL, DefSQDestructorCallback<AIGameSettings>); return 1; } template <> int Return<AIGameSettings *>(HSQUIRRELVM vm, AIGameSettings *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGameSettings", res, NULL, DefSQDestructorCallback<AIGameSettings>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIGameSettings>() { return "AIGameSettings"; }
void SQAIGameSettings_Register(Squirrel *engine) void SQAIGameSettings_Register(Squirrel *engine)
{ {
DefSQClass <AIGameSettings> SQAIGameSettings("AIGameSettings"); DefSQClass <AIGameSettings> SQAIGameSettings("AIGameSettings");

View File

@ -19,9 +19,6 @@
*/ */
class AIGroup : public AIObject { class AIGroup : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGroup"; }
/** /**
* The group IDs of some special groups. * The group IDs of some special groups.
*/ */

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIGroup *>(HSQUIRRELVM vm, AIGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroup", res, NULL, DefSQDestructorCallback<AIGroup>); return 1; } template <> int Return<AIGroup *>(HSQUIRRELVM vm, AIGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroup", res, NULL, DefSQDestructorCallback<AIGroup>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIGroup>() { return "AIGroup"; }
void SQAIGroup_Register(Squirrel *engine) void SQAIGroup_Register(Squirrel *engine)
{ {
DefSQClass <AIGroup> SQAIGroup("AIGroup"); DefSQClass <AIGroup> SQAIGroup("AIGroup");

View File

@ -21,8 +21,6 @@
*/ */
class AIGroupList : public AIList { class AIGroupList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGroupList"; }
AIGroupList(); AIGroupList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIGroupList *>(HSQUIRRELVM vm, AIGroupList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroupList", res, NULL, DefSQDestructorCallback<AIGroupList>); return 1; } template <> int Return<AIGroupList *>(HSQUIRRELVM vm, AIGroupList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroupList", res, NULL, DefSQDestructorCallback<AIGroupList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIGroupList>() { return "AIGroupList"; }
void SQAIGroupList_Register(Squirrel *engine) void SQAIGroupList_Register(Squirrel *engine)
{ {
DefSQClass <AIGroupList> SQAIGroupList("AIGroupList"); DefSQClass <AIGroupList> SQAIGroupList("AIGroupList");

View File

@ -19,9 +19,6 @@
*/ */
class AIIndustry : public AIObject { class AIIndustry : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustry"; }
/** Ways for an industry to accept a cargo. */ /** Ways for an industry to accept a cargo. */
enum CargoAcceptState { enum CargoAcceptState {
CAS_NOT_ACCEPTED, ///< The CargoID is not accepted by this industry. CAS_NOT_ACCEPTED, ///< The CargoID is not accepted by this industry.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIIndustry *>(HSQUIRRELVM vm, AIIndustry *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustry", res, NULL, DefSQDestructorCallback<AIIndustry>); return 1; } template <> int Return<AIIndustry *>(HSQUIRRELVM vm, AIIndustry *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustry", res, NULL, DefSQDestructorCallback<AIIndustry>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustry>() { return "AIIndustry"; }
void SQAIIndustry_Register(Squirrel *engine) void SQAIIndustry_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustry> SQAIIndustry("AIIndustry"); DefSQClass <AIIndustry> SQAIIndustry("AIIndustry");

View File

@ -20,8 +20,6 @@
*/ */
class AIIndustryList : public AIList { class AIIndustryList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList"; }
AIIndustryList(); AIIndustryList();
}; };
@ -31,9 +29,6 @@ public:
*/ */
class AIIndustryList_CargoAccepting : public AIList { class AIIndustryList_CargoAccepting : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList_CargoAccepting"; }
/** /**
* @param cargo_id The cargo this industry should accept. * @param cargo_id The cargo this industry should accept.
*/ */
@ -47,9 +42,6 @@ public:
*/ */
class AIIndustryList_CargoProducing : public AIList { class AIIndustryList_CargoProducing : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList_CargoProducing"; }
/** /**
* @param cargo_id The cargo this industry should produce. * @param cargo_id The cargo this industry should produce.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIIndustryList *>(HSQUIRRELVM vm, AIIndustryList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList", res, NULL, DefSQDestructorCallback<AIIndustryList>); return 1; } template <> int Return<AIIndustryList *>(HSQUIRRELVM vm, AIIndustryList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList", res, NULL, DefSQDestructorCallback<AIIndustryList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustryList>() { return "AIIndustryList"; }
void SQAIIndustryList_Register(Squirrel *engine) void SQAIIndustryList_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustryList> SQAIIndustryList("AIIndustryList"); DefSQClass <AIIndustryList> SQAIIndustryList("AIIndustryList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIIndustryList_CargoAccepting *>(HSQUIRRELVM vm, AIIndustryList_CargoAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoAccepting", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoAccepting>); return 1; } template <> int Return<AIIndustryList_CargoAccepting *>(HSQUIRRELVM vm, AIIndustryList_CargoAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoAccepting", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoAccepting>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustryList_CargoAccepting>() { return "AIIndustryList_CargoAccepting"; }
void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine) void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustryList_CargoAccepting> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting"); DefSQClass <AIIndustryList_CargoAccepting> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> int Return<AIIndustryList_CargoProducing *>(HSQUIRRELVM vm, AIIndustryList_CargoProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoProducing", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoProducing>); return 1; } template <> int Return<AIIndustryList_CargoProducing *>(HSQUIRRELVM vm, AIIndustryList_CargoProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoProducing", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoProducing>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustryList_CargoProducing>() { return "AIIndustryList_CargoProducing"; }
void SQAIIndustryList_CargoProducing_Register(Squirrel *engine) void SQAIIndustryList_CargoProducing_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustryList_CargoProducing> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing"); DefSQClass <AIIndustryList_CargoProducing> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing");

View File

@ -19,9 +19,6 @@
*/ */
class AIIndustryType : public AIObject { class AIIndustryType : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryType"; }
/** /**
* Special IndustryTypes. * Special IndustryTypes.
*/ */

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIIndustryType *>(HSQUIRRELVM vm, AIIndustryType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryType", res, NULL, DefSQDestructorCallback<AIIndustryType>); return 1; } template <> int Return<AIIndustryType *>(HSQUIRRELVM vm, AIIndustryType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryType", res, NULL, DefSQDestructorCallback<AIIndustryType>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustryType>() { return "AIIndustryType"; }
void SQAIIndustryType_Register(Squirrel *engine) void SQAIIndustryType_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustryType> SQAIIndustryType("AIIndustryType"); DefSQClass <AIIndustryType> SQAIIndustryType("AIIndustryType");

View File

@ -20,8 +20,6 @@
*/ */
class AIIndustryTypeList : public AIList { class AIIndustryTypeList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryTypeList"; }
AIIndustryTypeList(); AIIndustryTypeList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIIndustryTypeList *>(HSQUIRRELVM vm, AIIndustryTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryTypeList", res, NULL, DefSQDestructorCallback<AIIndustryTypeList>); return 1; } template <> int Return<AIIndustryTypeList *>(HSQUIRRELVM vm, AIIndustryTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryTypeList", res, NULL, DefSQDestructorCallback<AIIndustryTypeList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIIndustryTypeList>() { return "AIIndustryTypeList"; }
void SQAIIndustryTypeList_Register(Squirrel *engine) void SQAIIndustryTypeList_Register(Squirrel *engine)
{ {
DefSQClass <AIIndustryTypeList> SQAIIndustryTypeList("AIIndustryTypeList"); DefSQClass <AIIndustryTypeList> SQAIIndustryTypeList("AIIndustryTypeList");

View File

@ -24,9 +24,6 @@ class AIListSorter;
*/ */
class AIList : public AIObject { class AIList : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIList"; }
/** Type of sorter */ /** Type of sorter */
enum SorterType { enum SorterType {
SORT_BY_VALUE, ///< Sort the list based on the value of the item. SORT_BY_VALUE, ///< Sort the list based on the value of the item.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AIList *>(HSQUIRRELVM vm, AIList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIList", res, NULL, DefSQDestructorCallback<AIList>); return 1; } template <> int Return<AIList *>(HSQUIRRELVM vm, AIList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIList", res, NULL, DefSQDestructorCallback<AIList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIList>() { return "AIList"; }
void SQAIList_Register(Squirrel *engine) void SQAIList_Register(Squirrel *engine)
{ {
DefSQClass <AIList> SQAIList("AIList"); DefSQClass <AIList> SQAIList("AIList");

View File

@ -23,9 +23,6 @@ class AILog : public AIObject {
friend class AIController; friend class AIController;
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AILog"; }
#ifndef EXPORT_SKIP #ifndef EXPORT_SKIP
/** /**
* Log levels; The value is also feed to DEBUG() lvl. * Log levels; The value is also feed to DEBUG() lvl.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AILog *>(HSQUIRRELVM vm, AILog *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AILog", res, NULL, DefSQDestructorCallback<AILog>); return 1; } template <> int Return<AILog *>(HSQUIRRELVM vm, AILog *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AILog", res, NULL, DefSQDestructorCallback<AILog>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AILog>() { return "AILog"; }
void SQAILog_Register(Squirrel *engine) void SQAILog_Register(Squirrel *engine)
{ {
DefSQClass <AILog> SQAILog("AILog"); DefSQClass <AILog> SQAILog("AILog");

View File

@ -22,9 +22,6 @@ class AIMap : public AIObject {
public: public:
static const int TILE_INVALID = (int)INVALID_TILE; ///< Invalid TileIndex. static const int TILE_INVALID = (int)INVALID_TILE; ///< Invalid TileIndex.
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIMap"; }
/** /**
* Checks whether the given tile is valid. * Checks whether the given tile is valid.
* @param tile The tile to check. * @param tile The tile to check.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIMap *>(HSQUIRRELVM vm, AIMap *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMap", res, NULL, DefSQDestructorCallback<AIMap>); return 1; } template <> int Return<AIMap *>(HSQUIRRELVM vm, AIMap *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMap", res, NULL, DefSQDestructorCallback<AIMap>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIMap>() { return "AIMap"; }
void SQAIMap_Register(Squirrel *engine) void SQAIMap_Register(Squirrel *engine)
{ {
DefSQClass <AIMap> SQAIMap("AIMap"); DefSQClass <AIMap> SQAIMap("AIMap");

View File

@ -19,9 +19,6 @@
*/ */
class AIMarine : public AIObject { class AIMarine : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIMarine"; }
/** /**
* All marine related error messages. * All marine related error messages.
*/ */

View File

@ -26,6 +26,8 @@ namespace SQConvert {
template <> int Return<AIMarine *>(HSQUIRRELVM vm, AIMarine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMarine", res, NULL, DefSQDestructorCallback<AIMarine>); return 1; } template <> int Return<AIMarine *>(HSQUIRRELVM vm, AIMarine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMarine", res, NULL, DefSQDestructorCallback<AIMarine>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIMarine>() { return "AIMarine"; }
void SQAIMarine_Register(Squirrel *engine) void SQAIMarine_Register(Squirrel *engine)
{ {
DefSQClass <AIMarine> SQAIMarine("AIMarine"); DefSQClass <AIMarine> SQAIMarine("AIMarine");

View File

@ -19,9 +19,6 @@
*/ */
class AIOrder : public AIObject { class AIOrder : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIOrder"; }
/** /**
* All order related error messages. * All order related error messages.
*/ */

View File

@ -34,6 +34,8 @@ namespace SQConvert {
template <> int Return<AIOrder *>(HSQUIRRELVM vm, AIOrder *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIOrder", res, NULL, DefSQDestructorCallback<AIOrder>); return 1; } template <> int Return<AIOrder *>(HSQUIRRELVM vm, AIOrder *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIOrder", res, NULL, DefSQDestructorCallback<AIOrder>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIOrder>() { return "AIOrder"; }
void SQAIOrder_Register(Squirrel *engine) void SQAIOrder_Register(Squirrel *engine)
{ {
DefSQClass <AIOrder> SQAIOrder("AIOrder"); DefSQClass <AIOrder> SQAIOrder("AIOrder");

View File

@ -19,9 +19,6 @@
*/ */
class AIRail : public AIObject { class AIRail : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRail"; }
/** /**
* All rail related error messages. * All rail related error messages.
*/ */

View File

@ -32,6 +32,8 @@ namespace SQConvert {
template <> int Return<AIRail *>(HSQUIRRELVM vm, AIRail *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRail", res, NULL, DefSQDestructorCallback<AIRail>); return 1; } template <> int Return<AIRail *>(HSQUIRRELVM vm, AIRail *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRail", res, NULL, DefSQDestructorCallback<AIRail>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIRail>() { return "AIRail"; }
void SQAIRail_Register(Squirrel *engine) void SQAIRail_Register(Squirrel *engine)
{ {
DefSQClass <AIRail> SQAIRail("AIRail"); DefSQClass <AIRail> SQAIRail("AIRail");

View File

@ -20,8 +20,6 @@
*/ */
class AIRailTypeList : public AIList { class AIRailTypeList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRailTypeList"; }
AIRailTypeList(); AIRailTypeList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIRailTypeList *>(HSQUIRRELVM vm, AIRailTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRailTypeList", res, NULL, DefSQDestructorCallback<AIRailTypeList>); return 1; } template <> int Return<AIRailTypeList *>(HSQUIRRELVM vm, AIRailTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRailTypeList", res, NULL, DefSQDestructorCallback<AIRailTypeList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIRailTypeList>() { return "AIRailTypeList"; }
void SQAIRailTypeList_Register(Squirrel *engine) void SQAIRailTypeList_Register(Squirrel *engine)
{ {
DefSQClass <AIRailTypeList> SQAIRailTypeList("AIRailTypeList"); DefSQClass <AIRailTypeList> SQAIRailTypeList("AIRailTypeList");

View File

@ -19,9 +19,6 @@
*/ */
class AIRoad : public AIObject { class AIRoad : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRoad"; }
/** /**
* All road related error messages. * All road related error messages.
*/ */

View File

@ -30,6 +30,8 @@ namespace SQConvert {
template <> int Return<AIRoad *>(HSQUIRRELVM vm, AIRoad *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRoad", res, NULL, DefSQDestructorCallback<AIRoad>); return 1; } template <> int Return<AIRoad *>(HSQUIRRELVM vm, AIRoad *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRoad", res, NULL, DefSQDestructorCallback<AIRoad>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIRoad>() { return "AIRoad"; }
void SQAIRoad_Register(Squirrel *engine) void SQAIRoad_Register(Squirrel *engine)
{ {
DefSQClass <AIRoad> SQAIRoad("AIRoad"); DefSQClass <AIRoad> SQAIRoad("AIRoad");

View File

@ -19,9 +19,6 @@
*/ */
class AISign : public AIObject { class AISign : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISign"; }
/** /**
* All sign related error messages. * All sign related error messages.
*/ */

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AISign *>(HSQUIRRELVM vm, AISign *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISign", res, NULL, DefSQDestructorCallback<AISign>); return 1; } template <> int Return<AISign *>(HSQUIRRELVM vm, AISign *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISign", res, NULL, DefSQDestructorCallback<AISign>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AISign>() { return "AISign"; }
void SQAISign_Register(Squirrel *engine) void SQAISign_Register(Squirrel *engine)
{ {
DefSQClass <AISign> SQAISign("AISign"); DefSQClass <AISign> SQAISign("AISign");

View File

@ -20,8 +20,6 @@
*/ */
class AISignList : public AIList { class AISignList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISignList"; }
AISignList(); AISignList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AISignList *>(HSQUIRRELVM vm, AISignList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISignList", res, NULL, DefSQDestructorCallback<AISignList>); return 1; } template <> int Return<AISignList *>(HSQUIRRELVM vm, AISignList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISignList", res, NULL, DefSQDestructorCallback<AISignList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AISignList>() { return "AISignList"; }
void SQAISignList_Register(Squirrel *engine) void SQAISignList_Register(Squirrel *engine)
{ {
DefSQClass <AISignList> SQAISignList("AISignList"); DefSQClass <AISignList> SQAISignList("AISignList");

View File

@ -20,9 +20,6 @@
*/ */
class AIStation : public AIBaseStation { class AIStation : public AIBaseStation {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStation"; }
/** /**
* All station related error messages. * All station related error messages.
*/ */

View File

@ -26,6 +26,8 @@ namespace SQConvert {
template <> int Return<AIStation *>(HSQUIRRELVM vm, AIStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStation", res, NULL, DefSQDestructorCallback<AIStation>); return 1; } template <> int Return<AIStation *>(HSQUIRRELVM vm, AIStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStation", res, NULL, DefSQDestructorCallback<AIStation>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIStation>() { return "AIStation"; }
void SQAIStation_Register(Squirrel *engine) void SQAIStation_Register(Squirrel *engine)
{ {
DefSQClass <AIStation> SQAIStation("AIStation"); DefSQClass <AIStation> SQAIStation("AIStation");

View File

@ -21,9 +21,6 @@
*/ */
class AIStationList : public AIList { class AIStationList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStationList"; }
/** /**
* @param station_type The type of station to make a list of stations for. * @param station_type The type of station to make a list of stations for.
*/ */
@ -36,9 +33,6 @@ public:
*/ */
class AIStationList_Vehicle : public AIList { class AIStationList_Vehicle : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStationList_Vehicle"; }
/** /**
* @param vehicle_id The vehicle to get the list of stations he has in its orders from. * @param vehicle_id The vehicle to get the list of stations he has in its orders from.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIStationList *>(HSQUIRRELVM vm, AIStationList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList", res, NULL, DefSQDestructorCallback<AIStationList>); return 1; } template <> int Return<AIStationList *>(HSQUIRRELVM vm, AIStationList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList", res, NULL, DefSQDestructorCallback<AIStationList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIStationList>() { return "AIStationList"; }
void SQAIStationList_Register(Squirrel *engine) void SQAIStationList_Register(Squirrel *engine)
{ {
DefSQClass <AIStationList> SQAIStationList("AIStationList"); DefSQClass <AIStationList> SQAIStationList("AIStationList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIStationList_Vehicle *>(HSQUIRRELVM vm, AIStationList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_Vehicle", res, NULL, DefSQDestructorCallback<AIStationList_Vehicle>); return 1; } template <> int Return<AIStationList_Vehicle *>(HSQUIRRELVM vm, AIStationList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_Vehicle", res, NULL, DefSQDestructorCallback<AIStationList_Vehicle>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIStationList_Vehicle>() { return "AIStationList_Vehicle"; }
void SQAIStationList_Vehicle_Register(Squirrel *engine) void SQAIStationList_Vehicle_Register(Squirrel *engine)
{ {
DefSQClass <AIStationList_Vehicle> SQAIStationList_Vehicle("AIStationList_Vehicle"); DefSQClass <AIStationList_Vehicle> SQAIStationList_Vehicle("AIStationList_Vehicle");

View File

@ -19,9 +19,6 @@
*/ */
class AISubsidy : public AIObject { class AISubsidy : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISubsidy"; }
/** /**
* Enumeration for source and destination of a subsidy. * Enumeration for source and destination of a subsidy.
* @note The list of values may grow in future. * @note The list of values may grow in future.

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AISubsidy *>(HSQUIRRELVM vm, AISubsidy *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidy", res, NULL, DefSQDestructorCallback<AISubsidy>); return 1; } template <> int Return<AISubsidy *>(HSQUIRRELVM vm, AISubsidy *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidy", res, NULL, DefSQDestructorCallback<AISubsidy>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AISubsidy>() { return "AISubsidy"; }
void SQAISubsidy_Register(Squirrel *engine) void SQAISubsidy_Register(Squirrel *engine)
{ {
DefSQClass <AISubsidy> SQAISubsidy("AISubsidy"); DefSQClass <AISubsidy> SQAISubsidy("AISubsidy");

View File

@ -20,8 +20,6 @@
*/ */
class AISubsidyList : public AIList { class AISubsidyList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISubsidyList"; }
AISubsidyList(); AISubsidyList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AISubsidyList *>(HSQUIRRELVM vm, AISubsidyList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidyList", res, NULL, DefSQDestructorCallback<AISubsidyList>); return 1; } template <> int Return<AISubsidyList *>(HSQUIRRELVM vm, AISubsidyList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidyList", res, NULL, DefSQDestructorCallback<AISubsidyList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AISubsidyList>() { return "AISubsidyList"; }
void SQAISubsidyList_Register(Squirrel *engine) void SQAISubsidyList_Register(Squirrel *engine)
{ {
DefSQClass <AISubsidyList> SQAISubsidyList("AISubsidyList"); DefSQClass <AISubsidyList> SQAISubsidyList("AISubsidyList");

View File

@ -24,10 +24,6 @@
* the cost would be. * the cost would be.
*/ */
class AITestMode : public AIObject { class AITestMode : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITestMode"; }
private: private:
AIModeProc *last_mode; ///< The previous mode we were in. AIModeProc *last_mode; ///< The previous mode we were in.
AIObject *last_instance; ///< The previous instace of the mode. AIObject *last_instance; ///< The previous instace of the mode.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AITestMode *>(HSQUIRRELVM vm, AITestMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITestMode", res, NULL, DefSQDestructorCallback<AITestMode>); return 1; } template <> int Return<AITestMode *>(HSQUIRRELVM vm, AITestMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITestMode", res, NULL, DefSQDestructorCallback<AITestMode>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITestMode>() { return "AITestMode"; }
void SQAITestMode_Register(Squirrel *engine) void SQAITestMode_Register(Squirrel *engine)
{ {
DefSQClass <AITestMode> SQAITestMode("AITestMode"); DefSQClass <AITestMode> SQAITestMode("AITestMode");

View File

@ -20,9 +20,6 @@
*/ */
class AITile : public AIObject { class AITile : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITile"; }
/** /**
* Error messages related to modifying tiles. * Error messages related to modifying tiles.
*/ */

View File

@ -32,6 +32,8 @@ namespace SQConvert {
template <> int Return<AITile *>(HSQUIRRELVM vm, AITile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITile", res, NULL, DefSQDestructorCallback<AITile>); return 1; } template <> int Return<AITile *>(HSQUIRRELVM vm, AITile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITile", res, NULL, DefSQDestructorCallback<AITile>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITile>() { return "AITile"; }
void SQAITile_Register(Squirrel *engine) void SQAITile_Register(Squirrel *engine)
{ {
DefSQClass <AITile> SQAITile("AITile"); DefSQClass <AITile> SQAITile("AITile");

View File

@ -21,9 +21,6 @@
*/ */
class AITileList : public AIList { class AITileList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList"; }
/** /**
* Adds the rectangle between tile_from and tile_to to the to-be-evaluated tiles. * Adds the rectangle between tile_from and tile_to to the to-be-evaluated tiles.
* @param tile_from One corner of the tiles to add. * @param tile_from One corner of the tiles to add.
@ -64,9 +61,6 @@ public:
*/ */
class AITileList_IndustryAccepting : public AITileList { class AITileList_IndustryAccepting : public AITileList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_IndustryAccepting"; }
/** /**
* @param industry_id The industry to create the AITileList around. * @param industry_id The industry to create the AITileList around.
* @param radius The radius of the station you will be using. * @param radius The radius of the station you will be using.
@ -83,9 +77,6 @@ public:
*/ */
class AITileList_IndustryProducing : public AITileList { class AITileList_IndustryProducing : public AITileList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_IndustryProducing"; }
/** /**
* @param industry_id The industry to create the AITileList around. * @param industry_id The industry to create the AITileList around.
* @param radius The radius of the station you will be using. * @param radius The radius of the station you will be using.
@ -102,9 +93,6 @@ public:
*/ */
class AITileList_StationType : public AITileList { class AITileList_StationType : public AITileList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_StationType"; }
/** /**
* @param station_id The station to create the AITileList for. * @param station_id The station to create the AITileList for.
* @param station_type The StationType to create the AIList for. * @param station_type The StationType to create the AIList for.

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AITileList *>(HSQUIRRELVM vm, AITileList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList", res, NULL, DefSQDestructorCallback<AITileList>); return 1; } template <> int Return<AITileList *>(HSQUIRRELVM vm, AITileList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList", res, NULL, DefSQDestructorCallback<AITileList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITileList>() { return "AITileList"; }
void SQAITileList_Register(Squirrel *engine) void SQAITileList_Register(Squirrel *engine)
{ {
DefSQClass <AITileList> SQAITileList("AITileList"); DefSQClass <AITileList> SQAITileList("AITileList");
@ -43,6 +45,8 @@ namespace SQConvert {
template <> int Return<AITileList_IndustryAccepting *>(HSQUIRRELVM vm, AITileList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AITileList_IndustryAccepting>); return 1; } template <> int Return<AITileList_IndustryAccepting *>(HSQUIRRELVM vm, AITileList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AITileList_IndustryAccepting>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITileList_IndustryAccepting>() { return "AITileList_IndustryAccepting"; }
void SQAITileList_IndustryAccepting_Register(Squirrel *engine) void SQAITileList_IndustryAccepting_Register(Squirrel *engine)
{ {
DefSQClass <AITileList_IndustryAccepting> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting"); DefSQClass <AITileList_IndustryAccepting> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting");
@ -61,6 +65,8 @@ namespace SQConvert {
template <> int Return<AITileList_IndustryProducing *>(HSQUIRRELVM vm, AITileList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryProducing", res, NULL, DefSQDestructorCallback<AITileList_IndustryProducing>); return 1; } template <> int Return<AITileList_IndustryProducing *>(HSQUIRRELVM vm, AITileList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryProducing", res, NULL, DefSQDestructorCallback<AITileList_IndustryProducing>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITileList_IndustryProducing>() { return "AITileList_IndustryProducing"; }
void SQAITileList_IndustryProducing_Register(Squirrel *engine) void SQAITileList_IndustryProducing_Register(Squirrel *engine)
{ {
DefSQClass <AITileList_IndustryProducing> SQAITileList_IndustryProducing("AITileList_IndustryProducing"); DefSQClass <AITileList_IndustryProducing> SQAITileList_IndustryProducing("AITileList_IndustryProducing");
@ -79,6 +85,8 @@ namespace SQConvert {
template <> int Return<AITileList_StationType *>(HSQUIRRELVM vm, AITileList_StationType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_StationType", res, NULL, DefSQDestructorCallback<AITileList_StationType>); return 1; } template <> int Return<AITileList_StationType *>(HSQUIRRELVM vm, AITileList_StationType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_StationType", res, NULL, DefSQDestructorCallback<AITileList_StationType>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITileList_StationType>() { return "AITileList_StationType"; }
void SQAITileList_StationType_Register(Squirrel *engine) void SQAITileList_StationType_Register(Squirrel *engine)
{ {
DefSQClass <AITileList_StationType> SQAITileList_StationType("AITileList_StationType"); DefSQClass <AITileList_StationType> SQAITileList_StationType("AITileList_StationType");

View File

@ -19,9 +19,6 @@
*/ */
class AITown : public AIObject { class AITown : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITown"; }
/** /**
* Actions that one can perform on a town. * Actions that one can perform on a town.
*/ */

View File

@ -28,6 +28,8 @@ namespace SQConvert {
template <> int Return<AITown *>(HSQUIRRELVM vm, AITown *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITown", res, NULL, DefSQDestructorCallback<AITown>); return 1; } template <> int Return<AITown *>(HSQUIRRELVM vm, AITown *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITown", res, NULL, DefSQDestructorCallback<AITown>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITown>() { return "AITown"; }
void SQAITown_Register(Squirrel *engine) void SQAITown_Register(Squirrel *engine)
{ {
DefSQClass <AITown> SQAITown("AITown"); DefSQClass <AITown> SQAITown("AITown");

View File

@ -20,8 +20,6 @@
*/ */
class AITownList : public AIList { class AITownList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITownList"; }
AITownList(); AITownList();
}; };

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AITownList *>(HSQUIRRELVM vm, AITownList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITownList", res, NULL, DefSQDestructorCallback<AITownList>); return 1; } template <> int Return<AITownList *>(HSQUIRRELVM vm, AITownList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITownList", res, NULL, DefSQDestructorCallback<AITownList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITownList>() { return "AITownList"; }
void SQAITownList_Register(Squirrel *engine) void SQAITownList_Register(Squirrel *engine)
{ {
DefSQClass <AITownList> SQAITownList("AITownList"); DefSQClass <AITownList> SQAITownList("AITownList");

View File

@ -19,9 +19,6 @@
*/ */
class AITunnel : public AIObject { class AITunnel : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITunnel"; }
/** /**
* All tunnel related errors. * All tunnel related errors.
*/ */

View File

@ -24,6 +24,8 @@ namespace SQConvert {
template <> int Return<AITunnel *>(HSQUIRRELVM vm, AITunnel *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITunnel", res, NULL, DefSQDestructorCallback<AITunnel>); return 1; } template <> int Return<AITunnel *>(HSQUIRRELVM vm, AITunnel *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITunnel", res, NULL, DefSQDestructorCallback<AITunnel>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AITunnel>() { return "AITunnel"; }
void SQAITunnel_Register(Squirrel *engine) void SQAITunnel_Register(Squirrel *engine)
{ {
DefSQClass <AITunnel> SQAITunnel("AITunnel"); DefSQClass <AITunnel> SQAITunnel("AITunnel");

View File

@ -19,9 +19,6 @@
*/ */
class AIVehicle : public AIObject { class AIVehicle : public AIObject {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicle"; }
/** /**
* All vehicle related error messages. * All vehicle related error messages.
*/ */

View File

@ -28,6 +28,8 @@ namespace SQConvert {
template <> int Return<AIVehicle *>(HSQUIRRELVM vm, AIVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicle", res, NULL, DefSQDestructorCallback<AIVehicle>); return 1; } template <> int Return<AIVehicle *>(HSQUIRRELVM vm, AIVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicle", res, NULL, DefSQDestructorCallback<AIVehicle>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicle>() { return "AIVehicle"; }
void SQAIVehicle_Register(Squirrel *engine) void SQAIVehicle_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicle> SQAIVehicle("AIVehicle"); DefSQClass <AIVehicle> SQAIVehicle("AIVehicle");

View File

@ -21,8 +21,6 @@
*/ */
class AIVehicleList : public AIList { class AIVehicleList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList"; }
AIVehicleList(); AIVehicleList();
}; };
@ -32,9 +30,6 @@ public:
*/ */
class AIVehicleList_Station : public AIList { class AIVehicleList_Station : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Station"; }
/** /**
* @param station_id The station to get the list of vehicles from, which have orders to it. * @param station_id The station to get the list of vehicles from, which have orders to it.
* @pre AIBaseStation::IsValidBaseStation(station_id) * @pre AIBaseStation::IsValidBaseStation(station_id)
@ -52,9 +47,6 @@ public:
*/ */
class AIVehicleList_Depot : public AIList { class AIVehicleList_Depot : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Depot"; }
/** /**
* @param tile The tile of the depot to get the list of vehicles from, which have orders to it. * @param tile The tile of the depot to get the list of vehicles from, which have orders to it.
*/ */
@ -67,9 +59,6 @@ public:
*/ */
class AIVehicleList_SharedOrders : public AIList { class AIVehicleList_SharedOrders : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_SharedOrders"; }
/** /**
* @param vehicle_id The vehicle that the rest shared orders with. * @param vehicle_id The vehicle that the rest shared orders with.
*/ */
@ -82,9 +71,6 @@ public:
*/ */
class AIVehicleList_Group : public AIList { class AIVehicleList_Group : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Group"; }
/** /**
* @param group_id The ID of the group the vehicles are in. * @param group_id The ID of the group the vehicles are in.
*/ */
@ -97,9 +83,6 @@ public:
*/ */
class AIVehicleList_DefaultGroup : public AIList { class AIVehicleList_DefaultGroup : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_DefaultGroup"; }
/** /**
* @param vehicle_type The VehicleType to get the list of vehicles for. * @param vehicle_type The VehicleType to get the list of vehicles for.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList *>(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback<AIVehicleList>); return 1; } template <> int Return<AIVehicleList *>(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback<AIVehicleList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList>() { return "AIVehicleList"; }
void SQAIVehicleList_Register(Squirrel *engine) void SQAIVehicleList_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList"); DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList_Station *>(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback<AIVehicleList_Station>); return 1; } template <> int Return<AIVehicleList_Station *>(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback<AIVehicleList_Station>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList_Station>() { return "AIVehicleList_Station"; }
void SQAIVehicleList_Station_Register(Squirrel *engine) void SQAIVehicleList_Station_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station"); DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList_Depot *>(HSQUIRRELVM vm, AIVehicleList_Depot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Depot", res, NULL, DefSQDestructorCallback<AIVehicleList_Depot>); return 1; } template <> int Return<AIVehicleList_Depot *>(HSQUIRRELVM vm, AIVehicleList_Depot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Depot", res, NULL, DefSQDestructorCallback<AIVehicleList_Depot>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList_Depot>() { return "AIVehicleList_Depot"; }
void SQAIVehicleList_Depot_Register(Squirrel *engine) void SQAIVehicleList_Depot_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList_Depot> SQAIVehicleList_Depot("AIVehicleList_Depot"); DefSQClass <AIVehicleList_Depot> SQAIVehicleList_Depot("AIVehicleList_Depot");
@ -74,6 +80,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList_SharedOrders *>(HSQUIRRELVM vm, AIVehicleList_SharedOrders *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_SharedOrders", res, NULL, DefSQDestructorCallback<AIVehicleList_SharedOrders>); return 1; } template <> int Return<AIVehicleList_SharedOrders *>(HSQUIRRELVM vm, AIVehicleList_SharedOrders *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_SharedOrders", res, NULL, DefSQDestructorCallback<AIVehicleList_SharedOrders>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList_SharedOrders>() { return "AIVehicleList_SharedOrders"; }
void SQAIVehicleList_SharedOrders_Register(Squirrel *engine) void SQAIVehicleList_SharedOrders_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList_SharedOrders> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders"); DefSQClass <AIVehicleList_SharedOrders> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders");
@ -92,6 +100,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList_Group *>(HSQUIRRELVM vm, AIVehicleList_Group *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Group", res, NULL, DefSQDestructorCallback<AIVehicleList_Group>); return 1; } template <> int Return<AIVehicleList_Group *>(HSQUIRRELVM vm, AIVehicleList_Group *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Group", res, NULL, DefSQDestructorCallback<AIVehicleList_Group>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList_Group>() { return "AIVehicleList_Group"; }
void SQAIVehicleList_Group_Register(Squirrel *engine) void SQAIVehicleList_Group_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList_Group> SQAIVehicleList_Group("AIVehicleList_Group"); DefSQClass <AIVehicleList_Group> SQAIVehicleList_Group("AIVehicleList_Group");
@ -110,6 +120,8 @@ namespace SQConvert {
template <> int Return<AIVehicleList_DefaultGroup *>(HSQUIRRELVM vm, AIVehicleList_DefaultGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_DefaultGroup", res, NULL, DefSQDestructorCallback<AIVehicleList_DefaultGroup>); return 1; } template <> int Return<AIVehicleList_DefaultGroup *>(HSQUIRRELVM vm, AIVehicleList_DefaultGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_DefaultGroup", res, NULL, DefSQDestructorCallback<AIVehicleList_DefaultGroup>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIVehicleList_DefaultGroup>() { return "AIVehicleList_DefaultGroup"; }
void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine) void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine)
{ {
DefSQClass <AIVehicleList_DefaultGroup> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup"); DefSQClass <AIVehicleList_DefaultGroup> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup");

View File

@ -19,9 +19,6 @@
*/ */
class AIWaypoint : public AIBaseStation { class AIWaypoint : public AIBaseStation {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypoint"; }
/** /**
* Type of waypoints known in the game. * Type of waypoints known in the game.
*/ */

View File

@ -26,6 +26,8 @@ namespace SQConvert {
template <> int Return<AIWaypoint *>(HSQUIRRELVM vm, AIWaypoint *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypoint", res, NULL, DefSQDestructorCallback<AIWaypoint>); return 1; } template <> int Return<AIWaypoint *>(HSQUIRRELVM vm, AIWaypoint *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypoint", res, NULL, DefSQDestructorCallback<AIWaypoint>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIWaypoint>() { return "AIWaypoint"; }
void SQAIWaypoint_Register(Squirrel *engine) void SQAIWaypoint_Register(Squirrel *engine)
{ {
DefSQClass <AIWaypoint> SQAIWaypoint("AIWaypoint"); DefSQClass <AIWaypoint> SQAIWaypoint("AIWaypoint");

View File

@ -21,9 +21,6 @@
*/ */
class AIWaypointList : public AIList { class AIWaypointList : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypointList"; }
/** /**
* @param waypoint_type The type of waypoint to make a list of waypoints for. * @param waypoint_type The type of waypoint to make a list of waypoints for.
*/ */
@ -36,9 +33,6 @@ public:
*/ */
class AIWaypointList_Vehicle : public AIList { class AIWaypointList_Vehicle : public AIList {
public: public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypointList_Vehicle"; }
/** /**
* @param vehicle_id The vehicle to get the list of waypoints he has in its orders from. * @param vehicle_id The vehicle to get the list of waypoints he has in its orders from.
*/ */

View File

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIWaypointList *>(HSQUIRRELVM vm, AIWaypointList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList", res, NULL, DefSQDestructorCallback<AIWaypointList>); return 1; } template <> int Return<AIWaypointList *>(HSQUIRRELVM vm, AIWaypointList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList", res, NULL, DefSQDestructorCallback<AIWaypointList>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIWaypointList>() { return "AIWaypointList"; }
void SQAIWaypointList_Register(Squirrel *engine) void SQAIWaypointList_Register(Squirrel *engine)
{ {
DefSQClass <AIWaypointList> SQAIWaypointList("AIWaypointList"); DefSQClass <AIWaypointList> SQAIWaypointList("AIWaypointList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> int Return<AIWaypointList_Vehicle *>(HSQUIRRELVM vm, AIWaypointList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList_Vehicle", res, NULL, DefSQDestructorCallback<AIWaypointList_Vehicle>); return 1; } template <> int Return<AIWaypointList_Vehicle *>(HSQUIRRELVM vm, AIWaypointList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList_Vehicle", res, NULL, DefSQDestructorCallback<AIWaypointList_Vehicle>); return 1; }
} // namespace SQConvert } // namespace SQConvert
template <> const char *GetClassName<AIWaypointList_Vehicle>() { return "AIWaypointList_Vehicle"; }
void SQAIWaypointList_Vehicle_Register(Squirrel *engine) void SQAIWaypointList_Vehicle_Register(Squirrel *engine)
{ {
DefSQClass <AIWaypointList_Vehicle> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle"); DefSQClass <AIWaypointList_Vehicle> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle");

View File

@ -209,6 +209,9 @@ BEGIN {
print "} // namespace SQConvert" print "} // namespace SQConvert"
print ""; print "";
print "template <> const char *GetClassName<" cls ">() { return \"" cls "\"; }"
print "";
# Then do the registration functions of the class. */ # Then do the registration functions of the class. */
print "void SQ" cls "_Register(Squirrel *engine)" print "void SQ" cls "_Register(Squirrel *engine)"
print "{" print "{"
@ -414,7 +417,6 @@ BEGIN {
cls_param[1] = len; cls_param[1] = len;
cls_param[2] = types; cls_param[2] = types;
} else if (substr(funcname, 0, 1) == "_" && types != "v") { } else if (substr(funcname, 0, 1) == "_" && types != "v") {
} else if (funcname == "GetClassName" && types == ".") {
} else if (is_static) { } else if (is_static) {
static_method_size++ static_method_size++
static_methods[static_method_size, 0] = funcname static_methods[static_method_size, 0] = funcname

Some files were not shown because too many files have changed in this diff Show More