equal
deleted
inserted
replaced
102 */ |
102 */ |
103 bool RemoveRoadStation(TileIndex tile); |
103 bool RemoveRoadStation(TileIndex tile); |
104 }; |
104 }; |
105 |
105 |
106 #ifdef DEFINE_SQUIRREL_CLASS |
106 #ifdef DEFINE_SQUIRREL_CLASS |
|
107 namespace SQConvert { |
|
108 /* Allow AIRoad to be used as Squirrel parameter */ |
|
109 template <> AIRoad *GetParam(ForceType<AIRoad *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIRoad *)instance; } |
|
110 }; // namespace SQConvert |
|
111 |
107 void SQAIRoadRegister(Squirrel *engine) { |
112 void SQAIRoadRegister(Squirrel *engine) { |
108 DefSQClass <AIRoad> SQAIRoad("AIRoad"); |
113 DefSQClass <AIRoad> SQAIRoad("AIRoad"); |
109 SQAIRoad.PreRegister(engine); |
114 SQAIRoad.PreRegister(engine); |
110 SQAIRoad.AddConstructor(engine); |
115 SQAIRoad.AddConstructor(engine); |
111 SQAIRoad.DefSQFunction(engine, &AIRoad::IsRoadTile, "IsRoadTile"); |
116 SQAIRoad.DefSQFunction(engine, &AIRoad::IsRoadTile, "IsRoadTile"); |