diff options
author | rubidium <rubidium@openttd.org> | 2011-11-13 20:52:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-13 20:52:39 +0000 |
commit | 3f7eb71b17da7840678c68953729aff156cc500b (patch) | |
tree | 5d71bc9aae9a9bc39ae15c1794f85d7e14987628 /src/ai/api/ai_tilelist.hpp.sq | |
parent | b7a655bf4cafc68e14cade593e8b1aca7f04f7dd (diff) | |
download | openttd-3f7eb71b17da7840678c68953729aff156cc500b.tar.xz |
(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically
Diffstat (limited to 'src/ai/api/ai_tilelist.hpp.sq')
-rw-r--r-- | src/ai/api/ai_tilelist.hpp.sq | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ai/api/ai_tilelist.hpp.sq b/src/ai/api/ai_tilelist.hpp.sq index 22739a2db..1a44c8e42 100644 --- a/src/ai/api/ai_tilelist.hpp.sq +++ b/src/ai/api/ai_tilelist.hpp.sq @@ -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; } } // namespace SQConvert +template <> const char *GetClassName<AITileList>() { return "AITileList"; } + void SQAITileList_Register(Squirrel *engine) { 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; } } // namespace SQConvert +template <> const char *GetClassName<AITileList_IndustryAccepting>() { return "AITileList_IndustryAccepting"; } + void SQAITileList_IndustryAccepting_Register(Squirrel *engine) { 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; } } // namespace SQConvert +template <> const char *GetClassName<AITileList_IndustryProducing>() { return "AITileList_IndustryProducing"; } + void SQAITileList_IndustryProducing_Register(Squirrel *engine) { 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; } } // namespace SQConvert +template <> const char *GetClassName<AITileList_StationType>() { return "AITileList_StationType"; } + void SQAITileList_StationType_Register(Squirrel *engine) { DefSQClass <AITileList_StationType> SQAITileList_StationType("AITileList_StationType"); |