--- a/src/ai/api/ai_town.hpp Sat Apr 14 21:01:44 2007 +0000
+++ b/src/ai/api/ai_town.hpp Sat Apr 14 21:57:44 2007 +0000
@@ -67,31 +67,4 @@
static TileIndex GetLocation(TownID town_id);
};
-#ifdef DEFINE_SQUIRREL_CLASS
-namespace SQConvert {
- /* Allow AITown to be used as Squirrel parameter */
- template <> AITown *GetParam(ForceType<AITown *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITown *)instance; }
- template <> AITown &GetParam(ForceType<AITown &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITown *)instance; }
- template <> const AITown *GetParam(ForceType<const AITown *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITown *)instance; }
- template <> const AITown &GetParam(ForceType<const AITown &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITown *)instance; }
-}; // namespace SQConvert
-
-void SQAITownRegister(Squirrel *engine) {
- DefSQClass <AITown> SQAITown("AITown");
- SQAITown.PreRegister(engine);
- SQAITown.AddConstructor(engine);
-
- SQAITown.DefSQStaticMethod(engine, &AITown::GetClassName, "GetClassName", 1, "x");
- SQAITown.DefSQStaticMethod(engine, &AITown::IsValidTown, "IsValidTown", 2, "xi");
- SQAITown.DefSQStaticMethod(engine, &AITown::GetName, "GetName", 2, "xi");
- SQAITown.DefSQStaticMethod(engine, &AITown::GetPopulation, "GetPopulation", 2, "xi");
- SQAITown.DefSQStaticMethod(engine, &AITown::GetLocation, "GetLocation", 2, "xi");
-
- SQAITown.DefSQMethod(engine, &AITown::GetMaxTownID, "GetMaxTownID", 1, "x");
- SQAITown.DefSQMethod(engine, &AITown::GetTownCount, "GetTownCount", 1, "x");
-
- SQAITown.PostRegister(engine);
-}
-#endif /* DEFINE_SQUIRREL_CLASS */
-
#endif /* AI_TOWN_HPP */