equal
deleted
inserted
replaced
70 */ |
70 */ |
71 SignID BuildSign(TileIndex location, const char *text); |
71 SignID BuildSign(TileIndex location, const char *text); |
72 }; |
72 }; |
73 |
73 |
74 #ifdef DEFINE_SQUIRREL_CLASS |
74 #ifdef DEFINE_SQUIRREL_CLASS |
|
75 namespace SQConvert { |
|
76 /* Allow AISign to be used as Squirrel parameter */ |
|
77 template <> AISign *GetParam(ForceType<AISign *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISign *)instance; } |
|
78 }; // namespace SQConvert |
|
79 |
75 void SQAISignRegister(Squirrel *engine) { |
80 void SQAISignRegister(Squirrel *engine) { |
76 DefSQClass <AISign> SQAISign("AISign"); |
81 DefSQClass <AISign> SQAISign("AISign"); |
77 SQAISign.PreRegister(engine); |
82 SQAISign.PreRegister(engine); |
78 SQAISign.AddConstructor(engine); |
83 SQAISign.AddConstructor(engine); |
79 SQAISign.DefSQFunction(engine, &AISign::GetMaxSignID, "GetMaxSignID"); |
84 SQAISign.DefSQFunction(engine, &AISign::GetMaxSignID, "GetMaxSignID"); |