diff -r 366771e15a2c -r 820b77e19bb3 src/ai/api/ai_stationlist.hpp.sq --- a/src/ai/api/ai_stationlist.hpp.sq Wed Jul 18 08:38:50 2007 +0000 +++ b/src/ai/api/ai_stationlist.hpp.sq Wed Jul 18 09:20:50 2007 +0000 @@ -1,10 +1,6 @@ #include "ai_stationlist.hpp" namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> AIStationList::StationType GetParam(ForceType, HSQUIRRELVM vm, int index) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIStationList::StationType)tmp; } - template <> int Return(HSQUIRRELVM vm, AIStationList::StationType res) { sq_pushinteger(vm, (int32)res); return 1; } - /* Allow AIStationList to be used as Squirrel parameter */ template <> AIStationList *GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIStationList *)instance; } template <> AIStationList &GetParam(ForceType, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationList *)instance; } @@ -15,14 +11,7 @@ void SQAIStationListRegister(Squirrel *engine) { DefSQClass SQAIStationList("AIStationList"); SQAIStationList.PreRegister(engine, "AIAbstractList"); - SQAIStationList.AddConstructor(engine, "xi"); - - SQAIStationList.DefSQConst(engine, AIStationList::STATION_ANY, "STATION_ANY"); - SQAIStationList.DefSQConst(engine, AIStationList::STATION_TRAIN, "STATION_TRAIN"); - SQAIStationList.DefSQConst(engine, AIStationList::STATION_TRUCK_STOP, "STATION_TRUCK_STOP"); - SQAIStationList.DefSQConst(engine, AIStationList::STATION_BUS_STOP, "STATION_BUS_STOP"); - SQAIStationList.DefSQConst(engine, AIStationList::STATION_AIRPORT, "STATION_AIRPORT"); - SQAIStationList.DefSQConst(engine, AIStationList::STATION_DOCK, "STATION_DOCK"); + SQAIStationList.AddConstructor(engine, "xi"); SQAIStationList.DefSQStaticMethod(engine, &AIStationList::GetClassName, "GetClassName", 1, "x");