src/ai/api/ai_tilelist_valuator.hpp.sq
branchnoai
changeset 9611 5cf58c6571b7
parent 9610 5cebcd43a1ec
child 9617 df9cedf12aab
equal deleted inserted replaced
9610:5cebcd43a1ec 9611:5cf58c6571b7
    14 	SQAITileListBuildable.AddConstructor<void (AITileListBuildable::*)()>(engine, 1, "x");
    14 	SQAITileListBuildable.AddConstructor<void (AITileListBuildable::*)()>(engine, 1, "x");
    15 
    15 
    16 	SQAITileListBuildable.DefSQStaticMethod(engine, &AITileListBuildable::GetClassName, "GetClassName", 1, "x");
    16 	SQAITileListBuildable.DefSQStaticMethod(engine, &AITileListBuildable::GetClassName, "GetClassName", 1, "x");
    17 
    17 
    18 	SQAITileListBuildable.PostRegister(engine);
    18 	SQAITileListBuildable.PostRegister(engine);
       
    19 }
       
    20 
       
    21 namespace SQConvert {
       
    22 	/* Allow AITileListSlope to be used as Squirrel parameter */
       
    23 	template <> AITileListSlope *GetParam(ForceType<AITileListSlope *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListSlope *)instance; }
       
    24 	template <> AITileListSlope &GetParam(ForceType<AITileListSlope &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileListSlope *)instance; }
       
    25 	template <> const AITileListSlope *GetParam(ForceType<const AITileListSlope *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListSlope *)instance; }
       
    26 	template <> const AITileListSlope &GetParam(ForceType<const AITileListSlope &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileListSlope *)instance; }
       
    27 }; // namespace SQConvert
       
    28 
       
    29 void SQAITileListSlopeRegister(Squirrel *engine) {
       
    30 	DefSQClass <AITileListSlope> SQAITileListSlope("AITileListSlope");
       
    31 	SQAITileListSlope.PreRegister(engine);
       
    32 	SQAITileListSlope.AddConstructor<void (AITileListSlope::*)()>(engine, 1, "x");
       
    33 
       
    34 	SQAITileListSlope.DefSQStaticMethod(engine, &AITileListSlope::GetClassName, "GetClassName", 1, "x");
       
    35 
       
    36 	SQAITileListSlope.PostRegister(engine);
    19 }
    37 }
    20 
    38 
    21 namespace SQConvert {
    39 namespace SQConvert {
    22 	/* Allow AITileListNeighbourRoad to be used as Squirrel parameter */
    40 	/* Allow AITileListNeighbourRoad to be used as Squirrel parameter */
    23 	template <> AITileListNeighbourRoad *GetParam(ForceType<AITileListNeighbourRoad *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListNeighbourRoad *)instance; }
    41 	template <> AITileListNeighbourRoad *GetParam(ForceType<AITileListNeighbourRoad *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileListNeighbourRoad *)instance; }