equal
deleted
inserted
replaced
61 */ |
61 */ |
62 TileIndex GetLocation(TownID town_id); |
62 TileIndex GetLocation(TownID town_id); |
63 }; |
63 }; |
64 |
64 |
65 #ifdef DEFINE_SQUIRREL_CLASS |
65 #ifdef DEFINE_SQUIRREL_CLASS |
|
66 namespace SQConvert { |
|
67 /* Allow AITown to be used as Squirrel parameter */ |
|
68 template <> AITown *GetParam(ForceType<AITown *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AITown *)instance; } |
|
69 }; // namespace SQConvert |
|
70 |
66 void SQAITownRegister(Squirrel *engine) { |
71 void SQAITownRegister(Squirrel *engine) { |
67 DefSQClass <AITown> SQAITown("AITown"); |
72 DefSQClass <AITown> SQAITown("AITown"); |
68 SQAITown.PreRegister(engine); |
73 SQAITown.PreRegister(engine); |
69 SQAITown.AddConstructor(engine); |
74 SQAITown.AddConstructor(engine); |
70 SQAITown.DefSQFunction(engine, &AITown::GetMaxTownID, "GetMaxTownID"); |
75 SQAITown.DefSQFunction(engine, &AITown::GetMaxTownID, "GetMaxTownID"); |