From 5bd2b15e863eaf54bfee4dfebb280d6884169354 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 11 Apr 2019 22:08:56 +0100 Subject: Codechange: Replace NULL with nullptr in squirrel interface. --- src/script/api/squirrel_export.awk | 6 +-- src/script/api/squirrel_export.vbs | 6 +-- src/script/api/template/template_accounting.hpp.sq | 2 +- src/script/api/template/template_admin.hpp.sq | 2 +- src/script/api/template/template_airport.hpp.sq | 2 +- src/script/api/template/template_base.hpp.sq | 2 +- .../api/template/template_basestation.hpp.sq | 2 +- src/script/api/template/template_bridge.hpp.sq | 2 +- src/script/api/template/template_bridgelist.hpp.sq | 4 +- src/script/api/template/template_cargo.hpp.sq | 2 +- src/script/api/template/template_cargolist.hpp.sq | 8 ++-- .../api/template/template_cargomonitor.hpp.sq | 2 +- src/script/api/template/template_client.hpp.sq | 2 +- src/script/api/template/template_clientlist.hpp.sq | 4 +- src/script/api/template/template_company.hpp.sq | 2 +- .../api/template/template_companymode.hpp.sq | 2 +- src/script/api/template/template_date.hpp.sq | 2 +- src/script/api/template/template_depotlist.hpp.sq | 2 +- src/script/api/template/template_engine.hpp.sq | 2 +- src/script/api/template/template_enginelist.hpp.sq | 2 +- src/script/api/template/template_error.hpp.sq | 2 +- src/script/api/template/template_event.hpp.sq | 4 +- .../api/template/template_event_types.hpp.sq | 56 +++++++++++----------- src/script/api/template/template_execmode.hpp.sq | 2 +- src/script/api/template/template_game.hpp.sq | 2 +- .../api/template/template_gamesettings.hpp.sq | 2 +- src/script/api/template/template_goal.hpp.sq | 2 +- src/script/api/template/template_group.hpp.sq | 2 +- src/script/api/template/template_grouplist.hpp.sq | 2 +- src/script/api/template/template_industry.hpp.sq | 2 +- .../api/template/template_industrylist.hpp.sq | 6 +-- .../api/template/template_industrytype.hpp.sq | 2 +- .../api/template/template_industrytypelist.hpp.sq | 2 +- .../api/template/template_infrastructure.hpp.sq | 2 +- src/script/api/template/template_list.hpp.sq | 2 +- src/script/api/template/template_log.hpp.sq | 2 +- src/script/api/template/template_map.hpp.sq | 2 +- src/script/api/template/template_marine.hpp.sq | 2 +- src/script/api/template/template_news.hpp.sq | 2 +- src/script/api/template/template_order.hpp.sq | 2 +- src/script/api/template/template_rail.hpp.sq | 2 +- .../api/template/template_railtypelist.hpp.sq | 2 +- src/script/api/template/template_road.hpp.sq | 2 +- src/script/api/template/template_sign.hpp.sq | 2 +- src/script/api/template/template_signlist.hpp.sq | 2 +- src/script/api/template/template_station.hpp.sq | 2 +- .../api/template/template_stationlist.hpp.sq | 26 +++++----- src/script/api/template/template_story_page.hpp.sq | 2 +- .../template/template_storypageelementlist.hpp.sq | 2 +- .../api/template/template_storypagelist.hpp.sq | 2 +- src/script/api/template/template_subsidy.hpp.sq | 2 +- .../api/template/template_subsidylist.hpp.sq | 2 +- src/script/api/template/template_testmode.hpp.sq | 2 +- src/script/api/template/template_text.hpp.sq | 2 +- src/script/api/template/template_tile.hpp.sq | 2 +- src/script/api/template/template_tilelist.hpp.sq | 8 ++-- src/script/api/template/template_town.hpp.sq | 2 +- src/script/api/template/template_townlist.hpp.sq | 4 +- src/script/api/template/template_tunnel.hpp.sq | 2 +- src/script/api/template/template_vehicle.hpp.sq | 2 +- .../api/template/template_vehiclelist.hpp.sq | 12 ++--- src/script/api/template/template_viewport.hpp.sq | 2 +- src/script/api/template/template_waypoint.hpp.sq | 2 +- .../api/template/template_waypointlist.hpp.sq | 4 +- src/script/api/template/template_window.hpp.sq | 2 +- 65 files changed, 126 insertions(+), 126 deletions(-) (limited to 'src/script/api') diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk index ef0a74c8d..a2782721c 100644 --- a/src/script/api/squirrel_export.awk +++ b/src/script/api/squirrel_export.awk @@ -34,7 +34,7 @@ function dump_class_templates(name) print " template <> inline const " name " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR print " template <> inline const " name " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }" CR if (name == "ScriptEvent") { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, nullptr, DefSQDestructorCallback<" name ">, true); return 1; }" CR } else if (name == "ScriptText") { print "" CR print " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" CR @@ -44,10 +44,10 @@ function dump_class_templates(name) print " if (sq_gettype(vm, index) == OT_STRING) {" CR print " return new RawText(GetParam(ForceType(), vm, index, ptr));" CR print " }" CR - print " return NULL;" CR + print " return nullptr;" CR print " }" CR } else { - print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, NULL, DefSQDestructorCallback<" name ">, true); return 1; }" CR + print " template <> inline int Return<" name " *>(HSQUIRRELVM vm, " name " *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"" realname "\", res, nullptr, DefSQDestructorCallback<" name ">, true); return 1; }" CR } } diff --git a/src/script/api/squirrel_export.vbs b/src/script/api/squirrel_export.vbs index a13869509..d9d5d643d 100644 --- a/src/script/api/squirrel_export.vbs +++ b/src/script/api/squirrel_export.vbs @@ -62,7 +62,7 @@ Function DumpClassTemplates(name, file) file.WriteLine " template <> inline const " & name & " *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" file.WriteLine " template <> inline const " & name & " &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" & name & " *)instance; }" If name = "ScriptEvent" Then - file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, nullptr, DefSQDestructorCallback<" & name & ">, true); return 1; }" ElseIf name = "ScriptText" Then file.WriteLine "" file.WriteLine " template <> inline Text *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" @@ -72,10 +72,10 @@ Function DumpClassTemplates(name, file) file.WriteLine " if (sq_gettype(vm, index) == OT_STRING) {" file.WriteLine " return new RawText(GetParam(ForceType(), vm, index, ptr));" file.WriteLine " }" - file.WriteLine " return NULL;" + file.WriteLine " return nullptr;" file.WriteLine " }" Else - file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, NULL, DefSQDestructorCallback<" & name & ">, true); return 1; }" + file.WriteLine " template <> inline int Return<" & name & " *>(HSQUIRRELVM vm, " & name & " *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, " & Chr(34) & realname & Chr(34) & ", res, nullptr, DefSQDestructorCallback<" & name & ">, true); return 1; }" End If End Function diff --git a/src/script/api/template/template_accounting.hpp.sq b/src/script/api/template/template_accounting.hpp.sq index 298217a22..58f011a4e 100644 --- a/src/script/api/template/template_accounting.hpp.sq +++ b/src/script/api/template/template_accounting.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptAccounting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAccounting *)instance; } template <> inline const ScriptAccounting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAccounting *)instance; } template <> inline const ScriptAccounting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAccounting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Accounting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptAccounting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Accounting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_admin.hpp.sq b/src/script/api/template/template_admin.hpp.sq index 2256d674b..394304be0 100644 --- a/src/script/api/template/template_admin.hpp.sq +++ b/src/script/api/template/template_admin.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptAdmin &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAdmin *)instance; } template <> inline const ScriptAdmin *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAdmin *)instance; } template <> inline const ScriptAdmin &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAdmin *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptAdmin *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Admin", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptAdmin *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Admin", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_airport.hpp.sq b/src/script/api/template/template_airport.hpp.sq index 402eea076..d091837ce 100644 --- a/src/script/api/template/template_airport.hpp.sq +++ b/src/script/api/template/template_airport.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptAirport &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAirport *)instance; } template <> inline const ScriptAirport *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAirport *)instance; } template <> inline const ScriptAirport &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAirport *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptAirport *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Airport", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptAirport *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Airport", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_base.hpp.sq b/src/script/api/template/template_base.hpp.sq index 0ff19bcb8..be19e8bad 100644 --- a/src/script/api/template/template_base.hpp.sq +++ b/src/script/api/template/template_base.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptBase &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBase *)instance; } template <> inline const ScriptBase *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBase *)instance; } template <> inline const ScriptBase &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBase *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptBase *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Base", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptBase *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Base", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_basestation.hpp.sq b/src/script/api/template/template_basestation.hpp.sq index c11a7745e..272c58e4a 100644 --- a/src/script/api/template/template_basestation.hpp.sq +++ b/src/script/api/template/template_basestation.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptBaseStation &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBaseStation *)instance; } template <> inline const ScriptBaseStation *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBaseStation *)instance; } template <> inline const ScriptBaseStation &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBaseStation *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptBaseStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BaseStation", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptBaseStation *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BaseStation", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_bridge.hpp.sq b/src/script/api/template/template_bridge.hpp.sq index f62715511..90a1569de 100644 --- a/src/script/api/template/template_bridge.hpp.sq +++ b/src/script/api/template/template_bridge.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptBridge &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridge *)instance; } template <> inline const ScriptBridge *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridge *)instance; } template <> inline const ScriptBridge &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridge *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptBridge *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Bridge", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptBridge *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Bridge", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_bridgelist.hpp.sq b/src/script/api/template/template_bridgelist.hpp.sq index 1f78a7874..61c0ccf40 100644 --- a/src/script/api/template/template_bridgelist.hpp.sq +++ b/src/script/api/template/template_bridgelist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptBridgeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList *)instance; } template <> inline const ScriptBridgeList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridgeList *)instance; } template <> inline const ScriptBridgeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptBridgeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptBridgeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,5 +26,5 @@ namespace SQConvert { template <> inline ScriptBridgeList_Length &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList_Length *)instance; } template <> inline const ScriptBridgeList_Length *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridgeList_Length *)instance; } template <> inline const ScriptBridgeList_Length &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList_Length *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptBridgeList_Length *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList_Length", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptBridgeList_Length *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList_Length", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_cargo.hpp.sq b/src/script/api/template/template_cargo.hpp.sq index b57e5c05a..2d85ef862 100644 --- a/src/script/api/template/template_cargo.hpp.sq +++ b/src/script/api/template/template_cargo.hpp.sq @@ -27,5 +27,5 @@ namespace SQConvert { template <> inline ScriptCargo &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargo *)instance; } template <> inline const ScriptCargo *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargo *)instance; } template <> inline const ScriptCargo &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargo *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargo *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Cargo", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargo *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Cargo", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_cargolist.hpp.sq b/src/script/api/template/template_cargolist.hpp.sq index 5b39aa66d..eee554027 100644 --- a/src/script/api/template/template_cargolist.hpp.sq +++ b/src/script/api/template/template_cargolist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptCargoList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; } template <> inline const ScriptCargoList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList *)instance; } template <> inline const ScriptCargoList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,7 +26,7 @@ namespace SQConvert { template <> inline ScriptCargoList_IndustryAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryAccepting *)instance; } template <> inline const ScriptCargoList_IndustryAccepting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_IndustryAccepting *)instance; } template <> inline const ScriptCargoList_IndustryAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryAccepting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryAccepting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_IndustryAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryAccepting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -35,7 +35,7 @@ namespace SQConvert { template <> inline ScriptCargoList_IndustryProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryProducing *)instance; } template <> inline const ScriptCargoList_IndustryProducing *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_IndustryProducing *)instance; } template <> inline const ScriptCargoList_IndustryProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryProducing *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryProducing", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_IndustryProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryProducing", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -44,5 +44,5 @@ namespace SQConvert { template <> inline ScriptCargoList_StationAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_StationAccepting *)instance; } template <> inline const ScriptCargoList_StationAccepting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_StationAccepting *)instance; } template <> inline const ScriptCargoList_StationAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_StationAccepting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_StationAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_StationAccepting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargoList_StationAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_StationAccepting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_cargomonitor.hpp.sq b/src/script/api/template/template_cargomonitor.hpp.sq index ce0a358ac..2010bf6eb 100644 --- a/src/script/api/template/template_cargomonitor.hpp.sq +++ b/src/script/api/template/template_cargomonitor.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptCargoMonitor &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoMonitor *)instance; } template <> inline const ScriptCargoMonitor *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoMonitor *)instance; } template <> inline const ScriptCargoMonitor &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoMonitor *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCargoMonitor *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoMonitor", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCargoMonitor *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoMonitor", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_client.hpp.sq b/src/script/api/template/template_client.hpp.sq index 13b9d68b6..7e9314197 100644 --- a/src/script/api/template/template_client.hpp.sq +++ b/src/script/api/template/template_client.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptClient &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } template <> inline const ScriptClient *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClient *)instance; } template <> inline const ScriptClient &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptClient *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Client", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClient *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Client", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_clientlist.hpp.sq b/src/script/api/template/template_clientlist.hpp.sq index 74c3f4525..6373994a1 100644 --- a/src/script/api/template/template_clientlist.hpp.sq +++ b/src/script/api/template/template_clientlist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptClientList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } template <> inline const ScriptClientList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList *)instance; } template <> inline const ScriptClientList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptClientList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClientList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,5 +26,5 @@ namespace SQConvert { template <> inline ScriptClientList_Company &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList_Company *)instance; } template <> inline const ScriptClientList_Company *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList_Company *)instance; } template <> inline const ScriptClientList_Company &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList_Company *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptClientList_Company *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList_Company", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptClientList_Company *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList_Company", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_company.hpp.sq b/src/script/api/template/template_company.hpp.sq index 82c10381a..77ca0c933 100644 --- a/src/script/api/template/template_company.hpp.sq +++ b/src/script/api/template/template_company.hpp.sq @@ -31,5 +31,5 @@ namespace SQConvert { template <> inline ScriptCompany &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompany *)instance; } template <> inline const ScriptCompany *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompany *)instance; } template <> inline const ScriptCompany &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompany *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCompany *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Company", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCompany *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Company", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_companymode.hpp.sq b/src/script/api/template/template_companymode.hpp.sq index f99f1d42d..c25f04708 100644 --- a/src/script/api/template/template_companymode.hpp.sq +++ b/src/script/api/template/template_companymode.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptCompanyMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompanyMode *)instance; } template <> inline const ScriptCompanyMode *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompanyMode *)instance; } template <> inline const ScriptCompanyMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompanyMode *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptCompanyMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CompanyMode", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptCompanyMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CompanyMode", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_date.hpp.sq b/src/script/api/template/template_date.hpp.sq index cca4a258b..c6d65a867 100644 --- a/src/script/api/template/template_date.hpp.sq +++ b/src/script/api/template/template_date.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptDate &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDate *)instance; } template <> inline const ScriptDate *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDate *)instance; } template <> inline const ScriptDate &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDate *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptDate *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Date", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptDate *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Date", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_depotlist.hpp.sq b/src/script/api/template/template_depotlist.hpp.sq index f5fcbcf54..4305552cf 100644 --- a/src/script/api/template/template_depotlist.hpp.sq +++ b/src/script/api/template/template_depotlist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptDepotList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDepotList *)instance; } template <> inline const ScriptDepotList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDepotList *)instance; } template <> inline const ScriptDepotList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDepotList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptDepotList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "DepotList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptDepotList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "DepotList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_engine.hpp.sq b/src/script/api/template/template_engine.hpp.sq index 3d652df9e..6aa13a94e 100644 --- a/src/script/api/template/template_engine.hpp.sq +++ b/src/script/api/template/template_engine.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptEngine &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } template <> inline const ScriptEngine *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngine *)instance; } template <> inline const ScriptEngine &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEngine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Engine", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEngine *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Engine", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_enginelist.hpp.sq b/src/script/api/template/template_enginelist.hpp.sq index f17c244eb..3d42f8c53 100644 --- a/src/script/api/template/template_enginelist.hpp.sq +++ b/src/script/api/template/template_enginelist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptEngineList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngineList *)instance; } template <> inline const ScriptEngineList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngineList *)instance; } template <> inline const ScriptEngineList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngineList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEngineList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EngineList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEngineList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EngineList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_error.hpp.sq b/src/script/api/template/template_error.hpp.sq index 8e61f0810..817a2226d 100644 --- a/src/script/api/template/template_error.hpp.sq +++ b/src/script/api/template/template_error.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptError &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptError *)instance; } template <> inline const ScriptError *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptError *)instance; } template <> inline const ScriptError &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptError *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptError *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Error", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptError *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Error", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_event.hpp.sq b/src/script/api/template/template_event.hpp.sq index c0a8afdc9..3847a81ca 100644 --- a/src/script/api/template/template_event.hpp.sq +++ b/src/script/api/template/template_event.hpp.sq @@ -21,7 +21,7 @@ namespace SQConvert { template <> inline ScriptEvent &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEvent *)instance; } template <> inline const ScriptEvent *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEvent *)instance; } template <> inline const ScriptEvent &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEvent *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEvent *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "Event", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEvent *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "Event", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -30,5 +30,5 @@ namespace SQConvert { template <> inline ScriptEventController &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventController *)instance; } template <> inline const ScriptEventController *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventController *)instance; } template <> inline const ScriptEventController &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventController *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventController *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventController", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventController *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventController", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_event_types.hpp.sq b/src/script/api/template/template_event_types.hpp.sq index eb6d1f1b4..4b4e00ecf 100644 --- a/src/script/api/template/template_event_types.hpp.sq +++ b/src/script/api/template/template_event_types.hpp.sq @@ -21,7 +21,7 @@ namespace SQConvert { template <> inline ScriptEventVehicleCrashed &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleCrashed *)instance; } template <> inline const ScriptEventVehicleCrashed *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleCrashed *)instance; } template <> inline const ScriptEventVehicleCrashed &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleCrashed *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleCrashed", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleCrashed *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleCrashed", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -30,7 +30,7 @@ namespace SQConvert { template <> inline ScriptEventSubsidyOffer &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOffer *)instance; } template <> inline const ScriptEventSubsidyOffer *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOffer *)instance; } template <> inline const ScriptEventSubsidyOffer &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOffer *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyOffer *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOffer", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyOffer *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOffer", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -39,7 +39,7 @@ namespace SQConvert { template <> inline ScriptEventSubsidyOfferExpired &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOfferExpired *)instance; } template <> inline const ScriptEventSubsidyOfferExpired *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOfferExpired *)instance; } template <> inline const ScriptEventSubsidyOfferExpired &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOfferExpired *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyOfferExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOfferExpired", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyOfferExpired *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOfferExpired", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -48,7 +48,7 @@ namespace SQConvert { template <> inline ScriptEventSubsidyAwarded &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyAwarded *)instance; } template <> inline const ScriptEventSubsidyAwarded *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyAwarded *)instance; } template <> inline const ScriptEventSubsidyAwarded &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyAwarded *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyAwarded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyAwarded", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyAwarded *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyAwarded", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -57,7 +57,7 @@ namespace SQConvert { template <> inline ScriptEventSubsidyExpired &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyExpired *)instance; } template <> inline const ScriptEventSubsidyExpired *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyExpired *)instance; } template <> inline const ScriptEventSubsidyExpired &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyExpired *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyExpired", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventSubsidyExpired *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyExpired", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -66,7 +66,7 @@ namespace SQConvert { template <> inline ScriptEventEnginePreview &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEnginePreview *)instance; } template <> inline const ScriptEventEnginePreview *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEnginePreview *)instance; } template <> inline const ScriptEventEnginePreview &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEnginePreview *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventEnginePreview *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEnginePreview", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventEnginePreview *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEnginePreview", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -75,7 +75,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyNew &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyNew *)instance; } template <> inline const ScriptEventCompanyNew *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyNew *)instance; } template <> inline const ScriptEventCompanyNew &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyNew *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyNew *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyNew", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyNew *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyNew", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -84,7 +84,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyInTrouble &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyInTrouble *)instance; } template <> inline const ScriptEventCompanyInTrouble *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyInTrouble *)instance; } template <> inline const ScriptEventCompanyInTrouble &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyInTrouble *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyInTrouble *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyInTrouble", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyInTrouble *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyInTrouble", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -93,7 +93,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyAskMerger &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyAskMerger *)instance; } template <> inline const ScriptEventCompanyAskMerger *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyAskMerger *)instance; } template <> inline const ScriptEventCompanyAskMerger &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyAskMerger *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyAskMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyAskMerger", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyAskMerger *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyAskMerger", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -102,7 +102,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyMerger &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyMerger *)instance; } template <> inline const ScriptEventCompanyMerger *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyMerger *)instance; } template <> inline const ScriptEventCompanyMerger &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyMerger *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyMerger", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyMerger *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyMerger", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -111,7 +111,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyBankrupt &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyBankrupt *)instance; } template <> inline const ScriptEventCompanyBankrupt *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyBankrupt *)instance; } template <> inline const ScriptEventCompanyBankrupt &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyBankrupt *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyBankrupt *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyBankrupt", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyBankrupt *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyBankrupt", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -120,7 +120,7 @@ namespace SQConvert { template <> inline ScriptEventVehicleLost &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleLost *)instance; } template <> inline const ScriptEventVehicleLost *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleLost *)instance; } template <> inline const ScriptEventVehicleLost &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleLost *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleLost *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleLost", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleLost *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleLost", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -129,7 +129,7 @@ namespace SQConvert { template <> inline ScriptEventVehicleWaitingInDepot &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleWaitingInDepot *)instance; } template <> inline const ScriptEventVehicleWaitingInDepot *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleWaitingInDepot *)instance; } template <> inline const ScriptEventVehicleWaitingInDepot &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleWaitingInDepot *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleWaitingInDepot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleWaitingInDepot", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleWaitingInDepot *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleWaitingInDepot", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -138,7 +138,7 @@ namespace SQConvert { template <> inline ScriptEventVehicleUnprofitable &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleUnprofitable *)instance; } template <> inline const ScriptEventVehicleUnprofitable *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleUnprofitable *)instance; } template <> inline const ScriptEventVehicleUnprofitable &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleUnprofitable *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleUnprofitable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleUnprofitable", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventVehicleUnprofitable *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleUnprofitable", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -147,7 +147,7 @@ namespace SQConvert { template <> inline ScriptEventIndustryOpen &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryOpen *)instance; } template <> inline const ScriptEventIndustryOpen *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryOpen *)instance; } template <> inline const ScriptEventIndustryOpen &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryOpen *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventIndustryOpen *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryOpen", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventIndustryOpen *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryOpen", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -156,7 +156,7 @@ namespace SQConvert { template <> inline ScriptEventIndustryClose &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryClose *)instance; } template <> inline const ScriptEventIndustryClose *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryClose *)instance; } template <> inline const ScriptEventIndustryClose &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryClose *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventIndustryClose *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryClose", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventIndustryClose *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryClose", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -165,7 +165,7 @@ namespace SQConvert { template <> inline ScriptEventEngineAvailable &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEngineAvailable *)instance; } template <> inline const ScriptEventEngineAvailable *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEngineAvailable *)instance; } template <> inline const ScriptEventEngineAvailable &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEngineAvailable *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventEngineAvailable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEngineAvailable", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventEngineAvailable *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEngineAvailable", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -174,7 +174,7 @@ namespace SQConvert { template <> inline ScriptEventStationFirstVehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStationFirstVehicle *)instance; } template <> inline const ScriptEventStationFirstVehicle *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStationFirstVehicle *)instance; } template <> inline const ScriptEventStationFirstVehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStationFirstVehicle *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventStationFirstVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStationFirstVehicle", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventStationFirstVehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStationFirstVehicle", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -183,7 +183,7 @@ namespace SQConvert { template <> inline ScriptEventDisasterZeppelinerCrashed &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCrashed *)instance; } template <> inline const ScriptEventDisasterZeppelinerCrashed *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCrashed *)instance; } template <> inline const ScriptEventDisasterZeppelinerCrashed &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCrashed *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCrashed", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCrashed *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCrashed", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -192,7 +192,7 @@ namespace SQConvert { template <> inline ScriptEventDisasterZeppelinerCleared &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCleared *)instance; } template <> inline const ScriptEventDisasterZeppelinerCleared *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCleared *)instance; } template <> inline const ScriptEventDisasterZeppelinerCleared &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCleared *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCleared *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCleared", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCleared *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCleared", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -201,7 +201,7 @@ namespace SQConvert { template <> inline ScriptEventTownFounded &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventTownFounded *)instance; } template <> inline const ScriptEventTownFounded *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventTownFounded *)instance; } template <> inline const ScriptEventTownFounded &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventTownFounded *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventTownFounded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventTownFounded", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventTownFounded *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventTownFounded", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -210,7 +210,7 @@ namespace SQConvert { template <> inline ScriptEventAircraftDestTooFar &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAircraftDestTooFar *)instance; } template <> inline const ScriptEventAircraftDestTooFar *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAircraftDestTooFar *)instance; } template <> inline const ScriptEventAircraftDestTooFar &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAircraftDestTooFar *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventAircraftDestTooFar *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAircraftDestTooFar", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventAircraftDestTooFar *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAircraftDestTooFar", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -219,7 +219,7 @@ namespace SQConvert { template <> inline ScriptEventAdminPort &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAdminPort *)instance; } template <> inline const ScriptEventAdminPort *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAdminPort *)instance; } template <> inline const ScriptEventAdminPort &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAdminPort *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventAdminPort *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAdminPort", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventAdminPort *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAdminPort", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -228,7 +228,7 @@ namespace SQConvert { template <> inline ScriptEventWindowWidgetClick &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventWindowWidgetClick *)instance; } template <> inline const ScriptEventWindowWidgetClick *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventWindowWidgetClick *)instance; } template <> inline const ScriptEventWindowWidgetClick &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventWindowWidgetClick *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventWindowWidgetClick *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventWindowWidgetClick", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventWindowWidgetClick *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventWindowWidgetClick", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -237,7 +237,7 @@ namespace SQConvert { template <> inline ScriptEventGoalQuestionAnswer &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventGoalQuestionAnswer *)instance; } template <> inline const ScriptEventGoalQuestionAnswer *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventGoalQuestionAnswer *)instance; } template <> inline const ScriptEventGoalQuestionAnswer &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventGoalQuestionAnswer *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventGoalQuestionAnswer *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventGoalQuestionAnswer", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventGoalQuestionAnswer *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventGoalQuestionAnswer", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -246,7 +246,7 @@ namespace SQConvert { template <> inline ScriptEventCompanyTown &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyTown *)instance; } template <> inline const ScriptEventCompanyTown *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyTown *)instance; } template <> inline const ScriptEventCompanyTown &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyTown *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyTown *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyTown", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventCompanyTown *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyTown", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -255,7 +255,7 @@ namespace SQConvert { template <> inline ScriptEventExclusiveTransportRights &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventExclusiveTransportRights *)instance; } template <> inline const ScriptEventExclusiveTransportRights *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventExclusiveTransportRights *)instance; } template <> inline const ScriptEventExclusiveTransportRights &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventExclusiveTransportRights *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventExclusiveTransportRights *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventExclusiveTransportRights", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventExclusiveTransportRights *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventExclusiveTransportRights", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -264,5 +264,5 @@ namespace SQConvert { template <> inline ScriptEventRoadReconstruction &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventRoadReconstruction *)instance; } template <> inline const ScriptEventRoadReconstruction *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventRoadReconstruction *)instance; } template <> inline const ScriptEventRoadReconstruction &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventRoadReconstruction *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptEventRoadReconstruction *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventRoadReconstruction", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptEventRoadReconstruction *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventRoadReconstruction", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_execmode.hpp.sq b/src/script/api/template/template_execmode.hpp.sq index 4c8326bc1..b7030774e 100644 --- a/src/script/api/template/template_execmode.hpp.sq +++ b/src/script/api/template/template_execmode.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptExecMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptExecMode *)instance; } template <> inline const ScriptExecMode *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptExecMode *)instance; } template <> inline const ScriptExecMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptExecMode *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptExecMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ExecMode", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptExecMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ExecMode", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_game.hpp.sq b/src/script/api/template/template_game.hpp.sq index 495aeada4..db30d893e 100644 --- a/src/script/api/template/template_game.hpp.sq +++ b/src/script/api/template/template_game.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptGame &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGame *)instance; } template <> inline const ScriptGame *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGame *)instance; } template <> inline const ScriptGame &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGame *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptGame *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Game", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptGame *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Game", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_gamesettings.hpp.sq b/src/script/api/template/template_gamesettings.hpp.sq index 9c6e91746..4882951a1 100644 --- a/src/script/api/template/template_gamesettings.hpp.sq +++ b/src/script/api/template/template_gamesettings.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptGameSettings &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGameSettings *)instance; } template <> inline const ScriptGameSettings *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGameSettings *)instance; } template <> inline const ScriptGameSettings &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGameSettings *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptGameSettings *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GameSettings", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptGameSettings *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GameSettings", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_goal.hpp.sq b/src/script/api/template/template_goal.hpp.sq index 6aa3014ee..7b392eca7 100644 --- a/src/script/api/template/template_goal.hpp.sq +++ b/src/script/api/template/template_goal.hpp.sq @@ -27,5 +27,5 @@ namespace SQConvert { template <> inline ScriptGoal &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGoal *)instance; } template <> inline const ScriptGoal *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGoal *)instance; } template <> inline const ScriptGoal &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGoal *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptGoal *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Goal", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptGoal *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Goal", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_group.hpp.sq b/src/script/api/template/template_group.hpp.sq index ac4abe5a1..0bb83765a 100644 --- a/src/script/api/template/template_group.hpp.sq +++ b/src/script/api/template/template_group.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptGroup &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroup *)instance; } template <> inline const ScriptGroup *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroup *)instance; } template <> inline const ScriptGroup &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroup *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Group", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptGroup *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Group", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_grouplist.hpp.sq b/src/script/api/template/template_grouplist.hpp.sq index 858abcf01..8638ef52f 100644 --- a/src/script/api/template/template_grouplist.hpp.sq +++ b/src/script/api/template/template_grouplist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptGroupList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroupList *)instance; } template <> inline const ScriptGroupList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroupList *)instance; } template <> inline const ScriptGroupList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroupList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptGroupList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GroupList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptGroupList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GroupList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_industry.hpp.sq b/src/script/api/template/template_industry.hpp.sq index e1e02263c..3b60c0fd3 100644 --- a/src/script/api/template/template_industry.hpp.sq +++ b/src/script/api/template/template_industry.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptIndustry &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustry *)instance; } template <> inline const ScriptIndustry *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustry *)instance; } template <> inline const ScriptIndustry &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustry *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustry *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Industry", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustry *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Industry", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_industrylist.hpp.sq b/src/script/api/template/template_industrylist.hpp.sq index 0c0316346..184b42775 100644 --- a/src/script/api/template/template_industrylist.hpp.sq +++ b/src/script/api/template/template_industrylist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptIndustryList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList *)instance; } template <> inline const ScriptIndustryList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList *)instance; } template <> inline const ScriptIndustryList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,7 +26,7 @@ namespace SQConvert { template <> inline ScriptIndustryList_CargoAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoAccepting *)instance; } template <> inline const ScriptIndustryList_CargoAccepting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList_CargoAccepting *)instance; } template <> inline const ScriptIndustryList_CargoAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoAccepting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList_CargoAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoAccepting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList_CargoAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoAccepting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -35,5 +35,5 @@ namespace SQConvert { template <> inline ScriptIndustryList_CargoProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoProducing *)instance; } template <> inline const ScriptIndustryList_CargoProducing *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList_CargoProducing *)instance; } template <> inline const ScriptIndustryList_CargoProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoProducing *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList_CargoProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoProducing", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryList_CargoProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoProducing", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_industrytype.hpp.sq b/src/script/api/template/template_industrytype.hpp.sq index 79495053e..dfc735d03 100644 --- a/src/script/api/template/template_industrytype.hpp.sq +++ b/src/script/api/template/template_industrytype.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptIndustryType &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryType *)instance; } template <> inline const ScriptIndustryType *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryType *)instance; } template <> inline const ScriptIndustryType &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryType *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryType", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryType *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryType", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_industrytypelist.hpp.sq b/src/script/api/template/template_industrytypelist.hpp.sq index 044f9cced..cac1fc0e3 100644 --- a/src/script/api/template/template_industrytypelist.hpp.sq +++ b/src/script/api/template/template_industrytypelist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptIndustryTypeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryTypeList *)instance; } template <> inline const ScriptIndustryTypeList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryTypeList *)instance; } template <> inline const ScriptIndustryTypeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryTypeList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryTypeList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptIndustryTypeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryTypeList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_infrastructure.hpp.sq b/src/script/api/template/template_infrastructure.hpp.sq index 39460e140..c2a7b7191 100644 --- a/src/script/api/template/template_infrastructure.hpp.sq +++ b/src/script/api/template/template_infrastructure.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptInfrastructure &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptInfrastructure *)instance; } template <> inline const ScriptInfrastructure *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptInfrastructure *)instance; } template <> inline const ScriptInfrastructure &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptInfrastructure *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptInfrastructure *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Infrastructure", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptInfrastructure *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Infrastructure", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_list.hpp.sq b/src/script/api/template/template_list.hpp.sq index fa8d2b36d..b16117af3 100644 --- a/src/script/api/template/template_list.hpp.sq +++ b/src/script/api/template/template_list.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptList *)instance; } template <> inline const ScriptList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptList *)instance; } template <> inline const ScriptList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "List", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "List", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_log.hpp.sq b/src/script/api/template/template_log.hpp.sq index 91c0511d0..fd9737388 100644 --- a/src/script/api/template/template_log.hpp.sq +++ b/src/script/api/template/template_log.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptLog &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptLog *)instance; } template <> inline const ScriptLog *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptLog *)instance; } template <> inline const ScriptLog &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptLog *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptLog *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Log", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptLog *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Log", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_map.hpp.sq b/src/script/api/template/template_map.hpp.sq index 4d34cc734..980bd7a53 100644 --- a/src/script/api/template/template_map.hpp.sq +++ b/src/script/api/template/template_map.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptMap &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMap *)instance; } template <> inline const ScriptMap *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMap *)instance; } template <> inline const ScriptMap &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMap *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptMap *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Map", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptMap *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Map", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_marine.hpp.sq b/src/script/api/template/template_marine.hpp.sq index d2415b699..1dc3eaa33 100644 --- a/src/script/api/template/template_marine.hpp.sq +++ b/src/script/api/template/template_marine.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptMarine &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMarine *)instance; } template <> inline const ScriptMarine *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMarine *)instance; } template <> inline const ScriptMarine &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMarine *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptMarine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Marine", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptMarine *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Marine", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_news.hpp.sq b/src/script/api/template/template_news.hpp.sq index 445a055e1..db65507cc 100644 --- a/src/script/api/template/template_news.hpp.sq +++ b/src/script/api/template/template_news.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptNews &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptNews *)instance; } template <> inline const ScriptNews *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptNews *)instance; } template <> inline const ScriptNews &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptNews *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptNews *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "News", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptNews *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "News", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_order.hpp.sq b/src/script/api/template/template_order.hpp.sq index d11fafa14..39a16e00e 100644 --- a/src/script/api/template/template_order.hpp.sq +++ b/src/script/api/template/template_order.hpp.sq @@ -31,5 +31,5 @@ namespace SQConvert { template <> inline ScriptOrder &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptOrder *)instance; } template <> inline const ScriptOrder *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptOrder *)instance; } template <> inline const ScriptOrder &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptOrder *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptOrder *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Order", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptOrder *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Order", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_rail.hpp.sq b/src/script/api/template/template_rail.hpp.sq index f92f96d58..3b9c9ce6a 100644 --- a/src/script/api/template/template_rail.hpp.sq +++ b/src/script/api/template/template_rail.hpp.sq @@ -29,5 +29,5 @@ namespace SQConvert { template <> inline ScriptRail &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRail *)instance; } template <> inline const ScriptRail *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRail *)instance; } template <> inline const ScriptRail &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRail *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptRail *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Rail", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptRail *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Rail", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_railtypelist.hpp.sq b/src/script/api/template/template_railtypelist.hpp.sq index 9a768e1d5..87f9f0e2c 100644 --- a/src/script/api/template/template_railtypelist.hpp.sq +++ b/src/script/api/template/template_railtypelist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptRailTypeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRailTypeList *)instance; } template <> inline const ScriptRailTypeList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRailTypeList *)instance; } template <> inline const ScriptRailTypeList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRailTypeList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptRailTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "RailTypeList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptRailTypeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "RailTypeList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_road.hpp.sq b/src/script/api/template/template_road.hpp.sq index d50bda573..bf9a32082 100644 --- a/src/script/api/template/template_road.hpp.sq +++ b/src/script/api/template/template_road.hpp.sq @@ -27,5 +27,5 @@ namespace SQConvert { template <> inline ScriptRoad &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoad *)instance; } template <> inline const ScriptRoad *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRoad *)instance; } template <> inline const ScriptRoad &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoad *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptRoad *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Road", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptRoad *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Road", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_sign.hpp.sq b/src/script/api/template/template_sign.hpp.sq index db926fed3..244171189 100644 --- a/src/script/api/template/template_sign.hpp.sq +++ b/src/script/api/template/template_sign.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptSign &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSign *)instance; } template <> inline const ScriptSign *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSign *)instance; } template <> inline const ScriptSign &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSign *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptSign *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Sign", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptSign *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Sign", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_signlist.hpp.sq b/src/script/api/template/template_signlist.hpp.sq index e5bd67ae5..a7c53a6c8 100644 --- a/src/script/api/template/template_signlist.hpp.sq +++ b/src/script/api/template/template_signlist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptSignList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSignList *)instance; } template <> inline const ScriptSignList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSignList *)instance; } template <> inline const ScriptSignList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSignList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptSignList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SignList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptSignList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SignList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_station.hpp.sq b/src/script/api/template/template_station.hpp.sq index 729ae68a6..3bbd4220e 100644 --- a/src/script/api/template/template_station.hpp.sq +++ b/src/script/api/template/template_station.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptStation &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStation *)instance; } template <> inline const ScriptStation *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStation *)instance; } template <> inline const ScriptStation &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStation *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Station", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStation *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Station", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_stationlist.hpp.sq b/src/script/api/template/template_stationlist.hpp.sq index 5f7bd2812..e13d26b67 100644 --- a/src/script/api/template/template_stationlist.hpp.sq +++ b/src/script/api/template/template_stationlist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptStationList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList *)instance; } template <> inline const ScriptStationList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList *)instance; } template <> inline const ScriptStationList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -32,7 +32,7 @@ namespace SQConvert { template <> inline ScriptStationList_Cargo &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Cargo *)instance; } template <> inline const ScriptStationList_Cargo *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_Cargo *)instance; } template <> inline const ScriptStationList_Cargo &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Cargo *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_Cargo *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Cargo", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_Cargo *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Cargo", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -41,7 +41,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoWaiting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaiting *)instance; } template <> inline const ScriptStationList_CargoWaiting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaiting *)instance; } template <> inline const ScriptStationList_CargoWaiting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaiting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaiting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaiting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaiting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaiting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -50,7 +50,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoPlanned &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlanned *)instance; } template <> inline const ScriptStationList_CargoPlanned *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlanned *)instance; } template <> inline const ScriptStationList_CargoPlanned &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlanned *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlanned *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlanned", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlanned *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlanned", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -59,7 +59,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoWaitingByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByFrom *)instance; } template <> inline const ScriptStationList_CargoWaitingByFrom *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingByFrom *)instance; } template <> inline const ScriptStationList_CargoWaitingByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByFrom *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByFrom *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByFrom", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByFrom", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -68,7 +68,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoWaitingViaByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingViaByFrom *)instance; } template <> inline const ScriptStationList_CargoWaitingViaByFrom *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingViaByFrom *)instance; } template <> inline const ScriptStationList_CargoWaitingViaByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingViaByFrom *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingViaByFrom *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingViaByFrom", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingViaByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingViaByFrom", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -77,7 +77,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoWaitingByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByVia *)instance; } template <> inline const ScriptStationList_CargoWaitingByVia *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingByVia *)instance; } template <> inline const ScriptStationList_CargoWaitingByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByVia *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByVia *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByVia", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByVia", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -86,7 +86,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoWaitingFromByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingFromByVia *)instance; } template <> inline const ScriptStationList_CargoWaitingFromByVia *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingFromByVia *)instance; } template <> inline const ScriptStationList_CargoWaitingFromByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingFromByVia *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingFromByVia *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingFromByVia", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoWaitingFromByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingFromByVia", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -95,7 +95,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoPlannedByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByFrom *)instance; } template <> inline const ScriptStationList_CargoPlannedByFrom *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedByFrom *)instance; } template <> inline const ScriptStationList_CargoPlannedByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByFrom *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByFrom *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByFrom", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByFrom", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -104,7 +104,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoPlannedViaByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedViaByFrom *)instance; } template <> inline const ScriptStationList_CargoPlannedViaByFrom *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedViaByFrom *)instance; } template <> inline const ScriptStationList_CargoPlannedViaByFrom &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedViaByFrom *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedViaByFrom *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedViaByFrom", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedViaByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedViaByFrom", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -113,7 +113,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoPlannedByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByVia *)instance; } template <> inline const ScriptStationList_CargoPlannedByVia *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedByVia *)instance; } template <> inline const ScriptStationList_CargoPlannedByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByVia *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByVia *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByVia", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByVia", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -122,7 +122,7 @@ namespace SQConvert { template <> inline ScriptStationList_CargoPlannedFromByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedFromByVia *)instance; } template <> inline const ScriptStationList_CargoPlannedFromByVia *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedFromByVia *)instance; } template <> inline const ScriptStationList_CargoPlannedFromByVia &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedFromByVia *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedFromByVia *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedFromByVia", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_CargoPlannedFromByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedFromByVia", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -131,5 +131,5 @@ namespace SQConvert { template <> inline ScriptStationList_Vehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Vehicle *)instance; } template <> inline const ScriptStationList_Vehicle *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_Vehicle *)instance; } template <> inline const ScriptStationList_Vehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Vehicle *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Vehicle", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStationList_Vehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Vehicle", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_story_page.hpp.sq b/src/script/api/template/template_story_page.hpp.sq index 4c322a3ac..add3a30e7 100644 --- a/src/script/api/template/template_story_page.hpp.sq +++ b/src/script/api/template/template_story_page.hpp.sq @@ -25,5 +25,5 @@ namespace SQConvert { template <> inline ScriptStoryPage &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPage *)instance; } template <> inline const ScriptStoryPage *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPage *)instance; } template <> inline const ScriptStoryPage &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPage *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPage *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPage", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPage *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPage", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_storypageelementlist.hpp.sq b/src/script/api/template/template_storypageelementlist.hpp.sq index 34d940f92..df7ae6e68 100644 --- a/src/script/api/template/template_storypageelementlist.hpp.sq +++ b/src/script/api/template/template_storypageelementlist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptStoryPageElementList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageElementList *)instance; } template <> inline const ScriptStoryPageElementList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageElementList *)instance; } template <> inline const ScriptStoryPageElementList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageElementList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPageElementList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageElementList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPageElementList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageElementList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_storypagelist.hpp.sq b/src/script/api/template/template_storypagelist.hpp.sq index 7325969fd..bb21f83a9 100644 --- a/src/script/api/template/template_storypagelist.hpp.sq +++ b/src/script/api/template/template_storypagelist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptStoryPageList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageList *)instance; } template <> inline const ScriptStoryPageList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageList *)instance; } template <> inline const ScriptStoryPageList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPageList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptStoryPageList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_subsidy.hpp.sq b/src/script/api/template/template_subsidy.hpp.sq index 61303a645..501a2f23f 100644 --- a/src/script/api/template/template_subsidy.hpp.sq +++ b/src/script/api/template/template_subsidy.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptSubsidy &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidy *)instance; } template <> inline const ScriptSubsidy *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidy *)instance; } template <> inline const ScriptSubsidy &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidy *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptSubsidy *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Subsidy", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptSubsidy *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Subsidy", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_subsidylist.hpp.sq b/src/script/api/template/template_subsidylist.hpp.sq index 4e6284f4e..1f3f7b3a1 100644 --- a/src/script/api/template/template_subsidylist.hpp.sq +++ b/src/script/api/template/template_subsidylist.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptSubsidyList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidyList *)instance; } template <> inline const ScriptSubsidyList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidyList *)instance; } template <> inline const ScriptSubsidyList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidyList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptSubsidyList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SubsidyList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptSubsidyList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SubsidyList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_testmode.hpp.sq b/src/script/api/template/template_testmode.hpp.sq index bacafa16e..5404e8023 100644 --- a/src/script/api/template/template_testmode.hpp.sq +++ b/src/script/api/template/template_testmode.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptTestMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTestMode *)instance; } template <> inline const ScriptTestMode *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTestMode *)instance; } template <> inline const ScriptTestMode &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTestMode *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTestMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TestMode", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTestMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TestMode", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_text.hpp.sq b/src/script/api/template/template_text.hpp.sq index 7a44daf16..93654c84a 100644 --- a/src/script/api/template/template_text.hpp.sq +++ b/src/script/api/template/template_text.hpp.sq @@ -25,6 +25,6 @@ namespace SQConvert { if (sq_gettype(vm, index) == OT_STRING) { return new RawText(GetParam(ForceType(), vm, index, ptr)); } - return NULL; + return nullptr; } } // namespace SQConvert diff --git a/src/script/api/template/template_tile.hpp.sq b/src/script/api/template/template_tile.hpp.sq index e78aaa6ac..9271b5ba4 100644 --- a/src/script/api/template/template_tile.hpp.sq +++ b/src/script/api/template/template_tile.hpp.sq @@ -31,5 +31,5 @@ namespace SQConvert { template <> inline ScriptTile &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTile *)instance; } template <> inline const ScriptTile *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTile *)instance; } template <> inline const ScriptTile &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTile *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tile", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTile *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tile", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_tilelist.hpp.sq b/src/script/api/template/template_tilelist.hpp.sq index e3d73a7c8..989e6749e 100644 --- a/src/script/api/template/template_tilelist.hpp.sq +++ b/src/script/api/template/template_tilelist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptTileList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList *)instance; } template <> inline const ScriptTileList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList *)instance; } template <> inline const ScriptTileList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTileList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTileList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,7 +26,7 @@ namespace SQConvert { template <> inline ScriptTileList_IndustryAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryAccepting *)instance; } template <> inline const ScriptTileList_IndustryAccepting *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_IndustryAccepting *)instance; } template <> inline const ScriptTileList_IndustryAccepting &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryAccepting *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryAccepting", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_IndustryAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryAccepting", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -35,7 +35,7 @@ namespace SQConvert { template <> inline ScriptTileList_IndustryProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryProducing *)instance; } template <> inline const ScriptTileList_IndustryProducing *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_IndustryProducing *)instance; } template <> inline const ScriptTileList_IndustryProducing &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryProducing *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryProducing", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_IndustryProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryProducing", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -44,5 +44,5 @@ namespace SQConvert { template <> inline ScriptTileList_StationType &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_StationType *)instance; } template <> inline const ScriptTileList_StationType *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_StationType *)instance; } template <> inline const ScriptTileList_StationType &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_StationType *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_StationType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_StationType", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTileList_StationType *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_StationType", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_town.hpp.sq b/src/script/api/template/template_town.hpp.sq index 0ec1c285d..30534fa8a 100644 --- a/src/script/api/template/template_town.hpp.sq +++ b/src/script/api/template/template_town.hpp.sq @@ -29,5 +29,5 @@ namespace SQConvert { template <> inline ScriptTown &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTown *)instance; } template <> inline const ScriptTown *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTown *)instance; } template <> inline const ScriptTown &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTown *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTown *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Town", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTown *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Town", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_townlist.hpp.sq b/src/script/api/template/template_townlist.hpp.sq index 5bbd2e203..e3709b5b5 100644 --- a/src/script/api/template/template_townlist.hpp.sq +++ b/src/script/api/template/template_townlist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptTownList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownList *)instance; } template <> inline const ScriptTownList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownList *)instance; } template <> inline const ScriptTownList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTownList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTownList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,5 +26,5 @@ namespace SQConvert { template <> inline ScriptTownEffectList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownEffectList *)instance; } template <> inline const ScriptTownEffectList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownEffectList *)instance; } template <> inline const ScriptTownEffectList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownEffectList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTownEffectList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownEffectList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTownEffectList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownEffectList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_tunnel.hpp.sq b/src/script/api/template/template_tunnel.hpp.sq index 2d7eed91e..b003eae13 100644 --- a/src/script/api/template/template_tunnel.hpp.sq +++ b/src/script/api/template/template_tunnel.hpp.sq @@ -21,5 +21,5 @@ namespace SQConvert { template <> inline ScriptTunnel &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTunnel *)instance; } template <> inline const ScriptTunnel *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTunnel *)instance; } template <> inline const ScriptTunnel &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTunnel *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptTunnel *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tunnel", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptTunnel *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tunnel", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_vehicle.hpp.sq b/src/script/api/template/template_vehicle.hpp.sq index 999a9c507..d0e2f52b1 100644 --- a/src/script/api/template/template_vehicle.hpp.sq +++ b/src/script/api/template/template_vehicle.hpp.sq @@ -25,5 +25,5 @@ namespace SQConvert { template <> inline ScriptVehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicle *)instance; } template <> inline const ScriptVehicle *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicle *)instance; } template <> inline const ScriptVehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicle *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Vehicle", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Vehicle", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_vehiclelist.hpp.sq b/src/script/api/template/template_vehiclelist.hpp.sq index dd1d17682..11dac4bc3 100644 --- a/src/script/api/template/template_vehiclelist.hpp.sq +++ b/src/script/api/template/template_vehiclelist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptVehicleList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList *)instance; } template <> inline const ScriptVehicleList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList *)instance; } template <> inline const ScriptVehicleList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,7 +26,7 @@ namespace SQConvert { template <> inline ScriptVehicleList_Station &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Station *)instance; } template <> inline const ScriptVehicleList_Station *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Station *)instance; } template <> inline const ScriptVehicleList_Station &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Station *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Station", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Station *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Station", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -35,7 +35,7 @@ namespace SQConvert { template <> inline ScriptVehicleList_Depot &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Depot *)instance; } template <> inline const ScriptVehicleList_Depot *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Depot *)instance; } template <> inline const ScriptVehicleList_Depot &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Depot *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Depot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Depot", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Depot *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Depot", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -44,7 +44,7 @@ namespace SQConvert { template <> inline ScriptVehicleList_SharedOrders &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_SharedOrders *)instance; } template <> inline const ScriptVehicleList_SharedOrders *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_SharedOrders *)instance; } template <> inline const ScriptVehicleList_SharedOrders &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_SharedOrders *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_SharedOrders *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_SharedOrders", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_SharedOrders *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_SharedOrders", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -53,7 +53,7 @@ namespace SQConvert { template <> inline ScriptVehicleList_Group &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Group *)instance; } template <> inline const ScriptVehicleList_Group *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Group *)instance; } template <> inline const ScriptVehicleList_Group &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Group *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Group *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Group", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_Group *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Group", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -62,5 +62,5 @@ namespace SQConvert { template <> inline ScriptVehicleList_DefaultGroup &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_DefaultGroup *)instance; } template <> inline const ScriptVehicleList_DefaultGroup *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_DefaultGroup *)instance; } template <> inline const ScriptVehicleList_DefaultGroup &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_DefaultGroup *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_DefaultGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_DefaultGroup", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptVehicleList_DefaultGroup *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_DefaultGroup", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_viewport.hpp.sq b/src/script/api/template/template_viewport.hpp.sq index 8a187ae81..e5b44943b 100644 --- a/src/script/api/template/template_viewport.hpp.sq +++ b/src/script/api/template/template_viewport.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptViewport &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptViewport *)instance; } template <> inline const ScriptViewport *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptViewport *)instance; } template <> inline const ScriptViewport &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptViewport *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptViewport *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Viewport", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptViewport *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Viewport", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_waypoint.hpp.sq b/src/script/api/template/template_waypoint.hpp.sq index 88cc495c9..613c3cbcc 100644 --- a/src/script/api/template/template_waypoint.hpp.sq +++ b/src/script/api/template/template_waypoint.hpp.sq @@ -23,5 +23,5 @@ namespace SQConvert { template <> inline ScriptWaypoint &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypoint *)instance; } template <> inline const ScriptWaypoint *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypoint *)instance; } template <> inline const ScriptWaypoint &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypoint *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptWaypoint *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Waypoint", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWaypoint *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Waypoint", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_waypointlist.hpp.sq b/src/script/api/template/template_waypointlist.hpp.sq index 2e23bba14..7c2330964 100644 --- a/src/script/api/template/template_waypointlist.hpp.sq +++ b/src/script/api/template/template_waypointlist.hpp.sq @@ -17,7 +17,7 @@ namespace SQConvert { template <> inline ScriptWaypointList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList *)instance; } template <> inline const ScriptWaypointList *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypointList *)instance; } template <> inline const ScriptWaypointList &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptWaypointList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWaypointList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert namespace SQConvert { @@ -26,5 +26,5 @@ namespace SQConvert { template <> inline ScriptWaypointList_Vehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList_Vehicle *)instance; } template <> inline const ScriptWaypointList_Vehicle *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypointList_Vehicle *)instance; } template <> inline const ScriptWaypointList_Vehicle &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList_Vehicle *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptWaypointList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList_Vehicle", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWaypointList_Vehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList_Vehicle", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq index 3077215ec..c0d3f59de 100644 --- a/src/script/api/template/template_window.hpp.sq +++ b/src/script/api/template/template_window.hpp.sq @@ -259,5 +259,5 @@ namespace SQConvert { template <> inline ScriptWindow &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWindow *)instance; } template <> inline const ScriptWindow *GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWindow *)instance; } template <> inline const ScriptWindow &GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWindow *)instance; } - template <> inline int Return(HSQUIRRELVM vm, ScriptWindow *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Window", res, NULL, DefSQDestructorCallback, true); return 1; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWindow *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Window", res, nullptr, DefSQDestructorCallback, true); return 1; } } // namespace SQConvert -- cgit v1.2.3-70-g09d2