diff options
Diffstat (limited to 'src')
186 files changed, 101 insertions, 12173 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index 49f8cff64..9e1f00163 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -24,60 +24,8 @@ /* Manually include the Text glue. */ #include "../script/api/template/template_text.hpp.sq" -/* Convert all AI related classes to Squirrel data. - * Note: this line is a marker in squirrel_export.sh. Do not change! */ -#include "../script/api/ai/ai_accounting.hpp.sq" -#include "../script/api/ai/ai_airport.hpp.sq" -#include "../script/api/ai/ai_base.hpp.sq" -#include "../script/api/ai/ai_basestation.hpp.sq" -#include "../script/api/ai/ai_bridge.hpp.sq" -#include "../script/api/ai/ai_bridgelist.hpp.sq" -#include "../script/api/ai/ai_cargo.hpp.sq" -#include "../script/api/ai/ai_cargolist.hpp.sq" -#include "../script/api/ai/ai_company.hpp.sq" -#include "../script/api/ai/ai_controller.hpp.sq" -#include "../script/api/ai/ai_date.hpp.sq" -#include "../script/api/ai/ai_depotlist.hpp.sq" -#include "../script/api/ai/ai_engine.hpp.sq" -#include "../script/api/ai/ai_enginelist.hpp.sq" -#include "../script/api/ai/ai_error.hpp.sq" -#include "../script/api/ai/ai_event.hpp.sq" -#include "../script/api/ai/ai_event_types.hpp.sq" -#include "../script/api/ai/ai_execmode.hpp.sq" -#include "../script/api/ai/ai_gamesettings.hpp.sq" -#include "../script/api/ai/ai_group.hpp.sq" -#include "../script/api/ai/ai_grouplist.hpp.sq" -#include "../script/api/ai/ai_industry.hpp.sq" -#include "../script/api/ai/ai_industrylist.hpp.sq" -#include "../script/api/ai/ai_industrytype.hpp.sq" -#include "../script/api/ai/ai_industrytypelist.hpp.sq" -#include "../script/api/ai/ai_infrastructure.hpp.sq" -#include "../script/api/ai/ai_list.hpp.sq" -#include "../script/api/ai/ai_log.hpp.sq" -#include "../script/api/ai/ai_map.hpp.sq" -#include "../script/api/ai/ai_marine.hpp.sq" -#include "../script/api/ai/ai_order.hpp.sq" -#include "../script/api/ai/ai_priorityqueue.hpp.sq" -#include "../script/api/ai/ai_rail.hpp.sq" -#include "../script/api/ai/ai_railtypelist.hpp.sq" -#include "../script/api/ai/ai_road.hpp.sq" -#include "../script/api/ai/ai_roadtypelist.hpp.sq" -#include "../script/api/ai/ai_sign.hpp.sq" -#include "../script/api/ai/ai_signlist.hpp.sq" -#include "../script/api/ai/ai_station.hpp.sq" -#include "../script/api/ai/ai_stationlist.hpp.sq" -#include "../script/api/ai/ai_subsidy.hpp.sq" -#include "../script/api/ai/ai_subsidylist.hpp.sq" -#include "../script/api/ai/ai_testmode.hpp.sq" -#include "../script/api/ai/ai_tile.hpp.sq" -#include "../script/api/ai/ai_tilelist.hpp.sq" -#include "../script/api/ai/ai_town.hpp.sq" -#include "../script/api/ai/ai_townlist.hpp.sq" -#include "../script/api/ai/ai_tunnel.hpp.sq" -#include "../script/api/ai/ai_vehicle.hpp.sq" -#include "../script/api/ai/ai_vehiclelist.hpp.sq" -#include "../script/api/ai/ai_waypoint.hpp.sq" -#include "../script/api/ai/ai_waypointlist.hpp.sq" +/* Convert all AI related classes to Squirrel data. */ +#include "../script/api/ai/ai_includes.hpp" #include "../company_base.h" #include "../company_func.h" @@ -102,112 +50,8 @@ void AIInstance::RegisterAPI() { ScriptInstance::RegisterAPI(); -/* Register all classes */ - SQAIList_Register(this->engine); - SQAIAccounting_Register(this->engine); - SQAIAirport_Register(this->engine); - SQAIBase_Register(this->engine); - SQAIBaseStation_Register(this->engine); - SQAIBridge_Register(this->engine); - SQAIBridgeList_Register(this->engine); - SQAIBridgeList_Length_Register(this->engine); - SQAICargo_Register(this->engine); - SQAICargoList_Register(this->engine); - SQAICargoList_IndustryAccepting_Register(this->engine); - SQAICargoList_IndustryProducing_Register(this->engine); - SQAICargoList_StationAccepting_Register(this->engine); - SQAICompany_Register(this->engine); - SQAIDate_Register(this->engine); - SQAIDepotList_Register(this->engine); - SQAIEngine_Register(this->engine); - SQAIEngineList_Register(this->engine); - SQAIError_Register(this->engine); - SQAIEvent_Register(this->engine); - SQAIEventAircraftDestTooFar_Register(this->engine); - SQAIEventCompanyAskMerger_Register(this->engine); - SQAIEventCompanyBankrupt_Register(this->engine); - SQAIEventCompanyInTrouble_Register(this->engine); - SQAIEventCompanyMerger_Register(this->engine); - SQAIEventCompanyNew_Register(this->engine); - SQAIEventCompanyTown_Register(this->engine); - SQAIEventController_Register(this->engine); - SQAIEventDisasterZeppelinerCleared_Register(this->engine); - SQAIEventDisasterZeppelinerCrashed_Register(this->engine); - SQAIEventEngineAvailable_Register(this->engine); - SQAIEventEnginePreview_Register(this->engine); - SQAIEventExclusiveTransportRights_Register(this->engine); - SQAIEventIndustryClose_Register(this->engine); - SQAIEventIndustryOpen_Register(this->engine); - SQAIEventRoadReconstruction_Register(this->engine); - SQAIEventStationFirstVehicle_Register(this->engine); - SQAIEventSubsidyAwarded_Register(this->engine); - SQAIEventSubsidyExpired_Register(this->engine); - SQAIEventSubsidyOffer_Register(this->engine); - SQAIEventSubsidyOfferExpired_Register(this->engine); - SQAIEventTownFounded_Register(this->engine); - SQAIEventVehicleAutoReplaced_Register(this->engine); - SQAIEventVehicleCrashed_Register(this->engine); - SQAIEventVehicleLost_Register(this->engine); - SQAIEventVehicleUnprofitable_Register(this->engine); - SQAIEventVehicleWaitingInDepot_Register(this->engine); - SQAIExecMode_Register(this->engine); - SQAIGameSettings_Register(this->engine); - SQAIGroup_Register(this->engine); - SQAIGroupList_Register(this->engine); - SQAIIndustry_Register(this->engine); - SQAIIndustryList_Register(this->engine); - SQAIIndustryList_CargoAccepting_Register(this->engine); - SQAIIndustryList_CargoProducing_Register(this->engine); - SQAIIndustryType_Register(this->engine); - SQAIIndustryTypeList_Register(this->engine); - SQAIInfrastructure_Register(this->engine); - SQAILog_Register(this->engine); - SQAIMap_Register(this->engine); - SQAIMarine_Register(this->engine); - SQAIOrder_Register(this->engine); - SQAIPriorityQueue_Register(this->engine); - SQAIRail_Register(this->engine); - SQAIRailTypeList_Register(this->engine); - SQAIRoad_Register(this->engine); - SQAIRoadTypeList_Register(this->engine); - SQAISign_Register(this->engine); - SQAISignList_Register(this->engine); - SQAIStation_Register(this->engine); - SQAIStationList_Register(this->engine); - SQAIStationList_Cargo_Register(this->engine); - SQAIStationList_CargoPlanned_Register(this->engine); - SQAIStationList_CargoPlannedByFrom_Register(this->engine); - SQAIStationList_CargoPlannedByVia_Register(this->engine); - SQAIStationList_CargoPlannedFromByVia_Register(this->engine); - SQAIStationList_CargoPlannedViaByFrom_Register(this->engine); - SQAIStationList_CargoWaiting_Register(this->engine); - SQAIStationList_CargoWaitingByFrom_Register(this->engine); - SQAIStationList_CargoWaitingByVia_Register(this->engine); - SQAIStationList_CargoWaitingFromByVia_Register(this->engine); - SQAIStationList_CargoWaitingViaByFrom_Register(this->engine); - SQAIStationList_Vehicle_Register(this->engine); - SQAISubsidy_Register(this->engine); - SQAISubsidyList_Register(this->engine); - SQAITestMode_Register(this->engine); - SQAITile_Register(this->engine); - SQAITileList_Register(this->engine); - SQAITileList_IndustryAccepting_Register(this->engine); - SQAITileList_IndustryProducing_Register(this->engine); - SQAITileList_StationType_Register(this->engine); - SQAITown_Register(this->engine); - SQAITownEffectList_Register(this->engine); - SQAITownList_Register(this->engine); - SQAITunnel_Register(this->engine); - SQAIVehicle_Register(this->engine); - SQAIVehicleList_Register(this->engine); - SQAIVehicleList_DefaultGroup_Register(this->engine); - SQAIVehicleList_Depot_Register(this->engine); - SQAIVehicleList_Group_Register(this->engine); - SQAIVehicleList_SharedOrders_Register(this->engine); - SQAIVehicleList_Station_Register(this->engine); - SQAIWaypoint_Register(this->engine); - SQAIWaypointList_Register(this->engine); - SQAIWaypointList_Vehicle_Register(this->engine); + /* Register all classes */ + SQAI_RegisterAll(this->engine); if (!this->LoadCompatibilityScripts(this->versionAPI, AI_DIR)) this->Died(); } diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp index 47d51e28e..842b4b3e4 100644 --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -20,72 +20,8 @@ #include "game_text.hpp" #include "game.hpp" -/* Convert all Game related classes to Squirrel data. - * Note: this line is a marker in squirrel_export.sh. Do not change! */ -#include "../script/api/game/game_accounting.hpp.sq" -#include "../script/api/game/game_admin.hpp.sq" -#include "../script/api/game/game_airport.hpp.sq" -#include "../script/api/game/game_base.hpp.sq" -#include "../script/api/game/game_basestation.hpp.sq" -#include "../script/api/game/game_bridge.hpp.sq" -#include "../script/api/game/game_bridgelist.hpp.sq" -#include "../script/api/game/game_cargo.hpp.sq" -#include "../script/api/game/game_cargolist.hpp.sq" -#include "../script/api/game/game_cargomonitor.hpp.sq" -#include "../script/api/game/game_client.hpp.sq" -#include "../script/api/game/game_clientlist.hpp.sq" -#include "../script/api/game/game_company.hpp.sq" -#include "../script/api/game/game_companymode.hpp.sq" -#include "../script/api/game/game_controller.hpp.sq" -#include "../script/api/game/game_date.hpp.sq" -#include "../script/api/game/game_depotlist.hpp.sq" -#include "../script/api/game/game_engine.hpp.sq" -#include "../script/api/game/game_enginelist.hpp.sq" -#include "../script/api/game/game_error.hpp.sq" -#include "../script/api/game/game_event.hpp.sq" -#include "../script/api/game/game_event_types.hpp.sq" -#include "../script/api/game/game_execmode.hpp.sq" -#include "../script/api/game/game_game.hpp.sq" -#include "../script/api/game/game_gamesettings.hpp.sq" -#include "../script/api/game/game_goal.hpp.sq" -#include "../script/api/game/game_industry.hpp.sq" -#include "../script/api/game/game_industrylist.hpp.sq" -#include "../script/api/game/game_industrytype.hpp.sq" -#include "../script/api/game/game_industrytypelist.hpp.sq" -#include "../script/api/game/game_infrastructure.hpp.sq" -#include "../script/api/game/game_list.hpp.sq" -#include "../script/api/game/game_log.hpp.sq" -#include "../script/api/game/game_map.hpp.sq" -#include "../script/api/game/game_marine.hpp.sq" -#include "../script/api/game/game_news.hpp.sq" -#include "../script/api/game/game_order.hpp.sq" -#include "../script/api/game/game_priorityqueue.hpp.sq" -#include "../script/api/game/game_rail.hpp.sq" -#include "../script/api/game/game_railtypelist.hpp.sq" -#include "../script/api/game/game_road.hpp.sq" -#include "../script/api/game/game_roadtypelist.hpp.sq" -#include "../script/api/game/game_sign.hpp.sq" -#include "../script/api/game/game_signlist.hpp.sq" -#include "../script/api/game/game_station.hpp.sq" -#include "../script/api/game/game_stationlist.hpp.sq" -#include "../script/api/game/game_story_page.hpp.sq" -#include "../script/api/game/game_storypageelementlist.hpp.sq" -#include "../script/api/game/game_storypagelist.hpp.sq" -#include "../script/api/game/game_subsidy.hpp.sq" -#include "../script/api/game/game_subsidylist.hpp.sq" -#include "../script/api/game/game_testmode.hpp.sq" -#include "../script/api/game/game_text.hpp.sq" -#include "../script/api/game/game_tile.hpp.sq" -#include "../script/api/game/game_tilelist.hpp.sq" -#include "../script/api/game/game_town.hpp.sq" -#include "../script/api/game/game_townlist.hpp.sq" -#include "../script/api/game/game_tunnel.hpp.sq" -#include "../script/api/game/game_vehicle.hpp.sq" -#include "../script/api/game/game_vehiclelist.hpp.sq" -#include "../script/api/game/game_viewport.hpp.sq" -#include "../script/api/game/game_waypoint.hpp.sq" -#include "../script/api/game/game_waypointlist.hpp.sq" -#include "../script/api/game/game_window.hpp.sq" +/* Convert all Game related classes to Squirrel data. */ +#include "../script/api/game/game_includes.hpp" #include "../safeguards.h" @@ -108,119 +44,8 @@ void GameInstance::RegisterAPI() { ScriptInstance::RegisterAPI(); -/* Register all classes */ - SQGSList_Register(this->engine); - SQGSAccounting_Register(this->engine); - SQGSAdmin_Register(this->engine); - SQGSAirport_Register(this->engine); - SQGSBase_Register(this->engine); - SQGSBaseStation_Register(this->engine); - SQGSBridge_Register(this->engine); - SQGSBridgeList_Register(this->engine); - SQGSBridgeList_Length_Register(this->engine); - SQGSCargo_Register(this->engine); - SQGSCargoList_Register(this->engine); - SQGSCargoList_IndustryAccepting_Register(this->engine); - SQGSCargoList_IndustryProducing_Register(this->engine); - SQGSCargoList_StationAccepting_Register(this->engine); - SQGSCargoMonitor_Register(this->engine); - SQGSClient_Register(this->engine); - SQGSClientList_Register(this->engine); - SQGSClientList_Company_Register(this->engine); - SQGSCompany_Register(this->engine); - SQGSCompanyMode_Register(this->engine); - SQGSDate_Register(this->engine); - SQGSDepotList_Register(this->engine); - SQGSEngine_Register(this->engine); - SQGSEngineList_Register(this->engine); - SQGSError_Register(this->engine); - SQGSEvent_Register(this->engine); - SQGSEventAdminPort_Register(this->engine); - SQGSEventCompanyBankrupt_Register(this->engine); - SQGSEventCompanyInTrouble_Register(this->engine); - SQGSEventCompanyMerger_Register(this->engine); - SQGSEventCompanyNew_Register(this->engine); - SQGSEventCompanyTown_Register(this->engine); - SQGSEventController_Register(this->engine); - SQGSEventExclusiveTransportRights_Register(this->engine); - SQGSEventGoalQuestionAnswer_Register(this->engine); - SQGSEventIndustryClose_Register(this->engine); - SQGSEventIndustryOpen_Register(this->engine); - SQGSEventRoadReconstruction_Register(this->engine); - SQGSEventStationFirstVehicle_Register(this->engine); - SQGSEventStoryPageButtonClick_Register(this->engine); - SQGSEventStoryPageTileSelect_Register(this->engine); - SQGSEventStoryPageVehicleSelect_Register(this->engine); - SQGSEventSubsidyAwarded_Register(this->engine); - SQGSEventSubsidyExpired_Register(this->engine); - SQGSEventSubsidyOffer_Register(this->engine); - SQGSEventSubsidyOfferExpired_Register(this->engine); - SQGSEventTownFounded_Register(this->engine); - SQGSEventVehicleCrashed_Register(this->engine); - SQGSEventWindowWidgetClick_Register(this->engine); - SQGSExecMode_Register(this->engine); - SQGSGame_Register(this->engine); - SQGSGameSettings_Register(this->engine); - SQGSGoal_Register(this->engine); - SQGSIndustry_Register(this->engine); - SQGSIndustryList_Register(this->engine); - SQGSIndustryList_CargoAccepting_Register(this->engine); - SQGSIndustryList_CargoProducing_Register(this->engine); - SQGSIndustryType_Register(this->engine); - SQGSIndustryTypeList_Register(this->engine); - SQGSInfrastructure_Register(this->engine); - SQGSLog_Register(this->engine); - SQGSMap_Register(this->engine); - SQGSMarine_Register(this->engine); - SQGSNews_Register(this->engine); - SQGSOrder_Register(this->engine); - SQGSPriorityQueue_Register(this->engine); - SQGSRail_Register(this->engine); - SQGSRailTypeList_Register(this->engine); - SQGSRoad_Register(this->engine); - SQGSRoadTypeList_Register(this->engine); - SQGSSign_Register(this->engine); - SQGSSignList_Register(this->engine); - SQGSStation_Register(this->engine); - SQGSStationList_Register(this->engine); - SQGSStationList_Cargo_Register(this->engine); - SQGSStationList_CargoPlanned_Register(this->engine); - SQGSStationList_CargoPlannedByFrom_Register(this->engine); - SQGSStationList_CargoPlannedByVia_Register(this->engine); - SQGSStationList_CargoPlannedFromByVia_Register(this->engine); - SQGSStationList_CargoPlannedViaByFrom_Register(this->engine); - SQGSStationList_CargoWaiting_Register(this->engine); - SQGSStationList_CargoWaitingByFrom_Register(this->engine); - SQGSStationList_CargoWaitingByVia_Register(this->engine); - SQGSStationList_CargoWaitingFromByVia_Register(this->engine); - SQGSStationList_CargoWaitingViaByFrom_Register(this->engine); - SQGSStationList_Vehicle_Register(this->engine); - SQGSStoryPage_Register(this->engine); - SQGSStoryPageElementList_Register(this->engine); - SQGSStoryPageList_Register(this->engine); - SQGSSubsidy_Register(this->engine); - SQGSSubsidyList_Register(this->engine); - SQGSTestMode_Register(this->engine); - SQGSText_Register(this->engine); - SQGSTile_Register(this->engine); - SQGSTileList_Register(this->engine); - SQGSTileList_IndustryAccepting_Register(this->engine); - SQGSTileList_IndustryProducing_Register(this->engine); - SQGSTileList_StationType_Register(this->engine); - SQGSTown_Register(this->engine); - SQGSTownEffectList_Register(this->engine); - SQGSTownList_Register(this->engine); - SQGSTunnel_Register(this->engine); - SQGSVehicle_Register(this->engine); - SQGSVehicleList_Register(this->engine); - SQGSVehicleList_Depot_Register(this->engine); - SQGSVehicleList_SharedOrders_Register(this->engine); - SQGSVehicleList_Station_Register(this->engine); - SQGSViewport_Register(this->engine); - SQGSWaypoint_Register(this->engine); - SQGSWaypointList_Register(this->engine); - SQGSWaypointList_Vehicle_Register(this->engine); - SQGSWindow_Register(this->engine); + /* Register all classes */ + SQGS_RegisterAll(this->engine); RegisterGameTranslation(this->engine); diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt index f9f5fb7c8..c22867928 100644 --- a/src/script/api/CMakeLists.txt +++ b/src/script/api/CMakeLists.txt @@ -1,3 +1,7 @@ +add_library(script_api + INTERFACE +) + # Get script_window.hpp dependencies file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in ENUM_LINES REGEX "@enum") foreach(ENUM IN LISTS ENUM_LINES) @@ -13,7 +17,6 @@ add_custom_command_timestamp(OUTPUT ${CMAKE_BINARY_DIR}/generated/script/api/scr -DGENERATE_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in -DGENERATE_BINARY_FILE=${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp -P ${CMAKE_SOURCE_DIR}/cmake/scripts/GenerateWidget.cmake - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/generated/script/api/dummy # dummy directory for #include "../script_window.hpp" MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in DEPENDS ${CMAKE_SOURCE_DIR}/cmake/scripts/GenerateWidget.cmake ${DEPENDENCIES} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -23,19 +26,94 @@ add_custom_target_timestamp(script_window DEPENDS ${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp ) - -add_library(script_api - INTERFACE -) target_include_directories(script_api INTERFACE ${CMAKE_BINARY_DIR}/generated/script/api/ - ${CMAKE_BINARY_DIR}/generated/script/api/dummy # dummy path so #include "../script_window.hpp" works ${CMAKE_CURRENT_SOURCE_DIR} ) -add_dependencies(script_api - script_window -) + +file(GLOB SCRIPT_API_FILES "script_*.hpp") +list(APPEND SCRIPT_API_FILES ${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp) + +foreach(API "ai;AI" "game;GS" "template;Template") + list(GET API 0 APILC) + list(GET API 1 APIUC) + + foreach(SCRIPT_API_FILE IN LISTS SCRIPT_API_FILES) + if ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*") + continue() + endif ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*") + get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME) + string(REPLACE "script_" "${APILC}_" SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE_NAME}") + set(SCRIPT_API_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${SCRIPT_API_FILE_NAME}.sq") + + add_custom_command_timestamp(OUTPUT ${SCRIPT_API_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} + -DSCRIPT_API_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/squirrel_export.hpp.sq.in + -DSCRIPT_API_BINARY_FILE=${SCRIPT_API_BINARY_FILE} + -DSCRIPT_API_FILE=${SCRIPT_API_FILE} + -DAPIUC=${APIUC} + -DAPILC=${APILC} + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelExport.cmake + MAIN_DEPENDENCY ${SCRIPT_API_FILE} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/squirrel_export.hpp.sq.in + ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelExport.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating ${APILC}/${SCRIPT_API_FILE_NAME}.sq" + ) + list(APPEND SCRIPT_${APIUC}_BINARY_FILES ${SCRIPT_API_BINARY_FILE}) + endforeach(SCRIPT_API_FILE) + + add_custom_target_timestamp(script_${APILC} + DEPENDS + ${SCRIPT_${APIUC}_BINARY_FILES} + ) + add_dependencies(script_${APILC} + script_window + ) + + if (NOT "${APILC}" STREQUAL "template") + list(APPEND SCRIPT_${APIUC}_BINARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APILC}/${APILC}_controller.hpp.sq") + set(INCLUDES_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${APILC}_includes.hpp") + add_custom_command_timestamp(OUTPUT ${INCLUDES_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} + -DINCLUDES_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/script_includes.hpp.in + -DINCLUDES_BINARY_FILE=${INCLUDES_BINARY_FILE} + -DAPIUC=${APIUC} + -DAPILC=${APILC} + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelIncludes.cmake + -- + ${SCRIPT_${APIUC}_BINARY_FILES} + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/script_includes.hpp.in + DEPENDS ${SCRIPT_${APIUC}_BINARY_FILES} + ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelIncludes.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating ${APILC}/${APILC}_includes.hpp" + ) + add_custom_target_timestamp(script_${APILC}_includes + DEPENDS + ${INCLUDES_BINARY_FILE} + ) + add_dependencies(script_${APILC}_includes + script_${APILC} + ) + add_dependencies(script_api + script_${APILC}_includes + ) + else (NOT "${APILC}" STREQUAL "template") + add_dependencies(script_api + script_${APILC} + ) + endif (NOT "${APILC}" STREQUAL "template") + + target_include_directories(script_api + INTERFACE + ${CMAKE_BINARY_DIR}/generated/script + ${CMAKE_BINARY_DIR}/generated/script/api/${APILC} + ${CMAKE_CURRENT_SOURCE_DIR}/${APILC} + ) +endforeach(API) + add_library(openttd::script_api ALIAS script_api) diff --git a/src/script/api/Doxyfile_AI b/src/script/api/Doxyfile_AI index fbd935b41..fb0abc056 100644 --- a/src/script/api/Doxyfile_AI +++ b/src/script/api/Doxyfile_AI @@ -98,7 +98,7 @@ FILE_PATTERNS = script_*.hpp \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = ai_includes.hpp EXCLUDE_SYMBOLS = GetClassName DECLARE_ENUM_AS_BIT_SET DECLARE_POSTFIX_INCREMENT EXAMPLE_PATH = EXAMPLE_PATTERNS = * diff --git a/src/script/api/Doxyfile_Game b/src/script/api/Doxyfile_Game index 238b47f7d..83f8ad0e8 100644 --- a/src/script/api/Doxyfile_Game +++ b/src/script/api/Doxyfile_Game @@ -98,7 +98,7 @@ FILE_PATTERNS = script_*.hpp \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = game_includes.hpp EXCLUDE_SYMBOLS = GetClassName DECLARE_ENUM_AS_BIT_SET DECLARE_POSTFIX_INCREMENT EXAMPLE_PATH = EXAMPLE_PATTERNS = * diff --git a/src/script/api/ai/ai_accounting.hpp.sq b/src/script/api/ai/ai_accounting.hpp.sq deleted file mode 100644 index d2bfbb04f..000000000 --- a/src/script/api/ai/ai_accounting.hpp.sq +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_accounting.hpp" -#include "../template/template_accounting.hpp.sq" - - -template <> const char *GetClassName<ScriptAccounting, ST_AI>() { return "AIAccounting"; } - -void SQAIAccounting_Register(Squirrel *engine) -{ - DefSQClass<ScriptAccounting, ST_AI> SQAIAccounting("AIAccounting"); - SQAIAccounting.PreRegister(engine); - SQAIAccounting.AddConstructor<void (ScriptAccounting::*)(), 1>(engine, "x"); - - SQAIAccounting.DefSQMethod(engine, &ScriptAccounting::GetCosts, "GetCosts", 1, "x"); - SQAIAccounting.DefSQMethod(engine, &ScriptAccounting::ResetCosts, "ResetCosts", 1, "x"); - - SQAIAccounting.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_airport.hpp.sq b/src/script/api/ai/ai_airport.hpp.sq deleted file mode 100644 index 2d7daeef7..000000000 --- a/src/script/api/ai/ai_airport.hpp.sq +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_airport.hpp" -#include "../template/template_airport.hpp.sq" - - -template <> const char *GetClassName<ScriptAirport, ST_AI>() { return "AIAirport"; } - -void SQAIAirport_Register(Squirrel *engine) -{ - DefSQClass<ScriptAirport, ST_AI> SQAIAirport("AIAirport"); - SQAIAirport.PreRegister(engine); - SQAIAirport.AddConstructor<void (ScriptAirport::*)(), 1>(engine, "x"); - - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_SMALL, "AT_SMALL"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_LARGE, "AT_LARGE"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_METROPOLITAN, "AT_METROPOLITAN"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INTERNATIONAL, "AT_INTERNATIONAL"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_COMMUTER, "AT_COMMUTER"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INTERCON, "AT_INTERCON"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELIPORT, "AT_HELIPORT"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELISTATION, "AT_HELISTATION"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELIDEPOT, "AT_HELIDEPOT"); - SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INVALID, "AT_INVALID"); - SQAIAirport.DefSQConst(engine, ScriptAirport::PT_HELICOPTER, "PT_HELICOPTER"); - SQAIAirport.DefSQConst(engine, ScriptAirport::PT_SMALL_PLANE, "PT_SMALL_PLANE"); - SQAIAirport.DefSQConst(engine, ScriptAirport::PT_BIG_PLANE, "PT_BIG_PLANE"); - SQAIAirport.DefSQConst(engine, ScriptAirport::PT_INVALID, "PT_INVALID"); - - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsValidAirportType, "IsValidAirportType", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetPrice, "GetPrice", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsHangarTile, "IsHangarTile", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportTile, "IsAirportTile", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportWidth, "GetAirportWidth", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportHeight, "GetAirportHeight", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNumHangars, "GetNumHangars", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::BuildAirport, "BuildAirport", 4, ".iii"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::RemoveAirport, "RemoveAirport", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportType, "GetAirportType", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i"); - - SQAIAirport.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_base.hpp.sq b/src/script/api/ai/ai_base.hpp.sq deleted file mode 100644 index a03566b4e..000000000 --- a/src/script/api/ai/ai_base.hpp.sq +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_base.hpp" -#include "../template/template_base.hpp.sq" - - -template <> const char *GetClassName<ScriptBase, ST_AI>() { return "AIBase"; } - -void SQAIBase_Register(Squirrel *engine) -{ - DefSQClass<ScriptBase, ST_AI> SQAIBase("AIBase"); - SQAIBase.PreRegister(engine); - SQAIBase.AddConstructor<void (ScriptBase::*)(), 1>(engine, "x"); - - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::Rand, "Rand", 1, "."); - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandItem, "RandItem", 2, ".i"); - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandRange, "RandRange", 2, ".i"); - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandRangeItem, "RandRangeItem", 3, ".ii"); - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::Chance, "Chance", 3, ".ii"); - SQAIBase.DefSQStaticMethod(engine, &ScriptBase::ChanceItem, "ChanceItem", 4, ".iii"); - - SQAIBase.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_basestation.hpp.sq b/src/script/api/ai/ai_basestation.hpp.sq deleted file mode 100644 index 13a351b8e..000000000 --- a/src/script/api/ai/ai_basestation.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_basestation.hpp" -#include "../template/template_basestation.hpp.sq" - - -template <> const char *GetClassName<ScriptBaseStation, ST_AI>() { return "AIBaseStation"; } - -void SQAIBaseStation_Register(Squirrel *engine) -{ - DefSQClass<ScriptBaseStation, ST_AI> SQAIBaseStation("AIBaseStation"); - SQAIBaseStation.PreRegister(engine); - SQAIBaseStation.AddConstructor<void (ScriptBaseStation::*)(), 1>(engine, "x"); - - SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_NEW, "STATION_NEW"); - SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT"); - SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_INVALID, "STATION_INVALID"); - - SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i"); - SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetName, "GetName", 2, ".i"); - SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::SetName, "SetName", 3, ".i."); - SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetLocation, "GetLocation", 2, ".i"); - SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i"); - - SQAIBaseStation.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_bridge.hpp.sq b/src/script/api/ai/ai_bridge.hpp.sq deleted file mode 100644 index 0d026673f..000000000 --- a/src/script/api/ai/ai_bridge.hpp.sq +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridge.hpp" -#include "../template/template_bridge.hpp.sq" - - -template <> const char *GetClassName<ScriptBridge, ST_AI>() { return "AIBridge"; } - -void SQAIBridge_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridge, ST_AI> SQAIBridge("AIBridge"); - SQAIBridge.PreRegister(engine); - SQAIBridge.AddConstructor<void (ScriptBridge::*)(), 1>(engine, "x"); - - SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_BASE, "ERR_BRIDGE_BASE"); - SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE"); - SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER"); - SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT"); - - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER); - ScriptError::RegisterErrorMap(STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT); - - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE"); - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER"); - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT"); - - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::BuildBridge, "BuildBridge", 5, ".iiii"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::RemoveBridge, "RemoveBridge", 2, ".i"); - SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i"); - - SQAIBridge.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_bridgelist.hpp.sq b/src/script/api/ai/ai_bridgelist.hpp.sq deleted file mode 100644 index 35d33f544..000000000 --- a/src/script/api/ai/ai_bridgelist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridgelist.hpp" -#include "../template/template_bridgelist.hpp.sq" - - -template <> const char *GetClassName<ScriptBridgeList, ST_AI>() { return "AIBridgeList"; } - -void SQAIBridgeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridgeList, ST_AI> SQAIBridgeList("AIBridgeList"); - SQAIBridgeList.PreRegister(engine, "AIList"); - SQAIBridgeList.AddConstructor<void (ScriptBridgeList::*)(), 1>(engine, "x"); - - SQAIBridgeList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptBridgeList_Length, ST_AI>() { return "AIBridgeList_Length"; } - -void SQAIBridgeList_Length_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridgeList_Length, ST_AI> SQAIBridgeList_Length("AIBridgeList_Length"); - SQAIBridgeList_Length.PreRegister(engine, "AIList"); - SQAIBridgeList_Length.AddConstructor<void (ScriptBridgeList_Length::*)(uint length), 2>(engine, "xi"); - - SQAIBridgeList_Length.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_cargo.hpp.sq b/src/script/api/ai/ai_cargo.hpp.sq deleted file mode 100644 index 119328e41..000000000 --- a/src/script/api/ai/ai_cargo.hpp.sq +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargo.hpp" -#include "../template/template_cargo.hpp.sq" - - -template <> const char *GetClassName<ScriptCargo, ST_AI>() { return "AICargo"; } - -void SQAICargo_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargo, ST_AI> SQAICargo("AICargo"); - SQAICargo.PreRegister(engine); - SQAICargo.AddConstructor<void (ScriptCargo::*)(), 1>(engine, "x"); - - SQAICargo.DefSQConst(engine, ScriptCargo::CC_PASSENGERS, "CC_PASSENGERS"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_MAIL, "CC_MAIL"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_EXPRESS, "CC_EXPRESS"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_ARMOURED, "CC_ARMOURED"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_BULK, "CC_BULK"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_PIECE_GOODS, "CC_PIECE_GOODS"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_LIQUID, "CC_LIQUID"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_REFRIGERATED, "CC_REFRIGERATED"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_HAZARDOUS, "CC_HAZARDOUS"); - SQAICargo.DefSQConst(engine, ScriptCargo::CC_COVERED, "CC_COVERED"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_NONE, "TE_NONE"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_PASSENGERS, "TE_PASSENGERS"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_MAIL, "TE_MAIL"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_GOODS, "TE_GOODS"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_WATER, "TE_WATER"); - SQAICargo.DefSQConst(engine, ScriptCargo::TE_FOOD, "TE_FOOD"); - SQAICargo.DefSQConst(engine, ScriptCargo::CT_AUTO_REFIT, "CT_AUTO_REFIT"); - SQAICargo.DefSQConst(engine, ScriptCargo::CT_NO_REFIT, "CT_NO_REFIT"); - SQAICargo.DefSQConst(engine, ScriptCargo::DT_MANUAL, "DT_MANUAL"); - SQAICargo.DefSQConst(engine, ScriptCargo::DT_ASYMMETRIC, "DT_ASYMMETRIC"); - SQAICargo.DefSQConst(engine, ScriptCargo::DT_SYMMETRIC, "DT_SYMMETRIC"); - SQAICargo.DefSQConst(engine, ScriptCargo::INVALID_DISTRIBUTION_TYPE, "INVALID_DISTRIBUTION_TYPE"); - - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidCargo, "IsValidCargo", 2, ".i"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidTownEffect, "IsValidTownEffect", 2, ".i"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoLabel, "GetCargoLabel", 2, ".i"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsFreight, "IsFreight", 2, ".i"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::HasCargoClass, "HasCargoClass", 3, ".ii"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetTownEffect, "GetTownEffect", 2, ".i"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoIncome, "GetCargoIncome", 4, ".iii"); - SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetDistributionType, "GetDistributionType", 2, ".i"); - - SQAICargo.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_cargolist.hpp.sq b/src/script/api/ai/ai_cargolist.hpp.sq deleted file mode 100644 index d1c1b0b98..000000000 --- a/src/script/api/ai/ai_cargolist.hpp.sq +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargolist.hpp" -#include "../template/template_cargolist.hpp.sq" - - -template <> const char *GetClassName<ScriptCargoList, ST_AI>() { return "AICargoList"; } - -void SQAICargoList_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList, ST_AI> SQAICargoList("AICargoList"); - SQAICargoList.PreRegister(engine, "AIList"); - SQAICargoList.AddConstructor<void (ScriptCargoList::*)(), 1>(engine, "x"); - - SQAICargoList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_IndustryAccepting, ST_AI>() { return "AICargoList_IndustryAccepting"; } - -void SQAICargoList_IndustryAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_IndustryAccepting, ST_AI> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting"); - SQAICargoList_IndustryAccepting.PreRegister(engine, "AIList"); - SQAICargoList_IndustryAccepting.AddConstructor<void (ScriptCargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi"); - - SQAICargoList_IndustryAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_IndustryProducing, ST_AI>() { return "AICargoList_IndustryProducing"; } - -void SQAICargoList_IndustryProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_IndustryProducing, ST_AI> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing"); - SQAICargoList_IndustryProducing.PreRegister(engine, "AIList"); - SQAICargoList_IndustryProducing.AddConstructor<void (ScriptCargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi"); - - SQAICargoList_IndustryProducing.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_StationAccepting, ST_AI>() { return "AICargoList_StationAccepting"; } - -void SQAICargoList_StationAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_StationAccepting, ST_AI> SQAICargoList_StationAccepting("AICargoList_StationAccepting"); - SQAICargoList_StationAccepting.PreRegister(engine, "AIList"); - SQAICargoList_StationAccepting.AddConstructor<void (ScriptCargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi"); - - SQAICargoList_StationAccepting.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_company.hpp.sq b/src/script/api/ai/ai_company.hpp.sq deleted file mode 100644 index 156b6fcb7..000000000 --- a/src/script/api/ai/ai_company.hpp.sq +++ /dev/null @@ -1,107 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_company.hpp" -#include "../template/template_company.hpp.sq" - - -template <> const char *GetClassName<ScriptCompany, ST_AI>() { return "AICompany"; } - -void SQAICompany_Register(Squirrel *engine) -{ - DefSQClass<ScriptCompany, ST_AI> SQAICompany("AICompany"); - SQAICompany.PreRegister(engine); - SQAICompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x"); - - SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER"); - SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF"); - SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE"); - SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_DEFAULT, "LS_DEFAULT"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_STEAM, "LS_STEAM"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_DIESEL, "LS_DIESEL"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_ELECTRIC, "LS_ELECTRIC"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_MONORAIL, "LS_MONORAIL"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_MAGLEV, "LS_MAGLEV"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_DMU, "LS_DMU"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_EMU, "LS_EMU"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_STEAM, "LS_PASSENGER_WAGON_STEAM"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_DIESEL, "LS_PASSENGER_WAGON_DIESEL"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_ELECTRIC, "LS_PASSENGER_WAGON_ELECTRIC"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MONORAIL, "LS_PASSENGER_WAGON_MONORAIL"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MAGLEV, "LS_PASSENGER_WAGON_MAGLEV"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_WAGON, "LS_FREIGHT_WAGON"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_BUS, "LS_BUS"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_TRUCK, "LS_TRUCK"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_SHIP, "LS_PASSENGER_SHIP"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_SHIP, "LS_FREIGHT_SHIP"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_HELICOPTER, "LS_HELICOPTER"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_SMALL_PLANE, "LS_SMALL_PLANE"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_LARGE_PLANE, "LS_LARGE_PLANE"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_TRAM, "LS_PASSENGER_TRAM"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_TRAM, "LS_FREIGHT_TRAM"); - SQAICompany.DefSQConst(engine, ScriptCompany::LS_INVALID, "LS_INVALID"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_BLUE, "COLOUR_DARK_BLUE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PALE_GREEN, "COLOUR_PALE_GREEN"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PINK, "COLOUR_PINK"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_YELLOW, "COLOUR_YELLOW"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_RED, "COLOUR_RED"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_LIGHT_BLUE, "COLOUR_LIGHT_BLUE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREEN, "COLOUR_GREEN"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_GREEN, "COLOUR_DARK_GREEN"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BLUE, "COLOUR_BLUE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_CREAM, "COLOUR_CREAM"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_MAUVE, "COLOUR_MAUVE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PURPLE, "COLOUR_PURPLE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_ORANGE, "COLOUR_ORANGE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BROWN, "COLOUR_BROWN"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREY, "COLOUR_GREY"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_WHITE, "COLOUR_WHITE"); - SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_INVALID, "COLOUR_INVALID"); - - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::IsMine, "IsMine", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetName, "SetName", 2, ".."); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetName, "GetName", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentName, "SetPresidentName", 2, ".."); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentName, "GetPresidentName", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentGender, "SetPresidentGender", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentGender, "GetPresidentGender", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetLoanAmount, "SetLoanAmount", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanAmount, "GetLoanAmount", 1, "."); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, "."); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanInterval, "GetLoanInterval", 1, "."); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetBankBalance, "GetBankBalance", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewStatus, "SetAutoRenewStatus", 2, ".b"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewMonths, "SetAutoRenewMonths", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewMoney, "SetAutoRenewMoney", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPrimaryLiveryColour, "SetPrimaryLiveryColour", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetSecondaryLiveryColour, "SetSecondaryLiveryColour", 3, ".ii"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPrimaryLiveryColour, "GetPrimaryLiveryColour", 2, ".i"); - SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetSecondaryLiveryColour, "GetSecondaryLiveryColour", 2, ".i"); - - SQAICompany.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_date.hpp.sq b/src/script/api/ai/ai_date.hpp.sq deleted file mode 100644 index 2f98a2918..000000000 --- a/src/script/api/ai/ai_date.hpp.sq +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_date.hpp" -#include "../template/template_date.hpp.sq" - - -template <> const char *GetClassName<ScriptDate, ST_AI>() { return "AIDate"; } - -void SQAIDate_Register(Squirrel *engine) -{ - DefSQClass<ScriptDate, ST_AI> SQAIDate("AIDate"); - SQAIDate.PreRegister(engine); - SQAIDate.AddConstructor<void (ScriptDate::*)(), 1>(engine, "x"); - - SQAIDate.DefSQConst(engine, ScriptDate::DATE_INVALID, "DATE_INVALID"); - - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::IsValidDate, "IsValidDate", 2, ".i"); - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetCurrentDate, "GetCurrentDate", 1, "."); - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetYear, "GetYear", 2, ".i"); - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetMonth, "GetMonth", 2, ".i"); - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetDayOfMonth, "GetDayOfMonth", 2, ".i"); - SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetDate, "GetDate", 4, ".iii"); - - SQAIDate.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_depotlist.hpp.sq b/src/script/api/ai/ai_depotlist.hpp.sq deleted file mode 100644 index 72668a4d7..000000000 --- a/src/script/api/ai/ai_depotlist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_depotlist.hpp" -#include "../template/template_depotlist.hpp.sq" - - -template <> const char *GetClassName<ScriptDepotList, ST_AI>() { return "AIDepotList"; } - -void SQAIDepotList_Register(Squirrel *engine) -{ - DefSQClass<ScriptDepotList, ST_AI> SQAIDepotList("AIDepotList"); - SQAIDepotList.PreRegister(engine, "AIList"); - SQAIDepotList.AddConstructor<void (ScriptDepotList::*)(ScriptTile::TransportType transport_type), 2>(engine, "xi"); - - SQAIDepotList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_engine.hpp.sq b/src/script/api/ai/ai_engine.hpp.sq deleted file mode 100644 index fa49f919d..000000000 --- a/src/script/api/ai/ai_engine.hpp.sq +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_engine.hpp" -#include "../template/template_engine.hpp.sq" - - -template <> const char *GetClassName<ScriptEngine, ST_AI>() { return "AIEngine"; } - -void SQAIEngine_Register(Squirrel *engine) -{ - DefSQClass<ScriptEngine, ST_AI> SQAIEngine("AIEngine"); - SQAIEngine.PreRegister(engine); - SQAIEngine.AddConstructor<void (ScriptEngine::*)(), 1>(engine, "x"); - - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsValidEngine, "IsValidEngine", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsBuildable, "IsBuildable", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetName, "GetName", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCargoType, "GetCargoType", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanPullCargo, "CanPullCargo", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCapacity, "GetCapacity", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetReliability, "GetReliability", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPrice, "GetPrice", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxAge, "GetMaxAge", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRunningCost, "GetRunningCost", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPower, "GetPower", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetWeight, "GetWeight", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetDesignDate, "GetDesignDate", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetVehicleType, "GetVehicleType", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsWagon, "IsWagon", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRail, "HasPowerOnRail", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRoad, "CanRunOnRoad", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRoad, "HasPowerOnRoad", 3, ".ii"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRoadType, "GetRoadType", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRailType, "GetRailType", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsArticulated, "IsArticulated", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPlaneType, "GetPlaneType", 2, ".i"); - SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i"); - - SQAIEngine.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_enginelist.hpp.sq b/src/script/api/ai/ai_enginelist.hpp.sq deleted file mode 100644 index 1c1c4cfed..000000000 --- a/src/script/api/ai/ai_enginelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_enginelist.hpp" -#include "../template/template_enginelist.hpp.sq" - - -template <> const char *GetClassName<ScriptEngineList, ST_AI>() { return "AIEngineList"; } - -void SQAIEngineList_Register(Squirrel *engine) -{ - DefSQClass<ScriptEngineList, ST_AI> SQAIEngineList("AIEngineList"); - SQAIEngineList.PreRegister(engine, "AIList"); - SQAIEngineList.AddConstructor<void (ScriptEngineList::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi"); - - SQAIEngineList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_error.hpp.sq b/src/script/api/ai/ai_error.hpp.sq deleted file mode 100644 index 792a21f1d..000000000 --- a/src/script/api/ai/ai_error.hpp.sq +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_error.hpp" -#include "../template/template_error.hpp.sq" - - -template <> const char *GetClassName<ScriptError, ST_AI>() { return "AIError"; } - -void SQAIError_Register(Squirrel *engine) -{ - DefSQClass<ScriptError, ST_AI> SQAIError("AIError"); - SQAIError.PreRegister(engine); - SQAIError.AddConstructor<void (ScriptError::*)(), 1>(engine, "x"); - - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_NONE, "ERR_CAT_NONE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_GENERAL, "ERR_CAT_GENERAL"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_VEHICLE, "ERR_CAT_VEHICLE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_STATION, "ERR_CAT_STATION"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_BRIDGE, "ERR_CAT_BRIDGE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_TUNNEL, "ERR_CAT_TUNNEL"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_TILE, "ERR_CAT_TILE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_SIGN, "ERR_CAT_SIGN"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_RAIL, "ERR_CAT_RAIL"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_ROAD, "ERR_CAT_ROAD"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_ORDER, "ERR_CAT_ORDER"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_MARINE, "ERR_CAT_MARINE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_WAYPOINT, "ERR_CAT_WAYPOINT"); - SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_BIT_SIZE, "ERR_CAT_BIT_SIZE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_NONE, "ERR_NONE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN"); - SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED"); - SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG"); - SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS"); - SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY"); - SQAIError.DefSQConst(engine, ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR"); - SQAIError.DefSQConst(engine, ScriptError::ERR_GENERAL_BASE, "ERR_GENERAL_BASE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH"); - SQAIError.DefSQConst(engine, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES"); - SQAIError.DefSQConst(engine, ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT"); - SQAIError.DefSQConst(engine, ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR"); - SQAIError.DefSQConst(engine, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY"); - SQAIError.DefSQConst(engine, ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED"); - SQAIError.DefSQConst(engine, ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG"); - SQAIError.DefSQConst(engine, ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY"); - SQAIError.DefSQConst(engine, ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE"); - SQAIError.DefSQConst(engine, ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT"); - - ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_BUOY_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_COMPANY_HEADQUARTERS_IN, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_ROAD_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_AREA_IS_OWNED_BY_ANOTHER, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY); - ScriptError::RegisterErrorMap(STR_ERROR_OWNED_BY, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY); - ScriptError::RegisterErrorMap(STR_ERROR_NAME_MUST_BE_UNIQUE, ScriptError::ERR_NAME_IS_NOT_UNIQUE); - ScriptError::RegisterErrorMap(STR_ERROR_FLAT_LAND_REQUIRED, ScriptError::ERR_FLAT_LAND_REQUIRED); - ScriptError::RegisterErrorMap(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION, ScriptError::ERR_LAND_SLOPED_WRONG); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE); - ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT); - - ScriptError::RegisterErrorMapString(ScriptError::ERR_NONE, "ERR_NONE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT"); - - SQAIError.DefSQStaticMethod(engine, &ScriptError::GetErrorCategory, "GetErrorCategory", 1, "."); - SQAIError.DefSQStaticMethod(engine, &ScriptError::GetLastError, "GetLastError", 1, "."); - SQAIError.DefSQStaticMethod(engine, &ScriptError::GetLastErrorString, "GetLastErrorString", 1, "."); - - SQAIError.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq deleted file mode 100644 index 1290008c7..000000000 --- a/src/script/api/ai/ai_event.hpp.sq +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event.hpp" -#include "../template/template_event.hpp.sq" - - -template <> const char *GetClassName<ScriptEvent, ST_AI>() { return "AIEvent"; } - -void SQAIEvent_Register(Squirrel *engine) -{ - DefSQClass<ScriptEvent, ST_AI> SQAIEvent("AIEvent"); - SQAIEvent.PreRegister(engine); - SQAIEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi"); - - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INVALID, "ET_INVALID"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TEST, "ET_TEST"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER, "ET_SUBSIDY_OFFER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED, "ET_SUBSIDY_OFFER_EXPIRED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED, "ET_SUBSIDY_AWARDED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED, "ET_SUBSIDY_EXPIRED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW, "ET_ENGINE_PREVIEW"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW, "ET_COMPANY_NEW"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE, "ET_COMPANY_IN_TROUBLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER, "ET_COMPANY_ASK_MERGER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER, "ET_COMPANY_MERGER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT, "ET_COMPANY_BANKRUPT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED, "ET_VEHICLE_CRASHED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST, "ET_VEHICLE_LOST"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT, "ET_VEHICLE_WAITING_IN_DEPOT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE, "ET_VEHICLE_UNPROFITABLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN, "ET_INDUSTRY_OPEN"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE, "ET_INDUSTRY_CLOSE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE, "ET_ENGINE_AVAILABLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE, "ET_STATION_FIRST_VEHICLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED, "ET_TOWN_FOUNDED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_AIRCRAFT_DEST_TOO_FAR, "ET_AIRCRAFT_DEST_TOO_FAR"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT, "ET_ADMIN_PORT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_AUTOREPLACED, "ET_VEHICLE_AUTOREPLACED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_BUTTON_CLICK, "ET_STORYPAGE_BUTTON_CLICK"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_TILE_SELECT, "ET_STORYPAGE_TILE_SELECT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_VEHICLE_SELECT, "ET_STORYPAGE_VEHICLE_SELECT"); - - SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x"); - - SQAIEvent.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventController, ST_AI>() { return "AIEventController"; } - -void SQAIEventController_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventController, ST_AI> SQAIEventController("AIEventController"); - SQAIEventController.PreRegister(engine); - SQAIEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x"); - - SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, "."); - SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent, "GetNextEvent", 1, "."); - - SQAIEventController.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq deleted file mode 100644 index 21d0b663a..000000000 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ /dev/null @@ -1,421 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event_types.hpp" -#include "../template/template_event_types.hpp.sq" - - -template <> const char *GetClassName<ScriptEventVehicleCrashed, ST_AI>() { return "AIEventVehicleCrashed"; } - -void SQAIEventVehicleCrashed_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleCrashed, ST_AI> SQAIEventVehicleCrashed("AIEventVehicleCrashed"); - SQAIEventVehicleCrashed.PreRegister(engine, "AIEvent"); - - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_TRAIN, "CRASH_TRAIN"); - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING, "CRASH_RV_LEVEL_CROSSING"); - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_UFO, "CRASH_RV_UFO"); - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, "CRASH_PLANE_LANDING"); - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT, "CRASH_AIRCRAFT_NO_AIRPORT"); - SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_FLOODED, "CRASH_FLOODED"); - - SQAIEventVehicleCrashed.DefSQStaticMethod(engine, &ScriptEventVehicleCrashed::Convert, "Convert", 2, ".x"); - - SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetVehicleID, "GetVehicleID", 1, "x"); - SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashSite, "GetCrashSite", 1, "x"); - SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashReason, "GetCrashReason", 1, "x"); - - SQAIEventVehicleCrashed.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyOffer, ST_AI>() { return "AIEventSubsidyOffer"; } - -void SQAIEventSubsidyOffer_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyOffer, ST_AI> SQAIEventSubsidyOffer("AIEventSubsidyOffer"); - SQAIEventSubsidyOffer.PreRegister(engine, "AIEvent"); - - SQAIEventSubsidyOffer.DefSQStaticMethod(engine, &ScriptEventSubsidyOffer::Convert, "Convert", 2, ".x"); - - SQAIEventSubsidyOffer.DefSQMethod(engine, &ScriptEventSubsidyOffer::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQAIEventSubsidyOffer.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyOfferExpired, ST_AI>() { return "AIEventSubsidyOfferExpired"; } - -void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyOfferExpired, ST_AI> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired"); - SQAIEventSubsidyOfferExpired.PreRegister(engine, "AIEvent"); - - SQAIEventSubsidyOfferExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyOfferExpired::Convert, "Convert", 2, ".x"); - - SQAIEventSubsidyOfferExpired.DefSQMethod(engine, &ScriptEventSubsidyOfferExpired::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQAIEventSubsidyOfferExpired.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyAwarded, ST_AI>() { return "AIEventSubsidyAwarded"; } - -void SQAIEventSubsidyAwarded_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyAwarded, ST_AI> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded"); - SQAIEventSubsidyAwarded.PreRegister(engine, "AIEvent"); - - SQAIEventSubsidyAwarded.DefSQStaticMethod(engine, &ScriptEventSubsidyAwarded::Convert, "Convert", 2, ".x"); - - SQAIEventSubsidyAwarded.DefSQMethod(engine, &ScriptEventSubsidyAwarded::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQAIEventSubsidyAwarded.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyExpired, ST_AI>() { return "AIEventSubsidyExpired"; } - -void SQAIEventSubsidyExpired_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyExpired, ST_AI> SQAIEventSubsidyExpired("AIEventSubsidyExpired"); - SQAIEventSubsidyExpired.PreRegister(engine, "AIEvent"); - - SQAIEventSubsidyExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyExpired::Convert, "Convert", 2, ".x"); - - SQAIEventSubsidyExpired.DefSQMethod(engine, &ScriptEventSubsidyExpired::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQAIEventSubsidyExpired.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventEnginePreview, ST_AI>() { return "AIEventEnginePreview"; } - -void SQAIEventEnginePreview_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventEnginePreview, ST_AI> SQAIEventEnginePreview("AIEventEnginePreview"); - SQAIEventEnginePreview.PreRegister(engine, "AIEvent"); - - SQAIEventEnginePreview.DefSQStaticMethod(engine, &ScriptEventEnginePreview::Convert, "Convert", 2, ".x"); - - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetName, "GetName", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetCargoType, "GetCargoType", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetCapacity, "GetCapacity", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetMaxSpeed, "GetMaxSpeed", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetPrice, "GetPrice", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetRunningCost, "GetRunningCost", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetVehicleType, "GetVehicleType", 1, "x"); - SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::AcceptPreview, "AcceptPreview", 1, "x"); - - SQAIEventEnginePreview.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyNew, ST_AI>() { return "AIEventCompanyNew"; } - -void SQAIEventCompanyNew_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyNew, ST_AI> SQAIEventCompanyNew("AIEventCompanyNew"); - SQAIEventCompanyNew.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyNew.DefSQStaticMethod(engine, &ScriptEventCompanyNew::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyNew.DefSQMethod(engine, &ScriptEventCompanyNew::GetCompanyID, "GetCompanyID", 1, "x"); - - SQAIEventCompanyNew.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyInTrouble, ST_AI>() { return "AIEventCompanyInTrouble"; } - -void SQAIEventCompanyInTrouble_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyInTrouble, ST_AI> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble"); - SQAIEventCompanyInTrouble.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyInTrouble.DefSQStaticMethod(engine, &ScriptEventCompanyInTrouble::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyInTrouble.DefSQMethod(engine, &ScriptEventCompanyInTrouble::GetCompanyID, "GetCompanyID", 1, "x"); - - SQAIEventCompanyInTrouble.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyAskMerger, ST_AI>() { return "AIEventCompanyAskMerger"; } - -void SQAIEventCompanyAskMerger_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyAskMerger, ST_AI> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger"); - SQAIEventCompanyAskMerger.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyAskMerger.DefSQStaticMethod(engine, &ScriptEventCompanyAskMerger::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::GetCompanyID, "GetCompanyID", 1, "x"); - SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::GetValue, "GetValue", 1, "x"); - SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::AcceptMerger, "AcceptMerger", 1, "x"); - - SQAIEventCompanyAskMerger.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyMerger, ST_AI>() { return "AIEventCompanyMerger"; } - -void SQAIEventCompanyMerger_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyMerger, ST_AI> SQAIEventCompanyMerger("AIEventCompanyMerger"); - SQAIEventCompanyMerger.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyMerger.DefSQStaticMethod(engine, &ScriptEventCompanyMerger::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetOldCompanyID, "GetOldCompanyID", 1, "x"); - SQAIEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetNewCompanyID, "GetNewCompanyID", 1, "x"); - - SQAIEventCompanyMerger.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyBankrupt, ST_AI>() { return "AIEventCompanyBankrupt"; } - -void SQAIEventCompanyBankrupt_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyBankrupt, ST_AI> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt"); - SQAIEventCompanyBankrupt.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyBankrupt.DefSQStaticMethod(engine, &ScriptEventCompanyBankrupt::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyBankrupt.DefSQMethod(engine, &ScriptEventCompanyBankrupt::GetCompanyID, "GetCompanyID", 1, "x"); - - SQAIEventCompanyBankrupt.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventVehicleLost, ST_AI>() { return "AIEventVehicleLost"; } - -void SQAIEventVehicleLost_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleLost, ST_AI> SQAIEventVehicleLost("AIEventVehicleLost"); - SQAIEventVehicleLost.PreRegister(engine, "AIEvent"); - - SQAIEventVehicleLost.DefSQStaticMethod(engine, &ScriptEventVehicleLost::Convert, "Convert", 2, ".x"); - - SQAIEventVehicleLost.DefSQMethod(engine, &ScriptEventVehicleLost::GetVehicleID, "GetVehicleID", 1, "x"); - - SQAIEventVehicleLost.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventVehicleWaitingInDepot, ST_AI>() { return "AIEventVehicleWaitingInDepot"; } - -void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleWaitingInDepot, ST_AI> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot"); - SQAIEventVehicleWaitingInDepot.PreRegister(engine, "AIEvent"); - - SQAIEventVehicleWaitingInDepot.DefSQStaticMethod(engine, &ScriptEventVehicleWaitingInDepot::Convert, "Convert", 2, ".x"); - - SQAIEventVehicleWaitingInDepot.DefSQMethod(engine, &ScriptEventVehicleWaitingInDepot::GetVehicleID, "GetVehicleID", 1, "x"); - - SQAIEventVehicleWaitingInDepot.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventVehicleUnprofitable, ST_AI>() { return "AIEventVehicleUnprofitable"; } - -void SQAIEventVehicleUnprofitable_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleUnprofitable, ST_AI> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable"); - SQAIEventVehicleUnprofitable.PreRegister(engine, "AIEvent"); - - SQAIEventVehicleUnprofitable.DefSQStaticMethod(engine, &ScriptEventVehicleUnprofitable::Convert, "Convert", 2, ".x"); - - SQAIEventVehicleUnprofitable.DefSQMethod(engine, &ScriptEventVehicleUnprofitable::GetVehicleID, "GetVehicleID", 1, "x"); - - SQAIEventVehicleUnprofitable.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventIndustryOpen, ST_AI>() { return "AIEventIndustryOpen"; } - -void SQAIEventIndustryOpen_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventIndustryOpen, ST_AI> SQAIEventIndustryOpen("AIEventIndustryOpen"); - SQAIEventIndustryOpen.PreRegister(engine, "AIEvent"); - - SQAIEventIndustryOpen.DefSQStaticMethod(engine, &ScriptEventIndustryOpen::Convert, "Convert", 2, ".x"); - - SQAIEventIndustryOpen.DefSQMethod(engine, &ScriptEventIndustryOpen::GetIndustryID, "GetIndustryID", 1, "x"); - - SQAIEventIndustryOpen.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventIndustryClose, ST_AI>() { return "AIEventIndustryClose"; } - -void SQAIEventIndustryClose_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventIndustryClose, ST_AI> SQAIEventIndustryClose("AIEventIndustryClose"); - SQAIEventIndustryClose.PreRegister(engine, "AIEvent"); - - SQAIEventIndustryClose.DefSQStaticMethod(engine, &ScriptEventIndustryClose::Convert, "Convert", 2, ".x"); - - SQAIEventIndustryClose.DefSQMethod(engine, &ScriptEventIndustryClose::GetIndustryID, "GetIndustryID", 1, "x"); - - SQAIEventIndustryClose.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventEngineAvailable, ST_AI>() { return "AIEventEngineAvailable"; } - -void SQAIEventEngineAvailable_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventEngineAvailable, ST_AI> SQAIEventEngineAvailable("AIEventEngineAvailable"); - SQAIEventEngineAvailable.PreRegister(engine, "AIEvent"); - - SQAIEventEngineAvailable.DefSQStaticMethod(engine, &ScriptEventEngineAvailable::Convert, "Convert", 2, ".x"); - - SQAIEventEngineAvailable.DefSQMethod(engine, &ScriptEventEngineAvailable::GetEngineID, "GetEngineID", 1, "x"); - - SQAIEventEngineAvailable.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventStationFirstVehicle, ST_AI>() { return "AIEventStationFirstVehicle"; } - -void SQAIEventStationFirstVehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventStationFirstVehicle, ST_AI> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle"); - SQAIEventStationFirstVehicle.PreRegister(engine, "AIEvent"); - - SQAIEventStationFirstVehicle.DefSQStaticMethod(engine, &ScriptEventStationFirstVehicle::Convert, "Convert", 2, ".x"); - - SQAIEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetStationID, "GetStationID", 1, "x"); - SQAIEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetVehicleID, "GetVehicleID", 1, "x"); - - SQAIEventStationFirstVehicle.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventDisasterZeppelinerCrashed, ST_AI>() { return "AIEventDisasterZeppelinerCrashed"; } - -void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventDisasterZeppelinerCrashed, ST_AI> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed"); - SQAIEventDisasterZeppelinerCrashed.PreRegister(engine, "AIEvent"); - - SQAIEventDisasterZeppelinerCrashed.DefSQStaticMethod(engine, &ScriptEventDisasterZeppelinerCrashed::Convert, "Convert", 2, ".x"); - - SQAIEventDisasterZeppelinerCrashed.DefSQMethod(engine, &ScriptEventDisasterZeppelinerCrashed::GetStationID, "GetStationID", 1, "x"); - - SQAIEventDisasterZeppelinerCrashed.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventDisasterZeppelinerCleared, ST_AI>() { return "AIEventDisasterZeppelinerCleared"; } - -void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventDisasterZeppelinerCleared, ST_AI> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared"); - SQAIEventDisasterZeppelinerCleared.PreRegister(engine, "AIEvent"); - - SQAIEventDisasterZeppelinerCleared.DefSQStaticMethod(engine, &ScriptEventDisasterZeppelinerCleared::Convert, "Convert", 2, ".x"); - - SQAIEventDisasterZeppelinerCleared.DefSQMethod(engine, &ScriptEventDisasterZeppelinerCleared::GetStationID, "GetStationID", 1, "x"); - - SQAIEventDisasterZeppelinerCleared.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventTownFounded, ST_AI>() { return "AIEventTownFounded"; } - -void SQAIEventTownFounded_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventTownFounded, ST_AI> SQAIEventTownFounded("AIEventTownFounded"); - SQAIEventTownFounded.PreRegister(engine, "AIEvent"); - - SQAIEventTownFounded.DefSQStaticMethod(engine, &ScriptEventTownFounded::Convert, "Convert", 2, ".x"); - - SQAIEventTownFounded.DefSQMethod(engine, &ScriptEventTownFounded::GetTownID, "GetTownID", 1, "x"); - - SQAIEventTownFounded.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventAircraftDestTooFar, ST_AI>() { return "AIEventAircraftDestTooFar"; } - -void SQAIEventAircraftDestTooFar_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventAircraftDestTooFar, ST_AI> SQAIEventAircraftDestTooFar("AIEventAircraftDestTooFar"); - SQAIEventAircraftDestTooFar.PreRegister(engine, "AIEvent"); - - SQAIEventAircraftDestTooFar.DefSQStaticMethod(engine, &ScriptEventAircraftDestTooFar::Convert, "Convert", 2, ".x"); - - SQAIEventAircraftDestTooFar.DefSQMethod(engine, &ScriptEventAircraftDestTooFar::GetVehicleID, "GetVehicleID", 1, "x"); - - SQAIEventAircraftDestTooFar.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyTown, ST_AI>() { return "AIEventCompanyTown"; } - -void SQAIEventCompanyTown_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyTown, ST_AI> SQAIEventCompanyTown("AIEventCompanyTown"); - SQAIEventCompanyTown.PreRegister(engine, "AIEvent"); - - SQAIEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x"); - - SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x"); - SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x"); - - SQAIEventCompanyTown.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_AI>() { return "AIEventExclusiveTransportRights"; } - -void SQAIEventExclusiveTransportRights_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventExclusiveTransportRights, ST_AI> SQAIEventExclusiveTransportRights("AIEventExclusiveTransportRights"); - SQAIEventExclusiveTransportRights.PreRegister(engine, "AIEventCompanyTown"); - SQAIEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii"); - - SQAIEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x"); - - SQAIEventExclusiveTransportRights.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_AI>() { return "AIEventRoadReconstruction"; } - -void SQAIEventRoadReconstruction_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventRoadReconstruction, ST_AI> SQAIEventRoadReconstruction("AIEventRoadReconstruction"); - SQAIEventRoadReconstruction.PreRegister(engine, "AIEventCompanyTown"); - SQAIEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii"); - - SQAIEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x"); - - SQAIEventRoadReconstruction.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventVehicleAutoReplaced, ST_AI>() { return "AIEventVehicleAutoReplaced"; } - -void SQAIEventVehicleAutoReplaced_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleAutoReplaced, ST_AI> SQAIEventVehicleAutoReplaced("AIEventVehicleAutoReplaced"); - SQAIEventVehicleAutoReplaced.PreRegister(engine, "AIEvent"); - - SQAIEventVehicleAutoReplaced.DefSQStaticMethod(engine, &ScriptEventVehicleAutoReplaced::Convert, "Convert", 2, ".x"); - - SQAIEventVehicleAutoReplaced.DefSQMethod(engine, &ScriptEventVehicleAutoReplaced::GetOldVehicleID, "GetOldVehicleID", 1, "x"); - SQAIEventVehicleAutoReplaced.DefSQMethod(engine, &ScriptEventVehicleAutoReplaced::GetNewVehicleID, "GetNewVehicleID", 1, "x"); - - SQAIEventVehicleAutoReplaced.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_execmode.hpp.sq b/src/script/api/ai/ai_execmode.hpp.sq deleted file mode 100644 index fa7d8a2c2..000000000 --- a/src/script/api/ai/ai_execmode.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_execmode.hpp" -#include "../template/template_execmode.hpp.sq" - - -template <> const char *GetClassName<ScriptExecMode, ST_AI>() { return "AIExecMode"; } - -void SQAIExecMode_Register(Squirrel *engine) -{ - DefSQClass<ScriptExecMode, ST_AI> SQAIExecMode("AIExecMode"); - SQAIExecMode.PreRegister(engine); - SQAIExecMode.AddConstructor<void (ScriptExecMode::*)(), 1>(engine, "x"); - - SQAIExecMode.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_gamesettings.hpp.sq b/src/script/api/ai/ai_gamesettings.hpp.sq deleted file mode 100644 index e5ff4ce17..000000000 --- a/src/script/api/ai/ai_gamesettings.hpp.sq +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_gamesettings.hpp" -#include "../template/template_gamesettings.hpp.sq" - - -template <> const char *GetClassName<ScriptGameSettings, ST_AI>() { return "AIGameSettings"; } - -void SQAIGameSettings_Register(Squirrel *engine) -{ - DefSQClass<ScriptGameSettings, ST_AI> SQAIGameSettings("AIGameSettings"); - SQAIGameSettings.PreRegister(engine); - SQAIGameSettings.AddConstructor<void (ScriptGameSettings::*)(), 1>(engine, "x"); - - SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsValid, "IsValid", 2, ".."); - SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::GetValue, "GetValue", 2, ".."); - SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsDisabledVehicleType, "IsDisabledVehicleType", 2, ".i"); - - SQAIGameSettings.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_group.hpp.sq b/src/script/api/ai/ai_group.hpp.sq deleted file mode 100644 index 2a221df62..000000000 --- a/src/script/api/ai/ai_group.hpp.sq +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_group.hpp" -#include "../template/template_group.hpp.sq" - - -template <> const char *GetClassName<ScriptGroup, ST_AI>() { return "AIGroup"; } - -void SQAIGroup_Register(Squirrel *engine) -{ - DefSQClass<ScriptGroup, ST_AI> SQAIGroup("AIGroup"); - SQAIGroup.PreRegister(engine); - SQAIGroup.AddConstructor<void (ScriptGroup::*)(), 1>(engine, "x"); - - SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_ALL, "GROUP_ALL"); - SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_DEFAULT, "GROUP_DEFAULT"); - SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_INVALID, "GROUP_INVALID"); - - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::IsValidGroup, "IsValidGroup", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::CreateGroup, "CreateGroup", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::DeleteGroup, "DeleteGroup", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetVehicleType, "GetVehicleType", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetName, "SetName", 3, ".i."); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetName, "GetName", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetParent, "SetParent", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetParent, "GetParent", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::EnableAutoReplaceProtection, "EnableAutoReplaceProtection", 3, ".ib"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetAutoReplaceProtection, "GetAutoReplaceProtection", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetNumEngines, "GetNumEngines", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::MoveVehicle, "MoveVehicle", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::EnableWagonRemoval, "EnableWagonRemoval", 2, ".b"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::HasWagonRemoval, "HasWagonRemoval", 1, "."); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetAutoReplace, "SetAutoReplace", 4, ".iii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetEngineReplacement, "GetEngineReplacement", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::StopAutoReplace, "StopAutoReplace", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetProfitThisYear, "GetProfitThisYear", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetProfitLastYear, "GetProfitLastYear", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetCurrentUsage, "GetCurrentUsage", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetPrimaryColour, "SetPrimaryColour", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetSecondaryColour, "SetSecondaryColour", 3, ".ii"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetPrimaryColour, "GetPrimaryColour", 2, ".i"); - SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetSecondaryColour, "GetSecondaryColour", 2, ".i"); - - SQAIGroup.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_grouplist.hpp.sq b/src/script/api/ai/ai_grouplist.hpp.sq deleted file mode 100644 index 3977a92c8..000000000 --- a/src/script/api/ai/ai_grouplist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_grouplist.hpp" -#include "../template/template_grouplist.hpp.sq" - - -template <> const char *GetClassName<ScriptGroupList, ST_AI>() { return "AIGroupList"; } - -void SQAIGroupList_Register(Squirrel *engine) -{ - DefSQClass<ScriptGroupList, ST_AI> SQAIGroupList("AIGroupList"); - SQAIGroupList.PreRegister(engine, "AIList"); - SQAIGroupList.AddConstructor<void (ScriptGroupList::*)(), 1>(engine, "x"); - - SQAIGroupList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_industry.hpp.sq b/src/script/api/ai/ai_industry.hpp.sq deleted file mode 100644 index 833c6a9e8..000000000 --- a/src/script/api/ai/ai_industry.hpp.sq +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industry.hpp" -#include "../template/template_industry.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustry, ST_AI>() { return "AIIndustry"; } - -void SQAIIndustry_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustry, ST_AI> SQAIIndustry("AIIndustry"); - SQAIIndustry.PreRegister(engine); - SQAIIndustry.AddConstructor<void (ScriptIndustry::*)(), 1>(engine, "x"); - - SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_NOT_ACCEPTED, "CAS_NOT_ACCEPTED"); - SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_ACCEPTED, "CAS_ACCEPTED"); - SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_TEMP_REFUSED, "CAS_TEMP_REFUSED"); - - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryCount, "GetIndustryCount", 1, "."); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryID, "GetIndustryID", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetName, "GetName", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLocation, "GetLocation", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasHeliport, "HasHeliport", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasDock, "HasDock", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDockLocation, "GetDockLocation", 2, ".i"); - SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryType, "GetIndustryType", 2, ".i"); - - SQAIIndustry.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_industrylist.hpp.sq b/src/script/api/ai/ai_industrylist.hpp.sq deleted file mode 100644 index 11a4696dc..000000000 --- a/src/script/api/ai/ai_industrylist.hpp.sq +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrylist.hpp" -#include "../template/template_industrylist.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryList, ST_AI>() { return "AIIndustryList"; } - -void SQAIIndustryList_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList, ST_AI> SQAIIndustryList("AIIndustryList"); - SQAIIndustryList.PreRegister(engine, "AIList"); - SQAIIndustryList.AddConstructor<void (ScriptIndustryList::*)(), 1>(engine, "x"); - - SQAIIndustryList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptIndustryList_CargoAccepting, ST_AI>() { return "AIIndustryList_CargoAccepting"; } - -void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList_CargoAccepting, ST_AI> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting"); - SQAIIndustryList_CargoAccepting.PreRegister(engine, "AIList"); - SQAIIndustryList_CargoAccepting.AddConstructor<void (ScriptIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi"); - - SQAIIndustryList_CargoAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptIndustryList_CargoProducing, ST_AI>() { return "AIIndustryList_CargoProducing"; } - -void SQAIIndustryList_CargoProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList_CargoProducing, ST_AI> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing"); - SQAIIndustryList_CargoProducing.PreRegister(engine, "AIList"); - SQAIIndustryList_CargoProducing.AddConstructor<void (ScriptIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi"); - - SQAIIndustryList_CargoProducing.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_industrytype.hpp.sq b/src/script/api/ai/ai_industrytype.hpp.sq deleted file mode 100644 index 1d6648d99..000000000 --- a/src/script/api/ai/ai_industrytype.hpp.sq +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytype.hpp" -#include "../template/template_industrytype.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryType, ST_AI>() { return "AIIndustryType"; } - -void SQAIIndustryType_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryType, ST_AI> SQAIIndustryType("AIIndustryType"); - SQAIIndustryType.PreRegister(engine); - SQAIIndustryType.AddConstructor<void (ScriptIndustryType::*)(), 1>(engine, "x"); - - SQAIIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_UNKNOWN, "INDUSTRYTYPE_UNKNOWN"); - SQAIIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_TOWN, "INDUSTRYTYPE_TOWN"); - - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsValidIndustryType, "IsValidIndustryType", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetName, "GetName", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetProducedCargo, "GetProducedCargo", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetAcceptedCargo, "GetAcceptedCargo", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsRawIndustry, "IsRawIndustry", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsProcessingIndustry, "IsProcessingIndustry", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProductionCanIncrease, "ProductionCanIncrease", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetConstructionCost, "GetConstructionCost", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanBuildIndustry, "CanBuildIndustry", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::BuildIndustry, "BuildIndustry", 3, ".ii"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProspectIndustry, "ProspectIndustry", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasHeliport, "HasHeliport", 2, ".i"); - SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasDock, "HasDock", 2, ".i"); - - SQAIIndustryType.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_industrytypelist.hpp.sq b/src/script/api/ai/ai_industrytypelist.hpp.sq deleted file mode 100644 index 104a78ddf..000000000 --- a/src/script/api/ai/ai_industrytypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytypelist.hpp" -#include "../template/template_industrytypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryTypeList, ST_AI>() { return "AIIndustryTypeList"; } - -void SQAIIndustryTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryTypeList, ST_AI> SQAIIndustryTypeList("AIIndustryTypeList"); - SQAIIndustryTypeList.PreRegister(engine, "AIList"); - SQAIIndustryTypeList.AddConstructor<void (ScriptIndustryTypeList::*)(), 1>(engine, "x"); - - SQAIIndustryTypeList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_infrastructure.hpp.sq b/src/script/api/ai/ai_infrastructure.hpp.sq deleted file mode 100644 index f16f4b281..000000000 --- a/src/script/api/ai/ai_infrastructure.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_infrastructure.hpp" -#include "../template/template_infrastructure.hpp.sq" - - -template <> const char *GetClassName<ScriptInfrastructure, ST_AI>() { return "AIInfrastructure"; } - -void SQAIInfrastructure_Register(Squirrel *engine) -{ - DefSQClass<ScriptInfrastructure, ST_AI> SQAIInfrastructure("AIInfrastructure"); - SQAIInfrastructure.PreRegister(engine); - SQAIInfrastructure.AddConstructor<void (ScriptInfrastructure::*)(), 1>(engine, "x"); - - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_RAIL, "INFRASTRUCTURE_RAIL"); - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_SIGNALS, "INFRASTRUCTURE_SIGNALS"); - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_ROAD, "INFRASTRUCTURE_ROAD"); - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_CANAL, "INFRASTRUCTURE_CANAL"); - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_STATION, "INFRASTRUCTURE_STATION"); - SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_AIRPORT, "INFRASTRUCTURE_AIRPORT"); - - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRailPieceCount, "GetRailPieceCount", 3, ".ii"); - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRoadPieceCount, "GetRoadPieceCount", 3, ".ii"); - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetInfrastructurePieceCount, "GetInfrastructurePieceCount", 3, ".ii"); - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRailCosts, "GetMonthlyRailCosts", 3, ".ii"); - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRoadCosts, "GetMonthlyRoadCosts", 3, ".ii"); - SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyInfrastructureCosts, "GetMonthlyInfrastructureCosts", 3, ".ii"); - - SQAIInfrastructure.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_list.hpp.sq b/src/script/api/ai/ai_list.hpp.sq deleted file mode 100644 index ec66200b5..000000000 --- a/src/script/api/ai/ai_list.hpp.sq +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_list.hpp" -#include "../template/template_list.hpp.sq" - - -template <> const char *GetClassName<ScriptList, ST_AI>() { return "AIList"; } - -void SQAIList_Register(Squirrel *engine) -{ - DefSQClass<ScriptList, ST_AI> SQAIList("AIList"); - SQAIList.PreRegister(engine); - SQAIList.AddConstructor<void (ScriptList::*)(), 1>(engine, "x"); - - SQAIList.DefSQConst(engine, ScriptList::SORT_BY_VALUE, "SORT_BY_VALUE"); - SQAIList.DefSQConst(engine, ScriptList::SORT_BY_ITEM, "SORT_BY_ITEM"); - - SQAIList.DefSQConst(engine, ScriptList::SORT_ASCENDING, "SORT_ASCENDING"); - SQAIList.DefSQConst(engine, ScriptList::SORT_DESCENDING, "SORT_DESCENDING"); - - SQAIList.DefSQMethod(engine, &ScriptList::AddItem, "AddItem", 3, "xii"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveItem, "RemoveItem", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::Clear, "Clear", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::HasItem, "HasItem", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::Begin, "Begin", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::Next, "Next", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::IsEmpty, "IsEmpty", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::IsEnd, "IsEnd", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::Count, "Count", 1, "x"); - SQAIList.DefSQMethod(engine, &ScriptList::GetValue, "GetValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::SetValue, "SetValue", 3, "xii"); - SQAIList.DefSQMethod(engine, &ScriptList::Sort, "Sort", 3, "xib"); - SQAIList.DefSQMethod(engine, &ScriptList::AddList, "AddList", 2, "xx"); - SQAIList.DefSQMethod(engine, &ScriptList::SwapList, "SwapList", 2, "xx"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveAboveValue, "RemoveAboveValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveBelowValue, "RemoveBelowValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveBetweenValue, "RemoveBetweenValue", 3, "xii"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveValue, "RemoveValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveTop, "RemoveTop", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveBottom, "RemoveBottom", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::RemoveList, "RemoveList", 2, "xx"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepAboveValue, "KeepAboveValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepBelowValue, "KeepBelowValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepBetweenValue, "KeepBetweenValue", 3, "xii"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepValue, "KeepValue", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepTop, "KeepTop", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepBottom, "KeepBottom", 2, "xi"); - SQAIList.DefSQMethod(engine, &ScriptList::KeepList, "KeepList", 2, "xx"); - SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_get, "_get"); - SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_set, "_set"); - SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_nexti, "_nexti"); - SQAIList.DefSQAdvancedMethod(engine, &ScriptList::Valuate, "Valuate"); - - SQAIList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_log.hpp.sq b/src/script/api/ai/ai_log.hpp.sq deleted file mode 100644 index de8676964..000000000 --- a/src/script/api/ai/ai_log.hpp.sq +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_log.hpp" -#include "../template/template_log.hpp.sq" - - -template <> const char *GetClassName<ScriptLog, ST_AI>() { return "AILog"; } - -void SQAILog_Register(Squirrel *engine) -{ - DefSQClass<ScriptLog, ST_AI> SQAILog("AILog"); - SQAILog.PreRegister(engine); - SQAILog.AddConstructor<void (ScriptLog::*)(), 1>(engine, "x"); - - SQAILog.DefSQStaticMethod(engine, &ScriptLog::Info, "Info", 2, ".."); - SQAILog.DefSQStaticMethod(engine, &ScriptLog::Warning, "Warning", 2, ".."); - SQAILog.DefSQStaticMethod(engine, &ScriptLog::Error, "Error", 2, ".."); - - SQAILog.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_map.hpp.sq b/src/script/api/ai/ai_map.hpp.sq deleted file mode 100644 index 3280e7f51..000000000 --- a/src/script/api/ai/ai_map.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_map.hpp" -#include "../template/template_map.hpp.sq" - - -template <> const char *GetClassName<ScriptMap, ST_AI>() { return "AIMap"; } - -void SQAIMap_Register(Squirrel *engine) -{ - DefSQClass<ScriptMap, ST_AI> SQAIMap("AIMap"); - SQAIMap.PreRegister(engine); - SQAIMap.AddConstructor<void (ScriptMap::*)(), 1>(engine, "x"); - - SQAIMap.DefSQConst(engine, ScriptMap::TILE_INVALID, "TILE_INVALID"); - - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::IsValidTile, "IsValidTile", 2, ".i"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSize, "GetMapSize", 1, "."); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeX, "GetMapSizeX", 1, "."); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeY, "GetMapSizeY", 1, "."); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileX, "GetTileX", 2, ".i"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileY, "GetTileY", 2, ".i"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileIndex, "GetTileIndex", 3, ".ii"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceManhattan, "DistanceManhattan", 3, ".ii"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceMax, "DistanceMax", 3, ".ii"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceSquare, "DistanceSquare", 3, ".ii"); - SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceFromEdge, "DistanceFromEdge", 2, ".i"); - - SQAIMap.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_marine.hpp.sq b/src/script/api/ai/ai_marine.hpp.sq deleted file mode 100644 index d23fe0999..000000000 --- a/src/script/api/ai/ai_marine.hpp.sq +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_marine.hpp" -#include "../template/template_marine.hpp.sq" - - -template <> const char *GetClassName<ScriptMarine, ST_AI>() { return "AIMarine"; } - -void SQAIMarine_Register(Squirrel *engine) -{ - DefSQClass<ScriptMarine, ST_AI> SQAIMarine("AIMarine"); - SQAIMarine.PreRegister(engine); - SQAIMarine.AddConstructor<void (ScriptMarine::*)(), 1>(engine, "x"); - - SQAIMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_BASE, "ERR_MARINE_BASE"); - SQAIMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER"); - SQAIMarine.DefSQConst(engine, ScriptMarine::BT_DOCK, "BT_DOCK"); - SQAIMarine.DefSQConst(engine, ScriptMarine::BT_DEPOT, "BT_DEPOT"); - SQAIMarine.DefSQConst(engine, ScriptMarine::BT_BUOY, "BT_BUOY"); - - ScriptError::RegisterErrorMap(STR_ERROR_MUST_BE_BUILT_ON_WATER, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER); - - ScriptError::RegisterErrorMapString(ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER"); - - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsWaterDepotTile, "IsWaterDepotTile", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsDockTile, "IsDockTile", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsBuoyTile, "IsBuoyTile", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsLockTile, "IsLockTile", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsCanalTile, "IsCanalTile", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::AreWaterTilesConnected, "AreWaterTilesConnected", 3, ".ii"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildWaterDepot, "BuildWaterDepot", 3, ".ii"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildDock, "BuildDock", 3, ".ii"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildBuoy, "BuildBuoy", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildLock, "BuildLock", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildCanal, "BuildCanal", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveWaterDepot, "RemoveWaterDepot", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveDock, "RemoveDock", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveBuoy, "RemoveBuoy", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveLock, "RemoveLock", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveCanal, "RemoveCanal", 2, ".i"); - SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::GetBuildCost, "GetBuildCost", 2, ".i"); - - SQAIMarine.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_order.hpp.sq b/src/script/api/ai/ai_order.hpp.sq deleted file mode 100644 index 19664ee1e..000000000 --- a/src/script/api/ai/ai_order.hpp.sq +++ /dev/null @@ -1,116 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_order.hpp" -#include "../template/template_order.hpp.sq" - - -template <> const char *GetClassName<ScriptOrder, ST_AI>() { return "AIOrder"; } - -void SQAIOrder_Register(Squirrel *engine) -{ - DefSQClass<ScriptOrder, ST_AI> SQAIOrder("AIOrder"); - SQAIOrder.PreRegister(engine); - SQAIOrder.AddConstructor<void (ScriptOrder::*)(), 1>(engine, "x"); - - SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_BASE, "ERR_ORDER_BASE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY"); - SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION"); - SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NONE, "OF_NONE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_INTERMEDIATE, "OF_NON_STOP_INTERMEDIATE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_DESTINATION, "OF_NON_STOP_DESTINATION"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD, "OF_UNLOAD"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_TRANSFER, "OF_TRANSFER"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NO_UNLOAD, "OF_NO_UNLOAD"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD, "OF_FULL_LOAD"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD_ANY, "OF_FULL_LOAD_ANY"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NO_LOAD, "OF_NO_LOAD"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_SERVICE_IF_NEEDED, "OF_SERVICE_IF_NEEDED"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_STOP_IN_DEPOT, "OF_STOP_IN_DEPOT"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_GOTO_NEAREST_DEPOT, "OF_GOTO_NEAREST_DEPOT"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_FLAGS, "OF_NON_STOP_FLAGS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD_FLAGS, "OF_UNLOAD_FLAGS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_LOAD_FLAGS, "OF_LOAD_FLAGS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_DEPOT_FLAGS, "OF_DEPOT_FLAGS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_UNCONDITIONALLY, "OC_UNCONDITIONALLY"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REMAINING_LIFETIME, "OC_REMAINING_LIFETIME"); - SQAIOrder.DefSQConst(engine, ScriptOrder::OC_INVALID, "OC_INVALID"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_EQUALS, "CF_EQUALS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_NOT_EQUALS, "CF_NOT_EQUALS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_THAN, "CF_LESS_THAN"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_EQUALS, "CF_LESS_EQUALS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_THAN, "CF_MORE_THAN"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_EQUALS, "CF_MORE_EQUALS"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_TRUE, "CF_IS_TRUE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_FALSE, "CF_IS_FALSE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::CF_INVALID, "CF_INVALID"); - SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_CURRENT, "ORDER_CURRENT"); - SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_INVALID, "ORDER_INVALID"); - SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_NEAR, "STOPLOCATION_NEAR"); - SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_MIDDLE, "STOPLOCATION_MIDDLE"); - SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_FAR, "STOPLOCATION_FAR"); - SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_INVALID, "STOPLOCATION_INVALID"); - - ScriptError::RegisterErrorMap(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS, ScriptOrder::ERR_ORDER_TOO_MANY); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE); - - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY"); - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION"); - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE"); - - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsVoidOrder, "IsVoidOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsRefitOrder, "IsRefitOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCount, "GetOrderCount", 2, ".i"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetStopLocation, "GetStopLocation", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderRefit, "GetOrderRefit", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderJumpTo, "SetOrderJumpTo", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCondition, "SetOrderCondition", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareFunction, "SetOrderCompareFunction", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareValue, "SetOrderCompareValue", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetStopLocation, "SetStopLocation", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderRefit, "SetOrderRefit", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendOrder, "AppendOrder", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendConditionalOrder, "AppendConditionalOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertOrder, "InsertOrder", 5, ".iiii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertConditionalOrder, "InsertConditionalOrder", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::RemoveOrder, "RemoveOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderFlags, "SetOrderFlags", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::MoveOrder, "MoveOrder", 4, ".iii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SkipToOrder, "SkipToOrder", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::CopyOrders, "CopyOrders", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ShareOrders, "ShareOrders", 3, ".ii"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::UnshareOrders, "UnshareOrders", 2, ".i"); - SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDistance, "GetOrderDistance", 4, ".iii"); - - SQAIOrder.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_priorityqueue.hpp.sq b/src/script/api/ai/ai_priorityqueue.hpp.sq deleted file mode 100644 index 6e5fcf82e..000000000 --- a/src/script/api/ai/ai_priorityqueue.hpp.sq +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_priorityqueue.hpp" -#include "../template/template_priorityqueue.hpp.sq" - - -template <> const char *GetClassName<ScriptPriorityQueue, ST_AI>() { return "AIPriorityQueue"; } - -void SQAIPriorityQueue_Register(Squirrel *engine) -{ - DefSQClass<ScriptPriorityQueue, ST_AI> SQAIPriorityQueue("AIPriorityQueue"); - SQAIPriorityQueue.PreRegister(engine); - SQAIPriorityQueue.AddConstructor<void (ScriptPriorityQueue::*)(), 1>(engine, "x"); - - SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Insert, "Insert"); - SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Pop, "Pop"); - SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Peek, "Peek"); - SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Exists, "Exists"); - SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Clear, "Clear"); - SQAIPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::IsEmpty, "IsEmpty", 1, "x"); - SQAIPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::Count, "Count", 1, "x"); - - SQAIPriorityQueue.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_rail.hpp.sq b/src/script/api/ai/ai_rail.hpp.sq deleted file mode 100644 index f7de00cff..000000000 --- a/src/script/api/ai/ai_rail.hpp.sq +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_rail.hpp" -#include "../template/template_rail.hpp.sq" - - -template <> const char *GetClassName<ScriptRail, ST_AI>() { return "AIRail"; } - -void SQAIRail_Register(Squirrel *engine) -{ - DefSQClass<ScriptRail, ST_AI> SQAIRail("AIRail"); - SQAIRail.PreRegister(engine); - SQAIRail.AddConstructor<void (ScriptRail::*)(), 1>(engine, "x"); - - SQAIRail.DefSQConst(engine, ScriptRail::ERR_RAIL_BASE, "ERR_RAIL_BASE"); - SQAIRail.DefSQConst(engine, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD"); - SQAIRail.DefSQConst(engine, ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK"); - SQAIRail.DefSQConst(engine, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTYPE_INVALID, "RAILTYPE_INVALID"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE"); - SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_INVALID, "RAILTRACK_INVALID"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY"); - SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE"); - SQAIRail.DefSQConst(engine, ScriptRail::BT_TRACK, "BT_TRACK"); - SQAIRail.DefSQConst(engine, ScriptRail::BT_SIGNAL, "BT_SIGNAL"); - SQAIRail.DefSQConst(engine, ScriptRail::BT_DEPOT, "BT_DEPOT"); - SQAIRail.DefSQConst(engine, ScriptRail::BT_STATION, "BT_STATION"); - SQAIRail.DefSQConst(engine, ScriptRail::BT_WAYPOINT, "BT_WAYPOINT"); - - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_ARE_NO_SIGNALS, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_STATION, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_RAIL, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING); - - ScriptError::RegisterErrorMapString(ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD"); - ScriptError::RegisterErrorMapString(ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK"); - ScriptError::RegisterErrorMapString(ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING"); - - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetName, "GetName", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTile, "IsRailTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailStationTile, "IsRailStationTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailWaypointTile, "IsRailWaypointTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTypeAvailable, "IsRailTypeAvailable", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetCurrentRailType, "GetCurrentRailType", 1, "."); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::SetCurrentRailType, "SetCurrentRailType", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::TrainCanRunOnRail, "TrainCanRunOnRail", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::TrainHasPowerOnRail, "TrainHasPowerOnRail", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailType, "GetRailType", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::ConvertRailType, "ConvertRailType", 4, ".iii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailDepotFrontTile, "GetRailDepotFrontTile", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailStationDirection, "GetRailStationDirection", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailDepot, "BuildRailDepot", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailStation, "BuildRailStation", 6, ".iiiii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildNewGRFRailStation, "BuildNewGRFRailStation", 11, ".iiiiiiiiib"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailWaypoint, "BuildRailWaypoint", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailWaypointTileRectangle, "RemoveRailWaypointTileRectangle", 4, ".iib"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailStationTileRectangle, "RemoveRailStationTileRectangle", 4, ".iib"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailTracks, "GetRailTracks", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailTrack, "BuildRailTrack", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailTrack, "RemoveRailTrack", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::AreTilesConnected, "AreTilesConnected", 4, ".iii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRail, "BuildRail", 4, ".iii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRail, "RemoveRail", 4, ".iii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetSignalType, "GetSignalType", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildSignal, "BuildSignal", 4, ".iii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveSignal, "RemoveSignal", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetBuildCost, "GetBuildCost", 3, ".ii"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - - SQAIRail.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_railtypelist.hpp.sq b/src/script/api/ai/ai_railtypelist.hpp.sq deleted file mode 100644 index b676f6e8f..000000000 --- a/src/script/api/ai/ai_railtypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_railtypelist.hpp" -#include "../template/template_railtypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptRailTypeList, ST_AI>() { return "AIRailTypeList"; } - -void SQAIRailTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptRailTypeList, ST_AI> SQAIRailTypeList("AIRailTypeList"); - SQAIRailTypeList.PreRegister(engine, "AIList"); - SQAIRailTypeList.AddConstructor<void (ScriptRailTypeList::*)(), 1>(engine, "x"); - - SQAIRailTypeList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_road.hpp.sq b/src/script/api/ai/ai_road.hpp.sq deleted file mode 100644 index b42c54801..000000000 --- a/src/script/api/ai/ai_road.hpp.sq +++ /dev/null @@ -1,93 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_road.hpp" -#include "../template/template_road.hpp.sq" - - -template <> const char *GetClassName<ScriptRoad, ST_AI>() { return "AIRoad"; } - -void SQAIRoad_Register(Squirrel *engine) -{ - DefSQClass<ScriptRoad, ST_AI> SQAIRoad("AIRoad"); - SQAIRoad.PreRegister(engine); - SQAIRoad.AddConstructor<void (ScriptRoad::*)(), 1>(engine, "x"); - - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_BASE, "ERR_ROAD_BASE"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_ROAD, "ROADTYPE_ROAD"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_TRAM, "ROADTYPE_TRAM"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_INVALID, "ROADTYPE_INVALID"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_ROAD, "ROADTRAMTYPES_ROAD"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_TRAM, "ROADTRAMTYPES_TRAM"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_BUS, "ROADVEHTYPE_BUS"); - SQAIRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_TRUCK, "ROADVEHTYPE_TRUCK"); - SQAIRoad.DefSQConst(engine, ScriptRoad::BT_ROAD, "BT_ROAD"); - SQAIRoad.DefSQConst(engine, ScriptRoad::BT_DEPOT, "BT_DEPOT"); - SQAIRoad.DefSQConst(engine, ScriptRoad::BT_BUS_STOP, "BT_BUS_STOP"); - SQAIRoad.DefSQConst(engine, ScriptRoad::BT_TRUCK_STOP, "BT_TRUCK_STOP"); - - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_WORKS_IN_PROGRESS, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS); - ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_DIRECTION, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION); - ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS); - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_ROAD, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_ROAD, ScriptRoad::ERR_UNSUITABLE_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_TRAMWAY, ScriptRoad::ERR_UNSUITABLE_ROAD); - - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD"); - - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetName, "GetName", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTile, "IsRoadTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, "."); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehCanRunOnRoad, "RoadVehCanRunOnRoad", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehHasPowerOnRoad, "RoadVehHasPowerOnRoad", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::ConvertRoadType, "ConvertRoadType", 4, ".iii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::HasRoadType, "HasRoadType", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, ".iaii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, ".iii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoad, "BuildRoad", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadFull, "BuildRoadFull", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadDepot, "BuildRoadDepot", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadStation, "BuildRoadStation", 5, ".iiii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildDriveThroughRoadStation, "BuildDriveThroughRoadStation", 5, ".iiii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoad, "RemoveRoad", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadFull, "RemoveRoadFull", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadStation, "RemoveRoadStation", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadTramType, "GetRoadTramType", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - - SQAIRoad.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_roadtypelist.hpp.sq b/src/script/api/ai/ai_roadtypelist.hpp.sq deleted file mode 100644 index 43224eea5..000000000 --- a/src/script/api/ai/ai_roadtypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_roadtypelist.hpp" -#include "../template/template_roadtypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptRoadTypeList, ST_AI>() { return "AIRoadTypeList"; } - -void SQAIRoadTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptRoadTypeList, ST_AI> SQAIRoadTypeList("AIRoadTypeList"); - SQAIRoadTypeList.PreRegister(engine, "AIList"); - SQAIRoadTypeList.AddConstructor<void (ScriptRoadTypeList::*)(ScriptRoad::RoadTramTypes rtts), 2>(engine, "xi"); - - SQAIRoadTypeList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_sign.hpp.sq b/src/script/api/ai/ai_sign.hpp.sq deleted file mode 100644 index e6c78c934..000000000 --- a/src/script/api/ai/ai_sign.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_sign.hpp" -#include "../template/template_sign.hpp.sq" - - -template <> const char *GetClassName<ScriptSign, ST_AI>() { return "AISign"; } - -void SQAISign_Register(Squirrel *engine) -{ - DefSQClass<ScriptSign, ST_AI> SQAISign("AISign"); - SQAISign.PreRegister(engine); - SQAISign.AddConstructor<void (ScriptSign::*)(), 1>(engine, "x"); - - SQAISign.DefSQConst(engine, ScriptSign::ERR_SIGN_BASE, "ERR_SIGN_BASE"); - SQAISign.DefSQConst(engine, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_SIGNS, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS); - - ScriptError::RegisterErrorMapString(ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS"); - - SQAISign.DefSQStaticMethod(engine, &ScriptSign::IsValidSign, "IsValidSign", 2, ".i"); - SQAISign.DefSQStaticMethod(engine, &ScriptSign::SetName, "SetName", 3, ".i."); - SQAISign.DefSQStaticMethod(engine, &ScriptSign::GetName, "GetName", 2, ".i"); - SQAISign.DefSQStaticMethod(engine, &ScriptSign::GetLocation, "GetLocation", 2, ".i"); - SQAISign.DefSQStaticMethod(engine, &ScriptSign::BuildSign, "BuildSign", 3, ".i."); - SQAISign.DefSQStaticMethod(engine, &ScriptSign::RemoveSign, "RemoveSign", 2, ".i"); - - SQAISign.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_signlist.hpp.sq b/src/script/api/ai/ai_signlist.hpp.sq deleted file mode 100644 index 9fbf42ddf..000000000 --- a/src/script/api/ai/ai_signlist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_signlist.hpp" -#include "../template/template_signlist.hpp.sq" - - -template <> const char *GetClassName<ScriptSignList, ST_AI>() { return "AISignList"; } - -void SQAISignList_Register(Squirrel *engine) -{ - DefSQClass<ScriptSignList, ST_AI> SQAISignList("AISignList"); - SQAISignList.PreRegister(engine, "AIList"); - SQAISignList.AddConstructor<void (ScriptSignList::*)(), 1>(engine, "x"); - - SQAISignList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_station.hpp.sq b/src/script/api/ai/ai_station.hpp.sq deleted file mode 100644 index 2278faf23..000000000 --- a/src/script/api/ai/ai_station.hpp.sq +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_station.hpp" -#include "../template/template_station.hpp.sq" - - -template <> const char *GetClassName<ScriptStation, ST_AI>() { return "AIStation"; } - -void SQAIStation_Register(Squirrel *engine) -{ - DefSQClass<ScriptStation, ST_AI> SQAIStation("AIStation"); - SQAIStation.PreRegister(engine, "AIBaseStation"); - SQAIStation.AddConstructor<void (ScriptStation::*)(), 1>(engine, "x"); - - SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_BASE, "ERR_STATION_BASE"); - SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION"); - SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS"); - SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_TRAIN, "STATION_TRAIN"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_TRUCK_STOP, "STATION_TRUCK_STOP"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_BUS_STOP, "STATION_BUS_STOP"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_AIRPORT, "STATION_AIRPORT"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_DOCK, "STATION_DOCK"); - SQAIStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_BUS_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN); - - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION"); - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS"); - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN"); - - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsValidStation, "IsValidStation", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationID, "GetStationID", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFrom, "GetCargoWaitingFrom", 4, ".iii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingVia, "GetCargoWaitingVia", 4, ".iii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFromVia, "GetCargoWaitingFromVia", 5, ".iiii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlanned, "GetCargoPlanned", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFrom, "GetCargoPlannedFrom", 4, ".iii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedVia, "GetCargoPlannedVia", 4, ".iii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFromVia, "GetCargoPlannedFromVia", 5, ".iiii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasCargoRating, "HasCargoRating", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoRating, "GetCargoRating", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationCoverageRadius, "GetStationCoverageRadius", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasStationType, "HasStationType", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasRoadType, "HasRoadType", 3, ".ii"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetNearestTown, "GetNearestTown", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsAirportClosed, "IsAirportClosed", 2, ".i"); - SQAIStation.DefSQStaticMethod(engine, &ScriptStation::OpenCloseAirport, "OpenCloseAirport", 2, ".i"); - - SQAIStation.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_stationlist.hpp.sq b/src/script/api/ai/ai_stationlist.hpp.sq deleted file mode 100644 index d7a63212c..000000000 --- a/src/script/api/ai/ai_stationlist.hpp.sq +++ /dev/null @@ -1,174 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_stationlist.hpp" -#include "../template/template_stationlist.hpp.sq" - - -template <> const char *GetClassName<ScriptStationList, ST_AI>() { return "AIStationList"; } - -void SQAIStationList_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList, ST_AI> SQAIStationList("AIStationList"); - SQAIStationList.PreRegister(engine, "AIList"); - SQAIStationList.AddConstructor<void (ScriptStationList::*)(ScriptStation::StationType station_type), 2>(engine, "xi"); - - SQAIStationList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_Cargo, ST_AI>() { return "AIStationList_Cargo"; } - -void SQAIStationList_Cargo_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_Cargo, ST_AI> SQAIStationList_Cargo("AIStationList_Cargo"); - SQAIStationList_Cargo.PreRegister(engine, "AIList"); - SQAIStationList_Cargo.AddConstructor<void (ScriptStationList_Cargo::*)(ScriptStationList_Cargo::CargoMode mode, ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 6>(engine, "xiiiii"); - - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_FROM, "CS_BY_FROM"); - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_VIA_BY_FROM, "CS_VIA_BY_FROM"); - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_VIA, "CS_BY_VIA"); - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_FROM_BY_VIA, "CS_FROM_BY_VIA"); - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_WAITING, "CM_WAITING"); - SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_PLANNED, "CM_PLANNED"); - - SQAIStationList_Cargo.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaiting, ST_AI>() { return "AIStationList_CargoWaiting"; } - -void SQAIStationList_CargoWaiting_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaiting, ST_AI> SQAIStationList_CargoWaiting("AIStationList_CargoWaiting"); - SQAIStationList_CargoWaiting.PreRegister(engine, "AIStationList_Cargo"); - SQAIStationList_CargoWaiting.AddConstructor<void (ScriptStationList_CargoWaiting::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii"); - - SQAIStationList_CargoWaiting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlanned, ST_AI>() { return "AIStationList_CargoPlanned"; } - -void SQAIStationList_CargoPlanned_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlanned, ST_AI> SQAIStationList_CargoPlanned("AIStationList_CargoPlanned"); - SQAIStationList_CargoPlanned.PreRegister(engine, "AIStationList_Cargo"); - SQAIStationList_CargoPlanned.AddConstructor<void (ScriptStationList_CargoPlanned::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii"); - - SQAIStationList_CargoPlanned.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingByFrom, ST_AI>() { return "AIStationList_CargoWaitingByFrom"; } - -void SQAIStationList_CargoWaitingByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingByFrom, ST_AI> SQAIStationList_CargoWaitingByFrom("AIStationList_CargoWaitingByFrom"); - SQAIStationList_CargoWaitingByFrom.PreRegister(engine, "AIStationList_CargoWaiting"); - SQAIStationList_CargoWaitingByFrom.AddConstructor<void (ScriptStationList_CargoWaitingByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQAIStationList_CargoWaitingByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingViaByFrom, ST_AI>() { return "AIStationList_CargoWaitingViaByFrom"; } - -void SQAIStationList_CargoWaitingViaByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingViaByFrom, ST_AI> SQAIStationList_CargoWaitingViaByFrom("AIStationList_CargoWaitingViaByFrom"); - SQAIStationList_CargoWaitingViaByFrom.PreRegister(engine, "AIStationList_CargoWaiting"); - SQAIStationList_CargoWaitingViaByFrom.AddConstructor<void (ScriptStationList_CargoWaitingViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii"); - - SQAIStationList_CargoWaitingViaByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingByVia, ST_AI>() { return "AIStationList_CargoWaitingByVia"; } - -void SQAIStationList_CargoWaitingByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingByVia, ST_AI> SQAIStationList_CargoWaitingByVia("AIStationList_CargoWaitingByVia"); - SQAIStationList_CargoWaitingByVia.PreRegister(engine, "AIStationList_CargoWaiting"); - SQAIStationList_CargoWaitingByVia.AddConstructor<void (ScriptStationList_CargoWaitingByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQAIStationList_CargoWaitingByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingFromByVia, ST_AI>() { return "AIStationList_CargoWaitingFromByVia"; } - -void SQAIStationList_CargoWaitingFromByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingFromByVia, ST_AI> SQAIStationList_CargoWaitingFromByVia("AIStationList_CargoWaitingFromByVia"); - SQAIStationList_CargoWaitingFromByVia.PreRegister(engine, "AIStationList_CargoWaiting"); - SQAIStationList_CargoWaitingFromByVia.AddConstructor<void (ScriptStationList_CargoWaitingFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii"); - - SQAIStationList_CargoWaitingFromByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedByFrom, ST_AI>() { return "AIStationList_CargoPlannedByFrom"; } - -void SQAIStationList_CargoPlannedByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedByFrom, ST_AI> SQAIStationList_CargoPlannedByFrom("AIStationList_CargoPlannedByFrom"); - SQAIStationList_CargoPlannedByFrom.PreRegister(engine, "AIStationList_CargoPlanned"); - SQAIStationList_CargoPlannedByFrom.AddConstructor<void (ScriptStationList_CargoPlannedByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQAIStationList_CargoPlannedByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedViaByFrom, ST_AI>() { return "AIStationList_CargoPlannedViaByFrom"; } - -void SQAIStationList_CargoPlannedViaByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedViaByFrom, ST_AI> SQAIStationList_CargoPlannedViaByFrom("AIStationList_CargoPlannedViaByFrom"); - SQAIStationList_CargoPlannedViaByFrom.PreRegister(engine, "AIStationList_CargoPlanned"); - SQAIStationList_CargoPlannedViaByFrom.AddConstructor<void (ScriptStationList_CargoPlannedViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii"); - - SQAIStationList_CargoPlannedViaByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedByVia, ST_AI>() { return "AIStationList_CargoPlannedByVia"; } - -void SQAIStationList_CargoPlannedByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedByVia, ST_AI> SQAIStationList_CargoPlannedByVia("AIStationList_CargoPlannedByVia"); - SQAIStationList_CargoPlannedByVia.PreRegister(engine, "AIStationList_CargoPlanned"); - SQAIStationList_CargoPlannedByVia.AddConstructor<void (ScriptStationList_CargoPlannedByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQAIStationList_CargoPlannedByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedFromByVia, ST_AI>() { return "AIStationList_CargoPlannedFromByVia"; } - -void SQAIStationList_CargoPlannedFromByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedFromByVia, ST_AI> SQAIStationList_CargoPlannedFromByVia("AIStationList_CargoPlannedFromByVia"); - SQAIStationList_CargoPlannedFromByVia.PreRegister(engine, "AIStationList_CargoPlanned"); - SQAIStationList_CargoPlannedFromByVia.AddConstructor<void (ScriptStationList_CargoPlannedFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii"); - - SQAIStationList_CargoPlannedFromByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_Vehicle, ST_AI>() { return "AIStationList_Vehicle"; } - -void SQAIStationList_Vehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_Vehicle, ST_AI> SQAIStationList_Vehicle("AIStationList_Vehicle"); - SQAIStationList_Vehicle.PreRegister(engine, "AIList"); - SQAIStationList_Vehicle.AddConstructor<void (ScriptStationList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQAIStationList_Vehicle.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_subsidy.hpp.sq b/src/script/api/ai/ai_subsidy.hpp.sq deleted file mode 100644 index 34a8173e5..000000000 --- a/src/script/api/ai/ai_subsidy.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidy.hpp" -#include "../template/template_subsidy.hpp.sq" - - -template <> const char *GetClassName<ScriptSubsidy, ST_AI>() { return "AISubsidy"; } - -void SQAISubsidy_Register(Squirrel *engine) -{ - DefSQClass<ScriptSubsidy, ST_AI> SQAISubsidy("AISubsidy"); - SQAISubsidy.PreRegister(engine); - SQAISubsidy.AddConstructor<void (ScriptSubsidy::*)(), 1>(engine, "x"); - - SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INDUSTRY, "SPT_INDUSTRY"); - SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_TOWN, "SPT_TOWN"); - SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INVALID, "SPT_INVALID"); - - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsValidSubsidy, "IsValidSubsidy", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsAwarded, "IsAwarded", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetAwardedTo, "GetAwardedTo", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetExpireDate, "GetExpireDate", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetCargoType, "GetCargoType", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceType, "GetSourceType", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceIndex, "GetSourceIndex", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationType, "GetDestinationType", 2, ".i"); - SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationIndex, "GetDestinationIndex", 2, ".i"); - - SQAISubsidy.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_subsidylist.hpp.sq b/src/script/api/ai/ai_subsidylist.hpp.sq deleted file mode 100644 index c1a39238a..000000000 --- a/src/script/api/ai/ai_subsidylist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidylist.hpp" -#include "../template/template_subsidylist.hpp.sq" - - -template <> const char *GetClassName<ScriptSubsidyList, ST_AI>() { return "AISubsidyList"; } - -void SQAISubsidyList_Register(Squirrel *engine) -{ - DefSQClass<ScriptSubsidyList, ST_AI> SQAISubsidyList("AISubsidyList"); - SQAISubsidyList.PreRegister(engine, "AIList"); - SQAISubsidyList.AddConstructor<void (ScriptSubsidyList::*)(), 1>(engine, "x"); - - SQAISubsidyList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_testmode.hpp.sq b/src/script/api/ai/ai_testmode.hpp.sq deleted file mode 100644 index e80952a61..000000000 --- a/src/script/api/ai/ai_testmode.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_testmode.hpp" -#include "../template/template_testmode.hpp.sq" - - -template <> const char *GetClassName<ScriptTestMode, ST_AI>() { return "AITestMode"; } - -void SQAITestMode_Register(Squirrel *engine) -{ - DefSQClass<ScriptTestMode, ST_AI> SQAITestMode("AITestMode"); - SQAITestMode.PreRegister(engine); - SQAITestMode.AddConstructor<void (ScriptTestMode::*)(), 1>(engine, "x"); - - SQAITestMode.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_tile.hpp.sq b/src/script/api/ai/ai_tile.hpp.sq deleted file mode 100644 index 4d4f0fe37..000000000 --- a/src/script/api/ai/ai_tile.hpp.sq +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tile.hpp" -#include "../template/template_tile.hpp.sq" - - -template <> const char *GetClassName<ScriptTile, ST_AI>() { return "AITile"; } - -void SQAITile_Register(Squirrel *engine) -{ - DefSQClass<ScriptTile, ST_AI> SQAITile("AITile"); - SQAITile.PreRegister(engine); - SQAITile.AddConstructor<void (ScriptTile::*)(), 1>(engine, "x"); - - SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_BASE, "ERR_TILE_BASE"); - SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); - SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); - SQAITile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); - SQAITile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); - SQAITile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); - SQAITile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W"); - SQAITile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S"); - SQAITile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E"); - SQAITile.DefSQConst(engine, ScriptTile::CORNER_N, "CORNER_N"); - SQAITile.DefSQConst(engine, ScriptTile::CORNER_INVALID, "CORNER_INVALID"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_FLAT, "SLOPE_FLAT"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_W, "SLOPE_W"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_S, "SLOPE_S"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_E, "SLOPE_E"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_N, "SLOPE_N"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP, "SLOPE_STEEP"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NW, "SLOPE_NW"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SW, "SLOPE_SW"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SE, "SLOPE_SE"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NE, "SLOPE_NE"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_EW, "SLOPE_EW"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NS, "SLOPE_NS"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_ELEVATED, "SLOPE_ELEVATED"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NWS, "SLOPE_NWS"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_WSE, "SLOPE_WSE"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SEN, "SLOPE_SEN"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_ENW, "SLOPE_ENW"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_W, "SLOPE_STEEP_W"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_S, "SLOPE_STEEP_S"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_E, "SLOPE_STEEP_E"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_N, "SLOPE_STEEP_N"); - SQAITile.DefSQConst(engine, ScriptTile::SLOPE_INVALID, "SLOPE_INVALID"); - SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_RAIL, "TRANSPORT_RAIL"); - SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_ROAD, "TRANSPORT_ROAD"); - SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_WATER, "TRANSPORT_WATER"); - SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_AIR, "TRANSPORT_AIR"); - SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_INVALID, "TRANSPORT_INVALID"); - SQAITile.DefSQConst(engine, ScriptTile::BT_FOUNDATION, "BT_FOUNDATION"); - SQAITile.DefSQConst(engine, ScriptTile::BT_TERRAFORM, "BT_TERRAFORM"); - SQAITile.DefSQConst(engine, ScriptTile::BT_BUILD_TREES, "BT_BUILD_TREES"); - SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_GRASS, "BT_CLEAR_GRASS"); - SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROUGH, "BT_CLEAR_ROUGH"); - SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROCKY, "BT_CLEAR_ROCKY"); - SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_FIELDS, "BT_CLEAR_FIELDS"); - SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_HOUSE, "BT_CLEAR_HOUSE"); - SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_NORMAL, "TERRAIN_NORMAL"); - SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_DESERT, "TERRAIN_DESERT"); - SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); - SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW"); - - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); - ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - - ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); - - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsWaterTile, "IsWaterTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsCoastTile, "IsCoastTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsStationTile, "IsStationTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsSteepSlope, "IsSteepSlope", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsHalftileSlope, "IsHalftileSlope", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::HasTreeOnTile, "HasTreeOnTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsFarmTile, "IsFarmTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsRockTile, "IsRockTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsRoughTile, "IsRoughTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsSnowTile, "IsSnowTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsDesertTile, "IsDesertTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetTerrainType, "GetTerrainType", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetSlope, "GetSlope", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetComplementSlope, "GetComplementSlope", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetMinHeight, "GetMinHeight", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetMaxHeight, "GetMaxHeight", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCornerHeight, "GetCornerHeight", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetOwner, "GetOwner", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::HasTransportType, "HasTransportType", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCargoAcceptance, "GetCargoAcceptance", 6, ".iiiii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCargoProduction, "GetCargoProduction", 6, ".iiiii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::RaiseTile, "RaiseTile", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::LowerTile, "LowerTile", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::LevelTiles, "LevelTiles", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::DemolishTile, "DemolishTile", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::PlantTree, "PlantTree", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::PlantTreeRectangle, "PlantTreeRectangle", 4, ".iii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetTownAuthority, "GetTownAuthority", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetClosestTown, "GetClosestTown", 2, ".i"); - SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetBuildCost, "GetBuildCost", 2, ".i"); - - SQAITile.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_tilelist.hpp.sq b/src/script/api/ai/ai_tilelist.hpp.sq deleted file mode 100644 index 64f666f6c..000000000 --- a/src/script/api/ai/ai_tilelist.hpp.sq +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tilelist.hpp" -#include "../template/template_tilelist.hpp.sq" - - -template <> const char *GetClassName<ScriptTileList, ST_AI>() { return "AITileList"; } - -void SQAITileList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList, ST_AI> SQAITileList("AITileList"); - SQAITileList.PreRegister(engine, "AIList"); - SQAITileList.AddConstructor<void (ScriptTileList::*)(), 1>(engine, "x"); - - SQAITileList.DefSQMethod(engine, &ScriptTileList::AddRectangle, "AddRectangle", 3, "xii"); - SQAITileList.DefSQMethod(engine, &ScriptTileList::AddTile, "AddTile", 2, "xi"); - SQAITileList.DefSQMethod(engine, &ScriptTileList::RemoveRectangle, "RemoveRectangle", 3, "xii"); - SQAITileList.DefSQMethod(engine, &ScriptTileList::RemoveTile, "RemoveTile", 2, "xi"); - - SQAITileList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_IndustryAccepting, ST_AI>() { return "AITileList_IndustryAccepting"; } - -void SQAITileList_IndustryAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_IndustryAccepting, ST_AI> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting"); - SQAITileList_IndustryAccepting.PreRegister(engine, "AITileList"); - SQAITileList_IndustryAccepting.AddConstructor<void (ScriptTileList_IndustryAccepting::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); - - SQAITileList_IndustryAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_IndustryProducing, ST_AI>() { return "AITileList_IndustryProducing"; } - -void SQAITileList_IndustryProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_IndustryProducing, ST_AI> SQAITileList_IndustryProducing("AITileList_IndustryProducing"); - SQAITileList_IndustryProducing.PreRegister(engine, "AITileList"); - SQAITileList_IndustryProducing.AddConstructor<void (ScriptTileList_IndustryProducing::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); - - SQAITileList_IndustryProducing.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_StationType, ST_AI>() { return "AITileList_StationType"; } - -void SQAITileList_StationType_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_StationType, ST_AI> SQAITileList_StationType("AITileList_StationType"); - SQAITileList_StationType.PreRegister(engine, "AITileList"); - SQAITileList_StationType.AddConstructor<void (ScriptTileList_StationType::*)(StationID station_id, ScriptStation::StationType station_type), 3>(engine, "xii"); - - SQAITileList_StationType.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_town.hpp.sq b/src/script/api/ai/ai_town.hpp.sq deleted file mode 100644 index 8cae7f11a..000000000 --- a/src/script/api/ai/ai_town.hpp.sq +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_town.hpp" -#include "../template/template_town.hpp.sq" - - -template <> const char *GetClassName<ScriptTown, ST_AI>() { return "AITown"; } - -void SQAITown_Register(Squirrel *engine) -{ - DefSQClass<ScriptTown, ST_AI> SQAITown("AITown"); - SQAITown.PreRegister(engine); - SQAITown.AddConstructor<void (ScriptTown::*)(), 1>(engine, "x"); - - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_SMALL, "TOWN_ACTION_ADVERTISE_SMALL"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_MEDIUM, "TOWN_ACTION_ADVERTISE_MEDIUM"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_LARGE, "TOWN_ACTION_ADVERTISE_LARGE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ROAD_REBUILD, "TOWN_ACTION_ROAD_REBUILD"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUILD_STATUE, "TOWN_ACTION_BUILD_STATUE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_FUND_BUILDINGS, "TOWN_ACTION_FUND_BUILDINGS"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUY_RIGHTS, "TOWN_ACTION_BUY_RIGHTS"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BRIBE, "TOWN_ACTION_BRIBE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_NONE, "TOWN_RATING_NONE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_APPALLING, "TOWN_RATING_APPALLING"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_POOR, "TOWN_RATING_VERY_POOR"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_POOR, "TOWN_RATING_POOR"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_MEDIOCRE, "TOWN_RATING_MEDIOCRE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_GOOD, "TOWN_RATING_GOOD"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_GOOD, "TOWN_RATING_VERY_GOOD"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_EXCELLENT, "TOWN_RATING_EXCELLENT"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_OUTSTANDING, "TOWN_RATING_OUTSTANDING"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_INVALID, "TOWN_RATING_INVALID"); - SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_ORIGINAL, "ROAD_LAYOUT_ORIGINAL"); - SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_BETTER_ROADS, "ROAD_LAYOUT_BETTER_ROADS"); - SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_2x2, "ROAD_LAYOUT_2x2"); - SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_3x3, "ROAD_LAYOUT_3x3"); - SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_INVALID, "ROAD_LAYOUT_INVALID"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_SMALL, "TOWN_SIZE_SMALL"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_MEDIUM, "TOWN_SIZE_MEDIUM"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_LARGE, "TOWN_SIZE_LARGE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_INVALID, "TOWN_SIZE_INVALID"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NONE, "TOWN_GROWTH_NONE"); - SQAITown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NORMAL, "TOWN_GROWTH_NORMAL"); - - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetTownCount, "GetTownCount", 1, "."); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsValidTown, "IsValidTown", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetName, "GetName", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetPopulation, "GetPopulation", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetHouseCount, "GetHouseCount", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLocation, "GetLocation", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthSupplied, "GetLastMonthSupplied", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthReceived, "GetLastMonthReceived", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetCargoGoal, "GetCargoGoal", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetGrowthRate, "GetGrowthRate", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::HasStatue, "HasStatue", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsCity, "IsCity", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetFundBuildingsDuration, "GetFundBuildingsDuration", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsCompany, "GetExclusiveRightsCompany", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsActionAvailable, "IsActionAvailable", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::PerformTownAction, "PerformTownAction", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::FoundTown, "FoundTown", 6, ".iibi."); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRating, "GetRating", 3, ".ii"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetAllowedNoise, "GetAllowedNoise", 2, ".i"); - SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRoadLayout, "GetRoadLayout", 2, ".i"); - - SQAITown.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_townlist.hpp.sq b/src/script/api/ai/ai_townlist.hpp.sq deleted file mode 100644 index 7efaa298d..000000000 --- a/src/script/api/ai/ai_townlist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_townlist.hpp" -#include "../template/template_townlist.hpp.sq" - - -template <> const char *GetClassName<ScriptTownList, ST_AI>() { return "AITownList"; } - -void SQAITownList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTownList, ST_AI> SQAITownList("AITownList"); - SQAITownList.PreRegister(engine, "AIList"); - SQAITownList.AddConstructor<void (ScriptTownList::*)(), 1>(engine, "x"); - - SQAITownList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTownEffectList, ST_AI>() { return "AITownEffectList"; } - -void SQAITownEffectList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTownEffectList, ST_AI> SQAITownEffectList("AITownEffectList"); - SQAITownEffectList.PreRegister(engine, "AIList"); - SQAITownEffectList.AddConstructor<void (ScriptTownEffectList::*)(), 1>(engine, "x"); - - SQAITownEffectList.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_tunnel.hpp.sq b/src/script/api/ai/ai_tunnel.hpp.sq deleted file mode 100644 index 7c72e8386..000000000 --- a/src/script/api/ai/ai_tunnel.hpp.sq +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tunnel.hpp" -#include "../template/template_tunnel.hpp.sq" - - -template <> const char *GetClassName<ScriptTunnel, ST_AI>() { return "AITunnel"; } - -void SQAITunnel_Register(Squirrel *engine) -{ - DefSQClass<ScriptTunnel, ST_AI> SQAITunnel("AITunnel"); - SQAITunnel.PreRegister(engine); - SQAITunnel.AddConstructor<void (ScriptTunnel::*)(), 1>(engine, "x"); - - SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_BASE, "ERR_TUNNEL_BASE"); - SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER"); - SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE"); - SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY"); - SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE"); - - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ON_WATER, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER); - ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_UNABLE_TO_EXCAVATE_LAND, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE); - - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE"); - - SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::IsTunnelTile, "IsTunnelTile", 2, ".i"); - SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, ".i"); - SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::BuildTunnel, "BuildTunnel", 3, ".ii"); - SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::RemoveTunnel, "RemoveTunnel", 2, ".i"); - - SQAITunnel.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_vehicle.hpp.sq b/src/script/api/ai/ai_vehicle.hpp.sq deleted file mode 100644 index 20c66254c..000000000 --- a/src/script/api/ai/ai_vehicle.hpp.sq +++ /dev/null @@ -1,147 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehicle.hpp" -#include "../template/template_vehicle.hpp.sq" - - -template <> const char *GetClassName<ScriptVehicle, ST_AI>() { return "AIVehicle"; } - -void SQAIVehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicle, ST_AI> SQAIVehicle("AIVehicle"); - SQAIVehicle.PreRegister(engine); - SQAIVehicle.AddConstructor<void (ScriptVehicle::*)(), 1>(engine, "x"); - - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BASE, "ERR_VEHICLE_BASE"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_RAIL, "VT_RAIL"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_ROAD, "VT_ROAD"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_WATER, "VT_WATER"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_AIR, "VT_AIR"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_INVALID, "VT_INVALID"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_RUNNING, "VS_RUNNING"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_STOPPED, "VS_STOPPED"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_IN_DEPOT, "VS_IN_DEPOT"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_AT_STATION, "VS_AT_STATION"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_BROKEN, "VS_BROKEN"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_CRASHED, "VS_CRASHED"); - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_INVALID, "VS_INVALID"); - - SQAIVehicle.DefSQConst(engine, ScriptVehicle::VEHICLE_INVALID, "VEHICLE_INVALID"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, ScriptVehicle::ERR_VEHICLE_TOO_MANY); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_TRAIN, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_SHIP, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_DEPOT_WRONG_DEPOT_TYPE, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_POWER, ScriptVehicle::ERR_VEHICLE_NO_POWER); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, ScriptVehicle::ERR_VEHICLE_TOO_LONG); - - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG"); - - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetNumWagons, "GetNumWagons", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SetName, "SetName", 3, ".i."); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetName, "GetName", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLocation, "GetLocation", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetEngineType, "GetEngineType", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAge, "GetAge", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonAge, "GetWagonAge", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaxAge, "GetMaxAge", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetState, "GetState", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRunningCost, "GetRunningCost", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetVehicleType, "GetVehicleType", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRoadType, "GetRoadType", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsInDepot, "IsInDepot", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicle, "BuildVehicle", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicleWithRefit, "BuildVehicleWithRefit", 4, ".iii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetBuildWithRefitCapacity, "GetBuildWithRefitCapacity", 4, ".iii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::CloneVehicle, "CloneVehicle", 4, ".iib"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagon, "MoveWagon", 5, ".iiii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagonChain, "MoveWagonChain", 5, ".iiii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::RefitVehicle, "RefitVehicle", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellVehicle, "SellVehicle", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagon, "SellWagon", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagonChain, "SellWagonChain", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepotForServicing, "SendVehicleToDepotForServicing", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCapacity, "GetCapacity", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLength, "GetLength", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetGroupID, "GetGroupID", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsArticulated, "IsArticulated", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetReliability, "GetReliability", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i"); - - SQAIVehicle.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_vehiclelist.hpp.sq b/src/script/api/ai/ai_vehiclelist.hpp.sq deleted file mode 100644 index 25a8610c3..000000000 --- a/src/script/api/ai/ai_vehiclelist.hpp.sq +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehiclelist.hpp" -#include "../template/template_vehiclelist.hpp.sq" - - -template <> const char *GetClassName<ScriptVehicleList, ST_AI>() { return "AIVehicleList"; } - -void SQAIVehicleList_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList, ST_AI> SQAIVehicleList("AIVehicleList"); - SQAIVehicleList.PreRegister(engine, "AIList"); - SQAIVehicleList.AddConstructor<void (ScriptVehicleList::*)(), 1>(engine, "x"); - - SQAIVehicleList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_Station, ST_AI>() { return "AIVehicleList_Station"; } - -void SQAIVehicleList_Station_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_Station, ST_AI> SQAIVehicleList_Station("AIVehicleList_Station"); - SQAIVehicleList_Station.PreRegister(engine, "AIList"); - SQAIVehicleList_Station.AddConstructor<void (ScriptVehicleList_Station::*)(StationID station_id), 2>(engine, "xi"); - - SQAIVehicleList_Station.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_Depot, ST_AI>() { return "AIVehicleList_Depot"; } - -void SQAIVehicleList_Depot_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_Depot, ST_AI> SQAIVehicleList_Depot("AIVehicleList_Depot"); - SQAIVehicleList_Depot.PreRegister(engine, "AIList"); - SQAIVehicleList_Depot.AddConstructor<void (ScriptVehicleList_Depot::*)(TileIndex tile), 2>(engine, "xi"); - - SQAIVehicleList_Depot.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_SharedOrders, ST_AI>() { return "AIVehicleList_SharedOrders"; } - -void SQAIVehicleList_SharedOrders_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_SharedOrders, ST_AI> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders"); - SQAIVehicleList_SharedOrders.PreRegister(engine, "AIList"); - SQAIVehicleList_SharedOrders.AddConstructor<void (ScriptVehicleList_SharedOrders::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQAIVehicleList_SharedOrders.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_Group, ST_AI>() { return "AIVehicleList_Group"; } - -void SQAIVehicleList_Group_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_Group, ST_AI> SQAIVehicleList_Group("AIVehicleList_Group"); - SQAIVehicleList_Group.PreRegister(engine, "AIList"); - SQAIVehicleList_Group.AddConstructor<void (ScriptVehicleList_Group::*)(GroupID group_id), 2>(engine, "xi"); - - SQAIVehicleList_Group.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_DefaultGroup, ST_AI>() { return "AIVehicleList_DefaultGroup"; } - -void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_DefaultGroup, ST_AI> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup"); - SQAIVehicleList_DefaultGroup.PreRegister(engine, "AIList"); - SQAIVehicleList_DefaultGroup.AddConstructor<void (ScriptVehicleList_DefaultGroup::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi"); - - SQAIVehicleList_DefaultGroup.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_waypoint.hpp.sq b/src/script/api/ai/ai_waypoint.hpp.sq deleted file mode 100644 index 3e2b64b46..000000000 --- a/src/script/api/ai/ai_waypoint.hpp.sq +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypoint.hpp" -#include "../template/template_waypoint.hpp.sq" - - -template <> const char *GetClassName<ScriptWaypoint, ST_AI>() { return "AIWaypoint"; } - -void SQAIWaypoint_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypoint, ST_AI> SQAIWaypoint("AIWaypoint"); - SQAIWaypoint.PreRegister(engine, "AIBaseStation"); - SQAIWaypoint.AddConstructor<void (ScriptWaypoint::*)(), 1>(engine, "x"); - - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_BASE, "ERR_WAYPOINT_BASE"); - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT"); - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS"); - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_RAIL, "WAYPOINT_RAIL"); - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_BUOY, "WAYPOINT_BUOY"); - SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_ANY, "WAYPOINT_ANY"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT); - ScriptError::RegisterErrorMap(STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS); - - ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT"); - ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS"); - - SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::IsValidWaypoint, "IsValidWaypoint", 2, ".i"); - SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::GetWaypointID, "GetWaypointID", 2, ".i"); - SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::HasWaypointType, "HasWaypointType", 3, ".ii"); - - SQAIWaypoint.PostRegister(engine); -} diff --git a/src/script/api/ai/ai_waypointlist.hpp.sq b/src/script/api/ai/ai_waypointlist.hpp.sq deleted file mode 100644 index c8359baed..000000000 --- a/src/script/api/ai/ai_waypointlist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypointlist.hpp" -#include "../template/template_waypointlist.hpp.sq" - - -template <> const char *GetClassName<ScriptWaypointList, ST_AI>() { return "AIWaypointList"; } - -void SQAIWaypointList_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypointList, ST_AI> SQAIWaypointList("AIWaypointList"); - SQAIWaypointList.PreRegister(engine, "AIList"); - SQAIWaypointList.AddConstructor<void (ScriptWaypointList::*)(ScriptWaypoint::WaypointType waypoint_type), 2>(engine, "xi"); - - SQAIWaypointList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptWaypointList_Vehicle, ST_AI>() { return "AIWaypointList_Vehicle"; } - -void SQAIWaypointList_Vehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypointList_Vehicle, ST_AI> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle"); - SQAIWaypointList_Vehicle.PreRegister(engine, "AIList"); - SQAIWaypointList_Vehicle.AddConstructor<void (ScriptWaypointList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQAIWaypointList_Vehicle.PostRegister(engine); -} diff --git a/src/script/api/game/game_accounting.hpp.sq b/src/script/api/game/game_accounting.hpp.sq deleted file mode 100644 index 5b78909bd..000000000 --- a/src/script/api/game/game_accounting.hpp.sq +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_accounting.hpp" -#include "../template/template_accounting.hpp.sq" - - -template <> const char *GetClassName<ScriptAccounting, ST_GS>() { return "GSAccounting"; } - -void SQGSAccounting_Register(Squirrel *engine) -{ - DefSQClass<ScriptAccounting, ST_GS> SQGSAccounting("GSAccounting"); - SQGSAccounting.PreRegister(engine); - SQGSAccounting.AddConstructor<void (ScriptAccounting::*)(), 1>(engine, "x"); - - SQGSAccounting.DefSQMethod(engine, &ScriptAccounting::GetCosts, "GetCosts", 1, "x"); - SQGSAccounting.DefSQMethod(engine, &ScriptAccounting::ResetCosts, "ResetCosts", 1, "x"); - - SQGSAccounting.PostRegister(engine); -} diff --git a/src/script/api/game/game_admin.hpp.sq b/src/script/api/game/game_admin.hpp.sq deleted file mode 100644 index 6616f2706..000000000 --- a/src/script/api/game/game_admin.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_admin.hpp" -#include "../template/template_admin.hpp.sq" - - -template <> const char *GetClassName<ScriptAdmin, ST_GS>() { return "GSAdmin"; } - -void SQGSAdmin_Register(Squirrel *engine) -{ - DefSQClass<ScriptAdmin, ST_GS> SQGSAdmin("GSAdmin"); - SQGSAdmin.PreRegister(engine); - SQGSAdmin.AddConstructor<void (ScriptAdmin::*)(), 1>(engine, "x"); - - SQGSAdmin.DefSQAdvancedStaticMethod(engine, &ScriptAdmin::Send, "Send"); - - SQGSAdmin.PostRegister(engine); -} diff --git a/src/script/api/game/game_airport.hpp.sq b/src/script/api/game/game_airport.hpp.sq deleted file mode 100644 index 32e0c12a1..000000000 --- a/src/script/api/game/game_airport.hpp.sq +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_airport.hpp" -#include "../template/template_airport.hpp.sq" - - -template <> const char *GetClassName<ScriptAirport, ST_GS>() { return "GSAirport"; } - -void SQGSAirport_Register(Squirrel *engine) -{ - DefSQClass<ScriptAirport, ST_GS> SQGSAirport("GSAirport"); - SQGSAirport.PreRegister(engine); - SQGSAirport.AddConstructor<void (ScriptAirport::*)(), 1>(engine, "x"); - - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_SMALL, "AT_SMALL"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_LARGE, "AT_LARGE"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_METROPOLITAN, "AT_METROPOLITAN"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERNATIONAL, "AT_INTERNATIONAL"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_COMMUTER, "AT_COMMUTER"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERCON, "AT_INTERCON"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIPORT, "AT_HELIPORT"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELISTATION, "AT_HELISTATION"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIDEPOT, "AT_HELIDEPOT"); - SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INVALID, "AT_INVALID"); - SQGSAirport.DefSQConst(engine, ScriptAirport::PT_HELICOPTER, "PT_HELICOPTER"); - SQGSAirport.DefSQConst(engine, ScriptAirport::PT_SMALL_PLANE, "PT_SMALL_PLANE"); - SQGSAirport.DefSQConst(engine, ScriptAirport::PT_BIG_PLANE, "PT_BIG_PLANE"); - SQGSAirport.DefSQConst(engine, ScriptAirport::PT_INVALID, "PT_INVALID"); - - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsValidAirportType, "IsValidAirportType", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetPrice, "GetPrice", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsHangarTile, "IsHangarTile", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportTile, "IsAirportTile", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportWidth, "GetAirportWidth", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportHeight, "GetAirportHeight", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNumHangars, "GetNumHangars", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::BuildAirport, "BuildAirport", 4, ".iii"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::RemoveAirport, "RemoveAirport", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportType, "GetAirportType", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i"); - - SQGSAirport.PostRegister(engine); -} diff --git a/src/script/api/game/game_base.hpp.sq b/src/script/api/game/game_base.hpp.sq deleted file mode 100644 index 01791e186..000000000 --- a/src/script/api/game/game_base.hpp.sq +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_base.hpp" -#include "../template/template_base.hpp.sq" - - -template <> const char *GetClassName<ScriptBase, ST_GS>() { return "GSBase"; } - -void SQGSBase_Register(Squirrel *engine) -{ - DefSQClass<ScriptBase, ST_GS> SQGSBase("GSBase"); - SQGSBase.PreRegister(engine); - SQGSBase.AddConstructor<void (ScriptBase::*)(), 1>(engine, "x"); - - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Rand, "Rand", 1, "."); - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandItem, "RandItem", 2, ".i"); - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRange, "RandRange", 2, ".i"); - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRangeItem, "RandRangeItem", 3, ".ii"); - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Chance, "Chance", 3, ".ii"); - SQGSBase.DefSQStaticMethod(engine, &ScriptBase::ChanceItem, "ChanceItem", 4, ".iii"); - - SQGSBase.PostRegister(engine); -} diff --git a/src/script/api/game/game_basestation.hpp.sq b/src/script/api/game/game_basestation.hpp.sq deleted file mode 100644 index 91f7b575e..000000000 --- a/src/script/api/game/game_basestation.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_basestation.hpp" -#include "../template/template_basestation.hpp.sq" - - -template <> const char *GetClassName<ScriptBaseStation, ST_GS>() { return "GSBaseStation"; } - -void SQGSBaseStation_Register(Squirrel *engine) -{ - DefSQClass<ScriptBaseStation, ST_GS> SQGSBaseStation("GSBaseStation"); - SQGSBaseStation.PreRegister(engine); - SQGSBaseStation.AddConstructor<void (ScriptBaseStation::*)(), 1>(engine, "x"); - - SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_NEW, "STATION_NEW"); - SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT"); - SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_INVALID, "STATION_INVALID"); - - SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i"); - SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetName, "GetName", 2, ".i"); - SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::SetName, "SetName", 3, ".i."); - SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetLocation, "GetLocation", 2, ".i"); - SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i"); - - SQGSBaseStation.PostRegister(engine); -} diff --git a/src/script/api/game/game_bridge.hpp.sq b/src/script/api/game/game_bridge.hpp.sq deleted file mode 100644 index be9ef4bdf..000000000 --- a/src/script/api/game/game_bridge.hpp.sq +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridge.hpp" -#include "../template/template_bridge.hpp.sq" - - -template <> const char *GetClassName<ScriptBridge, ST_GS>() { return "GSBridge"; } - -void SQGSBridge_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridge, ST_GS> SQGSBridge("GSBridge"); - SQGSBridge.PreRegister(engine); - SQGSBridge.AddConstructor<void (ScriptBridge::*)(), 1>(engine, "x"); - - SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_BASE, "ERR_BRIDGE_BASE"); - SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE"); - SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER"); - SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT"); - - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER); - ScriptError::RegisterErrorMap(STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT); - - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE"); - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER"); - ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT"); - - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::BuildBridge, "BuildBridge", 5, ".iiii"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::RemoveBridge, "RemoveBridge", 2, ".i"); - SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i"); - - SQGSBridge.PostRegister(engine); -} diff --git a/src/script/api/game/game_bridgelist.hpp.sq b/src/script/api/game/game_bridgelist.hpp.sq deleted file mode 100644 index 36a18bc22..000000000 --- a/src/script/api/game/game_bridgelist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridgelist.hpp" -#include "../template/template_bridgelist.hpp.sq" - - -template <> const char *GetClassName<ScriptBridgeList, ST_GS>() { return "GSBridgeList"; } - -void SQGSBridgeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridgeList, ST_GS> SQGSBridgeList("GSBridgeList"); - SQGSBridgeList.PreRegister(engine, "GSList"); - SQGSBridgeList.AddConstructor<void (ScriptBridgeList::*)(), 1>(engine, "x"); - - SQGSBridgeList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptBridgeList_Length, ST_GS>() { return "GSBridgeList_Length"; } - -void SQGSBridgeList_Length_Register(Squirrel *engine) -{ - DefSQClass<ScriptBridgeList_Length, ST_GS> SQGSBridgeList_Length("GSBridgeList_Length"); - SQGSBridgeList_Length.PreRegister(engine, "GSList"); - SQGSBridgeList_Length.AddConstructor<void (ScriptBridgeList_Length::*)(uint length), 2>(engine, "xi"); - - SQGSBridgeList_Length.PostRegister(engine); -} diff --git a/src/script/api/game/game_cargo.hpp.sq b/src/script/api/game/game_cargo.hpp.sq deleted file mode 100644 index 0f018bc57..000000000 --- a/src/script/api/game/game_cargo.hpp.sq +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargo.hpp" -#include "../template/template_cargo.hpp.sq" - - -template <> const char *GetClassName<ScriptCargo, ST_GS>() { return "GSCargo"; } - -void SQGSCargo_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargo, ST_GS> SQGSCargo("GSCargo"); - SQGSCargo.PreRegister(engine); - SQGSCargo.AddConstructor<void (ScriptCargo::*)(), 1>(engine, "x"); - - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PASSENGERS, "CC_PASSENGERS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_MAIL, "CC_MAIL"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_EXPRESS, "CC_EXPRESS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_ARMOURED, "CC_ARMOURED"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_BULK, "CC_BULK"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PIECE_GOODS, "CC_PIECE_GOODS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_LIQUID, "CC_LIQUID"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_REFRIGERATED, "CC_REFRIGERATED"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_HAZARDOUS, "CC_HAZARDOUS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CC_COVERED, "CC_COVERED"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_NONE, "TE_NONE"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_PASSENGERS, "TE_PASSENGERS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_MAIL, "TE_MAIL"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_GOODS, "TE_GOODS"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_WATER, "TE_WATER"); - SQGSCargo.DefSQConst(engine, ScriptCargo::TE_FOOD, "TE_FOOD"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CT_AUTO_REFIT, "CT_AUTO_REFIT"); - SQGSCargo.DefSQConst(engine, ScriptCargo::CT_NO_REFIT, "CT_NO_REFIT"); - SQGSCargo.DefSQConst(engine, ScriptCargo::DT_MANUAL, "DT_MANUAL"); - SQGSCargo.DefSQConst(engine, ScriptCargo::DT_ASYMMETRIC, "DT_ASYMMETRIC"); - SQGSCargo.DefSQConst(engine, ScriptCargo::DT_SYMMETRIC, "DT_SYMMETRIC"); - SQGSCargo.DefSQConst(engine, ScriptCargo::INVALID_DISTRIBUTION_TYPE, "INVALID_DISTRIBUTION_TYPE"); - - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidCargo, "IsValidCargo", 2, ".i"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidTownEffect, "IsValidTownEffect", 2, ".i"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoLabel, "GetCargoLabel", 2, ".i"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsFreight, "IsFreight", 2, ".i"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::HasCargoClass, "HasCargoClass", 3, ".ii"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetTownEffect, "GetTownEffect", 2, ".i"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoIncome, "GetCargoIncome", 4, ".iii"); - SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetDistributionType, "GetDistributionType", 2, ".i"); - - SQGSCargo.PostRegister(engine); -} diff --git a/src/script/api/game/game_cargolist.hpp.sq b/src/script/api/game/game_cargolist.hpp.sq deleted file mode 100644 index f1fd3ef84..000000000 --- a/src/script/api/game/game_cargolist.hpp.sq +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargolist.hpp" -#include "../template/template_cargolist.hpp.sq" - - -template <> const char *GetClassName<ScriptCargoList, ST_GS>() { return "GSCargoList"; } - -void SQGSCargoList_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList, ST_GS> SQGSCargoList("GSCargoList"); - SQGSCargoList.PreRegister(engine, "GSList"); - SQGSCargoList.AddConstructor<void (ScriptCargoList::*)(), 1>(engine, "x"); - - SQGSCargoList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_IndustryAccepting, ST_GS>() { return "GSCargoList_IndustryAccepting"; } - -void SQGSCargoList_IndustryAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_IndustryAccepting, ST_GS> SQGSCargoList_IndustryAccepting("GSCargoList_IndustryAccepting"); - SQGSCargoList_IndustryAccepting.PreRegister(engine, "GSList"); - SQGSCargoList_IndustryAccepting.AddConstructor<void (ScriptCargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi"); - - SQGSCargoList_IndustryAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_IndustryProducing, ST_GS>() { return "GSCargoList_IndustryProducing"; } - -void SQGSCargoList_IndustryProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_IndustryProducing, ST_GS> SQGSCargoList_IndustryProducing("GSCargoList_IndustryProducing"); - SQGSCargoList_IndustryProducing.PreRegister(engine, "GSList"); - SQGSCargoList_IndustryProducing.AddConstructor<void (ScriptCargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi"); - - SQGSCargoList_IndustryProducing.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptCargoList_StationAccepting, ST_GS>() { return "GSCargoList_StationAccepting"; } - -void SQGSCargoList_StationAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoList_StationAccepting, ST_GS> SQGSCargoList_StationAccepting("GSCargoList_StationAccepting"); - SQGSCargoList_StationAccepting.PreRegister(engine, "GSList"); - SQGSCargoList_StationAccepting.AddConstructor<void (ScriptCargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi"); - - SQGSCargoList_StationAccepting.PostRegister(engine); -} diff --git a/src/script/api/game/game_cargomonitor.hpp.sq b/src/script/api/game/game_cargomonitor.hpp.sq deleted file mode 100644 index ccf9f3d16..000000000 --- a/src/script/api/game/game_cargomonitor.hpp.sq +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargomonitor.hpp" -#include "../template/template_cargomonitor.hpp.sq" - - -template <> const char *GetClassName<ScriptCargoMonitor, ST_GS>() { return "GSCargoMonitor"; } - -void SQGSCargoMonitor_Register(Squirrel *engine) -{ - DefSQClass<ScriptCargoMonitor, ST_GS> SQGSCargoMonitor("GSCargoMonitor"); - SQGSCargoMonitor.PreRegister(engine); - SQGSCargoMonitor.AddConstructor<void (ScriptCargoMonitor::*)(), 1>(engine, "x"); - - SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetTownDeliveryAmount, "GetTownDeliveryAmount", 5, ".iiib"); - SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetIndustryDeliveryAmount, "GetIndustryDeliveryAmount", 5, ".iiib"); - SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetTownPickupAmount, "GetTownPickupAmount", 5, ".iiib"); - SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetIndustryPickupAmount, "GetIndustryPickupAmount", 5, ".iiib"); - SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::StopAllMonitoring, "StopAllMonitoring", 1, "."); - - SQGSCargoMonitor.PostRegister(engine); -} diff --git a/src/script/api/game/game_client.hpp.sq b/src/script/api/game/game_client.hpp.sq deleted file mode 100644 index 3a7f8491f..000000000 --- a/src/script/api/game/game_client.hpp.sq +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_client.hpp" -#include "../template/template_client.hpp.sq" - - -template <> const char *GetClassName<ScriptClient, ST_GS>() { return "GSClient"; } - -void SQGSClient_Register(Squirrel *engine) -{ - DefSQClass<ScriptClient, ST_GS> SQGSClient("GSClient"); - SQGSClient.PreRegister(engine); - SQGSClient.AddConstructor<void (ScriptClient::*)(), 1>(engine, "x"); - - SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_INVALID, "CLIENT_INVALID"); - SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_SERVER, "CLIENT_SERVER"); - SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_FIRST, "CLIENT_FIRST"); - - SQGSClient.DefSQStaticMethod(engine, &ScriptClient::ResolveClientID, "ResolveClientID", 2, ".i"); - SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetName, "GetName", 2, ".i"); - SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetCompany, "GetCompany", 2, ".i"); - SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetJoinDate, "GetJoinDate", 2, ".i"); - - SQGSClient.PostRegister(engine); -} diff --git a/src/script/api/game/game_clientlist.hpp.sq b/src/script/api/game/game_clientlist.hpp.sq deleted file mode 100644 index c341786f1..000000000 --- a/src/script/api/game/game_clientlist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_clientlist.hpp" -#include "../template/template_clientlist.hpp.sq" - - -template <> const char *GetClassName<ScriptClientList, ST_GS>() { return "GSClientList"; } - -void SQGSClientList_Register(Squirrel *engine) -{ - DefSQClass<ScriptClientList, ST_GS> SQGSClientList("GSClientList"); - SQGSClientList.PreRegister(engine, "GSList"); - SQGSClientList.AddConstructor<void (ScriptClientList::*)(), 1>(engine, "x"); - - SQGSClientList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptClientList_Company, ST_GS>() { return "GSClientList_Company"; } - -void SQGSClientList_Company_Register(Squirrel *engine) -{ - DefSQClass<ScriptClientList_Company, ST_GS> SQGSClientList_Company("GSClientList_Company"); - SQGSClientList_Company.PreRegister(engine, "GSList"); - SQGSClientList_Company.AddConstructor<void (ScriptClientList_Company::*)(ScriptCompany::CompanyID company), 2>(engine, "xi"); - - SQGSClientList_Company.PostRegister(engine); -} diff --git a/src/script/api/game/game_company.hpp.sq b/src/script/api/game/game_company.hpp.sq deleted file mode 100644 index 5bce4065c..000000000 --- a/src/script/api/game/game_company.hpp.sq +++ /dev/null @@ -1,117 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_company.hpp" -#include "../template/template_company.hpp.sq" - - -template <> const char *GetClassName<ScriptCompany, ST_GS>() { return "GSCompany"; } - -void SQGSCompany_Register(Squirrel *engine) -{ - DefSQClass<ScriptCompany, ST_GS> SQGSCompany("GSCompany"); - SQGSCompany.PreRegister(engine); - SQGSCompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x"); - - SQGSCompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR"); - SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DEFAULT, "LS_DEFAULT"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_STEAM, "LS_STEAM"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DIESEL, "LS_DIESEL"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_ELECTRIC, "LS_ELECTRIC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_MONORAIL, "LS_MONORAIL"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_MAGLEV, "LS_MAGLEV"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DMU, "LS_DMU"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_EMU, "LS_EMU"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_STEAM, "LS_PASSENGER_WAGON_STEAM"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_DIESEL, "LS_PASSENGER_WAGON_DIESEL"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_ELECTRIC, "LS_PASSENGER_WAGON_ELECTRIC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MONORAIL, "LS_PASSENGER_WAGON_MONORAIL"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MAGLEV, "LS_PASSENGER_WAGON_MAGLEV"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_WAGON, "LS_FREIGHT_WAGON"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_BUS, "LS_BUS"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_TRUCK, "LS_TRUCK"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_SHIP, "LS_PASSENGER_SHIP"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_SHIP, "LS_FREIGHT_SHIP"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_HELICOPTER, "LS_HELICOPTER"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_SMALL_PLANE, "LS_SMALL_PLANE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_LARGE_PLANE, "LS_LARGE_PLANE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_TRAM, "LS_PASSENGER_TRAM"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_TRAM, "LS_FREIGHT_TRAM"); - SQGSCompany.DefSQConst(engine, ScriptCompany::LS_INVALID, "LS_INVALID"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_BLUE, "COLOUR_DARK_BLUE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PALE_GREEN, "COLOUR_PALE_GREEN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PINK, "COLOUR_PINK"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_YELLOW, "COLOUR_YELLOW"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_RED, "COLOUR_RED"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_LIGHT_BLUE, "COLOUR_LIGHT_BLUE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_GREEN, "COLOUR_GREEN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_GREEN, "COLOUR_DARK_GREEN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_BLUE, "COLOUR_BLUE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_CREAM, "COLOUR_CREAM"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_MAUVE, "COLOUR_MAUVE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PURPLE, "COLOUR_PURPLE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_ORANGE, "COLOUR_ORANGE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_BROWN, "COLOUR_BROWN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_GREY, "COLOUR_GREY"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_WHITE, "COLOUR_WHITE"); - SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_INVALID, "COLOUR_INVALID"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_CONSTRUCTION, "EXPENSES_CONSTRUCTION"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_NEW_VEHICLES, "EXPENSES_NEW_VEHICLES"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_TRAIN_RUN, "EXPENSES_TRAIN_RUN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_ROADVEH_RUN, "EXPENSES_ROADVEH_RUN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_AIRCRAFT_RUN, "EXPENSES_AIRCRAFT_RUN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_SHIP_RUN, "EXPENSES_SHIP_RUN"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_PROPERTY, "EXPENSES_PROPERTY"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_TRAIN_INC, "EXPENSES_TRAIN_INC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_ROADVEH_INC, "EXPENSES_ROADVEH_INC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_AIRCRAFT_INC, "EXPENSES_AIRCRAFT_INC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_SHIP_INC, "EXPENSES_SHIP_INC"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_LOAN_INT, "EXPENSES_LOAN_INT"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_OTHER, "EXPENSES_OTHER"); - SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_INVALID, "EXPENSES_INVALID"); - - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetName, "SetName", 2, ".."); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetName, "GetName", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentName, "SetPresidentName", 2, ".."); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentName, "GetPresidentName", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentGender, "GetPresidentGender", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetLoanAmount, "SetLoanAmount", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanAmount, "GetLoanAmount", 1, "."); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, "."); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanInterval, "GetLoanInterval", 1, "."); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetBankBalance, "GetBankBalance", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::ChangeBankBalance, "ChangeBankBalance", 4, ".iii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetPrimaryLiveryColour, "SetPrimaryLiveryColour", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetSecondaryLiveryColour, "SetSecondaryLiveryColour", 3, ".ii"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPrimaryLiveryColour, "GetPrimaryLiveryColour", 2, ".i"); - SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetSecondaryLiveryColour, "GetSecondaryLiveryColour", 2, ".i"); - - SQGSCompany.PostRegister(engine); -} diff --git a/src/script/api/game/game_companymode.hpp.sq b/src/script/api/game/game_companymode.hpp.sq deleted file mode 100644 index 73eb5e26b..000000000 --- a/src/script/api/game/game_companymode.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_companymode.hpp" -#include "../template/template_companymode.hpp.sq" - - -template <> const char *GetClassName<ScriptCompanyMode, ST_GS>() { return "GSCompanyMode"; } - -void SQGSCompanyMode_Register(Squirrel *engine) -{ - DefSQClass<ScriptCompanyMode, ST_GS> SQGSCompanyMode("GSCompanyMode"); - SQGSCompanyMode.PreRegister(engine); - SQGSCompanyMode.AddConstructor<void (ScriptCompanyMode::*)(int company), 2>(engine, "xi"); - - SQGSCompanyMode.PostRegister(engine); -} diff --git a/src/script/api/game/game_date.hpp.sq b/src/script/api/game/game_date.hpp.sq deleted file mode 100644 index 10dc2ad24..000000000 --- a/src/script/api/game/game_date.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_date.hpp" -#include "../template/template_date.hpp.sq" - - -template <> const char *GetClassName<ScriptDate, ST_GS>() { return "GSDate"; } - -void SQGSDate_Register(Squirrel *engine) -{ - DefSQClass<ScriptDate, ST_GS> SQGSDate("GSDate"); - SQGSDate.PreRegister(engine); - SQGSDate.AddConstructor<void (ScriptDate::*)(), 1>(engine, "x"); - - SQGSDate.DefSQConst(engine, ScriptDate::DATE_INVALID, "DATE_INVALID"); - - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::IsValidDate, "IsValidDate", 2, ".i"); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetCurrentDate, "GetCurrentDate", 1, "."); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetYear, "GetYear", 2, ".i"); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetMonth, "GetMonth", 2, ".i"); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDayOfMonth, "GetDayOfMonth", 2, ".i"); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDate, "GetDate", 4, ".iii"); - SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetSystemTime, "GetSystemTime", 1, "."); - - SQGSDate.PostRegister(engine); -} diff --git a/src/script/api/game/game_depotlist.hpp.sq b/src/script/api/game/game_depotlist.hpp.sq deleted file mode 100644 index e01aa99a0..000000000 --- a/src/script/api/game/game_depotlist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_depotlist.hpp" -#include "../template/template_depotlist.hpp.sq" - - -template <> const char *GetClassName<ScriptDepotList, ST_GS>() { return "GSDepotList"; } - -void SQGSDepotList_Register(Squirrel *engine) -{ - DefSQClass<ScriptDepotList, ST_GS> SQGSDepotList("GSDepotList"); - SQGSDepotList.PreRegister(engine, "GSList"); - SQGSDepotList.AddConstructor<void (ScriptDepotList::*)(ScriptTile::TransportType transport_type), 2>(engine, "xi"); - - SQGSDepotList.PostRegister(engine); -} diff --git a/src/script/api/game/game_engine.hpp.sq b/src/script/api/game/game_engine.hpp.sq deleted file mode 100644 index 2efa1414a..000000000 --- a/src/script/api/game/game_engine.hpp.sq +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_engine.hpp" -#include "../template/template_engine.hpp.sq" - - -template <> const char *GetClassName<ScriptEngine, ST_GS>() { return "GSEngine"; } - -void SQGSEngine_Register(Squirrel *engine) -{ - DefSQClass<ScriptEngine, ST_GS> SQGSEngine("GSEngine"); - SQGSEngine.PreRegister(engine); - SQGSEngine.AddConstructor<void (ScriptEngine::*)(), 1>(engine, "x"); - - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsValidEngine, "IsValidEngine", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsBuildable, "IsBuildable", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetName, "GetName", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCargoType, "GetCargoType", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanPullCargo, "CanPullCargo", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCapacity, "GetCapacity", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetReliability, "GetReliability", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPrice, "GetPrice", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxAge, "GetMaxAge", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRunningCost, "GetRunningCost", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPower, "GetPower", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetWeight, "GetWeight", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetDesignDate, "GetDesignDate", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetVehicleType, "GetVehicleType", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsWagon, "IsWagon", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRail, "HasPowerOnRail", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRoad, "CanRunOnRoad", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRoad, "HasPowerOnRoad", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRoadType, "GetRoadType", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRailType, "GetRailType", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsArticulated, "IsArticulated", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPlaneType, "GetPlaneType", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::EnableForCompany, "EnableForCompany", 3, ".ii"); - SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::DisableForCompany, "DisableForCompany", 3, ".ii"); - - SQGSEngine.PostRegister(engine); -} diff --git a/src/script/api/game/game_enginelist.hpp.sq b/src/script/api/game/game_enginelist.hpp.sq deleted file mode 100644 index 9ffbba636..000000000 --- a/src/script/api/game/game_enginelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_enginelist.hpp" -#include "../template/template_enginelist.hpp.sq" - - -template <> const char *GetClassName<ScriptEngineList, ST_GS>() { return "GSEngineList"; } - -void SQGSEngineList_Register(Squirrel *engine) -{ - DefSQClass<ScriptEngineList, ST_GS> SQGSEngineList("GSEngineList"); - SQGSEngineList.PreRegister(engine, "GSList"); - SQGSEngineList.AddConstructor<void (ScriptEngineList::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi"); - - SQGSEngineList.PostRegister(engine); -} diff --git a/src/script/api/game/game_error.hpp.sq b/src/script/api/game/game_error.hpp.sq deleted file mode 100644 index f1f88b337..000000000 --- a/src/script/api/game/game_error.hpp.sq +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_error.hpp" -#include "../template/template_error.hpp.sq" - - -template <> const char *GetClassName<ScriptError, ST_GS>() { return "GSError"; } - -void SQGSError_Register(Squirrel *engine) -{ - DefSQClass<ScriptError, ST_GS> SQGSError("GSError"); - SQGSError.PreRegister(engine); - SQGSError.AddConstructor<void (ScriptError::*)(), 1>(engine, "x"); - - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_NONE, "ERR_CAT_NONE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_GENERAL, "ERR_CAT_GENERAL"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_VEHICLE, "ERR_CAT_VEHICLE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_STATION, "ERR_CAT_STATION"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_BRIDGE, "ERR_CAT_BRIDGE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_TUNNEL, "ERR_CAT_TUNNEL"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_TILE, "ERR_CAT_TILE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_SIGN, "ERR_CAT_SIGN"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_RAIL, "ERR_CAT_RAIL"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_ROAD, "ERR_CAT_ROAD"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_ORDER, "ERR_CAT_ORDER"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_MARINE, "ERR_CAT_MARINE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_WAYPOINT, "ERR_CAT_WAYPOINT"); - SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_BIT_SIZE, "ERR_CAT_BIT_SIZE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_NONE, "ERR_NONE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN"); - SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED"); - SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG"); - SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS"); - SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY"); - SQGSError.DefSQConst(engine, ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR"); - SQGSError.DefSQConst(engine, ScriptError::ERR_GENERAL_BASE, "ERR_GENERAL_BASE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH"); - SQGSError.DefSQConst(engine, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES"); - SQGSError.DefSQConst(engine, ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT"); - SQGSError.DefSQConst(engine, ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR"); - SQGSError.DefSQConst(engine, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY"); - SQGSError.DefSQConst(engine, ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED"); - SQGSError.DefSQConst(engine, ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG"); - SQGSError.DefSQConst(engine, ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY"); - SQGSError.DefSQConst(engine, ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE"); - SQGSError.DefSQConst(engine, ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT"); - - ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT); - ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_BUOY_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_COMPANY_HEADQUARTERS_IN, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_ROAD_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptError::ERR_AREA_NOT_CLEAR); - ScriptError::RegisterErrorMap(STR_ERROR_AREA_IS_OWNED_BY_ANOTHER, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY); - ScriptError::RegisterErrorMap(STR_ERROR_OWNED_BY, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY); - ScriptError::RegisterErrorMap(STR_ERROR_NAME_MUST_BE_UNIQUE, ScriptError::ERR_NAME_IS_NOT_UNIQUE); - ScriptError::RegisterErrorMap(STR_ERROR_FLAT_LAND_REQUIRED, ScriptError::ERR_FLAT_LAND_REQUIRED); - ScriptError::RegisterErrorMap(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION, ScriptError::ERR_LAND_SLOPED_WRONG); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE); - ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT); - - ScriptError::RegisterErrorMapString(ScriptError::ERR_NONE, "ERR_NONE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE"); - ScriptError::RegisterErrorMapString(ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT"); - - SQGSError.DefSQStaticMethod(engine, &ScriptError::GetErrorCategory, "GetErrorCategory", 1, "."); - SQGSError.DefSQStaticMethod(engine, &ScriptError::GetLastError, "GetLastError", 1, "."); - SQGSError.DefSQStaticMethod(engine, &ScriptError::GetLastErrorString, "GetLastErrorString", 1, "."); - - SQGSError.PostRegister(engine); -} diff --git a/src/script/api/game/game_event.hpp.sq b/src/script/api/game/game_event.hpp.sq deleted file mode 100644 index 2be056cd8..000000000 --- a/src/script/api/game/game_event.hpp.sq +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event.hpp" -#include "../template/template_event.hpp.sq" - - -template <> const char *GetClassName<ScriptEvent, ST_GS>() { return "GSEvent"; } - -void SQGSEvent_Register(Squirrel *engine) -{ - DefSQClass<ScriptEvent, ST_GS> SQGSEvent("GSEvent"); - SQGSEvent.PreRegister(engine); - SQGSEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi"); - - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INVALID, "ET_INVALID"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TEST, "ET_TEST"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER, "ET_SUBSIDY_OFFER"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED, "ET_SUBSIDY_OFFER_EXPIRED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED, "ET_SUBSIDY_AWARDED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED, "ET_SUBSIDY_EXPIRED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW, "ET_ENGINE_PREVIEW"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW, "ET_COMPANY_NEW"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE, "ET_COMPANY_IN_TROUBLE"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER, "ET_COMPANY_ASK_MERGER"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER, "ET_COMPANY_MERGER"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT, "ET_COMPANY_BANKRUPT"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED, "ET_VEHICLE_CRASHED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST, "ET_VEHICLE_LOST"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT, "ET_VEHICLE_WAITING_IN_DEPOT"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE, "ET_VEHICLE_UNPROFITABLE"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN, "ET_INDUSTRY_OPEN"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE, "ET_INDUSTRY_CLOSE"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE, "ET_ENGINE_AVAILABLE"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE, "ET_STATION_FIRST_VEHICLE"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED, "ET_TOWN_FOUNDED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_AIRCRAFT_DEST_TOO_FAR, "ET_AIRCRAFT_DEST_TOO_FAR"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT, "ET_ADMIN_PORT"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_AUTOREPLACED, "ET_VEHICLE_AUTOREPLACED"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_BUTTON_CLICK, "ET_STORYPAGE_BUTTON_CLICK"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_TILE_SELECT, "ET_STORYPAGE_TILE_SELECT"); - SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_VEHICLE_SELECT, "ET_STORYPAGE_VEHICLE_SELECT"); - - SQGSEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x"); - - SQGSEvent.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventController, ST_GS>() { return "GSEventController"; } - -void SQGSEventController_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventController, ST_GS> SQGSEventController("GSEventController"); - SQGSEventController.PreRegister(engine); - SQGSEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x"); - - SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, "."); - SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent, "GetNextEvent", 1, "."); - - SQGSEventController.PostRegister(engine); -} diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq deleted file mode 100644 index 6a0e89b49..000000000 --- a/src/script/api/game/game_event_types.hpp.sq +++ /dev/null @@ -1,363 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event_types.hpp" -#include "../template/template_event_types.hpp.sq" - - -template <> const char *GetClassName<ScriptEventVehicleCrashed, ST_GS>() { return "GSEventVehicleCrashed"; } - -void SQGSEventVehicleCrashed_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventVehicleCrashed, ST_GS> SQGSEventVehicleCrashed("GSEventVehicleCrashed"); - SQGSEventVehicleCrashed.PreRegister(engine, "GSEvent"); - - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_TRAIN, "CRASH_TRAIN"); - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING, "CRASH_RV_LEVEL_CROSSING"); - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_UFO, "CRASH_RV_UFO"); - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, "CRASH_PLANE_LANDING"); - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT, "CRASH_AIRCRAFT_NO_AIRPORT"); - SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_FLOODED, "CRASH_FLOODED"); - - SQGSEventVehicleCrashed.DefSQStaticMethod(engine, &ScriptEventVehicleCrashed::Convert, "Convert", 2, ".x"); - - SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetVehicleID, "GetVehicleID", 1, "x"); - SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashSite, "GetCrashSite", 1, "x"); - SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashReason, "GetCrashReason", 1, "x"); - - SQGSEventVehicleCrashed.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyOffer, ST_GS>() { return "GSEventSubsidyOffer"; } - -void SQGSEventSubsidyOffer_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyOffer, ST_GS> SQGSEventSubsidyOffer("GSEventSubsidyOffer"); - SQGSEventSubsidyOffer.PreRegister(engine, "GSEvent"); - - SQGSEventSubsidyOffer.DefSQStaticMethod(engine, &ScriptEventSubsidyOffer::Convert, "Convert", 2, ".x"); - - SQGSEventSubsidyOffer.DefSQMethod(engine, &ScriptEventSubsidyOffer::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQGSEventSubsidyOffer.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyOfferExpired, ST_GS>() { return "GSEventSubsidyOfferExpired"; } - -void SQGSEventSubsidyOfferExpired_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyOfferExpired, ST_GS> SQGSEventSubsidyOfferExpired("GSEventSubsidyOfferExpired"); - SQGSEventSubsidyOfferExpired.PreRegister(engine, "GSEvent"); - - SQGSEventSubsidyOfferExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyOfferExpired::Convert, "Convert", 2, ".x"); - - SQGSEventSubsidyOfferExpired.DefSQMethod(engine, &ScriptEventSubsidyOfferExpired::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQGSEventSubsidyOfferExpired.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyAwarded, ST_GS>() { return "GSEventSubsidyAwarded"; } - -void SQGSEventSubsidyAwarded_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyAwarded, ST_GS> SQGSEventSubsidyAwarded("GSEventSubsidyAwarded"); - SQGSEventSubsidyAwarded.PreRegister(engine, "GSEvent"); - - SQGSEventSubsidyAwarded.DefSQStaticMethod(engine, &ScriptEventSubsidyAwarded::Convert, "Convert", 2, ".x"); - - SQGSEventSubsidyAwarded.DefSQMethod(engine, &ScriptEventSubsidyAwarded::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQGSEventSubsidyAwarded.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventSubsidyExpired, ST_GS>() { return "GSEventSubsidyExpired"; } - -void SQGSEventSubsidyExpired_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventSubsidyExpired, ST_GS> SQGSEventSubsidyExpired("GSEventSubsidyExpired"); - SQGSEventSubsidyExpired.PreRegister(engine, "GSEvent"); - - SQGSEventSubsidyExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyExpired::Convert, "Convert", 2, ".x"); - - SQGSEventSubsidyExpired.DefSQMethod(engine, &ScriptEventSubsidyExpired::GetSubsidyID, "GetSubsidyID", 1, "x"); - - SQGSEventSubsidyExpired.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyNew, ST_GS>() { return "GSEventCompanyNew"; } - -void SQGSEventCompanyNew_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyNew, ST_GS> SQGSEventCompanyNew("GSEventCompanyNew"); - SQGSEventCompanyNew.PreRegister(engine, "GSEvent"); - - SQGSEventCompanyNew.DefSQStaticMethod(engine, &ScriptEventCompanyNew::Convert, "Convert", 2, ".x"); - - SQGSEventCompanyNew.DefSQMethod(engine, &ScriptEventCompanyNew::GetCompanyID, "GetCompanyID", 1, "x"); - - SQGSEventCompanyNew.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyInTrouble, ST_GS>() { return "GSEventCompanyInTrouble"; } - -void SQGSEventCompanyInTrouble_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyInTrouble, ST_GS> SQGSEventCompanyInTrouble("GSEventCompanyInTrouble"); - SQGSEventCompanyInTrouble.PreRegister(engine, "GSEvent"); - - SQGSEventCompanyInTrouble.DefSQStaticMethod(engine, &ScriptEventCompanyInTrouble::Convert, "Convert", 2, ".x"); - - SQGSEventCompanyInTrouble.DefSQMethod(engine, &ScriptEventCompanyInTrouble::GetCompanyID, "GetCompanyID", 1, "x"); - - SQGSEventCompanyInTrouble.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyMerger, ST_GS>() { return "GSEventCompanyMerger"; } - -void SQGSEventCompanyMerger_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyMerger, ST_GS> SQGSEventCompanyMerger("GSEventCompanyMerger"); - SQGSEventCompanyMerger.PreRegister(engine, "GSEvent"); - - SQGSEventCompanyMerger.DefSQStaticMethod(engine, &ScriptEventCompanyMerger::Convert, "Convert", 2, ".x"); - - SQGSEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetOldCompanyID, "GetOldCompanyID", 1, "x"); - SQGSEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetNewCompanyID, "GetNewCompanyID", 1, "x"); - - SQGSEventCompanyMerger.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyBankrupt, ST_GS>() { return "GSEventCompanyBankrupt"; } - -void SQGSEventCompanyBankrupt_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyBankrupt, ST_GS> SQGSEventCompanyBankrupt("GSEventCompanyBankrupt"); - SQGSEventCompanyBankrupt.PreRegister(engine, "GSEvent"); - - SQGSEventCompanyBankrupt.DefSQStaticMethod(engine, &ScriptEventCompanyBankrupt::Convert, "Convert", 2, ".x"); - - SQGSEventCompanyBankrupt.DefSQMethod(engine, &ScriptEventCompanyBankrupt::GetCompanyID, "GetCompanyID", 1, "x"); - - SQGSEventCompanyBankrupt.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventIndustryOpen, ST_GS>() { return "GSEventIndustryOpen"; } - -void SQGSEventIndustryOpen_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventIndustryOpen, ST_GS> SQGSEventIndustryOpen("GSEventIndustryOpen"); - SQGSEventIndustryOpen.PreRegister(engine, "GSEvent"); - - SQGSEventIndustryOpen.DefSQStaticMethod(engine, &ScriptEventIndustryOpen::Convert, "Convert", 2, ".x"); - - SQGSEventIndustryOpen.DefSQMethod(engine, &ScriptEventIndustryOpen::GetIndustryID, "GetIndustryID", 1, "x"); - - SQGSEventIndustryOpen.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventIndustryClose, ST_GS>() { return "GSEventIndustryClose"; } - -void SQGSEventIndustryClose_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventIndustryClose, ST_GS> SQGSEventIndustryClose("GSEventIndustryClose"); - SQGSEventIndustryClose.PreRegister(engine, "GSEvent"); - - SQGSEventIndustryClose.DefSQStaticMethod(engine, &ScriptEventIndustryClose::Convert, "Convert", 2, ".x"); - - SQGSEventIndustryClose.DefSQMethod(engine, &ScriptEventIndustryClose::GetIndustryID, "GetIndustryID", 1, "x"); - - SQGSEventIndustryClose.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventStationFirstVehicle, ST_GS>() { return "GSEventStationFirstVehicle"; } - -void SQGSEventStationFirstVehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventStationFirstVehicle, ST_GS> SQGSEventStationFirstVehicle("GSEventStationFirstVehicle"); - SQGSEventStationFirstVehicle.PreRegister(engine, "GSEvent"); - - SQGSEventStationFirstVehicle.DefSQStaticMethod(engine, &ScriptEventStationFirstVehicle::Convert, "Convert", 2, ".x"); - - SQGSEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetStationID, "GetStationID", 1, "x"); - SQGSEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetVehicleID, "GetVehicleID", 1, "x"); - - SQGSEventStationFirstVehicle.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventTownFounded, ST_GS>() { return "GSEventTownFounded"; } - -void SQGSEventTownFounded_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventTownFounded, ST_GS> SQGSEventTownFounded("GSEventTownFounded"); - SQGSEventTownFounded.PreRegister(engine, "GSEvent"); - - SQGSEventTownFounded.DefSQStaticMethod(engine, &ScriptEventTownFounded::Convert, "Convert", 2, ".x"); - - SQGSEventTownFounded.DefSQMethod(engine, &ScriptEventTownFounded::GetTownID, "GetTownID", 1, "x"); - - SQGSEventTownFounded.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventAdminPort, ST_GS>() { return "GSEventAdminPort"; } - -void SQGSEventAdminPort_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventAdminPort, ST_GS> SQGSEventAdminPort("GSEventAdminPort"); - SQGSEventAdminPort.PreRegister(engine, "GSEvent"); - - SQGSEventAdminPort.DefSQStaticMethod(engine, &ScriptEventAdminPort::Convert, "Convert", 2, ".x"); - - SQGSEventAdminPort.DefSQAdvancedMethod(engine, &ScriptEventAdminPort::GetObject, "GetObject"); - - SQGSEventAdminPort.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventWindowWidgetClick, ST_GS>() { return "GSEventWindowWidgetClick"; } - -void SQGSEventWindowWidgetClick_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventWindowWidgetClick, ST_GS> SQGSEventWindowWidgetClick("GSEventWindowWidgetClick"); - SQGSEventWindowWidgetClick.PreRegister(engine, "GSEvent"); - - SQGSEventWindowWidgetClick.DefSQStaticMethod(engine, &ScriptEventWindowWidgetClick::Convert, "Convert", 2, ".x"); - - SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowClass, "GetWindowClass", 1, "x"); - SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowNumber, "GetWindowNumber", 1, "x"); - SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWidgetNumber, "GetWidgetNumber", 1, "x"); - - SQGSEventWindowWidgetClick.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventGoalQuestionAnswer, ST_GS>() { return "GSEventGoalQuestionAnswer"; } - -void SQGSEventGoalQuestionAnswer_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventGoalQuestionAnswer, ST_GS> SQGSEventGoalQuestionAnswer("GSEventGoalQuestionAnswer"); - SQGSEventGoalQuestionAnswer.PreRegister(engine, "GSEvent"); - - SQGSEventGoalQuestionAnswer.DefSQStaticMethod(engine, &ScriptEventGoalQuestionAnswer::Convert, "Convert", 2, ".x"); - - SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetUniqueID, "GetUniqueID", 1, "x"); - SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetCompany, "GetCompany", 1, "x"); - SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetButton, "GetButton", 1, "x"); - - SQGSEventGoalQuestionAnswer.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventCompanyTown, ST_GS>() { return "GSEventCompanyTown"; } - -void SQGSEventCompanyTown_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventCompanyTown, ST_GS> SQGSEventCompanyTown("GSEventCompanyTown"); - SQGSEventCompanyTown.PreRegister(engine, "GSEvent"); - - SQGSEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x"); - - SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x"); - SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x"); - - SQGSEventCompanyTown.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_GS>() { return "GSEventExclusiveTransportRights"; } - -void SQGSEventExclusiveTransportRights_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventExclusiveTransportRights, ST_GS> SQGSEventExclusiveTransportRights("GSEventExclusiveTransportRights"); - SQGSEventExclusiveTransportRights.PreRegister(engine, "GSEventCompanyTown"); - SQGSEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii"); - - SQGSEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x"); - - SQGSEventExclusiveTransportRights.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_GS>() { return "GSEventRoadReconstruction"; } - -void SQGSEventRoadReconstruction_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventRoadReconstruction, ST_GS> SQGSEventRoadReconstruction("GSEventRoadReconstruction"); - SQGSEventRoadReconstruction.PreRegister(engine, "GSEventCompanyTown"); - SQGSEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii"); - - SQGSEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x"); - - SQGSEventRoadReconstruction.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventStoryPageButtonClick, ST_GS>() { return "GSEventStoryPageButtonClick"; } - -void SQGSEventStoryPageButtonClick_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventStoryPageButtonClick, ST_GS> SQGSEventStoryPageButtonClick("GSEventStoryPageButtonClick"); - SQGSEventStoryPageButtonClick.PreRegister(engine, "GSEvent"); - - SQGSEventStoryPageButtonClick.DefSQStaticMethod(engine, &ScriptEventStoryPageButtonClick::Convert, "Convert", 2, ".x"); - - SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetCompanyID, "GetCompanyID", 1, "x"); - SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetStoryPageID, "GetStoryPageID", 1, "x"); - SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetElementID, "GetElementID", 1, "x"); - - SQGSEventStoryPageButtonClick.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventStoryPageTileSelect, ST_GS>() { return "GSEventStoryPageTileSelect"; } - -void SQGSEventStoryPageTileSelect_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventStoryPageTileSelect, ST_GS> SQGSEventStoryPageTileSelect("GSEventStoryPageTileSelect"); - SQGSEventStoryPageTileSelect.PreRegister(engine, "GSEvent"); - - SQGSEventStoryPageTileSelect.DefSQStaticMethod(engine, &ScriptEventStoryPageTileSelect::Convert, "Convert", 2, ".x"); - - SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetCompanyID, "GetCompanyID", 1, "x"); - SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetStoryPageID, "GetStoryPageID", 1, "x"); - SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetElementID, "GetElementID", 1, "x"); - SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetTile, "GetTile", 1, "x"); - - SQGSEventStoryPageTileSelect.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptEventStoryPageVehicleSelect, ST_GS>() { return "GSEventStoryPageVehicleSelect"; } - -void SQGSEventStoryPageVehicleSelect_Register(Squirrel *engine) -{ - DefSQClass<ScriptEventStoryPageVehicleSelect, ST_GS> SQGSEventStoryPageVehicleSelect("GSEventStoryPageVehicleSelect"); - SQGSEventStoryPageVehicleSelect.PreRegister(engine, "GSEvent"); - - SQGSEventStoryPageVehicleSelect.DefSQStaticMethod(engine, &ScriptEventStoryPageVehicleSelect::Convert, "Convert", 2, ".x"); - - SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetCompanyID, "GetCompanyID", 1, "x"); - SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetStoryPageID, "GetStoryPageID", 1, "x"); - SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetElementID, "GetElementID", 1, "x"); - SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetVehicleID, "GetVehicleID", 1, "x"); - - SQGSEventStoryPageVehicleSelect.PostRegister(engine); -} diff --git a/src/script/api/game/game_game.hpp.sq b/src/script/api/game/game_game.hpp.sq deleted file mode 100644 index 8c889a05b..000000000 --- a/src/script/api/game/game_game.hpp.sq +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_game.hpp" -#include "../template/template_game.hpp.sq" - - -template <> const char *GetClassName<ScriptGame, ST_GS>() { return "GSGame"; } - -void SQGSGame_Register(Squirrel *engine) -{ - DefSQClass<ScriptGame, ST_GS> SQGSGame("GSGame"); - SQGSGame.PreRegister(engine); - SQGSGame.AddConstructor<void (ScriptGame::*)(), 1>(engine, "x"); - - SQGSGame.DefSQConst(engine, ScriptGame::LT_TEMPERATE, "LT_TEMPERATE"); - SQGSGame.DefSQConst(engine, ScriptGame::LT_ARCTIC, "LT_ARCTIC"); - SQGSGame.DefSQConst(engine, ScriptGame::LT_TROPIC, "LT_TROPIC"); - SQGSGame.DefSQConst(engine, ScriptGame::LT_TOYLAND, "LT_TOYLAND"); - - SQGSGame.DefSQStaticMethod(engine, &ScriptGame::Pause, "Pause", 1, "."); - SQGSGame.DefSQStaticMethod(engine, &ScriptGame::Unpause, "Unpause", 1, "."); - SQGSGame.DefSQStaticMethod(engine, &ScriptGame::IsPaused, "IsPaused", 1, "."); - SQGSGame.DefSQStaticMethod(engine, &ScriptGame::GetLandscape, "GetLandscape", 1, "."); - SQGSGame.DefSQStaticMethod(engine, &ScriptGame::IsMultiplayer, "IsMultiplayer", 1, "."); - - SQGSGame.PostRegister(engine); -} diff --git a/src/script/api/game/game_gamesettings.hpp.sq b/src/script/api/game/game_gamesettings.hpp.sq deleted file mode 100644 index a1dbcf791..000000000 --- a/src/script/api/game/game_gamesettings.hpp.sq +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_gamesettings.hpp" -#include "../template/template_gamesettings.hpp.sq" - - -template <> const char *GetClassName<ScriptGameSettings, ST_GS>() { return "GSGameSettings"; } - -void SQGSGameSettings_Register(Squirrel *engine) -{ - DefSQClass<ScriptGameSettings, ST_GS> SQGSGameSettings("GSGameSettings"); - SQGSGameSettings.PreRegister(engine); - SQGSGameSettings.AddConstructor<void (ScriptGameSettings::*)(), 1>(engine, "x"); - - SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsValid, "IsValid", 2, ".."); - SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::GetValue, "GetValue", 2, ".."); - SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::SetValue, "SetValue", 3, "..i"); - - SQGSGameSettings.PostRegister(engine); -} diff --git a/src/script/api/game/game_goal.hpp.sq b/src/script/api/game/game_goal.hpp.sq deleted file mode 100644 index 9f0384c55..000000000 --- a/src/script/api/game/game_goal.hpp.sq +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_goal.hpp" -#include "../template/template_goal.hpp.sq" - - -template <> const char *GetClassName<ScriptGoal, ST_GS>() { return "GSGoal"; } - -void SQGSGoal_Register(Squirrel *engine) -{ - DefSQClass<ScriptGoal, ST_GS> SQGSGoal("GSGoal"); - SQGSGoal.PreRegister(engine); - SQGSGoal.AddConstructor<void (ScriptGoal::*)(), 1>(engine, "x"); - - SQGSGoal.DefSQConst(engine, ScriptGoal::GOAL_INVALID, "GOAL_INVALID"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_NONE, "GT_NONE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TILE, "GT_TILE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_INDUSTRY, "GT_INDUSTRY"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TOWN, "GT_TOWN"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_COMPANY, "GT_COMPANY"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_STORY_PAGE, "GT_STORY_PAGE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::QT_QUESTION, "QT_QUESTION"); - SQGSGoal.DefSQConst(engine, ScriptGoal::QT_INFORMATION, "QT_INFORMATION"); - SQGSGoal.DefSQConst(engine, ScriptGoal::QT_WARNING, "QT_WARNING"); - SQGSGoal.DefSQConst(engine, ScriptGoal::QT_ERROR, "QT_ERROR"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CANCEL, "BUTTON_CANCEL"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_OK, "BUTTON_OK"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NO, "BUTTON_NO"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_YES, "BUTTON_YES"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_DECLINE, "BUTTON_DECLINE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_ACCEPT, "BUTTON_ACCEPT"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_IGNORE, "BUTTON_IGNORE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RETRY, "BUTTON_RETRY"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_PREVIOUS, "BUTTON_PREVIOUS"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NEXT, "BUTTON_NEXT"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_STOP, "BUTTON_STOP"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_START, "BUTTON_START"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_GO, "BUTTON_GO"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CONTINUE, "BUTTON_CONTINUE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RESTART, "BUTTON_RESTART"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_POSTPONE, "BUTTON_POSTPONE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_SURRENDER, "BUTTON_SURRENDER"); - SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CLOSE, "BUTTON_CLOSE"); - - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetText, "SetText", 3, ".i."); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetProgress, "SetProgress", 3, ".i."); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetCompleted, "SetCompleted", 3, ".ib"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsCompleted, "IsCompleted", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Question, "Question", 6, ".ii.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::QuestionClient, "QuestionClient", 6, ".ii.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::CloseQuestion, "CloseQuestion", 2, ".i"); - - SQGSGoal.PostRegister(engine); -} diff --git a/src/script/api/game/game_industry.hpp.sq b/src/script/api/game/game_industry.hpp.sq deleted file mode 100644 index 281ee638f..000000000 --- a/src/script/api/game/game_industry.hpp.sq +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industry.hpp" -#include "../template/template_industry.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustry, ST_GS>() { return "GSIndustry"; } - -void SQGSIndustry_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustry, ST_GS> SQGSIndustry("GSIndustry"); - SQGSIndustry.PreRegister(engine); - SQGSIndustry.AddConstructor<void (ScriptIndustry::*)(), 1>(engine, "x"); - - SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_NOT_ACCEPTED, "CAS_NOT_ACCEPTED"); - SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_ACCEPTED, "CAS_ACCEPTED"); - SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_TEMP_REFUSED, "CAS_TEMP_REFUSED"); - - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryCount, "GetIndustryCount", 1, "."); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryID, "GetIndustryID", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetName, "GetName", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLocation, "GetLocation", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasHeliport, "HasHeliport", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasDock, "HasDock", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDockLocation, "GetDockLocation", 2, ".i"); - SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryType, "GetIndustryType", 2, ".i"); - - SQGSIndustry.PostRegister(engine); -} diff --git a/src/script/api/game/game_industrylist.hpp.sq b/src/script/api/game/game_industrylist.hpp.sq deleted file mode 100644 index 71ea5633b..000000000 --- a/src/script/api/game/game_industrylist.hpp.sq +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrylist.hpp" -#include "../template/template_industrylist.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryList, ST_GS>() { return "GSIndustryList"; } - -void SQGSIndustryList_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList, ST_GS> SQGSIndustryList("GSIndustryList"); - SQGSIndustryList.PreRegister(engine, "GSList"); - SQGSIndustryList.AddConstructor<void (ScriptIndustryList::*)(), 1>(engine, "x"); - - SQGSIndustryList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptIndustryList_CargoAccepting, ST_GS>() { return "GSIndustryList_CargoAccepting"; } - -void SQGSIndustryList_CargoAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList_CargoAccepting, ST_GS> SQGSIndustryList_CargoAccepting("GSIndustryList_CargoAccepting"); - SQGSIndustryList_CargoAccepting.PreRegister(engine, "GSList"); - SQGSIndustryList_CargoAccepting.AddConstructor<void (ScriptIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi"); - - SQGSIndustryList_CargoAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptIndustryList_CargoProducing, ST_GS>() { return "GSIndustryList_CargoProducing"; } - -void SQGSIndustryList_CargoProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryList_CargoProducing, ST_GS> SQGSIndustryList_CargoProducing("GSIndustryList_CargoProducing"); - SQGSIndustryList_CargoProducing.PreRegister(engine, "GSList"); - SQGSIndustryList_CargoProducing.AddConstructor<void (ScriptIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi"); - - SQGSIndustryList_CargoProducing.PostRegister(engine); -} diff --git a/src/script/api/game/game_industrytype.hpp.sq b/src/script/api/game/game_industrytype.hpp.sq deleted file mode 100644 index 67b9a2470..000000000 --- a/src/script/api/game/game_industrytype.hpp.sq +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytype.hpp" -#include "../template/template_industrytype.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryType, ST_GS>() { return "GSIndustryType"; } - -void SQGSIndustryType_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryType, ST_GS> SQGSIndustryType("GSIndustryType"); - SQGSIndustryType.PreRegister(engine); - SQGSIndustryType.AddConstructor<void (ScriptIndustryType::*)(), 1>(engine, "x"); - - SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_UNKNOWN, "INDUSTRYTYPE_UNKNOWN"); - SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_TOWN, "INDUSTRYTYPE_TOWN"); - - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsValidIndustryType, "IsValidIndustryType", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetName, "GetName", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetProducedCargo, "GetProducedCargo", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetAcceptedCargo, "GetAcceptedCargo", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsRawIndustry, "IsRawIndustry", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsProcessingIndustry, "IsProcessingIndustry", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProductionCanIncrease, "ProductionCanIncrease", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetConstructionCost, "GetConstructionCost", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanBuildIndustry, "CanBuildIndustry", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::BuildIndustry, "BuildIndustry", 3, ".ii"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProspectIndustry, "ProspectIndustry", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasHeliport, "HasHeliport", 2, ".i"); - SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasDock, "HasDock", 2, ".i"); - - SQGSIndustryType.PostRegister(engine); -} diff --git a/src/script/api/game/game_industrytypelist.hpp.sq b/src/script/api/game/game_industrytypelist.hpp.sq deleted file mode 100644 index 365bba6e8..000000000 --- a/src/script/api/game/game_industrytypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytypelist.hpp" -#include "../template/template_industrytypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptIndustryTypeList, ST_GS>() { return "GSIndustryTypeList"; } - -void SQGSIndustryTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptIndustryTypeList, ST_GS> SQGSIndustryTypeList("GSIndustryTypeList"); - SQGSIndustryTypeList.PreRegister(engine, "GSList"); - SQGSIndustryTypeList.AddConstructor<void (ScriptIndustryTypeList::*)(), 1>(engine, "x"); - - SQGSIndustryTypeList.PostRegister(engine); -} diff --git a/src/script/api/game/game_infrastructure.hpp.sq b/src/script/api/game/game_infrastructure.hpp.sq deleted file mode 100644 index d241a8223..000000000 --- a/src/script/api/game/game_infrastructure.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_infrastructure.hpp" -#include "../template/template_infrastructure.hpp.sq" - - -template <> const char *GetClassName<ScriptInfrastructure, ST_GS>() { return "GSInfrastructure"; } - -void SQGSInfrastructure_Register(Squirrel *engine) -{ - DefSQClass<ScriptInfrastructure, ST_GS> SQGSInfrastructure("GSInfrastructure"); - SQGSInfrastructure.PreRegister(engine); - SQGSInfrastructure.AddConstructor<void (ScriptInfrastructure::*)(), 1>(engine, "x"); - - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_RAIL, "INFRASTRUCTURE_RAIL"); - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_SIGNALS, "INFRASTRUCTURE_SIGNALS"); - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_ROAD, "INFRASTRUCTURE_ROAD"); - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_CANAL, "INFRASTRUCTURE_CANAL"); - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_STATION, "INFRASTRUCTURE_STATION"); - SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_AIRPORT, "INFRASTRUCTURE_AIRPORT"); - - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRailPieceCount, "GetRailPieceCount", 3, ".ii"); - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRoadPieceCount, "GetRoadPieceCount", 3, ".ii"); - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetInfrastructurePieceCount, "GetInfrastructurePieceCount", 3, ".ii"); - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRailCosts, "GetMonthlyRailCosts", 3, ".ii"); - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRoadCosts, "GetMonthlyRoadCosts", 3, ".ii"); - SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyInfrastructureCosts, "GetMonthlyInfrastructureCosts", 3, ".ii"); - - SQGSInfrastructure.PostRegister(engine); -} diff --git a/src/script/api/game/game_list.hpp.sq b/src/script/api/game/game_list.hpp.sq deleted file mode 100644 index 9b9e614ce..000000000 --- a/src/script/api/game/game_list.hpp.sq +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_list.hpp" -#include "../template/template_list.hpp.sq" - - -template <> const char *GetClassName<ScriptList, ST_GS>() { return "GSList"; } - -void SQGSList_Register(Squirrel *engine) -{ - DefSQClass<ScriptList, ST_GS> SQGSList("GSList"); - SQGSList.PreRegister(engine); - SQGSList.AddConstructor<void (ScriptList::*)(), 1>(engine, "x"); - - SQGSList.DefSQConst(engine, ScriptList::SORT_BY_VALUE, "SORT_BY_VALUE"); - SQGSList.DefSQConst(engine, ScriptList::SORT_BY_ITEM, "SORT_BY_ITEM"); - - SQGSList.DefSQConst(engine, ScriptList::SORT_ASCENDING, "SORT_ASCENDING"); - SQGSList.DefSQConst(engine, ScriptList::SORT_DESCENDING, "SORT_DESCENDING"); - - SQGSList.DefSQMethod(engine, &ScriptList::AddItem, "AddItem", 3, "xii"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveItem, "RemoveItem", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::Clear, "Clear", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::HasItem, "HasItem", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::Begin, "Begin", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::Next, "Next", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::IsEmpty, "IsEmpty", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::IsEnd, "IsEnd", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::Count, "Count", 1, "x"); - SQGSList.DefSQMethod(engine, &ScriptList::GetValue, "GetValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::SetValue, "SetValue", 3, "xii"); - SQGSList.DefSQMethod(engine, &ScriptList::Sort, "Sort", 3, "xib"); - SQGSList.DefSQMethod(engine, &ScriptList::AddList, "AddList", 2, "xx"); - SQGSList.DefSQMethod(engine, &ScriptList::SwapList, "SwapList", 2, "xx"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveAboveValue, "RemoveAboveValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveBelowValue, "RemoveBelowValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveBetweenValue, "RemoveBetweenValue", 3, "xii"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveValue, "RemoveValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveTop, "RemoveTop", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveBottom, "RemoveBottom", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::RemoveList, "RemoveList", 2, "xx"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepAboveValue, "KeepAboveValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepBelowValue, "KeepBelowValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepBetweenValue, "KeepBetweenValue", 3, "xii"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepValue, "KeepValue", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepTop, "KeepTop", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepBottom, "KeepBottom", 2, "xi"); - SQGSList.DefSQMethod(engine, &ScriptList::KeepList, "KeepList", 2, "xx"); - SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_get, "_get"); - SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_set, "_set"); - SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_nexti, "_nexti"); - SQGSList.DefSQAdvancedMethod(engine, &ScriptList::Valuate, "Valuate"); - - SQGSList.PostRegister(engine); -} diff --git a/src/script/api/game/game_log.hpp.sq b/src/script/api/game/game_log.hpp.sq deleted file mode 100644 index c2c387489..000000000 --- a/src/script/api/game/game_log.hpp.sq +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_log.hpp" -#include "../template/template_log.hpp.sq" - - -template <> const char *GetClassName<ScriptLog, ST_GS>() { return "GSLog"; } - -void SQGSLog_Register(Squirrel *engine) -{ - DefSQClass<ScriptLog, ST_GS> SQGSLog("GSLog"); - SQGSLog.PreRegister(engine); - SQGSLog.AddConstructor<void (ScriptLog::*)(), 1>(engine, "x"); - - SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Info, "Info", 2, ".."); - SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Warning, "Warning", 2, ".."); - SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Error, "Error", 2, ".."); - - SQGSLog.PostRegister(engine); -} diff --git a/src/script/api/game/game_map.hpp.sq b/src/script/api/game/game_map.hpp.sq deleted file mode 100644 index 139b2e4d6..000000000 --- a/src/script/api/game/game_map.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_map.hpp" -#include "../template/template_map.hpp.sq" - - -template <> const char *GetClassName<ScriptMap, ST_GS>() { return "GSMap"; } - -void SQGSMap_Register(Squirrel *engine) -{ - DefSQClass<ScriptMap, ST_GS> SQGSMap("GSMap"); - SQGSMap.PreRegister(engine); - SQGSMap.AddConstructor<void (ScriptMap::*)(), 1>(engine, "x"); - - SQGSMap.DefSQConst(engine, ScriptMap::TILE_INVALID, "TILE_INVALID"); - - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::IsValidTile, "IsValidTile", 2, ".i"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSize, "GetMapSize", 1, "."); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeX, "GetMapSizeX", 1, "."); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeY, "GetMapSizeY", 1, "."); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileX, "GetTileX", 2, ".i"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileY, "GetTileY", 2, ".i"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileIndex, "GetTileIndex", 3, ".ii"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceManhattan, "DistanceManhattan", 3, ".ii"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceMax, "DistanceMax", 3, ".ii"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceSquare, "DistanceSquare", 3, ".ii"); - SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceFromEdge, "DistanceFromEdge", 2, ".i"); - - SQGSMap.PostRegister(engine); -} diff --git a/src/script/api/game/game_marine.hpp.sq b/src/script/api/game/game_marine.hpp.sq deleted file mode 100644 index 4029f78db..000000000 --- a/src/script/api/game/game_marine.hpp.sq +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_marine.hpp" -#include "../template/template_marine.hpp.sq" - - -template <> const char *GetClassName<ScriptMarine, ST_GS>() { return "GSMarine"; } - -void SQGSMarine_Register(Squirrel *engine) -{ - DefSQClass<ScriptMarine, ST_GS> SQGSMarine("GSMarine"); - SQGSMarine.PreRegister(engine); - SQGSMarine.AddConstructor<void (ScriptMarine::*)(), 1>(engine, "x"); - - SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_BASE, "ERR_MARINE_BASE"); - SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER"); - SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DOCK, "BT_DOCK"); - SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DEPOT, "BT_DEPOT"); - SQGSMarine.DefSQConst(engine, ScriptMarine::BT_BUOY, "BT_BUOY"); - - ScriptError::RegisterErrorMap(STR_ERROR_MUST_BE_BUILT_ON_WATER, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER); - - ScriptError::RegisterErrorMapString(ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER"); - - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsWaterDepotTile, "IsWaterDepotTile", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsDockTile, "IsDockTile", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsBuoyTile, "IsBuoyTile", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsLockTile, "IsLockTile", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsCanalTile, "IsCanalTile", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::AreWaterTilesConnected, "AreWaterTilesConnected", 3, ".ii"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildWaterDepot, "BuildWaterDepot", 3, ".ii"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildDock, "BuildDock", 3, ".ii"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildBuoy, "BuildBuoy", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildLock, "BuildLock", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildCanal, "BuildCanal", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveWaterDepot, "RemoveWaterDepot", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveDock, "RemoveDock", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveBuoy, "RemoveBuoy", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveLock, "RemoveLock", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveCanal, "RemoveCanal", 2, ".i"); - SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::GetBuildCost, "GetBuildCost", 2, ".i"); - - SQGSMarine.PostRegister(engine); -} diff --git a/src/script/api/game/game_news.hpp.sq b/src/script/api/game/game_news.hpp.sq deleted file mode 100644 index 5a3c7f973..000000000 --- a/src/script/api/game/game_news.hpp.sq +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_news.hpp" -#include "../template/template_news.hpp.sq" - - -template <> const char *GetClassName<ScriptNews, ST_GS>() { return "GSNews"; } - -void SQGSNews_Register(Squirrel *engine) -{ - DefSQClass<ScriptNews, ST_GS> SQGSNews("GSNews"); - SQGSNews.PreRegister(engine); - SQGSNews.AddConstructor<void (ScriptNews::*)(), 1>(engine, "x"); - - SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCIDENT, "NT_ACCIDENT"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_COMPANY_INFO, "NT_COMPANY_INFO"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_ECONOMY, "NT_ECONOMY"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_ADVICE, "NT_ADVICE"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCEPTANCE, "NT_ACCEPTANCE"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_SUBSIDIES, "NT_SUBSIDIES"); - SQGSNews.DefSQConst(engine, ScriptNews::NT_GENERAL, "NT_GENERAL"); - SQGSNews.DefSQConst(engine, ScriptNews::NR_NONE, "NR_NONE"); - SQGSNews.DefSQConst(engine, ScriptNews::NR_TILE, "NR_TILE"); - SQGSNews.DefSQConst(engine, ScriptNews::NR_STATION, "NR_STATION"); - SQGSNews.DefSQConst(engine, ScriptNews::NR_INDUSTRY, "NR_INDUSTRY"); - SQGSNews.DefSQConst(engine, ScriptNews::NR_TOWN, "NR_TOWN"); - - SQGSNews.DefSQStaticMethod(engine, &ScriptNews::Create, "Create", 6, ".i.iii"); - - SQGSNews.PostRegister(engine); -} diff --git a/src/script/api/game/game_order.hpp.sq b/src/script/api/game/game_order.hpp.sq deleted file mode 100644 index 77a44acde..000000000 --- a/src/script/api/game/game_order.hpp.sq +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_order.hpp" -#include "../template/template_order.hpp.sq" - - -template <> const char *GetClassName<ScriptOrder, ST_GS>() { return "GSOrder"; } - -void SQGSOrder_Register(Squirrel *engine) -{ - DefSQClass<ScriptOrder, ST_GS> SQGSOrder("GSOrder"); - SQGSOrder.PreRegister(engine); - SQGSOrder.AddConstructor<void (ScriptOrder::*)(), 1>(engine, "x"); - - SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_BASE, "ERR_ORDER_BASE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY"); - SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION"); - SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NONE, "OF_NONE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_INTERMEDIATE, "OF_NON_STOP_INTERMEDIATE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_DESTINATION, "OF_NON_STOP_DESTINATION"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD, "OF_UNLOAD"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_TRANSFER, "OF_TRANSFER"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NO_UNLOAD, "OF_NO_UNLOAD"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD, "OF_FULL_LOAD"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD_ANY, "OF_FULL_LOAD_ANY"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NO_LOAD, "OF_NO_LOAD"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_SERVICE_IF_NEEDED, "OF_SERVICE_IF_NEEDED"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_STOP_IN_DEPOT, "OF_STOP_IN_DEPOT"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_GOTO_NEAREST_DEPOT, "OF_GOTO_NEAREST_DEPOT"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_FLAGS, "OF_NON_STOP_FLAGS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD_FLAGS, "OF_UNLOAD_FLAGS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_LOAD_FLAGS, "OF_LOAD_FLAGS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_DEPOT_FLAGS, "OF_DEPOT_FLAGS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_UNCONDITIONALLY, "OC_UNCONDITIONALLY"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_REMAINING_LIFETIME, "OC_REMAINING_LIFETIME"); - SQGSOrder.DefSQConst(engine, ScriptOrder::OC_INVALID, "OC_INVALID"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_EQUALS, "CF_EQUALS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_NOT_EQUALS, "CF_NOT_EQUALS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_LESS_THAN, "CF_LESS_THAN"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_LESS_EQUALS, "CF_LESS_EQUALS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_MORE_THAN, "CF_MORE_THAN"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_MORE_EQUALS, "CF_MORE_EQUALS"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_IS_TRUE, "CF_IS_TRUE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_IS_FALSE, "CF_IS_FALSE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::CF_INVALID, "CF_INVALID"); - SQGSOrder.DefSQConst(engine, ScriptOrder::ORDER_CURRENT, "ORDER_CURRENT"); - SQGSOrder.DefSQConst(engine, ScriptOrder::ORDER_INVALID, "ORDER_INVALID"); - SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_NEAR, "STOPLOCATION_NEAR"); - SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_MIDDLE, "STOPLOCATION_MIDDLE"); - SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_FAR, "STOPLOCATION_FAR"); - SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_INVALID, "STOPLOCATION_INVALID"); - - ScriptError::RegisterErrorMap(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS, ScriptOrder::ERR_ORDER_TOO_MANY); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE); - - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY"); - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION"); - ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE"); - - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsVoidOrder, "IsVoidOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsRefitOrder, "IsRefitOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCount, "GetOrderCount", 2, ".i"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetStopLocation, "GetStopLocation", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderRefit, "GetOrderRefit", 3, ".ii"); - SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDistance, "GetOrderDistance", 4, ".iii"); - - SQGSOrder.PostRegister(engine); -} diff --git a/src/script/api/game/game_priorityqueue.hpp.sq b/src/script/api/game/game_priorityqueue.hpp.sq deleted file mode 100644 index fade5e2a1..000000000 --- a/src/script/api/game/game_priorityqueue.hpp.sq +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_priorityqueue.hpp" -#include "../template/template_priorityqueue.hpp.sq" - - -template <> const char *GetClassName<ScriptPriorityQueue, ST_GS>() { return "GSPriorityQueue"; } - -void SQGSPriorityQueue_Register(Squirrel *engine) -{ - DefSQClass<ScriptPriorityQueue, ST_GS> SQGSPriorityQueue("GSPriorityQueue"); - SQGSPriorityQueue.PreRegister(engine); - SQGSPriorityQueue.AddConstructor<void (ScriptPriorityQueue::*)(), 1>(engine, "x"); - - SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Insert, "Insert"); - SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Pop, "Pop"); - SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Peek, "Peek"); - SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Exists, "Exists"); - SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Clear, "Clear"); - SQGSPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::IsEmpty, "IsEmpty", 1, "x"); - SQGSPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::Count, "Count", 1, "x"); - - SQGSPriorityQueue.PostRegister(engine); -} diff --git a/src/script/api/game/game_rail.hpp.sq b/src/script/api/game/game_rail.hpp.sq deleted file mode 100644 index cd32d5d25..000000000 --- a/src/script/api/game/game_rail.hpp.sq +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_rail.hpp" -#include "../template/template_rail.hpp.sq" - - -template <> const char *GetClassName<ScriptRail, ST_GS>() { return "GSRail"; } - -void SQGSRail_Register(Squirrel *engine) -{ - DefSQClass<ScriptRail, ST_GS> SQGSRail("GSRail"); - SQGSRail.PreRegister(engine); - SQGSRail.AddConstructor<void (ScriptRail::*)(), 1>(engine, "x"); - - SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAIL_BASE, "ERR_RAIL_BASE"); - SQGSRail.DefSQConst(engine, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD"); - SQGSRail.DefSQConst(engine, ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK"); - SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTYPE_INVALID, "RAILTYPE_INVALID"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE"); - SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_INVALID, "RAILTRACK_INVALID"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY"); - SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE"); - SQGSRail.DefSQConst(engine, ScriptRail::BT_TRACK, "BT_TRACK"); - SQGSRail.DefSQConst(engine, ScriptRail::BT_SIGNAL, "BT_SIGNAL"); - SQGSRail.DefSQConst(engine, ScriptRail::BT_DEPOT, "BT_DEPOT"); - SQGSRail.DefSQConst(engine, ScriptRail::BT_STATION, "BT_STATION"); - SQGSRail.DefSQConst(engine, ScriptRail::BT_WAYPOINT, "BT_WAYPOINT"); - - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_ARE_NO_SIGNALS, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_STATION, ScriptRail::ERR_UNSUITABLE_TRACK); - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_RAIL, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING); - - ScriptError::RegisterErrorMapString(ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD"); - ScriptError::RegisterErrorMapString(ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK"); - ScriptError::RegisterErrorMapString(ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING"); - - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetName, "GetName", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTile, "IsRailTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailStationTile, "IsRailStationTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailWaypointTile, "IsRailWaypointTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTypeAvailable, "IsRailTypeAvailable", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetCurrentRailType, "GetCurrentRailType", 1, "."); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::SetCurrentRailType, "SetCurrentRailType", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainCanRunOnRail, "TrainCanRunOnRail", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainHasPowerOnRail, "TrainHasPowerOnRail", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailType, "GetRailType", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::ConvertRailType, "ConvertRailType", 4, ".iii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailDepotFrontTile, "GetRailDepotFrontTile", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailStationDirection, "GetRailStationDirection", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailDepot, "BuildRailDepot", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailStation, "BuildRailStation", 6, ".iiiii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildNewGRFRailStation, "BuildNewGRFRailStation", 11, ".iiiiiiiiib"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailWaypoint, "BuildRailWaypoint", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailWaypointTileRectangle, "RemoveRailWaypointTileRectangle", 4, ".iib"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailStationTileRectangle, "RemoveRailStationTileRectangle", 4, ".iib"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailTracks, "GetRailTracks", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailTrack, "BuildRailTrack", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailTrack, "RemoveRailTrack", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::AreTilesConnected, "AreTilesConnected", 4, ".iii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRail, "BuildRail", 4, ".iii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRail, "RemoveRail", 4, ".iii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetSignalType, "GetSignalType", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildSignal, "BuildSignal", 4, ".iii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveSignal, "RemoveSignal", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetBuildCost, "GetBuildCost", 3, ".ii"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - - SQGSRail.PostRegister(engine); -} diff --git a/src/script/api/game/game_railtypelist.hpp.sq b/src/script/api/game/game_railtypelist.hpp.sq deleted file mode 100644 index b829724bb..000000000 --- a/src/script/api/game/game_railtypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_railtypelist.hpp" -#include "../template/template_railtypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptRailTypeList, ST_GS>() { return "GSRailTypeList"; } - -void SQGSRailTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptRailTypeList, ST_GS> SQGSRailTypeList("GSRailTypeList"); - SQGSRailTypeList.PreRegister(engine, "GSList"); - SQGSRailTypeList.AddConstructor<void (ScriptRailTypeList::*)(), 1>(engine, "x"); - - SQGSRailTypeList.PostRegister(engine); -} diff --git a/src/script/api/game/game_road.hpp.sq b/src/script/api/game/game_road.hpp.sq deleted file mode 100644 index 4398b21df..000000000 --- a/src/script/api/game/game_road.hpp.sq +++ /dev/null @@ -1,93 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_road.hpp" -#include "../template/template_road.hpp.sq" - - -template <> const char *GetClassName<ScriptRoad, ST_GS>() { return "GSRoad"; } - -void SQGSRoad_Register(Squirrel *engine) -{ - DefSQClass<ScriptRoad, ST_GS> SQGSRoad("GSRoad"); - SQGSRoad.PreRegister(engine); - SQGSRoad.AddConstructor<void (ScriptRoad::*)(), 1>(engine, "x"); - - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_BASE, "ERR_ROAD_BASE"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_ROAD, "ROADTYPE_ROAD"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_TRAM, "ROADTYPE_TRAM"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_INVALID, "ROADTYPE_INVALID"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_ROAD, "ROADTRAMTYPES_ROAD"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_TRAM, "ROADTRAMTYPES_TRAM"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_BUS, "ROADVEHTYPE_BUS"); - SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_TRUCK, "ROADVEHTYPE_TRUCK"); - SQGSRoad.DefSQConst(engine, ScriptRoad::BT_ROAD, "BT_ROAD"); - SQGSRoad.DefSQConst(engine, ScriptRoad::BT_DEPOT, "BT_DEPOT"); - SQGSRoad.DefSQConst(engine, ScriptRoad::BT_BUS_STOP, "BT_BUS_STOP"); - SQGSRoad.DefSQConst(engine, ScriptRoad::BT_TRUCK_STOP, "BT_TRUCK_STOP"); - - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_WORKS_IN_PROGRESS, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS); - ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_DIRECTION, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION); - ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS); - ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_ROAD, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_ROAD, ScriptRoad::ERR_UNSUITABLE_ROAD); - ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_TRAMWAY, ScriptRoad::ERR_UNSUITABLE_ROAD); - - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING"); - ScriptError::RegisterErrorMapString(ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD"); - - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetName, "GetName", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTile, "IsRoadTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, "."); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehCanRunOnRoad, "RoadVehCanRunOnRoad", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehHasPowerOnRoad, "RoadVehHasPowerOnRoad", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::ConvertRoadType, "ConvertRoadType", 4, ".iii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::HasRoadType, "HasRoadType", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, ".iaii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, ".iii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoad, "BuildRoad", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadFull, "BuildRoadFull", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadDepot, "BuildRoadDepot", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadStation, "BuildRoadStation", 5, ".iiii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildDriveThroughRoadStation, "BuildDriveThroughRoadStation", 5, ".iiii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoad, "RemoveRoad", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadFull, "RemoveRoadFull", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadStation, "RemoveRoadStation", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadTramType, "GetRoadTramType", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaxSpeed, "GetMaxSpeed", 2, ".i"); - SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i"); - - SQGSRoad.PostRegister(engine); -} diff --git a/src/script/api/game/game_roadtypelist.hpp.sq b/src/script/api/game/game_roadtypelist.hpp.sq deleted file mode 100644 index 0c5a74c57..000000000 --- a/src/script/api/game/game_roadtypelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_roadtypelist.hpp" -#include "../template/template_roadtypelist.hpp.sq" - - -template <> const char *GetClassName<ScriptRoadTypeList, ST_GS>() { return "GSRoadTypeList"; } - -void SQGSRoadTypeList_Register(Squirrel *engine) -{ - DefSQClass<ScriptRoadTypeList, ST_GS> SQGSRoadTypeList("GSRoadTypeList"); - SQGSRoadTypeList.PreRegister(engine, "GSList"); - SQGSRoadTypeList.AddConstructor<void (ScriptRoadTypeList::*)(ScriptRoad::RoadTramTypes rtts), 2>(engine, "xi"); - - SQGSRoadTypeList.PostRegister(engine); -} diff --git a/src/script/api/game/game_sign.hpp.sq b/src/script/api/game/game_sign.hpp.sq deleted file mode 100644 index 0ae48f1c0..000000000 --- a/src/script/api/game/game_sign.hpp.sq +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_sign.hpp" -#include "../template/template_sign.hpp.sq" - - -template <> const char *GetClassName<ScriptSign, ST_GS>() { return "GSSign"; } - -void SQGSSign_Register(Squirrel *engine) -{ - DefSQClass<ScriptSign, ST_GS> SQGSSign("GSSign"); - SQGSSign.PreRegister(engine); - SQGSSign.AddConstructor<void (ScriptSign::*)(), 1>(engine, "x"); - - SQGSSign.DefSQConst(engine, ScriptSign::ERR_SIGN_BASE, "ERR_SIGN_BASE"); - SQGSSign.DefSQConst(engine, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_SIGNS, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS); - - ScriptError::RegisterErrorMapString(ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS"); - - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::IsValidSign, "IsValidSign", 2, ".i"); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::SetName, "SetName", 3, ".i."); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetName, "GetName", 2, ".i"); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetOwner, "GetOwner", 2, ".i"); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetLocation, "GetLocation", 2, ".i"); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::BuildSign, "BuildSign", 3, ".i."); - SQGSSign.DefSQStaticMethod(engine, &ScriptSign::RemoveSign, "RemoveSign", 2, ".i"); - - SQGSSign.PostRegister(engine); -} diff --git a/src/script/api/game/game_signlist.hpp.sq b/src/script/api/game/game_signlist.hpp.sq deleted file mode 100644 index 15a9d6903..000000000 --- a/src/script/api/game/game_signlist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_signlist.hpp" -#include "../template/template_signlist.hpp.sq" - - -template <> const char *GetClassName<ScriptSignList, ST_GS>() { return "GSSignList"; } - -void SQGSSignList_Register(Squirrel *engine) -{ - DefSQClass<ScriptSignList, ST_GS> SQGSSignList("GSSignList"); - SQGSSignList.PreRegister(engine, "GSList"); - SQGSSignList.AddConstructor<void (ScriptSignList::*)(), 1>(engine, "x"); - - SQGSSignList.PostRegister(engine); -} diff --git a/src/script/api/game/game_station.hpp.sq b/src/script/api/game/game_station.hpp.sq deleted file mode 100644 index 5c412850a..000000000 --- a/src/script/api/game/game_station.hpp.sq +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_station.hpp" -#include "../template/template_station.hpp.sq" - - -template <> const char *GetClassName<ScriptStation, ST_GS>() { return "GSStation"; } - -void SQGSStation_Register(Squirrel *engine) -{ - DefSQClass<ScriptStation, ST_GS> SQGSStation("GSStation"); - SQGSStation.PreRegister(engine, "GSBaseStation"); - SQGSStation.AddConstructor<void (ScriptStation::*)(), 1>(engine, "x"); - - SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_BASE, "ERR_STATION_BASE"); - SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION"); - SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS"); - SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_TRAIN, "STATION_TRAIN"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_TRUCK_STOP, "STATION_TRUCK_STOP"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_BUS_STOP, "STATION_BUS_STOP"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_AIRPORT, "STATION_AIRPORT"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_DOCK, "STATION_DOCK"); - SQGSStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_BUS_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS); - ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN); - - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION"); - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS"); - ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN"); - - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::IsValidStation, "IsValidStation", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetOwner, "GetOwner", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetStationID, "GetStationID", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFrom, "GetCargoWaitingFrom", 4, ".iii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingVia, "GetCargoWaitingVia", 4, ".iii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFromVia, "GetCargoWaitingFromVia", 5, ".iiii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlanned, "GetCargoPlanned", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFrom, "GetCargoPlannedFrom", 4, ".iii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedVia, "GetCargoPlannedVia", 4, ".iii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFromVia, "GetCargoPlannedFromVia", 5, ".iiii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::HasCargoRating, "HasCargoRating", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoRating, "GetCargoRating", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetStationCoverageRadius, "GetStationCoverageRadius", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::HasStationType, "HasStationType", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::HasRoadType, "HasRoadType", 3, ".ii"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetNearestTown, "GetNearestTown", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::IsAirportClosed, "IsAirportClosed", 2, ".i"); - SQGSStation.DefSQStaticMethod(engine, &ScriptStation::OpenCloseAirport, "OpenCloseAirport", 2, ".i"); - - SQGSStation.PostRegister(engine); -} diff --git a/src/script/api/game/game_stationlist.hpp.sq b/src/script/api/game/game_stationlist.hpp.sq deleted file mode 100644 index e78377871..000000000 --- a/src/script/api/game/game_stationlist.hpp.sq +++ /dev/null @@ -1,174 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_stationlist.hpp" -#include "../template/template_stationlist.hpp.sq" - - -template <> const char *GetClassName<ScriptStationList, ST_GS>() { return "GSStationList"; } - -void SQGSStationList_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList, ST_GS> SQGSStationList("GSStationList"); - SQGSStationList.PreRegister(engine, "GSList"); - SQGSStationList.AddConstructor<void (ScriptStationList::*)(ScriptStation::StationType station_type), 2>(engine, "xi"); - - SQGSStationList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_Cargo, ST_GS>() { return "GSStationList_Cargo"; } - -void SQGSStationList_Cargo_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_Cargo, ST_GS> SQGSStationList_Cargo("GSStationList_Cargo"); - SQGSStationList_Cargo.PreRegister(engine, "GSList"); - SQGSStationList_Cargo.AddConstructor<void (ScriptStationList_Cargo::*)(ScriptStationList_Cargo::CargoMode mode, ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 6>(engine, "xiiiii"); - - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_FROM, "CS_BY_FROM"); - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_VIA_BY_FROM, "CS_VIA_BY_FROM"); - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_VIA, "CS_BY_VIA"); - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_FROM_BY_VIA, "CS_FROM_BY_VIA"); - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_WAITING, "CM_WAITING"); - SQGSStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_PLANNED, "CM_PLANNED"); - - SQGSStationList_Cargo.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaiting, ST_GS>() { return "GSStationList_CargoWaiting"; } - -void SQGSStationList_CargoWaiting_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaiting, ST_GS> SQGSStationList_CargoWaiting("GSStationList_CargoWaiting"); - SQGSStationList_CargoWaiting.PreRegister(engine, "GSStationList_Cargo"); - SQGSStationList_CargoWaiting.AddConstructor<void (ScriptStationList_CargoWaiting::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii"); - - SQGSStationList_CargoWaiting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlanned, ST_GS>() { return "GSStationList_CargoPlanned"; } - -void SQGSStationList_CargoPlanned_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlanned, ST_GS> SQGSStationList_CargoPlanned("GSStationList_CargoPlanned"); - SQGSStationList_CargoPlanned.PreRegister(engine, "GSStationList_Cargo"); - SQGSStationList_CargoPlanned.AddConstructor<void (ScriptStationList_CargoPlanned::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii"); - - SQGSStationList_CargoPlanned.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingByFrom, ST_GS>() { return "GSStationList_CargoWaitingByFrom"; } - -void SQGSStationList_CargoWaitingByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingByFrom, ST_GS> SQGSStationList_CargoWaitingByFrom("GSStationList_CargoWaitingByFrom"); - SQGSStationList_CargoWaitingByFrom.PreRegister(engine, "GSStationList_CargoWaiting"); - SQGSStationList_CargoWaitingByFrom.AddConstructor<void (ScriptStationList_CargoWaitingByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQGSStationList_CargoWaitingByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingViaByFrom, ST_GS>() { return "GSStationList_CargoWaitingViaByFrom"; } - -void SQGSStationList_CargoWaitingViaByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingViaByFrom, ST_GS> SQGSStationList_CargoWaitingViaByFrom("GSStationList_CargoWaitingViaByFrom"); - SQGSStationList_CargoWaitingViaByFrom.PreRegister(engine, "GSStationList_CargoWaiting"); - SQGSStationList_CargoWaitingViaByFrom.AddConstructor<void (ScriptStationList_CargoWaitingViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii"); - - SQGSStationList_CargoWaitingViaByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingByVia, ST_GS>() { return "GSStationList_CargoWaitingByVia"; } - -void SQGSStationList_CargoWaitingByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingByVia, ST_GS> SQGSStationList_CargoWaitingByVia("GSStationList_CargoWaitingByVia"); - SQGSStationList_CargoWaitingByVia.PreRegister(engine, "GSStationList_CargoWaiting"); - SQGSStationList_CargoWaitingByVia.AddConstructor<void (ScriptStationList_CargoWaitingByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQGSStationList_CargoWaitingByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoWaitingFromByVia, ST_GS>() { return "GSStationList_CargoWaitingFromByVia"; } - -void SQGSStationList_CargoWaitingFromByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoWaitingFromByVia, ST_GS> SQGSStationList_CargoWaitingFromByVia("GSStationList_CargoWaitingFromByVia"); - SQGSStationList_CargoWaitingFromByVia.PreRegister(engine, "GSStationList_CargoWaiting"); - SQGSStationList_CargoWaitingFromByVia.AddConstructor<void (ScriptStationList_CargoWaitingFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii"); - - SQGSStationList_CargoWaitingFromByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedByFrom, ST_GS>() { return "GSStationList_CargoPlannedByFrom"; } - -void SQGSStationList_CargoPlannedByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedByFrom, ST_GS> SQGSStationList_CargoPlannedByFrom("GSStationList_CargoPlannedByFrom"); - SQGSStationList_CargoPlannedByFrom.PreRegister(engine, "GSStationList_CargoPlanned"); - SQGSStationList_CargoPlannedByFrom.AddConstructor<void (ScriptStationList_CargoPlannedByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQGSStationList_CargoPlannedByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedViaByFrom, ST_GS>() { return "GSStationList_CargoPlannedViaByFrom"; } - -void SQGSStationList_CargoPlannedViaByFrom_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedViaByFrom, ST_GS> SQGSStationList_CargoPlannedViaByFrom("GSStationList_CargoPlannedViaByFrom"); - SQGSStationList_CargoPlannedViaByFrom.PreRegister(engine, "GSStationList_CargoPlanned"); - SQGSStationList_CargoPlannedViaByFrom.AddConstructor<void (ScriptStationList_CargoPlannedViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii"); - - SQGSStationList_CargoPlannedViaByFrom.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedByVia, ST_GS>() { return "GSStationList_CargoPlannedByVia"; } - -void SQGSStationList_CargoPlannedByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedByVia, ST_GS> SQGSStationList_CargoPlannedByVia("GSStationList_CargoPlannedByVia"); - SQGSStationList_CargoPlannedByVia.PreRegister(engine, "GSStationList_CargoPlanned"); - SQGSStationList_CargoPlannedByVia.AddConstructor<void (ScriptStationList_CargoPlannedByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii"); - - SQGSStationList_CargoPlannedByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_CargoPlannedFromByVia, ST_GS>() { return "GSStationList_CargoPlannedFromByVia"; } - -void SQGSStationList_CargoPlannedFromByVia_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_CargoPlannedFromByVia, ST_GS> SQGSStationList_CargoPlannedFromByVia("GSStationList_CargoPlannedFromByVia"); - SQGSStationList_CargoPlannedFromByVia.PreRegister(engine, "GSStationList_CargoPlanned"); - SQGSStationList_CargoPlannedFromByVia.AddConstructor<void (ScriptStationList_CargoPlannedFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii"); - - SQGSStationList_CargoPlannedFromByVia.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptStationList_Vehicle, ST_GS>() { return "GSStationList_Vehicle"; } - -void SQGSStationList_Vehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptStationList_Vehicle, ST_GS> SQGSStationList_Vehicle("GSStationList_Vehicle"); - SQGSStationList_Vehicle.PreRegister(engine, "GSList"); - SQGSStationList_Vehicle.AddConstructor<void (ScriptStationList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQGSStationList_Vehicle.PostRegister(engine); -} diff --git a/src/script/api/game/game_story_page.hpp.sq b/src/script/api/game/game_story_page.hpp.sq deleted file mode 100644 index b9fbf6026..000000000 --- a/src/script/api/game/game_story_page.hpp.sq +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_story_page.hpp" -#include "../template/template_story_page.hpp.sq" - - -template <> const char *GetClassName<ScriptStoryPage, ST_GS>() { return "GSStoryPage"; } - -void SQGSStoryPage_Register(Squirrel *engine) -{ - DefSQClass<ScriptStoryPage, ST_GS> SQGSStoryPage("GSStoryPage"); - SQGSStoryPage.PreRegister(engine); - SQGSStoryPage.AddConstructor<void (ScriptStoryPage::*)(), 1>(engine, "x"); - - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::STORY_PAGE_INVALID, "STORY_PAGE_INVALID"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::STORY_PAGE_ELEMENT_INVALID, "STORY_PAGE_ELEMENT_INVALID"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_TEXT, "SPET_TEXT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_LOCATION, "SPET_LOCATION"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_GOAL, "SPET_GOAL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_BUTTON_PUSH, "SPET_BUTTON_PUSH"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_BUTTON_TILE, "SPET_BUTTON_TILE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPET_BUTTON_VEHICLE, "SPET_BUTTON_VEHICLE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBF_NONE, "SPBF_NONE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBF_FLOAT_LEFT, "SPBF_FLOAT_LEFT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBF_FLOAT_RIGHT, "SPBF_FLOAT_RIGHT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_MOUSE, "SPBC_MOUSE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ZZZ, "SPBC_ZZZ"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BUOY, "SPBC_BUOY"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_QUERY, "SPBC_QUERY"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_HQ, "SPBC_HQ"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_SHIP_DEPOT, "SPBC_SHIP_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_SIGN, "SPBC_SIGN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TREE, "SPBC_TREE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BUY_LAND, "SPBC_BUY_LAND"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_LEVEL_LAND, "SPBC_LEVEL_LAND"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TOWN, "SPBC_TOWN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_INDUSTRY, "SPBC_INDUSTRY"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ROCKY_AREA, "SPBC_ROCKY_AREA"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_DESERT, "SPBC_DESERT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TRANSMITTER, "SPBC_TRANSMITTER"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AIRPORT, "SPBC_AIRPORT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_DOCK, "SPBC_DOCK"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CANAL, "SPBC_CANAL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_LOCK, "SPBC_LOCK"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_RIVER, "SPBC_RIVER"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AQUEDUCT, "SPBC_AQUEDUCT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BRIDGE, "SPBC_BRIDGE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_RAIL_STATION, "SPBC_RAIL_STATION"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TUNNEL_RAIL, "SPBC_TUNNEL_RAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TUNNEL_ELRAIL, "SPBC_TUNNEL_ELRAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TUNNEL_MONO, "SPBC_TUNNEL_MONO"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TUNNEL_MAGLEV, "SPBC_TUNNEL_MAGLEV"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTORAIL, "SPBC_AUTORAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTOELRAIL, "SPBC_AUTOELRAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTOMONO, "SPBC_AUTOMONO"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTOMAGLEV, "SPBC_AUTOMAGLEV"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_WAYPOINT, "SPBC_WAYPOINT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_RAIL_DEPOT, "SPBC_RAIL_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ELRAIL_DEPOT, "SPBC_ELRAIL_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_MONO_DEPOT, "SPBC_MONO_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_MAGLEV_DEPOT, "SPBC_MAGLEV_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CONVERT_RAIL, "SPBC_CONVERT_RAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CONVERT_ELRAIL, "SPBC_CONVERT_ELRAIL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CONVERT_MONO, "SPBC_CONVERT_MONO"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CONVERT_MAGLEV, "SPBC_CONVERT_MAGLEV"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTOROAD, "SPBC_AUTOROAD"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_AUTOTRAM, "SPBC_AUTOTRAM"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ROAD_DEPOT, "SPBC_ROAD_DEPOT"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BUS_STATION, "SPBC_BUS_STATION"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_TRUCK_STATION, "SPBC_TRUCK_STATION"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ROAD_TUNNEL, "SPBC_ROAD_TUNNEL"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CLONE_TRAIN, "SPBC_CLONE_TRAIN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CLONE_ROADVEH, "SPBC_CLONE_ROADVEH"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CLONE_SHIP, "SPBC_CLONE_SHIP"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CLONE_AIRPLANE, "SPBC_CLONE_AIRPLANE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_DEMOLISH, "SPBC_DEMOLISH"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_LOWERLAND, "SPBC_LOWERLAND"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_RAISELAND, "SPBC_RAISELAND"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_PICKSTATION, "SPBC_PICKSTATION"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BUILDSIGNALS, "SPBC_BUILDSIGNALS"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_DARK_BLUE, "SPBC_DARK_BLUE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_PALE_GREEN, "SPBC_PALE_GREEN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_PINK, "SPBC_PINK"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_YELLOW, "SPBC_YELLOW"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_RED, "SPBC_RED"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_LIGHT_BLUE, "SPBC_LIGHT_BLUE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_GREEN, "SPBC_GREEN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_DARK_GREEN, "SPBC_DARK_GREEN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BLUE, "SPBC_BLUE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_CREAM, "SPBC_CREAM"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_MAUVE, "SPBC_MAUVE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_PURPLE, "SPBC_PURPLE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_ORANGE, "SPBC_ORANGE"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_BROWN, "SPBC_BROWN"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_GREY, "SPBC_GREY"); - SQGSStoryPage.DefSQConst(engine, ScriptStoryPage::SPBC_WHITE, "SPBC_WHITE"); - - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::IsValidStoryPage, "IsValidStoryPage", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::IsValidStoryPageElement, "IsValidStoryPageElement", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::New, "New", 3, ".i."); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::NewElement, "NewElement", 5, ".iii."); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::UpdateElement, "UpdateElement", 4, ".ii."); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::GetPageSortValue, "GetPageSortValue", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::GetPageElementSortValue, "GetPageElementSortValue", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::GetCompany, "GetCompany", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::GetDate, "GetDate", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::SetDate, "SetDate", 3, ".ii"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::SetTitle, "SetTitle", 3, ".i."); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::Show, "Show", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::Remove, "Remove", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::RemoveElement, "RemoveElement", 2, ".i"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::MakePushButtonReference, "MakePushButtonReference", 3, ".ii"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::MakeTileButtonReference, "MakeTileButtonReference", 4, ".iii"); - SQGSStoryPage.DefSQStaticMethod(engine, &ScriptStoryPage::MakeVehicleButtonReference, "MakeVehicleButtonReference", 5, ".iiii"); - - SQGSStoryPage.PostRegister(engine); -} diff --git a/src/script/api/game/game_storypageelementlist.hpp.sq b/src/script/api/game/game_storypageelementlist.hpp.sq deleted file mode 100644 index 3c70a196c..000000000 --- a/src/script/api/game/game_storypageelementlist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_storypageelementlist.hpp" -#include "../template/template_storypageelementlist.hpp.sq" - - -template <> const char *GetClassName<ScriptStoryPageElementList, ST_GS>() { return "GSStoryPageElementList"; } - -void SQGSStoryPageElementList_Register(Squirrel *engine) -{ - DefSQClass<ScriptStoryPageElementList, ST_GS> SQGSStoryPageElementList("GSStoryPageElementList"); - SQGSStoryPageElementList.PreRegister(engine, "GSList"); - SQGSStoryPageElementList.AddConstructor<void (ScriptStoryPageElementList::*)(ScriptStoryPage::StoryPageID story_page_id), 2>(engine, "xi"); - - SQGSStoryPageElementList.PostRegister(engine); -} diff --git a/src/script/api/game/game_storypagelist.hpp.sq b/src/script/api/game/game_storypagelist.hpp.sq deleted file mode 100644 index b6577e3b8..000000000 --- a/src/script/api/game/game_storypagelist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_storypagelist.hpp" -#include "../template/template_storypagelist.hpp.sq" - - -template <> const char *GetClassName<ScriptStoryPageList, ST_GS>() { return "GSStoryPageList"; } - -void SQGSStoryPageList_Register(Squirrel *engine) -{ - DefSQClass<ScriptStoryPageList, ST_GS> SQGSStoryPageList("GSStoryPageList"); - SQGSStoryPageList.PreRegister(engine, "GSList"); - SQGSStoryPageList.AddConstructor<void (ScriptStoryPageList::*)(ScriptCompany::CompanyID company), 2>(engine, "xi"); - - SQGSStoryPageList.PostRegister(engine); -} diff --git a/src/script/api/game/game_subsidy.hpp.sq b/src/script/api/game/game_subsidy.hpp.sq deleted file mode 100644 index 8d2c4b200..000000000 --- a/src/script/api/game/game_subsidy.hpp.sq +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidy.hpp" -#include "../template/template_subsidy.hpp.sq" - - -template <> const char *GetClassName<ScriptSubsidy, ST_GS>() { return "GSSubsidy"; } - -void SQGSSubsidy_Register(Squirrel *engine) -{ - DefSQClass<ScriptSubsidy, ST_GS> SQGSSubsidy("GSSubsidy"); - SQGSSubsidy.PreRegister(engine); - SQGSSubsidy.AddConstructor<void (ScriptSubsidy::*)(), 1>(engine, "x"); - - SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INDUSTRY, "SPT_INDUSTRY"); - SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_TOWN, "SPT_TOWN"); - SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INVALID, "SPT_INVALID"); - - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsValidSubsidy, "IsValidSubsidy", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsAwarded, "IsAwarded", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::Create, "Create", 6, ".iiiii"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetAwardedTo, "GetAwardedTo", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetExpireDate, "GetExpireDate", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetCargoType, "GetCargoType", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceType, "GetSourceType", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceIndex, "GetSourceIndex", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationType, "GetDestinationType", 2, ".i"); - SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationIndex, "GetDestinationIndex", 2, ".i"); - - SQGSSubsidy.PostRegister(engine); -} diff --git a/src/script/api/game/game_subsidylist.hpp.sq b/src/script/api/game/game_subsidylist.hpp.sq deleted file mode 100644 index ff68ae322..000000000 --- a/src/script/api/game/game_subsidylist.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidylist.hpp" -#include "../template/template_subsidylist.hpp.sq" - - -template <> const char *GetClassName<ScriptSubsidyList, ST_GS>() { return "GSSubsidyList"; } - -void SQGSSubsidyList_Register(Squirrel *engine) -{ - DefSQClass<ScriptSubsidyList, ST_GS> SQGSSubsidyList("GSSubsidyList"); - SQGSSubsidyList.PreRegister(engine, "GSList"); - SQGSSubsidyList.AddConstructor<void (ScriptSubsidyList::*)(), 1>(engine, "x"); - - SQGSSubsidyList.PostRegister(engine); -} diff --git a/src/script/api/game/game_text.hpp.sq b/src/script/api/game/game_text.hpp.sq deleted file mode 100644 index b0563eaba..000000000 --- a/src/script/api/game/game_text.hpp.sq +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_text.hpp" -#include "../template/template_text.hpp.sq" - - -template <> const char *GetClassName<ScriptText, ST_GS>() { return "GSText"; } - -void SQGSText_Register(Squirrel *engine) -{ - DefSQClass<ScriptText, ST_GS> SQGSText("GSText"); - SQGSText.PreRegister(engine); - SQGSText.AddSQAdvancedConstructor(engine); - - SQGSText.DefSQConst(engine, ScriptText::SCRIPT_TEXT_MAX_PARAMETERS, "SCRIPT_TEXT_MAX_PARAMETERS"); - - SQGSText.DefSQAdvancedMethod(engine, &ScriptText::_set, "_set"); - SQGSText.DefSQAdvancedMethod(engine, &ScriptText::SetParam, "SetParam"); - SQGSText.DefSQAdvancedMethod(engine, &ScriptText::AddParam, "AddParam"); - - SQGSText.PostRegister(engine); -} diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq deleted file mode 100644 index 694708c8e..000000000 --- a/src/script/api/game/game_tile.hpp.sq +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tile.hpp" -#include "../template/template_tile.hpp.sq" - - -template <> const char *GetClassName<ScriptTile, ST_GS>() { return "GSTile"; } - -void SQGSTile_Register(Squirrel *engine) -{ - DefSQClass<ScriptTile, ST_GS> SQGSTile("GSTile"); - SQGSTile.PreRegister(engine); - SQGSTile.AddConstructor<void (ScriptTile::*)(), 1>(engine, "x"); - - SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_BASE, "ERR_TILE_BASE"); - SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); - SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); - SQGSTile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); - SQGSTile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); - SQGSTile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); - SQGSTile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W"); - SQGSTile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S"); - SQGSTile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E"); - SQGSTile.DefSQConst(engine, ScriptTile::CORNER_N, "CORNER_N"); - SQGSTile.DefSQConst(engine, ScriptTile::CORNER_INVALID, "CORNER_INVALID"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_FLAT, "SLOPE_FLAT"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_W, "SLOPE_W"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_S, "SLOPE_S"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_E, "SLOPE_E"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_N, "SLOPE_N"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP, "SLOPE_STEEP"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NW, "SLOPE_NW"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SW, "SLOPE_SW"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SE, "SLOPE_SE"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NE, "SLOPE_NE"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_EW, "SLOPE_EW"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NS, "SLOPE_NS"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_ELEVATED, "SLOPE_ELEVATED"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NWS, "SLOPE_NWS"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_WSE, "SLOPE_WSE"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SEN, "SLOPE_SEN"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_ENW, "SLOPE_ENW"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_W, "SLOPE_STEEP_W"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_S, "SLOPE_STEEP_S"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_E, "SLOPE_STEEP_E"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_N, "SLOPE_STEEP_N"); - SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_INVALID, "SLOPE_INVALID"); - SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_RAIL, "TRANSPORT_RAIL"); - SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_ROAD, "TRANSPORT_ROAD"); - SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_WATER, "TRANSPORT_WATER"); - SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_AIR, "TRANSPORT_AIR"); - SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_INVALID, "TRANSPORT_INVALID"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_FOUNDATION, "BT_FOUNDATION"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_TERRAFORM, "BT_TERRAFORM"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_BUILD_TREES, "BT_BUILD_TREES"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_GRASS, "BT_CLEAR_GRASS"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROUGH, "BT_CLEAR_ROUGH"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROCKY, "BT_CLEAR_ROCKY"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_FIELDS, "BT_CLEAR_FIELDS"); - SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_HOUSE, "BT_CLEAR_HOUSE"); - SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_NORMAL, "TERRAIN_NORMAL"); - SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_DESERT, "TERRAIN_DESERT"); - SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); - SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW"); - - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); - ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); - - ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); - ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); - - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsWaterTile, "IsWaterTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsCoastTile, "IsCoastTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsStationTile, "IsStationTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsSteepSlope, "IsSteepSlope", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsHalftileSlope, "IsHalftileSlope", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::HasTreeOnTile, "HasTreeOnTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsFarmTile, "IsFarmTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsRockTile, "IsRockTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsRoughTile, "IsRoughTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsSnowTile, "IsSnowTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsDesertTile, "IsDesertTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetTerrainType, "GetTerrainType", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetSlope, "GetSlope", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetComplementSlope, "GetComplementSlope", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetMinHeight, "GetMinHeight", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetMaxHeight, "GetMaxHeight", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCornerHeight, "GetCornerHeight", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetOwner, "GetOwner", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::HasTransportType, "HasTransportType", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCargoAcceptance, "GetCargoAcceptance", 6, ".iiiii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCargoProduction, "GetCargoProduction", 6, ".iiiii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::RaiseTile, "RaiseTile", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::LowerTile, "LowerTile", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::LevelTiles, "LevelTiles", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::DemolishTile, "DemolishTile", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::PlantTree, "PlantTree", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::PlantTreeRectangle, "PlantTreeRectangle", 4, ".iii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetTownAuthority, "GetTownAuthority", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetClosestTown, "GetClosestTown", 2, ".i"); - SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetBuildCost, "GetBuildCost", 2, ".i"); - - SQGSTile.PostRegister(engine); -} diff --git a/src/script/api/game/game_tilelist.hpp.sq b/src/script/api/game/game_tilelist.hpp.sq deleted file mode 100644 index 5cf05e785..000000000 --- a/src/script/api/game/game_tilelist.hpp.sq +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tilelist.hpp" -#include "../template/template_tilelist.hpp.sq" - - -template <> const char *GetClassName<ScriptTileList, ST_GS>() { return "GSTileList"; } - -void SQGSTileList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList, ST_GS> SQGSTileList("GSTileList"); - SQGSTileList.PreRegister(engine, "GSList"); - SQGSTileList.AddConstructor<void (ScriptTileList::*)(), 1>(engine, "x"); - - SQGSTileList.DefSQMethod(engine, &ScriptTileList::AddRectangle, "AddRectangle", 3, "xii"); - SQGSTileList.DefSQMethod(engine, &ScriptTileList::AddTile, "AddTile", 2, "xi"); - SQGSTileList.DefSQMethod(engine, &ScriptTileList::RemoveRectangle, "RemoveRectangle", 3, "xii"); - SQGSTileList.DefSQMethod(engine, &ScriptTileList::RemoveTile, "RemoveTile", 2, "xi"); - - SQGSTileList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_IndustryAccepting, ST_GS>() { return "GSTileList_IndustryAccepting"; } - -void SQGSTileList_IndustryAccepting_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_IndustryAccepting, ST_GS> SQGSTileList_IndustryAccepting("GSTileList_IndustryAccepting"); - SQGSTileList_IndustryAccepting.PreRegister(engine, "GSTileList"); - SQGSTileList_IndustryAccepting.AddConstructor<void (ScriptTileList_IndustryAccepting::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); - - SQGSTileList_IndustryAccepting.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_IndustryProducing, ST_GS>() { return "GSTileList_IndustryProducing"; } - -void SQGSTileList_IndustryProducing_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_IndustryProducing, ST_GS> SQGSTileList_IndustryProducing("GSTileList_IndustryProducing"); - SQGSTileList_IndustryProducing.PreRegister(engine, "GSTileList"); - SQGSTileList_IndustryProducing.AddConstructor<void (ScriptTileList_IndustryProducing::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); - - SQGSTileList_IndustryProducing.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTileList_StationType, ST_GS>() { return "GSTileList_StationType"; } - -void SQGSTileList_StationType_Register(Squirrel *engine) -{ - DefSQClass<ScriptTileList_StationType, ST_GS> SQGSTileList_StationType("GSTileList_StationType"); - SQGSTileList_StationType.PreRegister(engine, "GSTileList"); - SQGSTileList_StationType.AddConstructor<void (ScriptTileList_StationType::*)(StationID station_id, ScriptStation::StationType station_type), 3>(engine, "xii"); - - SQGSTileList_StationType.PostRegister(engine); -} diff --git a/src/script/api/game/game_town.hpp.sq b/src/script/api/game/game_town.hpp.sq deleted file mode 100644 index 5cf394ca1..000000000 --- a/src/script/api/game/game_town.hpp.sq +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_town.hpp" -#include "../template/template_town.hpp.sq" - - -template <> const char *GetClassName<ScriptTown, ST_GS>() { return "GSTown"; } - -void SQGSTown_Register(Squirrel *engine) -{ - DefSQClass<ScriptTown, ST_GS> SQGSTown("GSTown"); - SQGSTown.PreRegister(engine); - SQGSTown.AddConstructor<void (ScriptTown::*)(), 1>(engine, "x"); - - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_SMALL, "TOWN_ACTION_ADVERTISE_SMALL"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_MEDIUM, "TOWN_ACTION_ADVERTISE_MEDIUM"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_LARGE, "TOWN_ACTION_ADVERTISE_LARGE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ROAD_REBUILD, "TOWN_ACTION_ROAD_REBUILD"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUILD_STATUE, "TOWN_ACTION_BUILD_STATUE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_FUND_BUILDINGS, "TOWN_ACTION_FUND_BUILDINGS"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUY_RIGHTS, "TOWN_ACTION_BUY_RIGHTS"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BRIBE, "TOWN_ACTION_BRIBE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_NONE, "TOWN_RATING_NONE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_APPALLING, "TOWN_RATING_APPALLING"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_POOR, "TOWN_RATING_VERY_POOR"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_POOR, "TOWN_RATING_POOR"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_MEDIOCRE, "TOWN_RATING_MEDIOCRE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_GOOD, "TOWN_RATING_GOOD"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_GOOD, "TOWN_RATING_VERY_GOOD"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_EXCELLENT, "TOWN_RATING_EXCELLENT"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_OUTSTANDING, "TOWN_RATING_OUTSTANDING"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_INVALID, "TOWN_RATING_INVALID"); - SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_ORIGINAL, "ROAD_LAYOUT_ORIGINAL"); - SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_BETTER_ROADS, "ROAD_LAYOUT_BETTER_ROADS"); - SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_2x2, "ROAD_LAYOUT_2x2"); - SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_3x3, "ROAD_LAYOUT_3x3"); - SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_INVALID, "ROAD_LAYOUT_INVALID"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_SIZE_SMALL, "TOWN_SIZE_SMALL"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_SIZE_MEDIUM, "TOWN_SIZE_MEDIUM"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_SIZE_LARGE, "TOWN_SIZE_LARGE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_SIZE_INVALID, "TOWN_SIZE_INVALID"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NONE, "TOWN_GROWTH_NONE"); - SQGSTown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NORMAL, "TOWN_GROWTH_NORMAL"); - - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetTownCount, "GetTownCount", 1, "."); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsValidTown, "IsValidTown", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetName, "GetName", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::SetName, "SetName", 3, ".i."); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::SetText, "SetText", 3, ".i."); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetPopulation, "GetPopulation", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetHouseCount, "GetHouseCount", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLocation, "GetLocation", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthSupplied, "GetLastMonthSupplied", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthReceived, "GetLastMonthReceived", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::SetCargoGoal, "SetCargoGoal", 4, ".iii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetCargoGoal, "GetCargoGoal", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::SetGrowthRate, "SetGrowthRate", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetGrowthRate, "GetGrowthRate", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::HasStatue, "HasStatue", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsCity, "IsCity", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetFundBuildingsDuration, "GetFundBuildingsDuration", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsCompany, "GetExclusiveRightsCompany", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsActionAvailable, "IsActionAvailable", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::PerformTownAction, "PerformTownAction", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::ExpandTown, "ExpandTown", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::FoundTown, "FoundTown", 6, ".iibi."); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRating, "GetRating", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDetailedRating, "GetDetailedRating", 3, ".ii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::ChangeRating, "ChangeRating", 4, ".iii"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetAllowedNoise, "GetAllowedNoise", 2, ".i"); - SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRoadLayout, "GetRoadLayout", 2, ".i"); - - SQGSTown.PostRegister(engine); -} diff --git a/src/script/api/game/game_townlist.hpp.sq b/src/script/api/game/game_townlist.hpp.sq deleted file mode 100644 index 2445305b9..000000000 --- a/src/script/api/game/game_townlist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_townlist.hpp" -#include "../template/template_townlist.hpp.sq" - - -template <> const char *GetClassName<ScriptTownList, ST_GS>() { return "GSTownList"; } - -void SQGSTownList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTownList, ST_GS> SQGSTownList("GSTownList"); - SQGSTownList.PreRegister(engine, "GSList"); - SQGSTownList.AddConstructor<void (ScriptTownList::*)(), 1>(engine, "x"); - - SQGSTownList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptTownEffectList, ST_GS>() { return "GSTownEffectList"; } - -void SQGSTownEffectList_Register(Squirrel *engine) -{ - DefSQClass<ScriptTownEffectList, ST_GS> SQGSTownEffectList("GSTownEffectList"); - SQGSTownEffectList.PreRegister(engine, "GSList"); - SQGSTownEffectList.AddConstructor<void (ScriptTownEffectList::*)(), 1>(engine, "x"); - - SQGSTownEffectList.PostRegister(engine); -} diff --git a/src/script/api/game/game_tunnel.hpp.sq b/src/script/api/game/game_tunnel.hpp.sq deleted file mode 100644 index 863903679..000000000 --- a/src/script/api/game/game_tunnel.hpp.sq +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tunnel.hpp" -#include "../template/template_tunnel.hpp.sq" - - -template <> const char *GetClassName<ScriptTunnel, ST_GS>() { return "GSTunnel"; } - -void SQGSTunnel_Register(Squirrel *engine) -{ - DefSQClass<ScriptTunnel, ST_GS> SQGSTunnel("GSTunnel"); - SQGSTunnel.PreRegister(engine); - SQGSTunnel.AddConstructor<void (ScriptTunnel::*)(), 1>(engine, "x"); - - SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_BASE, "ERR_TUNNEL_BASE"); - SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER"); - SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE"); - SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY"); - SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE"); - - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ON_WATER, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER); - ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY); - ScriptError::RegisterErrorMap(STR_ERROR_UNABLE_TO_EXCAVATE_LAND, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE); - - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY"); - ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE"); - - SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::IsTunnelTile, "IsTunnelTile", 2, ".i"); - SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, ".i"); - SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::BuildTunnel, "BuildTunnel", 3, ".ii"); - SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::RemoveTunnel, "RemoveTunnel", 2, ".i"); - - SQGSTunnel.PostRegister(engine); -} diff --git a/src/script/api/game/game_vehicle.hpp.sq b/src/script/api/game/game_vehicle.hpp.sq deleted file mode 100644 index de58e05e6..000000000 --- a/src/script/api/game/game_vehicle.hpp.sq +++ /dev/null @@ -1,148 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehicle.hpp" -#include "../template/template_vehicle.hpp.sq" - - -template <> const char *GetClassName<ScriptVehicle, ST_GS>() { return "GSVehicle"; } - -void SQGSVehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicle, ST_GS> SQGSVehicle("GSVehicle"); - SQGSVehicle.PreRegister(engine); - SQGSVehicle.AddConstructor<void (ScriptVehicle::*)(), 1>(engine, "x"); - - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BASE, "ERR_VEHICLE_BASE"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_RAIL, "VT_RAIL"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_ROAD, "VT_ROAD"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_WATER, "VT_WATER"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_AIR, "VT_AIR"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_INVALID, "VT_INVALID"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_RUNNING, "VS_RUNNING"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_STOPPED, "VS_STOPPED"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_IN_DEPOT, "VS_IN_DEPOT"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_AT_STATION, "VS_AT_STATION"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_BROKEN, "VS_BROKEN"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_CRASHED, "VS_CRASHED"); - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_INVALID, "VS_INVALID"); - - SQGSVehicle.DefSQConst(engine, ScriptVehicle::VEHICLE_INVALID, "VEHICLE_INVALID"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, ScriptVehicle::ERR_VEHICLE_TOO_MANY); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_TRAIN, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_SHIP, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED); - ScriptError::RegisterErrorMap(STR_ERROR_DEPOT_WRONG_DEPOT_TYPE, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT); - ScriptError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT); - ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_POWER, ScriptVehicle::ERR_VEHICLE_NO_POWER); - ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, ScriptVehicle::ERR_VEHICLE_TOO_LONG); - - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER"); - ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG"); - - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetNumWagons, "GetNumWagons", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SetName, "SetName", 3, ".i."); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetName, "GetName", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetOwner, "GetOwner", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLocation, "GetLocation", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetEngineType, "GetEngineType", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAge, "GetAge", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonAge, "GetWagonAge", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaxAge, "GetMaxAge", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetState, "GetState", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRunningCost, "GetRunningCost", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetVehicleType, "GetVehicleType", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRoadType, "GetRoadType", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsInDepot, "IsInDepot", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicle, "BuildVehicle", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicleWithRefit, "BuildVehicleWithRefit", 4, ".iii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetBuildWithRefitCapacity, "GetBuildWithRefitCapacity", 4, ".iii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::CloneVehicle, "CloneVehicle", 4, ".iib"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagon, "MoveWagon", 5, ".iiii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagonChain, "MoveWagonChain", 5, ".iiii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::RefitVehicle, "RefitVehicle", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellVehicle, "SellVehicle", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagon, "SellWagon", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagonChain, "SellWagonChain", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepotForServicing, "SendVehicleToDepotForServicing", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCapacity, "GetCapacity", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLength, "GetLength", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetGroupID, "GetGroupID", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsArticulated, "IsArticulated", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetReliability, "GetReliability", 2, ".i"); - SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i"); - - SQGSVehicle.PostRegister(engine); -} diff --git a/src/script/api/game/game_vehiclelist.hpp.sq b/src/script/api/game/game_vehiclelist.hpp.sq deleted file mode 100644 index b4dcf4b82..000000000 --- a/src/script/api/game/game_vehiclelist.hpp.sq +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehiclelist.hpp" -#include "../template/template_vehiclelist.hpp.sq" - - -template <> const char *GetClassName<ScriptVehicleList, ST_GS>() { return "GSVehicleList"; } - -void SQGSVehicleList_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList, ST_GS> SQGSVehicleList("GSVehicleList"); - SQGSVehicleList.PreRegister(engine, "GSList"); - SQGSVehicleList.AddConstructor<void (ScriptVehicleList::*)(), 1>(engine, "x"); - - SQGSVehicleList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_Station, ST_GS>() { return "GSVehicleList_Station"; } - -void SQGSVehicleList_Station_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_Station, ST_GS> SQGSVehicleList_Station("GSVehicleList_Station"); - SQGSVehicleList_Station.PreRegister(engine, "GSList"); - SQGSVehicleList_Station.AddConstructor<void (ScriptVehicleList_Station::*)(StationID station_id), 2>(engine, "xi"); - - SQGSVehicleList_Station.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_Depot, ST_GS>() { return "GSVehicleList_Depot"; } - -void SQGSVehicleList_Depot_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_Depot, ST_GS> SQGSVehicleList_Depot("GSVehicleList_Depot"); - SQGSVehicleList_Depot.PreRegister(engine, "GSList"); - SQGSVehicleList_Depot.AddConstructor<void (ScriptVehicleList_Depot::*)(TileIndex tile), 2>(engine, "xi"); - - SQGSVehicleList_Depot.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptVehicleList_SharedOrders, ST_GS>() { return "GSVehicleList_SharedOrders"; } - -void SQGSVehicleList_SharedOrders_Register(Squirrel *engine) -{ - DefSQClass<ScriptVehicleList_SharedOrders, ST_GS> SQGSVehicleList_SharedOrders("GSVehicleList_SharedOrders"); - SQGSVehicleList_SharedOrders.PreRegister(engine, "GSList"); - SQGSVehicleList_SharedOrders.AddConstructor<void (ScriptVehicleList_SharedOrders::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQGSVehicleList_SharedOrders.PostRegister(engine); -} diff --git a/src/script/api/game/game_viewport.hpp.sq b/src/script/api/game/game_viewport.hpp.sq deleted file mode 100644 index 6d7d2a8a9..000000000 --- a/src/script/api/game/game_viewport.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_viewport.hpp" -#include "../template/template_viewport.hpp.sq" - - -template <> const char *GetClassName<ScriptViewport, ST_GS>() { return "GSViewport"; } - -void SQGSViewport_Register(Squirrel *engine) -{ - DefSQClass<ScriptViewport, ST_GS> SQGSViewport("GSViewport"); - SQGSViewport.PreRegister(engine); - SQGSViewport.AddConstructor<void (ScriptViewport::*)(), 1>(engine, "x"); - - SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollTo, "ScrollTo", 2, ".i"); - SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollEveryoneTo, "ScrollEveryoneTo", 2, ".i"); - SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollCompanyClientsTo, "ScrollCompanyClientsTo", 3, ".ii"); - SQGSViewport.DefSQStaticMethod(engine, &ScriptViewport::ScrollClientTo, "ScrollClientTo", 3, ".ii"); - - SQGSViewport.PostRegister(engine); -} diff --git a/src/script/api/game/game_waypoint.hpp.sq b/src/script/api/game/game_waypoint.hpp.sq deleted file mode 100644 index f74902c97..000000000 --- a/src/script/api/game/game_waypoint.hpp.sq +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypoint.hpp" -#include "../template/template_waypoint.hpp.sq" - - -template <> const char *GetClassName<ScriptWaypoint, ST_GS>() { return "GSWaypoint"; } - -void SQGSWaypoint_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypoint, ST_GS> SQGSWaypoint("GSWaypoint"); - SQGSWaypoint.PreRegister(engine, "GSBaseStation"); - SQGSWaypoint.AddConstructor<void (ScriptWaypoint::*)(), 1>(engine, "x"); - - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_BASE, "ERR_WAYPOINT_BASE"); - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT"); - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS"); - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_RAIL, "WAYPOINT_RAIL"); - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_BUOY, "WAYPOINT_BUOY"); - SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_ANY, "WAYPOINT_ANY"); - - ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT); - ScriptError::RegisterErrorMap(STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS); - - ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT"); - ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS"); - - SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::IsValidWaypoint, "IsValidWaypoint", 2, ".i"); - SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::GetWaypointID, "GetWaypointID", 2, ".i"); - SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::HasWaypointType, "HasWaypointType", 3, ".ii"); - - SQGSWaypoint.PostRegister(engine); -} diff --git a/src/script/api/game/game_waypointlist.hpp.sq b/src/script/api/game/game_waypointlist.hpp.sq deleted file mode 100644 index 92827c89b..000000000 --- a/src/script/api/game/game_waypointlist.hpp.sq +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypointlist.hpp" -#include "../template/template_waypointlist.hpp.sq" - - -template <> const char *GetClassName<ScriptWaypointList, ST_GS>() { return "GSWaypointList"; } - -void SQGSWaypointList_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypointList, ST_GS> SQGSWaypointList("GSWaypointList"); - SQGSWaypointList.PreRegister(engine, "GSList"); - SQGSWaypointList.AddConstructor<void (ScriptWaypointList::*)(ScriptWaypoint::WaypointType waypoint_type), 2>(engine, "xi"); - - SQGSWaypointList.PostRegister(engine); -} - - -template <> const char *GetClassName<ScriptWaypointList_Vehicle, ST_GS>() { return "GSWaypointList_Vehicle"; } - -void SQGSWaypointList_Vehicle_Register(Squirrel *engine) -{ - DefSQClass<ScriptWaypointList_Vehicle, ST_GS> SQGSWaypointList_Vehicle("GSWaypointList_Vehicle"); - SQGSWaypointList_Vehicle.PreRegister(engine, "GSList"); - SQGSWaypointList_Vehicle.AddConstructor<void (ScriptWaypointList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); - - SQGSWaypointList_Vehicle.PostRegister(engine); -} diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq deleted file mode 100644 index 0d5ab2bc0..000000000 --- a/src/script/api/game/game_window.hpp.sq +++ /dev/null @@ -1,1390 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_window.hpp" -#include "../template/template_window.hpp.sq" - - -template <> const char *GetClassName<ScriptWindow, ST_GS>() { return "GSWindow"; } - -void SQGSWindow_Register(Squirrel *engine) -{ - DefSQClass<ScriptWindow, ST_GS> SQGSWindow("GSWindow"); - SQGSWindow.PreRegister(engine); - SQGSWindow.AddConstructor<void (ScriptWindow::*)(), 1>(engine, "x"); - - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_AI, "WN_GAME_OPTIONS_AI"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_ABOUT, "WN_GAME_OPTIONS_ABOUT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_NEWGRF_STATE, "WN_GAME_OPTIONS_NEWGRF_STATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_GAME_OPTIONS, "WN_GAME_OPTIONS_GAME_OPTIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_GAME_SETTINGS, "WN_GAME_OPTIONS_GAME_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_QUERY_STRING, "WN_QUERY_STRING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_QUERY_STRING_SIGN, "WN_QUERY_STRING_SIGN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_CONFIRM_POPUP_QUERY, "WN_CONFIRM_POPUP_QUERY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_CONFIRM_POPUP_QUERY_BOOTSTRAP, "WN_CONFIRM_POPUP_QUERY_BOOTSTRAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_GAME, "WN_NETWORK_WINDOW_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_LOBBY, "WN_NETWORK_WINDOW_LOBBY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_CONTENT_LIST, "WN_NETWORK_WINDOW_CONTENT_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_START, "WN_NETWORK_WINDOW_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_STATUS_WINDOW_JOIN, "WN_NETWORK_STATUS_WINDOW_JOIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD, "WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NONE, "WC_NONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MAIN_WINDOW, "WC_MAIN_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MAIN_TOOLBAR, "WC_MAIN_TOOLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATUS_BAR, "WC_STATUS_BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_TOOLBAR, "WC_BUILD_TOOLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCEN_BUILD_TOOLBAR, "WC_SCEN_BUILD_TOOLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_TREES, "WC_BUILD_TREES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRANSPARENCY_TOOLBAR, "WC_TRANSPARENCY_TOOLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_SIGNAL, "WC_BUILD_SIGNAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SMALLMAP, "WC_SMALLMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ERRMSG, "WC_ERRMSG"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOOLTIPS, "WC_TOOLTIPS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_QUERY_STRING, "WC_QUERY_STRING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CONFIRM_POPUP_QUERY, "WC_CONFIRM_POPUP_QUERY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GOAL_QUESTION, "WC_GOAL_QUESTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVELOAD, "WC_SAVELOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LAND_INFO, "WC_LAND_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_DROPDOWN_MENU, "WC_DROPDOWN_MENU"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_OSK, "WC_OSK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SET_DATE, "WC_SET_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_SETTINGS, "WC_AI_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GRF_PARAMETERS, "WC_GRF_PARAMETERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TEXTFILE, "WC_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_AUTHORITY, "WC_TOWN_AUTHORITY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_DETAILS, "WC_VEHICLE_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_REFIT, "WC_VEHICLE_REFIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_ORDERS, "WC_VEHICLE_ORDERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_REPLACE_VEHICLE, "WC_REPLACE_VEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_TIMETABLE, "WC_VEHICLE_TIMETABLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_COLOUR, "WC_COMPANY_COLOUR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_MANAGER_FACE, "WC_COMPANY_MANAGER_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SELECT_STATION, "WC_SELECT_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWS_WINDOW, "WC_NEWS_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_DIRECTORY, "WC_TOWN_DIRECTORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SUBSIDIES_LIST, "WC_SUBSIDIES_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_DIRECTORY, "WC_INDUSTRY_DIRECTORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MESSAGE_HISTORY, "WC_MESSAGE_HISTORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SIGN_LIST, "WC_SIGN_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_LIST, "WC_AI_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GOALS_LIST, "WC_GOALS_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STORY_BOOK, "WC_STORY_BOOK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATION_LIST, "WC_STATION_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRAINS_LIST, "WC_TRAINS_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ROADVEH_LIST, "WC_ROADVEH_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SHIPS_LIST, "WC_SHIPS_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AIRCRAFT_LIST, "WC_AIRCRAFT_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_VIEW, "WC_TOWN_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_VIEW, "WC_VEHICLE_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATION_VIEW, "WC_STATION_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_DEPOT, "WC_VEHICLE_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_WAYPOINT_VIEW, "WC_WAYPOINT_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_VIEW, "WC_INDUSTRY_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY, "WC_COMPANY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_OBJECT, "WC_BUILD_OBJECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_VEHICLE, "WC_BUILD_VEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_BRIDGE, "WC_BUILD_BRIDGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_STATION, "WC_BUILD_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUS_STATION, "WC_BUS_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRUCK_STATION, "WC_TRUCK_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_DEPOT, "WC_BUILD_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_WAYPOINT, "WC_BUILD_WAYPOINT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FOUND_TOWN, "WC_FOUND_TOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_INDUSTRY, "WC_BUILD_INDUSTRY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SELECT_GAME, "WC_SELECT_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCEN_LAND_GEN, "WC_SCEN_LAND_GEN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GENERATE_LANDSCAPE, "WC_GENERATE_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MODAL_PROGRESS, "WC_MODAL_PROGRESS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NETWORK_WINDOW, "WC_NETWORK_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CLIENT_LIST, "WC_CLIENT_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CLIENT_LIST_POPUP, "WC_CLIENT_LIST_POPUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NETWORK_STATUS_WINDOW, "WC_NETWORK_STATUS_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SEND_NETWORK_MSG, "WC_SEND_NETWORK_MSG"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_PASSWORD_WINDOW, "WC_COMPANY_PASSWORD_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_CARGOES, "WC_INDUSTRY_CARGOES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GRAPH_LEGEND, "WC_GRAPH_LEGEND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FINANCES, "WC_FINANCES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INCOME_GRAPH, "WC_INCOME_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_OPERATING_PROFIT, "WC_OPERATING_PROFIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_DELIVERED_CARGO, "WC_DELIVERED_CARGO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PERFORMANCE_HISTORY, "WC_PERFORMANCE_HISTORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_VALUE, "WC_COMPANY_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_LEAGUE, "WC_COMPANY_LEAGUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PAYMENT_RATES, "WC_PAYMENT_RATES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PERFORMANCE_DETAIL, "WC_PERFORMANCE_DETAIL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_INFRASTRUCTURE, "WC_COMPANY_INFRASTRUCTURE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUY_COMPANY, "WC_BUY_COMPANY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ENGINE_PREVIEW, "WC_ENGINE_PREVIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MUSIC_WINDOW, "WC_MUSIC_WINDOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MUSIC_TRACK_SELECTION, "WC_MUSIC_TRACK_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GAME_OPTIONS, "WC_GAME_OPTIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CUSTOM_CURRENCY, "WC_CUSTOM_CURRENCY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CHEATS, "WC_CHEATS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_EXTRA_VIEW_PORT, "WC_EXTRA_VIEW_PORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CONSOLE, "WC_CONSOLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BOOTSTRAP, "WC_BOOTSTRAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_HIGHSCORE, "WC_HIGHSCORE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ENDSCREEN, "WC_ENDSCREEN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_DEBUG, "WC_AI_DEBUG"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWGRF_INSPECT, "WC_NEWGRF_INSPECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SPRITE_ALIGNER, "WC_SPRITE_ALIGNER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LINKGRAPH_LEGEND, "WC_LINKGRAPH_LEGEND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVE_PRESET, "WC_SAVE_PRESET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMERATE_DISPLAY, "WC_FRAMERATE_DISPLAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMETIME_GRAPH, "WC_FRAMETIME_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCREENSHOT, "WC_SCREENSHOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GOLD, "TC_GOLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_RED, "TC_RED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_PURPLE, "TC_PURPLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_LIGHT_BROWN, "TC_LIGHT_BROWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_ORANGE, "TC_ORANGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GREEN, "TC_GREEN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_YELLOW, "TC_YELLOW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_DARK_GREEN, "TC_DARK_GREEN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_CREAM, "TC_CREAM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BROWN, "TC_BROWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_WHITE, "TC_WHITE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_LIGHT_BLUE, "TC_LIGHT_BLUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GREY, "TC_GREY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_DARK_BLUE, "TC_DARK_BLUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLACK, "TC_BLACK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::TC_INVALID, "TC_INVALID"); - SQGSWindow.DefSQConst(engine, ScriptWindow::NUMBER_ALL, "NUMBER_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WIDGET_ALL, "WIDGET_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_CAPTION, "WID_AIL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_LIST, "WID_AIL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_SCROLLBAR, "WID_AIL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_INFO_BG, "WID_AIL_INFO_BG"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_ACCEPT, "WID_AIL_ACCEPT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_CANCEL, "WID_AIL_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_CAPTION, "WID_AIS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_BACKGROUND, "WID_AIS_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_SCROLLBAR, "WID_AIS_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_ACCEPT, "WID_AIS_ACCEPT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_RESET, "WID_AIS_RESET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_BACKGROUND, "WID_AIC_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_DECREASE, "WID_AIC_DECREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_INCREASE, "WID_AIC_INCREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_NUMBER, "WID_AIC_NUMBER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_GAMELIST, "WID_AIC_GAMELIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_LIST, "WID_AIC_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_SCROLLBAR, "WID_AIC_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_MOVE_UP, "WID_AIC_MOVE_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_MOVE_DOWN, "WID_AIC_MOVE_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CHANGE, "WID_AIC_CHANGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CONFIGURE, "WID_AIC_CONFIGURE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CLOSE, "WID_AIC_CLOSE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_TEXTFILE, "WID_AIC_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CONTENT_DOWNLOAD, "WID_AIC_CONTENT_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_VIEW, "WID_AID_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_NAME_TEXT, "WID_AID_NAME_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SETTINGS, "WID_AID_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SCRIPT_GAME, "WID_AID_SCRIPT_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_RELOAD_TOGGLE, "WID_AID_RELOAD_TOGGLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_LOG_PANEL, "WID_AID_LOG_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SCROLLBAR, "WID_AID_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_COMPANY_BUTTON_START, "WID_AID_COMPANY_BUTTON_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_COMPANY_BUTTON_END, "WID_AID_COMPANY_BUTTON_END"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STRING_WIDGETS, "WID_AID_BREAK_STRING_WIDGETS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STR_ON_OFF_BTN, "WID_AID_BREAK_STR_ON_OFF_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STR_EDIT_BOX, "WID_AID_BREAK_STR_EDIT_BOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_MATCH_CASE_BTN, "WID_AID_MATCH_CASE_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_CONTINUE_BTN, "WID_AID_CONTINUE_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AT_AIRPORT, "WID_AT_AIRPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AT_DEMOLISH, "WID_AT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_CLASS_DROPDOWN, "WID_AP_CLASS_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_AIRPORT_LIST, "WID_AP_AIRPORT_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_SCROLLBAR, "WID_AP_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_NUM, "WID_AP_LAYOUT_NUM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_DECREASE, "WID_AP_LAYOUT_DECREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_INCREASE, "WID_AP_LAYOUT_INCREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_AIRPORT_SPRITE, "WID_AP_AIRPORT_SPRITE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_EXTRA_TEXT, "WID_AP_EXTRA_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BOTTOMPANEL, "WID_AP_BOTTOMPANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_COVERAGE_LABEL, "WID_AP_COVERAGE_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DONTHILIGHT, "WID_AP_BTN_DONTHILIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DOHILIGHT, "WID_AP_BTN_DOHILIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_CAPTION, "WID_RV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SORT_ASCENDING_DESCENDING, "WID_RV_SORT_ASCENDING_DESCENDING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SHOW_HIDDEN_ENGINES, "WID_RV_SHOW_HIDDEN_ENGINES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SORT_DROPDOWN, "WID_RV_SORT_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_MATRIX, "WID_RV_LEFT_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_SCROLLBAR, "WID_RV_LEFT_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_MATRIX, "WID_RV_RIGHT_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_SCROLLBAR, "WID_RV_RIGHT_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_DETAILS, "WID_RV_LEFT_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_DETAILS, "WID_RV_RIGHT_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_START_REPLACE, "WID_RV_START_REPLACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_INFO_TAB, "WID_RV_INFO_TAB"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_STOP_REPLACE, "WID_RV_STOP_REPLACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RAIL_ROAD_TYPE_DROPDOWN, "WID_RV_RAIL_ROAD_TYPE_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_ENGINEWAGON_DROPDOWN, "WID_RV_TRAIN_ENGINEWAGON_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_WAGONREMOVE_TOGGLE, "WID_RV_TRAIN_WAGONREMOVE_TOGGLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BB_BACKGROUND, "WID_BB_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_QUESTION, "WID_BAFD_QUESTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_YES, "WID_BAFD_YES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_NO, "WID_BAFD_NO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_CAPTION, "WID_BBS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_DROPDOWN_ORDER, "WID_BBS_DROPDOWN_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_DROPDOWN_CRITERIA, "WID_BBS_DROPDOWN_CRITERIA"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_BRIDGE_LIST, "WID_BBS_BRIDGE_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_SCROLLBAR, "WID_BBS_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CAPTION, "WID_BV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_ASCENDING_DESCENDING, "WID_BV_SORT_ASCENDING_DESCENDING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_DROPDOWN, "WID_BV_SORT_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CARGO_FILTER_DROPDOWN, "WID_BV_CARGO_FILTER_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SHOW_HIDDEN_ENGINES, "WID_BV_SHOW_HIDDEN_ENGINES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_LIST, "WID_BV_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SCROLLBAR, "WID_BV_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_PANEL, "WID_BV_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_BUILD, "WID_BV_BUILD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SHOW_HIDE, "WID_BV_SHOW_HIDE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_BUILD_SEL, "WID_BV_BUILD_SEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_RENAME, "WID_BV_RENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_PANEL, "WID_C_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_CAPTION, "WID_C_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE, "WID_C_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE_TITLE, "WID_C_FACE_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INAUGURATION, "WID_C_DESC_INAUGURATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COLOUR_SCHEME, "WID_C_DESC_COLOUR_SCHEME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COLOUR_SCHEME_EXAMPLE, "WID_C_DESC_COLOUR_SCHEME_EXAMPLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_VEHICLE, "WID_C_DESC_VEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_VEHICLE_COUNTS, "WID_C_DESC_VEHICLE_COUNTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COMPANY_VALUE, "WID_C_DESC_COMPANY_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INFRASTRUCTURE, "WID_C_DESC_INFRASTRUCTURE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INFRASTRUCTURE_COUNTS, "WID_C_DESC_INFRASTRUCTURE_COUNTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_DESC_OWNERS, "WID_C_SELECT_DESC_OWNERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_OWNERS, "WID_C_DESC_OWNERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_BUTTONS, "WID_C_SELECT_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_NEW_FACE, "WID_C_NEW_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COLOUR_SCHEME, "WID_C_COLOUR_SCHEME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_PRESIDENT_NAME, "WID_C_PRESIDENT_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_NAME, "WID_C_COMPANY_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BUY_SHARE, "WID_C_BUY_SHARE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELL_SHARE, "WID_C_SELL_SHARE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_VIEW_BUILD_HQ, "WID_C_SELECT_VIEW_BUILD_HQ"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_VIEW_HQ, "WID_C_VIEW_HQ"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BUILD_HQ, "WID_C_BUILD_HQ"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_RELOCATE, "WID_C_SELECT_RELOCATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_RELOCATE_HQ, "WID_C_RELOCATE_HQ"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_VIEW_INFRASTRUCTURE, "WID_C_VIEW_INFRASTRUCTURE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_HAS_PASSWORD, "WID_C_HAS_PASSWORD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_MULTIPLAYER, "WID_C_SELECT_MULTIPLAYER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_PASSWORD, "WID_C_COMPANY_PASSWORD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_JOIN, "WID_C_COMPANY_JOIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_CAPTION, "WID_CF_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOGGLE_SIZE, "WID_CF_TOGGLE_SIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_PANEL, "WID_CF_SEL_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_CATEGORY, "WID_CF_EXPS_CATEGORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE1, "WID_CF_EXPS_PRICE1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE2, "WID_CF_EXPS_PRICE2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE3, "WID_CF_EXPS_PRICE3"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOTAL_PANEL, "WID_CF_TOTAL_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_MAXLOAN, "WID_CF_SEL_MAXLOAN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_BALANCE_VALUE, "WID_CF_BALANCE_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_LOAN_VALUE, "WID_CF_LOAN_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_LOAN_LINE, "WID_CF_LOAN_LINE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOTAL_VALUE, "WID_CF_TOTAL_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_MAXLOAN_GAP, "WID_CF_MAXLOAN_GAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_MAXLOAN_VALUE, "WID_CF_MAXLOAN_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_BUTTONS, "WID_CF_SEL_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_INCREASE_LOAN, "WID_CF_INCREASE_LOAN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_REPAY_LOAN, "WID_CF_REPAY_LOAN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_INFRASTRUCTURE, "WID_CF_INFRASTRUCTURE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CAPTION, "WID_SCL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_GENERAL, "WID_SCL_CLASS_GENERAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_RAIL, "WID_SCL_CLASS_RAIL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_ROAD, "WID_SCL_CLASS_ROAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_SHIP, "WID_SCL_CLASS_SHIP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_AIRCRAFT, "WID_SCL_CLASS_AIRCRAFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_RAIL, "WID_SCL_GROUPS_RAIL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_ROAD, "WID_SCL_GROUPS_ROAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_SHIP, "WID_SCL_GROUPS_SHIP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_GROUPS_AIRCRAFT, "WID_SCL_GROUPS_AIRCRAFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SPACER_DROPDOWN, "WID_SCL_SPACER_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_PRI_COL_DROPDOWN, "WID_SCL_PRI_COL_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SEC_COL_DROPDOWN, "WID_SCL_SEC_COL_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_MATRIX, "WID_SCL_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_MATRIX_SCROLLBAR, "WID_SCL_MATRIX_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CAPTION, "WID_SCMF_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TOGGLE_LARGE_SMALL, "WID_SCMF_TOGGLE_LARGE_SMALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SELECT_FACE, "WID_SCMF_SELECT_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CANCEL, "WID_SCMF_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ACCEPT, "WID_SCMF_ACCEPT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_MALE, "WID_SCMF_MALE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FEMALE, "WID_SCMF_FEMALE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_MALE2, "WID_SCMF_MALE2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FEMALE2, "WID_SCMF_FEMALE2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_LOADSAVE, "WID_SCMF_SEL_LOADSAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_MALEFEMALE, "WID_SCMF_SEL_MALEFEMALE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_PARTS, "WID_SCMF_SEL_PARTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_RANDOM_NEW_FACE, "WID_SCMF_RANDOM_NEW_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON, "WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FACE, "WID_SCMF_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LOAD, "WID_SCMF_LOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FACECODE, "WID_SCMF_FACECODE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SAVE, "WID_SCMF_SAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT, "WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_TEXT, "WID_SCMF_TIE_EARRING_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_TEXT, "WID_SCMF_LIPS_MOUSTACHE_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_GLASSES_TEXT, "WID_SCMF_HAS_GLASSES_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_TEXT, "WID_SCMF_HAIR_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_TEXT, "WID_SCMF_EYEBROWS_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_TEXT, "WID_SCMF_EYECOLOUR_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_TEXT, "WID_SCMF_GLASSES_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_TEXT, "WID_SCMF_NOSE_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_TEXT, "WID_SCMF_CHIN_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_TEXT, "WID_SCMF_JACKET_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_TEXT, "WID_SCMF_COLLAR_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ETHNICITY_EUR, "WID_SCMF_ETHNICITY_EUR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ETHNICITY_AFR, "WID_SCMF_ETHNICITY_AFR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_MOUSTACHE_EARRING, "WID_SCMF_HAS_MOUSTACHE_EARRING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_GLASSES, "WID_SCMF_HAS_GLASSES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_L, "WID_SCMF_EYECOLOUR_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR, "WID_SCMF_EYECOLOUR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_R, "WID_SCMF_EYECOLOUR_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_L, "WID_SCMF_CHIN_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN, "WID_SCMF_CHIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_R, "WID_SCMF_CHIN_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_L, "WID_SCMF_EYEBROWS_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS, "WID_SCMF_EYEBROWS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_R, "WID_SCMF_EYEBROWS_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_L, "WID_SCMF_LIPS_MOUSTACHE_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE, "WID_SCMF_LIPS_MOUSTACHE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_R, "WID_SCMF_LIPS_MOUSTACHE_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_L, "WID_SCMF_NOSE_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE, "WID_SCMF_NOSE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_R, "WID_SCMF_NOSE_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_L, "WID_SCMF_HAIR_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR, "WID_SCMF_HAIR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_R, "WID_SCMF_HAIR_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_L, "WID_SCMF_JACKET_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET, "WID_SCMF_JACKET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_R, "WID_SCMF_JACKET_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_L, "WID_SCMF_COLLAR_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR, "WID_SCMF_COLLAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_R, "WID_SCMF_COLLAR_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_L, "WID_SCMF_TIE_EARRING_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING, "WID_SCMF_TIE_EARRING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_R, "WID_SCMF_TIE_EARRING_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_L, "WID_SCMF_GLASSES_L"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES, "WID_SCMF_GLASSES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_R, "WID_SCMF_GLASSES_R"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_CAPTION, "WID_CI_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_RAIL_DESC, "WID_CI_RAIL_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_RAIL_COUNT, "WID_CI_RAIL_COUNT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_ROAD_DESC, "WID_CI_ROAD_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_ROAD_COUNT, "WID_CI_ROAD_COUNT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TRAM_DESC, "WID_CI_TRAM_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TRAM_COUNT, "WID_CI_TRAM_COUNT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_WATER_DESC, "WID_CI_WATER_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_WATER_COUNT, "WID_CI_WATER_COUNT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_STATION_DESC, "WID_CI_STATION_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_STATION_COUNT, "WID_CI_STATION_COUNT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TOTAL_DESC, "WID_CI_TOTAL_DESC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TOTAL, "WID_CI_TOTAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_CAPTION, "WID_BC_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_FACE, "WID_BC_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_QUESTION, "WID_BC_QUESTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_NO, "WID_BC_NO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_YES, "WID_BC_YES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BACKGROUND, "WID_C_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_DAY, "WID_SD_DAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_MONTH, "WID_SD_MONTH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_YEAR, "WID_SD_YEAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_SET_DATE, "WID_SD_SET_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_CAPTION, "WID_D_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL, "WID_D_SELL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_SELL_CHAIN, "WID_D_SHOW_SELL_CHAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL_CHAIN, "WID_D_SELL_CHAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL_ALL, "WID_D_SELL_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_AUTOREPLACE, "WID_D_AUTOREPLACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_MATRIX, "WID_D_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_V_SCROLL, "WID_D_V_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_H_SCROLL, "WID_D_SHOW_H_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_H_SCROLL, "WID_D_H_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_BUILD, "WID_D_BUILD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_CLONE, "WID_D_CLONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_LOCATION, "WID_D_LOCATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_RENAME, "WID_D_SHOW_RENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_RENAME, "WID_D_RENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_VEHICLE_LIST, "WID_D_VEHICLE_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_STOP_ALL, "WID_D_STOP_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_START_ALL, "WID_D_START_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_BACKGROUND, "WID_BDD_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_X, "WID_BDD_X"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_Y, "WID_BDD_Y"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_CANAL, "WID_DT_CANAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_LOCK, "WID_DT_LOCK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_DEMOLISH, "WID_DT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_DEPOT, "WID_DT_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_STATION, "WID_DT_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_BUOY, "WID_DT_BUOY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_RIVER, "WID_DT_RIVER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_BUILD_AQUEDUCT, "WID_DT_BUILD_AQUEDUCT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_INVALID, "WID_DT_INVALID"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_ITEMS, "WID_DM_ITEMS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_SHOW_SCROLL, "WID_DM_SHOW_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_SCROLL, "WID_DM_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_QUESTION, "WID_EP_QUESTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_NO, "WID_EP_NO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_YES, "WID_EP_YES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_CAPTION, "WID_EM_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_FACE, "WID_EM_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_MESSAGE, "WID_EM_MESSAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CAPTION, "WID_SL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYNAME, "WID_SL_SORT_BYNAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYDATE, "WID_SL_SORT_BYDATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_FILTER, "WID_SL_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_BACKGROUND, "WID_SL_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_FILE_BACKGROUND, "WID_SL_FILE_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_HOME_BUTTON, "WID_SL_HOME_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DRIVES_DIRECTORIES_LIST, "WID_SL_DRIVES_DIRECTORIES_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SCROLLBAR, "WID_SL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CONTENT_DOWNLOAD, "WID_SL_CONTENT_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SAVE_OSK_TITLE, "WID_SL_SAVE_OSK_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DELETE_SELECTION, "WID_SL_DELETE_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SAVE_GAME, "WID_SL_SAVE_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CONTENT_DOWNLOAD_SEL, "WID_SL_CONTENT_DOWNLOAD_SEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DETAILS, "WID_SL_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_NEWGRF_INFO, "WID_SL_NEWGRF_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_LOAD_BUTTON, "WID_SL_LOAD_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_MISSING_NEWGRFS, "WID_SL_MISSING_NEWGRFS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_CAPTION, "WID_FRW_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_GAMELOOP, "WID_FRW_RATE_GAMELOOP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_DRAWING, "WID_FRW_RATE_DRAWING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_RATE_FACTOR, "WID_FRW_RATE_FACTOR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_INFO_DATA_POINTS, "WID_FRW_INFO_DATA_POINTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_NAMES, "WID_FRW_TIMES_NAMES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_CURRENT, "WID_FRW_TIMES_CURRENT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_TIMES_AVERAGE, "WID_FRW_TIMES_AVERAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_ALLOCSIZE, "WID_FRW_ALLOCSIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_SEL_MEMORY, "WID_FRW_SEL_MEMORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FRW_SCROLLBAR, "WID_FRW_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FGW_CAPTION, "WID_FGW_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_FGW_GRAPH, "WID_FGW_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TEMPERATE, "WID_GL_TEMPERATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_ARCTIC, "WID_GL_ARCTIC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TROPICAL, "WID_GL_TROPICAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TOYLAND, "WID_GL_TOYLAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAPSIZE_X_PULLDOWN, "WID_GL_MAPSIZE_X_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAPSIZE_Y_PULLDOWN, "WID_GL_MAPSIZE_Y_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TOWN_PULLDOWN, "WID_GL_TOWN_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_INDUSTRY_PULLDOWN, "WID_GL_INDUSTRY_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_GENERATE_BUTTON, "WID_GL_GENERATE_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAX_HEIGHTLEVEL_DOWN, "WID_GL_MAX_HEIGHTLEVEL_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAX_HEIGHTLEVEL_TEXT, "WID_GL_MAX_HEIGHTLEVEL_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAX_HEIGHTLEVEL_UP, "WID_GL_MAX_HEIGHTLEVEL_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_DOWN, "WID_GL_START_DATE_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_TEXT, "WID_GL_START_DATE_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_UP, "WID_GL_START_DATE_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_DOWN, "WID_GL_SNOW_LEVEL_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_TEXT, "WID_GL_SNOW_LEVEL_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_UP, "WID_GL_SNOW_LEVEL_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TREE_PULLDOWN, "WID_GL_TREE_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LANDSCAPE_PULLDOWN, "WID_GL_LANDSCAPE_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_NAME_TEXT, "WID_GL_HEIGHTMAP_NAME_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_SIZE_TEXT, "WID_GL_HEIGHTMAP_SIZE_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, "WID_GL_HEIGHTMAP_ROTATION_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TERRAIN_PULLDOWN, "WID_GL_TERRAIN_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_PULLDOWN, "WID_GL_WATER_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RIVER_PULLDOWN, "WID_GL_RIVER_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SMOOTHNESS_PULLDOWN, "WID_GL_SMOOTHNESS_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_VARIETY_PULLDOWN, "WID_GL_VARIETY_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_BORDERS_RANDOM, "WID_GL_BORDERS_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_NW, "WID_GL_WATER_NW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_NE, "WID_GL_WATER_NE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_SE, "WID_GL_WATER_SE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_SW, "WID_GL_WATER_SW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TEMPERATE, "WID_CS_TEMPERATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_ARCTIC, "WID_CS_ARCTIC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TROPICAL, "WID_CS_TROPICAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TOYLAND, "WID_CS_TOYLAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_EMPTY_WORLD, "WID_CS_EMPTY_WORLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_RANDOM_WORLD, "WID_CS_RANDOM_WORLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_MAPSIZE_X_PULLDOWN, "WID_CS_MAPSIZE_X_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_MAPSIZE_Y_PULLDOWN, "WID_CS_MAPSIZE_Y_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_DOWN, "WID_CS_START_DATE_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_TEXT, "WID_CS_START_DATE_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_UP, "WID_CS_START_DATE_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_DOWN, "WID_CS_FLAT_LAND_HEIGHT_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_TEXT, "WID_CS_FLAT_LAND_HEIGHT_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_UP, "WID_CS_FLAT_LAND_HEIGHT_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_PROGRESS_BAR, "WID_GP_PROGRESS_BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_PROGRESS_TEXT, "WID_GP_PROGRESS_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_ABORT, "WID_GP_ABORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_CAPTION, "WID_GOAL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_LIST, "WID_GOAL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_SCROLLBAR, "WID_GOAL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_CAPTION, "WID_GQ_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_QUESTION, "WID_GQ_QUESTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTONS, "WID_GQ_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_1, "WID_GQ_BUTTON_1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_2, "WID_GQ_BUTTON_2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_3, "WID_GQ_BUTTON_3"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_BACKGROUND, "WID_GL_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_FIRST_COMPANY, "WID_GL_FIRST_COMPANY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LAST_COMPANY, "WID_GL_LAST_COMPANY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_KEY_BUTTON, "WID_CV_KEY_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_BACKGROUND, "WID_CV_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_GRAPH, "WID_CV_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_RESIZE, "WID_CV_RESIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_KEY, "WID_PHG_KEY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_DETAILED_PERFORMANCE, "WID_PHG_DETAILED_PERFORMANCE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_BACKGROUND, "WID_PHG_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_GRAPH, "WID_PHG_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_RESIZE, "WID_PHG_RESIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_BACKGROUND, "WID_CPR_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_HEADER, "WID_CPR_HEADER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_GRAPH, "WID_CPR_GRAPH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_RESIZE, "WID_CPR_RESIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_FOOTER, "WID_CPR_FOOTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_ENABLE_CARGOES, "WID_CPR_ENABLE_CARGOES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_DISABLE_CARGOES, "WID_CPR_DISABLE_CARGOES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_MATRIX, "WID_CPR_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_MATRIX_SCROLLBAR, "WID_CPR_MATRIX_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CL_BACKGROUND, "WID_CL_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_SCORE_FIRST, "WID_PRD_SCORE_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_SCORE_LAST, "WID_PRD_SCORE_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_COMPANY_FIRST, "WID_PRD_COMPANY_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_COMPANY_LAST, "WID_PRD_COMPANY_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_CAPTION, "WID_GL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SORT_BY_ORDER, "WID_GL_SORT_BY_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SORT_BY_DROPDOWN, "WID_GL_SORT_BY_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_VEHICLE, "WID_GL_LIST_VEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_VEHICLE_SCROLLBAR, "WID_GL_LIST_VEHICLE_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_AVAILABLE_VEHICLES, "WID_GL_AVAILABLE_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MANAGE_VEHICLES_DROPDOWN, "WID_GL_MANAGE_VEHICLES_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_STOP_ALL, "WID_GL_STOP_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_ALL, "WID_GL_START_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_ALL_VEHICLES, "WID_GL_ALL_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_DEFAULT_VEHICLES, "WID_GL_DEFAULT_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_GROUP, "WID_GL_LIST_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_GROUP_SCROLLBAR, "WID_GL_LIST_GROUP_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_CREATE_GROUP, "WID_GL_CREATE_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_DELETE_GROUP, "WID_GL_DELETE_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RENAME_GROUP, "WID_GL_RENAME_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIVERY_GROUP, "WID_GL_LIVERY_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_REPLACE_PROTECTION, "WID_GL_REPLACE_PROTECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_INFO, "WID_GL_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_H_BACKGROUND, "WID_H_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_MATRIX_WIDGET, "WID_DPI_MATRIX_WIDGET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_SCROLLBAR, "WID_DPI_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_INFOPANEL, "WID_DPI_INFOPANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_DISPLAY_WIDGET, "WID_DPI_DISPLAY_WIDGET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_FUND_WIDGET, "WID_DPI_FUND_WIDGET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_CAPTION, "WID_IV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_VIEWPORT, "WID_IV_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_INFO, "WID_IV_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_GOTO, "WID_IV_GOTO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_DISPLAY, "WID_IV_DISPLAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_ORDER, "WID_ID_DROPDOWN_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_CRITERIA, "WID_ID_DROPDOWN_CRITERIA"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_FILTER_BY_ACC_CARGO, "WID_ID_FILTER_BY_ACC_CARGO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_FILTER_BY_PROD_CARGO, "WID_ID_FILTER_BY_PROD_CARGO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_INDUSTRY_LIST, "WID_ID_INDUSTRY_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_SCROLLBAR, "WID_ID_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_CAPTION, "WID_IC_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_NOTIFY, "WID_IC_NOTIFY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_PANEL, "WID_IC_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_SCROLLBAR, "WID_IC_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_CARGO_DROPDOWN, "WID_IC_CARGO_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_IND_DROPDOWN, "WID_IC_IND_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_GENERATE_GAME, "WID_SGI_GENERATE_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_LOAD_GAME, "WID_SGI_LOAD_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_SCENARIO, "WID_SGI_PLAY_SCENARIO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_HEIGHTMAP, "WID_SGI_PLAY_HEIGHTMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_EDIT_SCENARIO, "WID_SGI_EDIT_SCENARIO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_NETWORK, "WID_SGI_PLAY_NETWORK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TEMPERATE_LANDSCAPE, "WID_SGI_TEMPERATE_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_ARCTIC_LANDSCAPE, "WID_SGI_ARCTIC_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TROPIC_LANDSCAPE, "WID_SGI_TROPIC_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TOYLAND_LANDSCAPE, "WID_SGI_TOYLAND_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_BASESET_SELECTION, "WID_SGI_BASESET_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_BASESET, "WID_SGI_BASESET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TRANSLATION_SELECTION, "WID_SGI_TRANSLATION_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TRANSLATION, "WID_SGI_TRANSLATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_OPTIONS, "WID_SGI_OPTIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_HIGHSCORE, "WID_SGI_HIGHSCORE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_SETTINGS_OPTIONS, "WID_SGI_SETTINGS_OPTIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_GRF_SETTINGS, "WID_SGI_GRF_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_CONTENT_DOWNLOAD, "WID_SGI_CONTENT_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_AI_SETTINGS, "WID_SGI_AI_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_EXIT, "WID_SGI_EXIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CAPTION, "WID_LGL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION, "WID_LGL_SATURATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION_FIRST, "WID_LGL_SATURATION_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION_LAST, "WID_LGL_SATURATION_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES, "WID_LGL_COMPANIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANY_FIRST, "WID_LGL_COMPANY_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANY_LAST, "WID_LGL_COMPANY_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES_ALL, "WID_LGL_COMPANIES_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES_NONE, "WID_LGL_COMPANIES_NONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES, "WID_LGL_CARGOES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGO_FIRST, "WID_LGL_CARGO_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGO_LAST, "WID_LGL_CARGO_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES_ALL, "WID_LGL_CARGOES_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES_NONE, "WID_LGL_CARGOES_NONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_VIEWPORT, "WID_M_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LI_BACKGROUND, "WID_LI_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BACKGROUND, "WID_TT_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_SCROLLING_TEXT, "WID_A_SCROLLING_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_WEBSITE, "WID_A_WEBSITE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_COPYRIGHT, "WID_A_COPYRIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_CAPTION, "WID_QS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_TEXT, "WID_QS_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_WARNING, "WID_QS_WARNING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_DEFAULT, "WID_QS_DEFAULT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_CANCEL, "WID_QS_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_OK, "WID_QS_OK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_CAPTION, "WID_Q_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_TEXT, "WID_Q_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_NO, "WID_Q_NO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_YES, "WID_Q_YES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_CAPTION, "WID_TF_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_WRAPTEXT, "WID_TF_WRAPTEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_BACKGROUND, "WID_TF_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_VSCROLLBAR, "WID_TF_VSCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_HSCROLLBAR, "WID_TF_HSCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CAPTION, "WID_MTS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_LEFT, "WID_MTS_LIST_LEFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_PLAYLIST, "WID_MTS_PLAYLIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_RIGHT, "WID_MTS_LIST_RIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_MUSICSET, "WID_MTS_MUSICSET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_ALL, "WID_MTS_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_OLD, "WID_MTS_OLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_NEW, "WID_MTS_NEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_EZY, "WID_MTS_EZY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CUSTOM1, "WID_MTS_CUSTOM1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CUSTOM2, "WID_MTS_CUSTOM2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CLEAR, "WID_MTS_CLEAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PREV, "WID_M_PREV"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_NEXT, "WID_M_NEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_STOP, "WID_M_STOP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PLAY, "WID_M_PLAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_SLIDERS, "WID_M_SLIDERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_MUSIC_VOL, "WID_M_MUSIC_VOL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_EFFECT_VOL, "WID_M_EFFECT_VOL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_BACKGROUND, "WID_M_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK, "WID_M_TRACK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_NR, "WID_M_TRACK_NR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_TITLE, "WID_M_TRACK_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_NAME, "WID_M_TRACK_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_SHUFFLE, "WID_M_SHUFFLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PROGRAMME, "WID_M_PROGRAMME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_ALL, "WID_M_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_OLD, "WID_M_OLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_NEW, "WID_M_NEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_EZY, "WID_M_EZY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_CUSTOM1, "WID_M_CUSTOM1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_CUSTOM2, "WID_M_CUSTOM2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_CLOSE, "WID_NC_CLOSE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_BACKGROUND, "WID_NC_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_DESTINATION, "WID_NC_DESTINATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_TEXTBOX, "WID_NC_TEXTBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_SENDBUTTON, "WID_NC_SENDBUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCDS_BACKGROUND, "WID_NCDS_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCDS_CANCELOK, "WID_NCDS_CANCELOK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_BACKGROUND, "WID_NCL_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_FILTER_CAPT, "WID_NCL_FILTER_CAPT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_FILTER, "WID_NCL_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_CHECKBOX, "WID_NCL_CHECKBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_TYPE, "WID_NCL_TYPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_NAME, "WID_NCL_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_MATRIX, "WID_NCL_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SCROLLBAR, "WID_NCL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_DETAILS, "WID_NCL_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_TEXTFILE, "WID_NCL_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SELECT_ALL, "WID_NCL_SELECT_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SELECT_UPDATE, "WID_NCL_SELECT_UPDATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_UNSELECT, "WID_NCL_UNSELECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_OPEN_URL, "WID_NCL_OPEN_URL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_CANCEL, "WID_NCL_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_DOWNLOAD, "WID_NCL_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SEL_ALL_UPDATE, "WID_NCL_SEL_ALL_UPDATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SEARCH_EXTERNAL, "WID_NCL_SEARCH_EXTERNAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MAIN, "WID_NG_MAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CONNECTION, "WID_NG_CONNECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CONN_BTN, "WID_NG_CONN_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENT_LABEL, "WID_NG_CLIENT_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENT, "WID_NG_CLIENT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FILTER_LABEL, "WID_NG_FILTER_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FILTER, "WID_NG_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_HEADER, "WID_NG_HEADER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NAME, "WID_NG_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENTS, "WID_NG_CLIENTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MAPSIZE, "WID_NG_MAPSIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DATE, "WID_NG_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_YEARS, "WID_NG_YEARS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_INFO, "WID_NG_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MATRIX, "WID_NG_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_SCROLLBAR, "WID_NG_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED_LABEL, "WID_NG_LASTJOINED_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED, "WID_NG_LASTJOINED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED_SPACER, "WID_NG_LASTJOINED_SPACER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DETAILS, "WID_NG_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DETAILS_SPACER, "WID_NG_DETAILS_SPACER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_JOIN, "WID_NG_JOIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_REFRESH, "WID_NG_REFRESH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF, "WID_NG_NEWGRF"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_SEL, "WID_NG_NEWGRF_SEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_MISSING, "WID_NG_NEWGRF_MISSING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_MISSING_SEL, "WID_NG_NEWGRF_MISSING_SEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FIND, "WID_NG_FIND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_ADD, "WID_NG_ADD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_START, "WID_NG_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CANCEL, "WID_NG_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_BACKGROUND, "WID_NSS_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GAMENAME_LABEL, "WID_NSS_GAMENAME_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GAMENAME, "WID_NSS_GAMENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SETPWD, "WID_NSS_SETPWD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CONNTYPE_LABEL, "WID_NSS_CONNTYPE_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CONNTYPE_BTN, "WID_NSS_CONNTYPE_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_LABEL, "WID_NSS_CLIENTS_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_BTND, "WID_NSS_CLIENTS_BTND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_TXT, "WID_NSS_CLIENTS_TXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_BTNU, "WID_NSS_CLIENTS_BTNU"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_LABEL, "WID_NSS_COMPANIES_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_BTND, "WID_NSS_COMPANIES_BTND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_TXT, "WID_NSS_COMPANIES_TXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_BTNU, "WID_NSS_COMPANIES_BTNU"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_LABEL, "WID_NSS_SPECTATORS_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_BTND, "WID_NSS_SPECTATORS_BTND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_TXT, "WID_NSS_SPECTATORS_TXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_BTNU, "WID_NSS_SPECTATORS_BTNU"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LANGUAGE_LABEL, "WID_NSS_LANGUAGE_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LANGUAGE_BTN, "WID_NSS_LANGUAGE_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GENERATE_GAME, "WID_NSS_GENERATE_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LOAD_GAME, "WID_NSS_LOAD_GAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_PLAY_SCENARIO, "WID_NSS_PLAY_SCENARIO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_PLAY_HEIGHTMAP, "WID_NSS_PLAY_HEIGHTMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CANCEL, "WID_NSS_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_BACKGROUND, "WID_NL_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_TEXT, "WID_NL_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_HEADER, "WID_NL_HEADER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_MATRIX, "WID_NL_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_SCROLLBAR, "WID_NL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_DETAILS, "WID_NL_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_JOIN, "WID_NL_JOIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_NEW, "WID_NL_NEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_SPECTATE, "WID_NL_SPECTATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_REFRESH, "WID_NL_REFRESH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_CANCEL, "WID_NL_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CL_PANEL, "WID_CL_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CLP_PANEL, "WID_CLP_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NJS_BACKGROUND, "WID_NJS_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NJS_CANCELOK, "WID_NJS_CANCELOK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_BACKGROUND, "WID_NCP_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_LABEL, "WID_NCP_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_PASSWORD, "WID_NCP_PASSWORD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_SAVE_AS_DEFAULT_PASSWORD, "WID_NCP_SAVE_AS_DEFAULT_PASSWORD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_WARNING, "WID_NCP_WARNING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_CANCEL, "WID_NCP_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_OK, "WID_NCP_OK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_CAPTION, "WID_NGRFI_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_PARENT, "WID_NGRFI_PARENT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_PREV, "WID_NGRFI_VEH_PREV"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_NEXT, "WID_NGRFI_VEH_NEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_CHAIN, "WID_NGRFI_VEH_CHAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_MAINPANEL, "WID_NGRFI_MAINPANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_SCROLLBAR, "WID_NGRFI_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_CAPTION, "WID_SA_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_PREVIOUS, "WID_SA_PREVIOUS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_GOTO, "WID_SA_GOTO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_NEXT, "WID_SA_NEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_UP, "WID_SA_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_LEFT, "WID_SA_LEFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_RIGHT, "WID_SA_RIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_DOWN, "WID_SA_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_SPRITE, "WID_SA_SPRITE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_OFFSETS_ABS, "WID_SA_OFFSETS_ABS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_OFFSETS_REL, "WID_SA_OFFSETS_REL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_PICKER, "WID_SA_PICKER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_LIST, "WID_SA_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_SCROLLBAR, "WID_SA_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_RESET_REL, "WID_SA_RESET_REL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SHOW_NUMPAR, "WID_NP_SHOW_NUMPAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_DEC, "WID_NP_NUMPAR_DEC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_INC, "WID_NP_NUMPAR_INC"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR, "WID_NP_NUMPAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_TEXT, "WID_NP_NUMPAR_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_BACKGROUND, "WID_NP_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SCROLLBAR, "WID_NP_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_ACCEPT, "WID_NP_ACCEPT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_RESET, "WID_NP_RESET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SHOW_DESCRIPTION, "WID_NP_SHOW_DESCRIPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_DESCRIPTION, "WID_NP_DESCRIPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_LIST, "WID_NS_PRESET_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_SAVE, "WID_NS_PRESET_SAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_DELETE, "WID_NS_PRESET_DELETE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_ADD, "WID_NS_ADD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_REMOVE, "WID_NS_REMOVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_MOVE_UP, "WID_NS_MOVE_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_MOVE_DOWN, "WID_NS_MOVE_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_UPGRADE, "WID_NS_UPGRADE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_FILTER, "WID_NS_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_FILE_LIST, "WID_NS_FILE_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SCROLLBAR, "WID_NS_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_AVAIL_LIST, "WID_NS_AVAIL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SCROLL2BAR, "WID_NS_SCROLL2BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_INFO_TITLE, "WID_NS_NEWGRF_INFO_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_INFO, "WID_NS_NEWGRF_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_OPEN_URL, "WID_NS_OPEN_URL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_TEXTFILE, "WID_NS_NEWGRF_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SET_PARAMETERS, "WID_NS_SET_PARAMETERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_VIEW_PARAMETERS, "WID_NS_VIEW_PARAMETERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_TOGGLE_PALETTE, "WID_NS_TOGGLE_PALETTE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_APPLY_CHANGES, "WID_NS_APPLY_CHANGES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_RESCAN_FILES, "WID_NS_RESCAN_FILES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_RESCAN_FILES2, "WID_NS_RESCAN_FILES2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_CONTENT_DOWNLOAD, "WID_NS_CONTENT_DOWNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_CONTENT_DOWNLOAD2, "WID_NS_CONTENT_DOWNLOAD2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_REMOVE, "WID_NS_SHOW_REMOVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_APPLY, "WID_NS_SHOW_APPLY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_PRESET_LIST, "WID_SVP_PRESET_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_SCROLLBAR, "WID_SVP_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_EDITBOX, "WID_SVP_EDITBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_CANCEL, "WID_SVP_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_SAVE, "WID_SVP_SAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_BAR, "WID_SP_PROGRESS_BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_TEXT, "WID_SP_PROGRESS_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_PANEL, "WID_N_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_TITLE, "WID_N_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_HEADLINE, "WID_N_HEADLINE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_CLOSEBOX, "WID_N_CLOSEBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_DATE, "WID_N_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_CAPTION, "WID_N_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_INSET, "WID_N_INSET"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VIEWPORT, "WID_N_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_COMPANY_MSG, "WID_N_COMPANY_MSG"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MESSAGE, "WID_N_MESSAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MGR_FACE, "WID_N_MGR_FACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MGR_NAME, "WID_N_MGR_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_TITLE, "WID_N_VEH_TITLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_BKGND, "WID_N_VEH_BKGND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_NAME, "WID_N_VEH_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_SPR, "WID_N_VEH_SPR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_INFO, "WID_N_VEH_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_SHOW_GROUP, "WID_N_SHOW_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_STICKYBOX, "WID_MH_STICKYBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_BACKGROUND, "WID_MH_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_SCROLLBAR, "WID_MH_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_CLASS_LIST, "WID_BO_CLASS_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SCROLLBAR, "WID_BO_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_MATRIX, "WID_BO_OBJECT_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SPRITE, "WID_BO_OBJECT_SPRITE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_NAME, "WID_BO_OBJECT_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SIZE, "WID_BO_OBJECT_SIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_INFO, "WID_BO_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_MATRIX, "WID_BO_SELECT_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_IMAGE, "WID_BO_SELECT_IMAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_SCROLL, "WID_BO_SELECT_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_CAPTION, "WID_O_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_TIMETABLE_VIEW, "WID_O_TIMETABLE_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_ORDER_LIST, "WID_O_ORDER_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SCROLLBAR, "WID_O_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SKIP, "WID_O_SKIP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_DELETE, "WID_O_DELETE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_STOP_SHARING, "WID_O_STOP_SHARING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_NON_STOP, "WID_O_NON_STOP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_GOTO, "WID_O_GOTO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_FULL_LOAD, "WID_O_FULL_LOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_UNLOAD, "WID_O_UNLOAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_REFIT, "WID_O_REFIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SERVICE, "WID_O_SERVICE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_EMPTY, "WID_O_EMPTY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_REFIT_DROPDOWN, "WID_O_REFIT_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_VARIABLE, "WID_O_COND_VARIABLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_COMPARATOR, "WID_O_COND_COMPARATOR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_VALUE, "WID_O_COND_VALUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_LEFT, "WID_O_SEL_TOP_LEFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_MIDDLE, "WID_O_SEL_TOP_MIDDLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_RIGHT, "WID_O_SEL_TOP_RIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_ROW_GROUNDVEHICLE, "WID_O_SEL_TOP_ROW_GROUNDVEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_ROW, "WID_O_SEL_TOP_ROW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_BOTTOM_MIDDLE, "WID_O_SEL_BOTTOM_MIDDLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SHARED_ORDER_LIST, "WID_O_SHARED_ORDER_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CAPTION, "WID_OSK_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_TEXT, "WID_OSK_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CANCEL, "WID_OSK_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_OK, "WID_OSK_OK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_BACKSPACE, "WID_OSK_BACKSPACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SPECIAL, "WID_OSK_SPECIAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CAPS, "WID_OSK_CAPS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SHIFT, "WID_OSK_SHIFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SPACE, "WID_OSK_SPACE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_LEFT, "WID_OSK_LEFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_RIGHT, "WID_OSK_RIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_LETTERS, "WID_OSK_LETTERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_NUMBERS_FIRST, "WID_OSK_NUMBERS_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_NUMBERS_LAST, "WID_OSK_NUMBERS_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_QWERTY_FIRST, "WID_OSK_QWERTY_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_QWERTY_LAST, "WID_OSK_QWERTY_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ASDFG_FIRST, "WID_OSK_ASDFG_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ASDFG_LAST, "WID_OSK_ASDFG_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ZXCVB_FIRST, "WID_OSK_ZXCVB_FIRST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ZXCVB_LAST, "WID_OSK_ZXCVB_LAST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_CAPTION, "WID_RAT_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_NS, "WID_RAT_BUILD_NS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_X, "WID_RAT_BUILD_X"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_EW, "WID_RAT_BUILD_EW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_Y, "WID_RAT_BUILD_Y"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_AUTORAIL, "WID_RAT_AUTORAIL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_DEMOLISH, "WID_RAT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_DEPOT, "WID_RAT_BUILD_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_WAYPOINT, "WID_RAT_BUILD_WAYPOINT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_STATION, "WID_RAT_BUILD_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_SIGNALS, "WID_RAT_BUILD_SIGNALS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_BRIDGE, "WID_RAT_BUILD_BRIDGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_TUNNEL, "WID_RAT_BUILD_TUNNEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_REMOVE, "WID_RAT_REMOVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_CONVERT_RAIL, "WID_RAT_CONVERT_RAIL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DIR_X, "WID_BRAS_PLATFORM_DIR_X"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DIR_Y, "WID_BRAS_PLATFORM_DIR_Y"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_1, "WID_BRAS_PLATFORM_NUM_1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_2, "WID_BRAS_PLATFORM_NUM_2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_3, "WID_BRAS_PLATFORM_NUM_3"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_4, "WID_BRAS_PLATFORM_NUM_4"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_5, "WID_BRAS_PLATFORM_NUM_5"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_6, "WID_BRAS_PLATFORM_NUM_6"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_7, "WID_BRAS_PLATFORM_NUM_7"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_1, "WID_BRAS_PLATFORM_LEN_1"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_2, "WID_BRAS_PLATFORM_LEN_2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_3, "WID_BRAS_PLATFORM_LEN_3"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_4, "WID_BRAS_PLATFORM_LEN_4"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_5, "WID_BRAS_PLATFORM_LEN_5"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_6, "WID_BRAS_PLATFORM_LEN_6"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_7, "WID_BRAS_PLATFORM_LEN_7"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DRAG_N_DROP, "WID_BRAS_PLATFORM_DRAG_N_DROP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_HIGHLIGHT_OFF, "WID_BRAS_HIGHLIGHT_OFF"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_HIGHLIGHT_ON, "WID_BRAS_HIGHLIGHT_ON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_COVERAGE_TEXTS, "WID_BRAS_COVERAGE_TEXTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX, "WID_BRAS_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_IMAGE, "WID_BRAS_IMAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX_SCROLL, "WID_BRAS_MATRIX_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_DEFSIZE, "WID_BRAS_SHOW_NEWST_DEFSIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_ADDITIONS, "WID_BRAS_SHOW_NEWST_ADDITIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_MATRIX, "WID_BRAS_SHOW_NEWST_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_RESIZE, "WID_BRAS_SHOW_NEWST_RESIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_TYPE, "WID_BRAS_SHOW_NEWST_TYPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_NEWST_LIST, "WID_BRAS_NEWST_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_NEWST_SCROLL, "WID_BRAS_NEWST_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_BEGIN, "WID_BRAS_PLATFORM_NUM_BEGIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_BEGIN, "WID_BRAS_PLATFORM_LEN_BEGIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_NORM, "WID_BS_SEMAPHORE_NORM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_ENTRY, "WID_BS_SEMAPHORE_ENTRY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_EXIT, "WID_BS_SEMAPHORE_EXIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_COMBO, "WID_BS_SEMAPHORE_COMBO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_PBS, "WID_BS_SEMAPHORE_PBS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_PBS_OWAY, "WID_BS_SEMAPHORE_PBS_OWAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_NORM, "WID_BS_ELECTRIC_NORM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_ENTRY, "WID_BS_ELECTRIC_ENTRY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_EXIT, "WID_BS_ELECTRIC_EXIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_COMBO, "WID_BS_ELECTRIC_COMBO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_PBS, "WID_BS_ELECTRIC_PBS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_PBS_OWAY, "WID_BS_ELECTRIC_PBS_OWAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_CONVERT, "WID_BS_CONVERT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_LABEL, "WID_BS_DRAG_SIGNALS_DENSITY_LABEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_DECREASE, "WID_BS_DRAG_SIGNALS_DENSITY_DECREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_INCREASE, "WID_BS_DRAG_SIGNALS_DENSITY_INCREASE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_NE, "WID_BRAD_DEPOT_NE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_SE, "WID_BRAD_DEPOT_SE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_SW, "WID_BRAD_DEPOT_SW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_NW, "WID_BRAD_DEPOT_NW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_WAYPOINT_MATRIX, "WID_BRW_WAYPOINT_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_WAYPOINT, "WID_BRW_WAYPOINT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_SCROLL, "WID_BRW_SCROLL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_CAPTION, "WID_ROT_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ROAD_X, "WID_ROT_ROAD_X"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ROAD_Y, "WID_ROT_ROAD_Y"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_AUTOROAD, "WID_ROT_AUTOROAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_DEMOLISH, "WID_ROT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_DEPOT, "WID_ROT_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUS_STATION, "WID_ROT_BUS_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_TRUCK_STATION, "WID_ROT_TRUCK_STATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ONE_WAY, "WID_ROT_ONE_WAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUILD_BRIDGE, "WID_ROT_BUILD_BRIDGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUILD_TUNNEL, "WID_ROT_BUILD_TUNNEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_REMOVE, "WID_ROT_REMOVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_CONVERT_ROAD, "WID_ROT_CONVERT_ROAD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_CAPTION, "WID_BROD_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_NE, "WID_BROD_DEPOT_NE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_SE, "WID_BROD_DEPOT_SE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_SW, "WID_BROD_DEPOT_SW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_NW, "WID_BROD_DEPOT_NW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_CAPTION, "WID_BROS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_BACKGROUND, "WID_BROS_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_NE, "WID_BROS_STATION_NE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_SE, "WID_BROS_STATION_SE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_SW, "WID_BROS_STATION_SW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_NW, "WID_BROS_STATION_NW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_X, "WID_BROS_STATION_X"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_Y, "WID_BROS_STATION_Y"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_OFF, "WID_BROS_LT_OFF"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_ON, "WID_BROS_LT_ON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_INFO, "WID_BROS_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE, "WID_SC_TAKE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_ZOOMIN, "WID_SC_TAKE_ZOOMIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_DEFAULTZOOM, "WID_SC_TAKE_DEFAULTZOOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_WORLD, "WID_SC_TAKE_WORLD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_HEIGHTMAP, "WID_SC_TAKE_HEIGHTMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_MINIMAP, "WID_SC_TAKE_MINIMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BACKGROUND, "WID_GO_BACKGROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_CURRENCY_DROPDOWN, "WID_GO_CURRENCY_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_DISTANCE_DROPDOWN, "WID_GO_DISTANCE_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_ROADSIDE_DROPDOWN, "WID_GO_ROADSIDE_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_TOWNNAME_DROPDOWN, "WID_GO_TOWNNAME_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_AUTOSAVE_DROPDOWN, "WID_GO_AUTOSAVE_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_LANG_DROPDOWN, "WID_GO_LANG_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_RESOLUTION_DROPDOWN, "WID_GO_RESOLUTION_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_FULLSCREEN_BUTTON, "WID_GO_FULLSCREEN_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_GUI_ZOOM_DROPDOWN, "WID_GO_GUI_ZOOM_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_DROPDOWN, "WID_GO_BASE_GRF_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_STATUS, "WID_GO_BASE_GRF_STATUS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_TEXTFILE, "WID_GO_BASE_GRF_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_DESCRIPTION, "WID_GO_BASE_GRF_DESCRIPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_DROPDOWN, "WID_GO_BASE_SFX_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_TEXTFILE, "WID_GO_BASE_SFX_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_DESCRIPTION, "WID_GO_BASE_SFX_DESCRIPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_DROPDOWN, "WID_GO_BASE_MUSIC_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_STATUS, "WID_GO_BASE_MUSIC_STATUS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_TEXTFILE, "WID_GO_BASE_MUSIC_TEXTFILE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_DESCRIPTION, "WID_GO_BASE_MUSIC_DESCRIPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_FONT_ZOOM_DROPDOWN, "WID_GO_FONT_ZOOM_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_FILTER, "WID_GS_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_OPTIONSPANEL, "WID_GS_OPTIONSPANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_SCROLLBAR, "WID_GS_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_HELP_TEXT, "WID_GS_HELP_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_EXPAND_ALL, "WID_GS_EXPAND_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_COLLAPSE_ALL, "WID_GS_COLLAPSE_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_CATEGORY, "WID_GS_RESTRICT_CATEGORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_TYPE, "WID_GS_RESTRICT_TYPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_DROPDOWN, "WID_GS_RESTRICT_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_TYPE_DROPDOWN, "WID_GS_TYPE_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE_DOWN, "WID_CC_RATE_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE_UP, "WID_CC_RATE_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE, "WID_CC_RATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SEPARATOR_EDIT, "WID_CC_SEPARATOR_EDIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SEPARATOR, "WID_CC_SEPARATOR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREFIX_EDIT, "WID_CC_PREFIX_EDIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREFIX, "WID_CC_PREFIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SUFFIX_EDIT, "WID_CC_SUFFIX_EDIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SUFFIX, "WID_CC_SUFFIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR_DOWN, "WID_CC_YEAR_DOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR_UP, "WID_CC_YEAR_UP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR, "WID_CC_YEAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREVIEW, "WID_CC_PREVIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_CAPTION, "WID_SIL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_LIST, "WID_SIL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_SCROLLBAR, "WID_SIL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_TEXT, "WID_SIL_FILTER_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_MATCH_CASE_BTN, "WID_SIL_FILTER_MATCH_CASE_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_ENTER_BTN, "WID_SIL_FILTER_ENTER_BTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_CAPTION, "WID_QES_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_TEXT, "WID_QES_TEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_OK, "WID_QES_OK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_CANCEL, "WID_QES_CANCEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_DELETE, "WID_QES_DELETE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_PREVIOUS, "WID_QES_PREVIOUS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_NEXT, "WID_QES_NEXT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CAPTION, "WID_SM_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_MAP_BORDER, "WID_SM_MAP_BORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_MAP, "WID_SM_MAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_LEGEND, "WID_SM_LEGEND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_BLANK, "WID_SM_BLANK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ZOOM_IN, "WID_SM_ZOOM_IN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ZOOM_OUT, "WID_SM_ZOOM_OUT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CONTOUR, "WID_SM_CONTOUR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_VEHICLES, "WID_SM_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_INDUSTRIES, "WID_SM_INDUSTRIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_LINKSTATS, "WID_SM_LINKSTATS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ROUTES, "WID_SM_ROUTES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_VEGETATION, "WID_SM_VEGETATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_OWNERS, "WID_SM_OWNERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CENTERMAP, "WID_SM_CENTERMAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_TOGGLETOWNNAME, "WID_SM_TOGGLETOWNNAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_SELECT_BUTTONS, "WID_SM_SELECT_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ENABLE_ALL, "WID_SM_ENABLE_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_DISABLE_ALL, "WID_SM_DISABLE_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_SHOW_HEIGHT, "WID_SM_SHOW_HEIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_CAPTION, "WID_SV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SORT_ORDER, "WID_SV_SORT_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SORT_BY, "WID_SV_SORT_BY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_GROUP, "WID_SV_GROUP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_GROUP_BY, "WID_SV_GROUP_BY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_WAITING, "WID_SV_WAITING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SCROLLBAR, "WID_SV_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ACCEPT_RATING_LIST, "WID_SV_ACCEPT_RATING_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_LOCATION, "WID_SV_LOCATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ACCEPTS_RATINGS, "WID_SV_ACCEPTS_RATINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_RENAME, "WID_SV_RENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_CLOSE_AIRPORT, "WID_SV_CLOSE_AIRPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_TRAINS, "WID_SV_TRAINS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ROADVEHS, "WID_SV_ROADVEHS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SHIPS, "WID_SV_SHIPS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_PLANES, "WID_SV_PLANES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_CATCHMENT, "WID_SV_CATCHMENT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CAPTION, "WID_STL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_LIST, "WID_STL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SCROLLBAR, "WID_STL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_TRAIN, "WID_STL_TRAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_TRUCK, "WID_STL_TRUCK"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_BUS, "WID_STL_BUS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_AIRPLANE, "WID_STL_AIRPLANE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SHIP, "WID_STL_SHIP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_FACILALL, "WID_STL_FACILALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_NOCARGOWAITING, "WID_STL_NOCARGOWAITING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CARGOALL, "WID_STL_CARGOALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SORTBY, "WID_STL_SORTBY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SORTDROPBTN, "WID_STL_SORTDROPBTN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CARGOSTART, "WID_STL_CARGOSTART"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_CAPTION, "WID_JS_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_PANEL, "WID_JS_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_SCROLLBAR, "WID_JS_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_LEFT, "WID_S_LEFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_MIDDLE, "WID_S_MIDDLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_RIGHT, "WID_S_RIGHT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_CAPTION, "WID_SB_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SEL_PAGE, "WID_SB_SEL_PAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PAGE_PANEL, "WID_SB_PAGE_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SCROLLBAR, "WID_SB_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PREV_PAGE, "WID_SB_PREV_PAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_NEXT_PAGE, "WID_SB_NEXT_PAGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_PANEL, "WID_SUL_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_SCROLLBAR, "WID_SUL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SHOW_PLACE_OBJECT, "WID_TT_SHOW_PLACE_OBJECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUTTONS_START, "WID_TT_BUTTONS_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LOWER_LAND, "WID_TT_LOWER_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_RAISE_LAND, "WID_TT_RAISE_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LEVEL_LAND, "WID_TT_LEVEL_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_DEMOLISH, "WID_TT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUY_LAND, "WID_TT_BUY_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLANT_TREES, "WID_TT_PLANT_TREES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLACE_SIGN, "WID_TT_PLACE_SIGN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLACE_OBJECT, "WID_TT_PLACE_OBJECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_SHOW_PLACE_DESERT, "WID_ETT_SHOW_PLACE_DESERT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_START, "WID_ETT_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DOTS, "WID_ETT_DOTS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_BUTTONS_START, "WID_ETT_BUTTONS_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DEMOLISH, "WID_ETT_DEMOLISH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_LOWER_LAND, "WID_ETT_LOWER_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_RAISE_LAND, "WID_ETT_RAISE_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_LEVEL_LAND, "WID_ETT_LEVEL_LAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_ROCKS, "WID_ETT_PLACE_ROCKS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_DESERT, "WID_ETT_PLACE_DESERT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_OBJECT, "WID_ETT_PLACE_OBJECT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_BUTTONS_END, "WID_ETT_BUTTONS_END"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_INCREASE_SIZE, "WID_ETT_INCREASE_SIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DECREASE_SIZE, "WID_ETT_DECREASE_SIZE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_NEW_SCENARIO, "WID_ETT_NEW_SCENARIO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_RESET_LANDSCAPE, "WID_ETT_RESET_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CAPTION, "WID_VT_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ORDER_VIEW, "WID_VT_ORDER_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_TIMETABLE_PANEL, "WID_VT_TIMETABLE_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ARRIVAL_DEPARTURE_PANEL, "WID_VT_ARRIVAL_DEPARTURE_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SCROLLBAR, "WID_VT_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SUMMARY_PANEL, "WID_VT_SUMMARY_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_START_DATE, "WID_VT_START_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CHANGE_TIME, "WID_VT_CHANGE_TIME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CLEAR_TIME, "WID_VT_CLEAR_TIME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_RESET_LATENESS, "WID_VT_RESET_LATENESS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_AUTOFILL, "WID_VT_AUTOFILL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_EXPECTED, "WID_VT_EXPECTED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SHARED_ORDER_LIST, "WID_VT_SHARED_ORDER_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ARRIVAL_DEPARTURE_SELECTION, "WID_VT_ARRIVAL_DEPARTURE_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_EXPECTED_SELECTION, "WID_VT_EXPECTED_SELECTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CHANGE_SPEED, "WID_VT_CHANGE_SPEED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CLEAR_SPEED, "WID_VT_CLEAR_SPEED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_PAUSE, "WID_TN_PAUSE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_FAST_FORWARD, "WID_TN_FAST_FORWARD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SETTINGS, "WID_TN_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SAVE, "WID_TN_SAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SMALL_MAP, "WID_TN_SMALL_MAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TOWNS, "WID_TN_TOWNS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SUBSIDIES, "WID_TN_SUBSIDIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_STATIONS, "WID_TN_STATIONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_FINANCES, "WID_TN_FINANCES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_COMPANIES, "WID_TN_COMPANIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_STORY, "WID_TN_STORY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_GOAL, "WID_TN_GOAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_GRAPHS, "WID_TN_GRAPHS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_LEAGUE, "WID_TN_LEAGUE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_INDUSTRIES, "WID_TN_INDUSTRIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_VEHICLE_START, "WID_TN_VEHICLE_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TRAINS, "WID_TN_TRAINS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ROADVEHS, "WID_TN_ROADVEHS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SHIPS, "WID_TN_SHIPS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIRCRAFT, "WID_TN_AIRCRAFT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_IN, "WID_TN_ZOOM_IN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_OUT, "WID_TN_ZOOM_OUT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_BUILDING_TOOLS_START, "WID_TN_BUILDING_TOOLS_START"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_RAILS, "WID_TN_RAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ROADS, "WID_TN_ROADS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TRAMS, "WID_TN_TRAMS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_WATER, "WID_TN_WATER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIR, "WID_TN_AIR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_LANDSCAPE, "WID_TN_LANDSCAPE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_MUSIC_SOUND, "WID_TN_MUSIC_SOUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_MESSAGES, "WID_TN_MESSAGES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_HELP, "WID_TN_HELP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SWITCH_BAR, "WID_TN_SWITCH_BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_END, "WID_TN_END"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_PAUSE, "WID_TE_PAUSE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_FAST_FORWARD, "WID_TE_FAST_FORWARD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SETTINGS, "WID_TE_SETTINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SAVE, "WID_TE_SAVE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SPACER, "WID_TE_SPACER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE, "WID_TE_DATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_BACKWARD, "WID_TE_DATE_BACKWARD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_FORWARD, "WID_TE_DATE_FORWARD"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SMALL_MAP, "WID_TE_SMALL_MAP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ZOOM_IN, "WID_TE_ZOOM_IN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ZOOM_OUT, "WID_TE_ZOOM_OUT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_LAND_GENERATE, "WID_TE_LAND_GENERATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_TOWN_GENERATE, "WID_TE_TOWN_GENERATE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_INDUSTRY, "WID_TE_INDUSTRY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ROADS, "WID_TE_ROADS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_TRAMS, "WID_TE_TRAMS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_WATER, "WID_TE_WATER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_TREES, "WID_TE_TREES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SIGNS, "WID_TE_SIGNS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_PANEL, "WID_TE_DATE_PANEL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_MUSIC_SOUND, "WID_TE_MUSIC_SOUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_HELP, "WID_TE_HELP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SWITCH_BAR, "WID_TE_SWITCH_BAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_ORDER, "WID_TD_SORT_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_CRITERIA, "WID_TD_SORT_CRITERIA"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_FILTER, "WID_TD_FILTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_LIST, "WID_TD_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SCROLLBAR, "WID_TD_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_WORLD_POPULATION, "WID_TD_WORLD_POPULATION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_CAPTION, "WID_TA_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_ZONE_BUTTON, "WID_TA_ZONE_BUTTON"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_RATING_INFO, "WID_TA_RATING_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_COMMAND_LIST, "WID_TA_COMMAND_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_SCROLLBAR, "WID_TA_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_ACTION_INFO, "WID_TA_ACTION_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_EXECUTE, "WID_TA_EXECUTE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CAPTION, "WID_TV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_VIEWPORT, "WID_TV_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_INFO, "WID_TV_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CENTER_VIEW, "WID_TV_CENTER_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_SHOW_AUTHORITY, "WID_TV_SHOW_AUTHORITY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CHANGE_NAME, "WID_TV_CHANGE_NAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CATCHMENT, "WID_TV_CATCHMENT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_EXPAND, "WID_TV_EXPAND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_DELETE, "WID_TV_DELETE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_NEW_TOWN, "WID_TF_NEW_TOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_RANDOM_TOWN, "WID_TF_RANDOM_TOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_MANY_RANDOM_TOWNS, "WID_TF_MANY_RANDOM_TOWNS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_TOWN_NAME_EDITBOX, "WID_TF_TOWN_NAME_EDITBOX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_TOWN_NAME_RANDOM, "WID_TF_TOWN_NAME_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_SMALL, "WID_TF_SIZE_SMALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_MEDIUM, "WID_TF_SIZE_MEDIUM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_LARGE, "WID_TF_SIZE_LARGE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_RANDOM, "WID_TF_SIZE_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_CITY, "WID_TF_CITY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_ORIGINAL, "WID_TF_LAYOUT_ORIGINAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_BETTER, "WID_TF_LAYOUT_BETTER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_GRID2, "WID_TF_LAYOUT_GRID2"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_GRID3, "WID_TF_LAYOUT_GRID3"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_RANDOM, "WID_TF_LAYOUT_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BEGIN, "WID_TT_BEGIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SIGNS, "WID_TT_SIGNS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_TREES, "WID_TT_TREES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_HOUSES, "WID_TT_HOUSES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_INDUSTRIES, "WID_TT_INDUSTRIES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUILDINGS, "WID_TT_BUILDINGS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BRIDGES, "WID_TT_BRIDGES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_STRUCTURES, "WID_TT_STRUCTURES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_CATENARY, "WID_TT_CATENARY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LOADING, "WID_TT_LOADING"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_END, "WID_TT_END"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUTTONS, "WID_TT_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_11, "WID_BT_TYPE_11"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_12, "WID_BT_TYPE_12"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_13, "WID_BT_TYPE_13"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_14, "WID_BT_TYPE_14"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_21, "WID_BT_TYPE_21"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_22, "WID_BT_TYPE_22"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_23, "WID_BT_TYPE_23"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_24, "WID_BT_TYPE_24"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_31, "WID_BT_TYPE_31"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_32, "WID_BT_TYPE_32"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_33, "WID_BT_TYPE_33"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_34, "WID_BT_TYPE_34"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_RANDOM, "WID_BT_TYPE_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_MANY_RANDOM, "WID_BT_MANY_RANDOM"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CAPTION, "WID_VV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_VIEWPORT, "WID_VV_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_START_STOP, "WID_VV_START_STOP"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CENTER_MAIN_VIEW, "WID_VV_CENTER_MAIN_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_GOTO_DEPOT, "WID_VV_GOTO_DEPOT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_REFIT, "WID_VV_REFIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SHOW_ORDERS, "WID_VV_SHOW_ORDERS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SHOW_DETAILS, "WID_VV_SHOW_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CLONE, "WID_VV_CLONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SELECT_DEPOT_CLONE, "WID_VV_SELECT_DEPOT_CLONE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SELECT_REFIT_TURN, "WID_VV_SELECT_REFIT_TURN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_TURN_AROUND, "WID_VV_TURN_AROUND"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_FORCE_PROCEED, "WID_VV_FORCE_PROCEED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_CAPTION, "WID_VR_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_VEHICLE_PANEL_DISPLAY, "WID_VR_VEHICLE_PANEL_DISPLAY"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SHOW_HSCROLLBAR, "WID_VR_SHOW_HSCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_HSCROLLBAR, "WID_VR_HSCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SELECT_HEADER, "WID_VR_SELECT_HEADER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_MATRIX, "WID_VR_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SCROLLBAR, "WID_VR_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_INFO, "WID_VR_INFO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_REFIT, "WID_VR_REFIT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_CAPTION, "WID_VD_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_RENAME_VEHICLE, "WID_VD_RENAME_VEHICLE"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_TOP_DETAILS, "WID_VD_TOP_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_INCREASE_SERVICING_INTERVAL, "WID_VD_INCREASE_SERVICING_INTERVAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DECREASE_SERVICING_INTERVAL, "WID_VD_DECREASE_SERVICING_INTERVAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SERVICE_INTERVAL_DROPDOWN, "WID_VD_SERVICE_INTERVAL_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SERVICING_INTERVAL, "WID_VD_SERVICING_INTERVAL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_MIDDLE_DETAILS, "WID_VD_MIDDLE_DETAILS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_MATRIX, "WID_VD_MATRIX"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SCROLLBAR, "WID_VD_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_CARGO_CARRIED, "WID_VD_DETAILS_CARGO_CARRIED"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_TRAIN_VEHICLES, "WID_VD_DETAILS_TRAIN_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_CAPACITY_OF_EACH, "WID_VD_DETAILS_CAPACITY_OF_EACH"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_TOTAL_CARGO, "WID_VD_DETAILS_TOTAL_CARGO"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_CAPTION, "WID_VL_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SORT_ORDER, "WID_VL_SORT_ORDER"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SORT_BY_PULLDOWN, "WID_VL_SORT_BY_PULLDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_LIST, "WID_VL_LIST"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SCROLLBAR, "WID_VL_SCROLLBAR"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_HIDE_BUTTONS, "WID_VL_HIDE_BUTTONS"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_AVAILABLE_VEHICLES, "WID_VL_AVAILABLE_VEHICLES"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_MANAGE_VEHICLES_DROPDOWN, "WID_VL_MANAGE_VEHICLES_DROPDOWN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_STOP_ALL, "WID_VL_STOP_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_START_ALL, "WID_VL_START_ALL"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_CAPTION, "WID_EV_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_VIEWPORT, "WID_EV_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_ZOOM_IN, "WID_EV_ZOOM_IN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_ZOOM_OUT, "WID_EV_ZOOM_OUT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_MAIN_TO_VIEW, "WID_EV_MAIN_TO_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_VIEW_TO_MAIN, "WID_EV_VIEW_TO_MAIN"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_CAPTION, "WID_W_CAPTION"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_VIEWPORT, "WID_W_VIEWPORT"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_CENTER_VIEW, "WID_W_CENTER_VIEW"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_RENAME, "WID_W_RENAME"); - SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_SHOW_VEHICLES, "WID_W_SHOW_VEHICLES"); - - SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::Close, "Close", 3, ".ii"); - SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::IsOpen, "IsOpen", 3, ".ii"); - SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::Highlight, "Highlight", 5, ".iiii"); - - SQGSWindow.PostRegister(engine); -} diff --git a/src/script/api/game/game_execmode.hpp.sq b/src/script/api/script_includes.hpp.in index 14946ba12..75f1249ef 100644 --- a/src/script/api/game/game_execmode.hpp.sq +++ b/src/script/api/script_includes.hpp.in @@ -7,17 +7,9 @@ /* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ -#include "../script_execmode.hpp" -#include "../template/template_execmode.hpp.sq" +${SQUIRREL_INCLUDES} - -template <> const char *GetClassName<ScriptExecMode, ST_GS>() { return "GSExecMode"; } - -void SQGSExecMode_Register(Squirrel *engine) +void SQ${APIUC}_RegisterAll(Squirrel *engine) { - DefSQClass<ScriptExecMode, ST_GS> SQGSExecMode("GSExecMode"); - SQGSExecMode.PreRegister(engine); - SQGSExecMode.AddConstructor<void (ScriptExecMode::*)(), 1>(engine, "x"); - - SQGSExecMode.PostRegister(engine); +${SQUIRREL_REGISTER} } diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk deleted file mode 100644 index 29305b789..000000000 --- a/src/script/api/squirrel_export.awk +++ /dev/null @@ -1,563 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - -# -# Awk script to automatically generate the code needed -# to export the script APIs to Squirrel. -# -# Note that arrays are 1 based... -# - -# Simple insertion sort. -function array_sort(ARRAY, ELEMENTS, temp, i, j) -{ - for (i = 2; i <= ELEMENTS; i++) - for (j = i; ARRAY[j - 1] > ARRAY[j]; --j) { - temp = ARRAY[j] - ARRAY[j] = ARRAY[j - 1] - ARRAY[j - 1] = temp - } - return -} - -function dump_class_templates(name) -{ - realname = name - gsub("^Script", "", realname) - - print " template <> inline " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }" CR - print " template <> inline " name " &GetParam(ForceType<" name " &>, 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<const " name " *>, 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<const " name " &>, 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 == 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<Text *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" CR - print " if (sq_gettype(vm, index) == OT_INSTANCE) {" CR - print " return GetParam(ForceType<ScriptText *>(), vm, index, ptr);" CR - print " }" CR - print " if (sq_gettype(vm, index) == OT_STRING) {" CR - print " return new RawText(GetParam(ForceType<const char *>(), vm, index, ptr));" CR - print " }" CR - print " return nullptr;" CR - print " }" CR - } else { - 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 - } -} - -function dump_fileheader() -{ - print "/*" CR - print " * This file is part of OpenTTD." CR - print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." CR - print " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." CR - print " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>." CR - print " */" CR - print "" CR - print "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" CR - print "" CR - print "#include \"../" filename "\"" CR - if (api != "Template") { - gsub("script_", "template_", filename) - print "#include \"../template/" filename ".sq\"" CR - } -} - -function reset_reader() -{ - enum_size = 0 - enum_value_size = 0 - enum_string_to_error_size = 0 - enum_error_to_string_size = 0 - struct_size = 0 - method_size = 0 - static_method_size = 0 - cls = "" - start_squirrel_define_on_next_line = "false" - cls_level = 0 - cls_in_api = "" -} - -BEGIN { - enum_size = 0 - enum_value_size = 0 - enum_string_to_error_size = 0 - enum_error_to_string_size = 0 - const_size = 0 - struct_size = 0 - method_size = 0 - static_method_size = 0 - super_cls = "" - cls = "" - api_selected = "" - cls_in_api = "" - start_squirrel_define_on_next_line = "false" - has_fileheader = "false" - cls_level = 0 - apis = tolower(api) - if (apis == "gs") apis = "game" -} - -{ CR = (match($0, "\\r$") > 0 ? "\r" : "") } - -/@file/ { - filename = $3 - gsub("^" apis "_", "script_", filename) -} - -# Ignore special doxygen blocks -/^#ifndef DOXYGEN_API/ { doxygen_skip = "next"; next; } -/^#ifdef DOXYGEN_API/ { doxygen_skip = "true"; next; } -/^#endif \/\* DOXYGEN_API \*\// { doxygen_skip = "false"; next; } -/^#else/ { - if (doxygen_skip == "next") { - doxygen_skip = "true"; - } else { - doxygen_skip = "false"; - } - next; -} -{ if (doxygen_skip == "true") next } - -/^([ ]*)\* @api/ { - # By default, classes are not selected - if (cls_level == 0) api_selected = "false" - - gsub("^([ ]*)", "", $0) - gsub("* @api ", "", $0) - - if (api == "Template") { - api_selected = "true" - if ($0 == "none" CR || $0 == "-all" CR) api_selected = "false" - next - } - - if ($0 == "none" CR) { - api_selected = "false" - } else if ($0 == "-all" CR) { - api_selected = "false" - } else if (match($0, "-" apis)) { - api_selected = "false" - } else if (match($0, apis)) { - api_selected = "true" - } - - next -} - -# Remove the old squirrel stuff -/#ifdef DEFINE_SQUIRREL_CLASS/ { squirrel_stuff = "true"; next; } -/^#endif \/\* DEFINE_SQUIRREL_CLASS \*\// { if (squirrel_stuff == "true") { squirrel_stuff = "false"; next; } } -{ if (squirrel_stuff == "true") next; } - -# Ignore forward declarations of classes -/^( *)class(.*);/ { next; } -# We only want to have public functions exported for now -/^( *)class/ { - if (cls_level == 0) { - if (api_selected == "") { - print "Class '"$2"' has no @api. It won't be published to any API." > "/dev/stderr" - api_selected = "false" - } - public = "false" - cls_param[0] = "" - cls_param[1] = 1 - cls_param[2] = "x" - cls_in_api = api_selected - api_selected = "" - cls = $2 - if (match($4, "public") || match($4, "protected") || match($4, "private")) { - super_cls = $5 - } else { - super_cls = $4 - } - } else if (cls_level == 1) { - if (api_selected == "") api_selected = cls_in_api - - if (api_selected == "true") { - struct_size++ - structs[struct_size] = cls "::" $2 - } - api_selected = "" - } - cls_level++ - next -} -/^( *)public/ { if (cls_level == 1) public = "true"; next; } -/^( *)protected/ { if (cls_level == 1) public = "false"; next; } -/^( *)private/ { if (cls_level == 1) public = "false"; next; } - -# Ignore the comments -/^#/ { next; } -/\/\*.*\*\// { comment = "false"; next; } -/\/\*/ { comment = "true"; next; } -/\*\// { comment = "false"; next; } -{ if (comment == "true") next } - -# We need to make specialized conversions for structs -/^( *)struct/ { - cls_level++ - - # Check if we want to publish this struct - if (api_selected == "") api_selected = cls_in_api - if (api_selected == "false") { - api_selected = "" - next - } - api_selected = "" - - if (public == "false") next - if (cls_level != 1) next - - struct_size++ - structs[struct_size] = cls "::" $2 - - next -} - -# We need to make specialized conversions for enums -/^( *)enum/ { - cls_level++ - - # Check if we want to publish this enum - if (api_selected == "") api_selected = cls_in_api - if (api_selected == "false") { - api_selected = "" - next - } - api_selected = "" - - if (public == "false") next - - in_enum = "true" - enum_size++ - enums[enum_size] = cls "::" $2 - - next -} - -# Maybe the end of the class, if so we can start with the Squirrel export pretty soon -/};/ { - cls_level-- - if (cls_level != 0) { - in_enum = "false"; - next; - } - if (cls == "") { - next; - } - start_squirrel_define_on_next_line = "true" - next; -} - -# Empty/white lines. When we may do the Squirrel export, do that export. -/^([ ]*)\r*$/ { - if (start_squirrel_define_on_next_line == "false") next - - if (cls_in_api != "true") { - reset_reader() - next - } - if (has_fileheader == "false") { - dump_fileheader() - has_fileheader = "true" - } - - spaces = " "; - public = "false" - namespace_opened = "false" - - api_cls = cls - gsub("^Script", api, api_cls) - api_super_cls = super_cls - gsub("^Script", api, api_super_cls) - - print "" CR - - if (api == "Template") { - # First check whether we have enums to print - if (enum_size != 0) { - if (namespace_opened == "false") { - print "namespace SQConvert {" CR - namespace_opened = "true" - } - print " /* Allow enums to be used as Squirrel parameters */" CR - for (i = 1; i <= enum_size; i++) { - print " template <> inline " enums[i] " GetParam(ForceType<" enums[i] ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" enums[i] ")tmp; }" CR - print " template <> inline int Return<" enums[i] ">(HSQUIRRELVM vm, " enums[i] " res) { sq_pushinteger(vm, (int32)res); return 1; }" CR - delete enums[i] - } - } - - # Then check whether we have structs/classes to print - if (struct_size != 0) { - if (namespace_opened == "false") { - print "namespace SQConvert {" CR - namespace_opened = "true" - } - print " /* Allow inner classes/structs to be used as Squirrel parameters */" CR - for (i = 1; i <= struct_size; i++) { - dump_class_templates(structs[i]) - delete structs[i] - } - } - - if (namespace_opened == "false") { - print "namespace SQConvert {" CR - namespace_opened = "true" - } else { - print "" CR - } - print " /* Allow " cls " to be used as Squirrel parameter */" CR - dump_class_templates(cls) - - print "} // namespace SQConvert" CR - - reset_reader() - next - } - - print "" CR - print "template <> const char *GetClassName<" cls ", ST_" toupper(api) ">() { return \"" api_cls "\"; }" CR - print "" CR - - # Then do the registration functions of the class. */ - print "void SQ" api_cls "_Register(Squirrel *engine)" CR - print "{" CR - print " DefSQClass<" cls ", ST_" toupper(api) "> SQ" api_cls "(\"" api_cls "\");" CR - if (super_cls == "Text" || super_cls == "ScriptObject" || super_cls == "AIAbstractList::Valuator") { - print " SQ" api_cls ".PreRegister(engine);" CR - } else { - print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");" CR - } - if (super_cls != "ScriptEvent") { - if (cls_param[2] == "v") { - print " SQ" api_cls ".AddSQAdvancedConstructor(engine);" CR - } else { - print " SQ" api_cls ".AddConstructor<void (" cls "::*)(" cls_param[0] "), " cls_param[1]">(engine, \"" cls_param[2] "\");" CR - } - } - print "" CR - - # Enum values - mlen = 0 - for (i = 1; i <= enum_value_size; i++) { - if (mlen <= length(enum_value[i])) mlen = length(enum_value[i]) - } - for (i = 1; i <= enum_value_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" enum_value[i] ", " substr(spaces, 1, mlen - length(enum_value[i])) "\"" enum_value[i] "\");" CR - delete enum_value[i] - } - if (enum_value_size != 0) print "" CR - - # Const values - mlen = 0 - for (i = 1; i <= const_size; i++) { - if (mlen <= length(const_value[i])) mlen = length(const_value[i]) - } - for (i = 1; i <= const_size; i++) { - print " SQ" api_cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");" CR - delete const_value[i] - } - if (const_size != 0) print "" CR - - # Mapping of OTTD strings to errors - mlen = 0 - for (i = 1; i <= enum_string_to_error_size; i++) { - if (mlen <= length(enum_string_to_error_mapping_string[i])) mlen = length(enum_string_to_error_mapping_string[i]) - } - for (i = 1; i <= enum_string_to_error_size; i++) { - print " ScriptError::RegisterErrorMap(" enum_string_to_error_mapping_string[i] ", " substr(spaces, 1, mlen - length(enum_string_to_error_mapping_string[i])) cls "::" enum_string_to_error_mapping_error[i] ");" CR - - delete enum_string_to_error_mapping_string[i] - } - if (enum_string_to_error_size != 0) print "" CR - - # Mapping of errors to human 'readable' strings. - mlen = 0 - for (i = 1; i <= enum_error_to_string_size; i++) { - if (mlen <= length(enum_error_to_string_mapping[i])) mlen = length(enum_error_to_string_mapping[i]) - } - for (i = 1; i <= enum_error_to_string_size; i++) { - print " ScriptError::RegisterErrorMapString(" cls "::" enum_error_to_string_mapping[i] ", " substr(spaces, 1, mlen - length(enum_error_to_string_mapping[i])) "\"" enum_error_to_string_mapping[i] "\");" CR - delete enum_error_to_string_mapping[i] - } - if (enum_error_to_string_size != 0) print "" CR - - # Static methods - mlen = 0 - for (i = 1; i <= static_method_size; i++) { - if (mlen <= length(static_methods[i, 0])) mlen = length(static_methods[i, 0]) - } - for (i = 1; i <= static_method_size; i++) { - if (static_methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0]) - 8) "\"" static_methods[i, 0] "\");" CR - } else { - print " SQ" api_cls ".DefSQStaticMethod(engine, &" cls "::" static_methods[i, 0] ", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "\"" static_methods[i, 0] "\", " substr(spaces, 1, mlen - length(static_methods[i, 0])) "" static_methods[i, 1] ", \"" static_methods[i, 2] "\");" CR - } - delete static_methods[i] - } - if (static_method_size != 0) print "" CR - - # Non-static methods - mlen = 0 - for (i = 1; i <= method_size; i++) { - if (mlen <= length(methods[i, 0])) mlen = length(methods[i, 0]) - } - for (i = 1; i <= method_size; i++) { - if (methods[i, 2] == "v") { - print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\"" methods[i, 0] "\");" CR - } else { - print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\"" methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");" CR - } - delete methods[i] - } - if (method_size != 0) print "" CR - - print " SQ" api_cls ".PostRegister(engine);" CR - print "}" CR - - reset_reader() - - next -} - -# Skip non-public functions -{ if (public == "false") next } - -# Add enums -{ - if (in_enum == "true") { - enum_value_size++ - sub(",", "", $1) - sub("\r", "", $1) - enum_value[enum_value_size] = $1 - - # Check if this a special error enum - if (match(enums[enum_size], ".*::ErrorMessages") != 0) { - # syntax: - # enum ErrorMessages { - # ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...] - # } - - # Set the mappings - if (match($0, "\\[.*\\]") != 0) { - mappings = substr($0, RSTART, RLENGTH); - gsub("([\\[[:space:]\\]])", "", mappings); - - split(mappings, mapitems, ","); - for (i = 1; i <= length(mapitems); i++) { - enum_string_to_error_size++ - enum_string_to_error_mapping_string[enum_string_to_error_size] = mapitems[i] - enum_string_to_error_mapping_error[enum_string_to_error_size] = $1 - } - - enum_error_to_string_size++ - enum_error_to_string_mapping[enum_error_to_string_size] = $1 - } - } - next - } -} - -# Add a const (non-enum) value -/^[ ]*static const \w+ \w+ = -?\(?\w*\)?\w+;/ { - const_size++ - const_value[const_size] = $4 - next -} - -# Add a method to the list -/^.*\(.*\).*\r*$/ { - if (cls_level != 1) next - if (match($0, "~")) { - if (api_selected != "") { - print "Destructor for '"cls"' has @api. Tag ignored." > "/dev/stderr" - api_selected = "" - } - next - } - - is_static = match($0, "static") - gsub("\\yvirtual\\y", "", $0) - gsub("\\ystatic\\y", "", $0) - gsub("\\yconst\\y", "", $0) - gsub("{.*", "", $0) - param_s = $0 - gsub("\\*", "", $0) - gsub("\\(.*", "", $0) - - sub(".*\\(", "", param_s) - sub("\\).*", "", param_s) - - funcname = $2 - if ($1 == cls && funcname == "") { - if (api_selected != "") { - print "Constructor for '"cls"' has @api. Tag ignored." > "/dev/stderr" - api_selected = "" - } - cls_param[0] = param_s - if (param_s == "") next - } else if (funcname == "") next - - split(param_s, params, ",") - if (is_static) { - types = "." - } else { - types = "x" - } - for (len = 1; params[len] != ""; len++) { - sub("^[ ]*", "", params[len]) - if (match(params[len], "\\*") || match(params[len], "&")) { - if (match(params[len], "^char")) { - # Many types can be converted to string, so use '.', not 's'. (handled by our glue code) - types = types "." - } else if (match(params[len], "^void")) { - types = types "p" - } else if (match(params[len], "^Array")) { - types = types "a" - } else if (match(params[len], "^struct Array")) { - types = types "a" - } else if (match(params[len], "^Text")) { - types = types "." - } else { - types = types "x" - } - } else if (match(params[len], "^bool")) { - types = types "b" - } else if (match(params[len], "^HSQUIRRELVM")) { - types = "v" - } else { - types = types "i" - } - } - - # Check if we want to publish this function - if (api_selected == "") api_selected = cls_in_api - if (api_selected == "false") { - api_selected = "" - next - } - api_selected = "" - - if ($1 == cls && funcname == "") { - cls_param[1] = len; - cls_param[2] = types; - } else if (substr(funcname, 0, 1) == "_" && types != "v") { - } else if (is_static) { - static_method_size++ - static_methods[static_method_size, 0] = funcname - static_methods[static_method_size, 1] = len - static_methods[static_method_size, 2] = types - } else { - method_size++ - methods[method_size, 0] = funcname - methods[method_size, 1] = len - methods[method_size, 2] = types - } - next -} diff --git a/src/script/api/game/game_testmode.hpp.sq b/src/script/api/squirrel_export.hpp.sq.in index 8b6ab26fe..09b7da764 100644 --- a/src/script/api/game/game_testmode.hpp.sq +++ b/src/script/api/squirrel_export.hpp.sq.in @@ -6,18 +6,4 @@ */ /* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_testmode.hpp" -#include "../template/template_testmode.hpp.sq" - - -template <> const char *GetClassName<ScriptTestMode, ST_GS>() { return "GSTestMode"; } - -void SQGSTestMode_Register(Squirrel *engine) -{ - DefSQClass<ScriptTestMode, ST_GS> SQGSTestMode("GSTestMode"); - SQGSTestMode.PreRegister(engine); - SQGSTestMode.AddConstructor<void (ScriptTestMode::*)(), 1>(engine, "x"); - - SQGSTestMode.PostRegister(engine); -} +${SQUIRREL_EXPORT} diff --git a/src/script/api/squirrel_export.sh b/src/script/api/squirrel_export.sh deleted file mode 100755 index 96bd102f9..000000000 --- a/src/script/api/squirrel_export.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - -# Set neutral locale so sort behaves the same everywhere -LC_ALL=C -export LC_ALL - -# We really need gawk for this! -AWK=gawk - -${AWK} --version > /dev/null 2> /dev/null -if [ "$?" != "0" ]; then - echo "This script needs gawk to run properly" - exit 1 -fi - -# This must be called from within a src/???/api directory. -scriptdir=`dirname $0` -apilc=`pwd | sed "s@/api@@;s@.*/@@"` - -# Check if we are in the root directory of the API, as then we generate all APIs -if [ "$apilc" = "script" ]; then - for api in `find . -type d | cut -b3-`; do - if [ -z "$api" ]; then continue; fi - echo "Generating for API '$api' ..." - cd $api - sh $scriptdir/../`basename $0` - cd .. - done - exit 0 -fi - -case $apilc in - template) apiuc="Template" ;; - ai) apiuc="AI" ;; - game) apiuc="GS" ;; - *) echo "Unknown API type."; exit 1 ;; -esac - -for f in `ls ../*.hpp`; do - bf=`basename ${f} | sed s@script_@${apilc}_@` - - # ScriptController has custom code, and should not be generated - if [ "`basename ${f}`" = "script_controller.hpp" ]; then continue; fi - - ${AWK} -v BINMODE=1 -v api=${apiuc} -f ${scriptdir}/squirrel_export.awk ${f} > ${bf}.tmp - - if [ "`wc -l ${bf}.tmp | cut -d\ -f1`" = "0" ]; then - if [ -f "${bf}.sq" ]; then - echo "Deleted: ${bf}.sq" - rm -f ${bf}.sq - fi - rm -f ${bf}.tmp - elif ! [ -f "${bf}.sq" ] || [ -n "`diff -I '$Id' ${bf}.tmp ${bf}.sq 2> /dev/null || echo boo`" ]; then - mv ${bf}.tmp ${bf}.sq - echo "Updated: ${bf}.sq" - else - rm -f ${bf}.tmp - fi -done - -# Remove .hpp.sq if .hpp doesn't exist anymore -for f in `ls *.hpp.sq`; do - f=`echo ${f} | sed "s/.hpp.sq$/.hpp/;s@${apilc}_@script_@"` - if [ ! -f ../${f} ];then - echo "Deleted: ${f}.sq" - rm -f ${f}.sq - fi -done - -if [ "$apilc" = "template" ]; then exit 0; fi - -# Add stuff to ${apilc}_instance.cpp -f="../../../${apilc}/${apilc}_instance.cpp" - -functions=`` - -echo " -{ } -/.hpp.sq/ { if (match(\$0, \"template\")) print \$0; next } -/SQ${apiuc}Controller_Register/ { print \$0; next } -/SQ${apiuc}.*_Register/ { next } - -/Note: this line is a marker in squirrel_export.sh. Do not change!/ { - print \$0 - gsub(\"^.*/\", \"\") - split(\"`grep '^void SQ'${apiuc}'.*_Register(Squirrel \*engine).\?$' *.hpp.sq | sed 's/:.*$//' | sort | uniq | tr -d '\r' | tr '\n' ' '`\", files, \" \") - - for (i = 1; files[i] != \"\"; i++) { - print \"#include \\\"../script/api/${apilc}/\" files[i] \"\\\"\" \$0 - } - - next; -} - -/\/\* Register all classes \*\// { - print \$0 - gsub(\"^.*/\", \"\") - # List needs to be registered with squirrel before all List subclasses. - print \" SQ${apiuc}List_Register(this->engine);\" \$0 - split(\"`grep '^void SQ'${apiuc}'.*_Register(Squirrel \*engine).\?$' *.hpp.sq | grep -v 'SQ'${apiuc}'List_Register' | sed 's/^.*void //;s/Squirrel \*/this->/;s/$/;/;s/_Register/0000Register/g;' | sort | sed 's/0000Register/_Register/g' | tr -d '\r' | tr '\n' ' '`\", regs, \" \") - - for (i = 1; regs[i] != \"\"; i++) { - if (regs[i] == \"SQ${apiuc}Controller_Register(this->engine);\") continue - print \" \" regs[i] \$0 - } - - next -} - -{ print \$0; } -" > ${f}.awk - -${AWK} -v BINMODE=1 -f ${f}.awk ${f} > ${f}.tmp - -if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then - mv ${f}.tmp ${f} - echo "Updated: ${f}" -else - rm -f ${f}.tmp -fi -rm -f ${f}.awk diff --git a/src/script/api/squirrel_export.vbs b/src/script/api/squirrel_export.vbs deleted file mode 100644 index 2ebc77136..000000000 --- a/src/script/api/squirrel_export.vbs +++ /dev/null @@ -1,941 +0,0 @@ -Option Explicit - -' This file is part of OpenTTD. -' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - -Dim FSO -Dim enum_size, enums, enum_value_size, enum_value -Dim enum_string_to_error_size, enum_string_to_error_mapping_string, enum_string_to_error_mapping_error -Dim enum_error_to_string_size, enum_error_to_string_mapping, const_size, const_value -Dim struct_size, structs, method_size, methods, static_method_size, static_methods -Dim super_cls, cls, api_selected, cls_in_api, start_squirrel_define_on_next_line, has_fileheader, cls_level -Dim apis, filename, doxygen_skip, squirrel_stuff, is_public, cls_param(2), comment, in_enum - -Set FSO = CreateObject("Scripting.FileSystemObject") - -Function CompareFiles(filename1, filename2) - Dim file, lines1, lines2 - - If Not FSO.FileExists(filename1) Then - CompareFiles = False - Exit Function - End If - Set file = FSO.OpenTextFile(filename1, 1) - If Not file.AtEndOfStream Then - lines1 = file.ReadAll - End IF - file.Close - - If Not FSO.FileExists(filename2) Then - CompareFiles = False - Exit Function - End If - Set file = FSO.OpenTextFile(filename2, 1) - If Not file.AtEndOfStream Then - lines2 = file.ReadAll - End IF - file.Close - - CompareFiles = (lines1 = lines2) -End Function - -Function IsEmptyFile(filename) - Dim file - Set file = FSO.OpenTextFile(filename, 1) - IsEmptyFile = file.AtEndOfStream - file.Close -End Function - -Function DumpClassTemplates(name, file) - Dim re, realname - Set re = New RegExp - - re.Pattern = "^Script" - realname = re.Replace(name, "") - - file.WriteLine " template <> inline " & name & " *GetParam(ForceType<" & name & " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" & name & " *)instance; }" - file.WriteLine " template <> inline " & name & " &GetParam(ForceType<" & name & " &>, 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<const " & name & " *>, 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<const " & name & " &>, 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 == 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<Text *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {" - file.WriteLine " if (sq_gettype(vm, index) == OT_INSTANCE) {" - file.WriteLine " return GetParam(ForceType<ScriptText *>(), vm, index, ptr);" - file.WriteLine " }" - file.WriteLine " if (sq_gettype(vm, index) == OT_STRING) {" - file.WriteLine " return new RawText(GetParam(ForceType<const char *>(), vm, index, ptr));" - file.WriteLine " }" - file.WriteLine " return nullptr;" - file.WriteLine " }" - Else - 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 - -Function DumpFileheader(api, file) - Dim re - Set re = New RegExp - file.WriteLine "/*" - file.WriteLine " * This file is part of OpenTTD." - file.WriteLine " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." - file.WriteLine " * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - file.WriteLine " * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>." - file.WriteLine " */" - file.WriteLine "" - file.WriteLine "/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */" - file.WriteLine "" - file.WriteLine "#include " & Chr(34) & "../" & filename & Chr(34) - If api <> "Template" Then - re.Pattern = "script_" - filename = re.Replace(filename, "template_") - file.WriteLine "#include " & Chr(34) & "../template/" & filename & ".sq" & Chr(34) - End If -End Function - -Function ResetReader() - enum_size = 0 - enums.RemoveAll - enum_value_size = 0 - enum_value.RemoveAll - enum_string_to_error_size = 0 - enum_string_to_error_mapping_string.RemoveAll - enum_string_to_error_mapping_error.RemoveAll - enum_error_to_string_size = 0 - enum_error_to_string_mapping.RemoveAll - const_size = 0 - const_value.RemoveAll - struct_size = 0 - structs.RemoveAll - method_size = 0 - methods.RemoveAll - static_method_size = 0 - static_methods.RemoveAll - cls = "" - start_squirrel_define_on_next_line = False - cls_level = 0 - cls_in_api = "" -End Function - -Sub SquirrelExportParse(api, line, file) - Dim re - Set re = New RegExp - - re.Pattern = "@file" - If re.Test(line) Then - filename = Split(line)(2) - re.Pattern = "^" & apis & "_" - filename = re.Replace(filename, "script_") - End If - - ' Ignore special doxygen blocks - re.Pattern = "^#ifndef DOXYGEN_API" - If re.Test(line) Then - doxygen_skip = "next" - Exit Sub - End If - re.Pattern = "^#ifdef DOXYGEN_API" - If re.Test(line) Then - doxygen_skip = "true" - Exit Sub - End If - re.Pattern = "^#endif /\* DOXYGEN_API \*/" - If re.Test(line) Then - doxygen_skip = "false" - Exit Sub - End If - re.Pattern = "^#else" - If re.Test(line) Then - If doxygen_skip = "next" Then - doxygen_skip = "true" - Else - doxygen_skip = "false" - End If - Exit Sub - End If - If doxygen_skip = "true" Then Exit Sub - - re.Pattern = "^([ ]*)\* @api" - If re.Test(line) Then - ' By default, classes are not selected - If cls_level = 0 Then api_selected = "false" - - re.Pattern = "^([ ]*)" - line = re.Replace(line, "") - re.Pattern = "\* @api " - line = re.Replace(line, "") - - If api = "Template" Then - api_selected = "true" - If line = "none" Or line = "-all" Then api_selected = "false" - Exit Sub - End If - - If line = "none" Then - api_selected = "false" - ElseIf line = "-all" Then - api_selected = "false" - Else - re.Pattern = "-" & apis - If re.Test(line) Then - api_selected = "false" - Else - re.Pattern = apis - If re.Test(line) Then - api_selected = "true" - End If - End If - End If - Exit Sub - End If - - ' Remove the old squirrel stuff - re.Pattern = "#ifdef DEFINE_SQUIRREL_CLASS" - If re.Test(line) Then - squirrel_stuff = True - Exit Sub - End If - re.Pattern = "^#endif /\* DEFINE_SQUIRREL_CLASS \*/" - If re.Test(line) Then - If squirrel_stuff Then squirrel_stuff = False - Exit Sub - End If - If squirrel_stuff Then Exit Sub - - ' Ignore forward declarations of classes - re.Pattern = "^( *)class(.*);" - If re.Test(line) Then Exit Sub - ' We only want to have public functions exported for now - re.Pattern = "^( *)class" - If re.Test(line) Then - line = Split(line) - If cls_level = 0 Then - If api_selected = "" Then - WScript.Echo "Class '" & line(1) & "' has no @api. It won't be published to any API." - api_selected = "false" - End If - is_public = False - cls_param(0) = "" - cls_param(1) = 1 - cls_param(2) = "x" - cls_in_api = api_selected - api_selected = "" - cls = line(1) - re.Pattern = "public|protected|private" - If UBound(line) > 2 Then - If re.Test(line(3)) Then - super_cls = line(4) - Else - super_cls = line(3) - End If - End If - ElseIf cls_level = 1 Then - If api_selected = "" Then api_selected = cls_in_api - - If api_selected = "true" Then - struct_size = struct_size + 1 - structs.Item(struct_size) = cls & "::" & line(1) - End If - api_selected = "" - End If - cls_level = cls_level + 1 - Exit Sub - End If - re.Pattern = "^( *)public" - If re.Test(line) Then - If cls_level = 1 Then is_public = True - Exit Sub - End If - re.Pattern = "^( *)protected" - If re.Test(line) Then - If cls_level = 1 Then is_public = False - Exit Sub - End If - re.Pattern = "^( *)private" - If re.Test(line) Then - If cls_level = 1 Then is_public = False - Exit Sub - End If - - ' Ignore the comments - re.Pattern = "^#" - If re.Test(line) Then Exit Sub - re.Pattern = "/\*.*\*/" - If re.Test(line) Then - comment = False - Exit Sub - End If - re.Pattern = "/\*" - If re.Test(line) Then - comment = True - Exit Sub - End If - re.Pattern = "\*/" - If re.Test(line) Then - comment = False - Exit Sub - End If - If comment Then Exit Sub - - ' We need to make specialized conversions for structs - re.Pattern = "^( *)struct" - If re.Test(line) Then - cls_level = cls_level + 1 - - ' Check if we want to publish this struct - If api_selected = "" Then api_selected = cls_in_api - If api_selected = "false" Then - api_selected = "" - Exit Sub - End If - api_selected = "" - - If Not is_public Then Exit Sub - If cls_level <> 1 Then Exit Sub - - struct_size = struct_size + 1 - structs.Item(struct_size) = cls & "::" & Split(line)(1) - Exit Sub - End If - - ' We need to make specialized conversions for enums - re.Pattern = "^( *)enum" - If re.Test(line) Then - cls_level = cls_level + 1 - - ' Check if we want to publish this enum - If api_selected = "" Then api_selected = cls_in_api - If api_selected = "false" Then - api_selected = "" - Exit Sub - End If - api_selected = "" - - If Not is_public Then Exit Sub - - in_enum = True - enum_size = enum_size + 1 - enums.Item(enum_size) = cls & "::" & Split(line)(1) - Exit Sub - End If - - ' Maybe the end of the class, if so we can start with the Squirrel export pretty soon - re.Pattern = "};" - If re.Test(line) Then - cls_level = cls_level - 1 - If cls_level <> 0 Then - in_enum = False - Exit Sub - End If - - If cls = "" Then Exit Sub - start_squirrel_define_on_next_line = True - Exit Sub - End If - - ' Empty/white lines. When we may do the Squirrel export, do that export. - re.Pattern = "^([ ]*)$" - If re.Test(line) Then - Dim namespace_opened, api_cls, api_super_cls, i, mlen, spaces - - If Not start_squirrel_define_on_next_line Then Exit Sub - - If cls_in_api <> "true" Then - ResetReader - Exit Sub - End If - If Not has_fileheader Then - DumpFileHeader api, file - has_fileheader = True - End If - - is_public = False - namespace_opened = False - - re.Pattern = "^Script" - api_cls = re.Replace(cls, api) - api_super_cls = re.Replace(super_cls, api) - - file.WriteLine "" - - If api = "Template" Then - ' First check whether we have enums to print - If enum_size <> 0 Then - If Not namespace_opened Then - file.WriteLine "namespace SQConvert {" - namespace_opened = True - End If - file.WriteLine " /* Allow enums to be used as Squirrel parameters */" - For i = 1 To enum_size - file.WriteLine " template <> inline " & enums.Item(i) & " GetParam(ForceType<" & enums.Item(i) & ">, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (" & enums.Item(i) & ")tmp; }" - file.WriteLine " template <> inline int Return<" & enums.Item(i) & ">(HSQUIRRELVM vm, " & enums.Item(i) & " res) { sq_pushinteger(vm, (int32)res); return 1; }" - Next - End If - - ' Then check whether we have structs/classes to print - If struct_size <> 0 Then - If Not namespace_opened Then - file.WriteLine "namespace SQConvert {" - namespace_opened = True - End If - file.WriteLine " /* Allow inner classes/structs to be used as Squirrel parameters */" - For i = 1 To struct_size - DumpClassTemplates structs.Item(i), file - Next - End If - - If Not namespace_opened Then - file.WriteLine "namespace SQConvert {" - namespace_opened = True - Else - file.WriteLine "" - End If - file.WriteLine " /* Allow " & cls & " to be used as Squirrel parameter */" - DumpClassTemplates cls, file - - file.WriteLine "} // namespace SQConvert" - - ResetReader - Exit Sub - End If - - file.WriteLine "" - file.WriteLine "template <> const char *GetClassName<" & cls & ", ST_" & UCase(api) & ">() { return " & Chr(34) & api_cls & Chr(34) & "; }" - file.WriteLine "" - - ' Then do the registration functions of the class. - file.WriteLine "void SQ" & api_cls & "_Register(Squirrel *engine)" - file.WriteLine "{" - file.WriteLine " DefSQClass<" & cls & ", ST_" & UCase(api) & "> SQ" & api_cls & "(" & Chr(34) & api_cls & Chr(34) & ");" - If super_cls = "Text" Or super_cls = "ScriptObject" Or super_cls = "AIAbstractiveList::Valuator" Then - file.WriteLine " SQ" & api_cls & ".PreRegister(engine);" - Else - file.WriteLine " SQ" & api_cls & ".PreRegister(engine, " & Chr(34) & api_super_cls & Chr(34) & ");" - End If - If super_cls <> "ScriptEvent" Then - If cls_param(2) = "v" Then - file.WriteLine " SQ" & api_cls & ".AddSQAdvancedConstructor(engine);" - Else - file.WriteLine " SQ" & api_cls & ".AddConstructor<void (" & cls & "::*)(" & cls_param(0) & "), " & cls_param(1) & ">(engine, " & Chr(34) & cls_param(2) & Chr(34) & ");" - End If - End If - file.WriteLine "" - - ' Enum values - mlen = 0 - For i = 1 To enum_value_size - If mlen <= Len(enum_value.Item(i)) Then mlen = Len(enum_value.Item(i)) - Next - For i = 1 To enum_value_size - file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & enum_value.Item(i) & ", " & Space(mlen - Len(enum_value.Item(i))) & Chr(34) & enum_value.Item(i) & Chr(34) & ");" - Next - If enum_value_size <> 0 Then file.WriteLine "" - - ' Const values - mlen = 0 - For i = 1 To const_size - If mlen <= Len(const_value.Item(i)) Then mlen = Len(const_value.Item(i)) - Next - For i = 1 To const_size - file.WriteLine " SQ" & api_cls & ".DefSQConst(engine, " & cls & "::" & const_value.Item(i) & ", " & Space(mlen - Len(const_value.Item(i))) & Chr(34) & const_value.Item(i) & Chr(34) & ");" - Next - If const_size <> 0 Then file.WriteLine "" - - ' Mapping of OTTD strings to errors - mlen = 0 - For i = 1 To enum_string_to_error_size - If mlen <= Len(enum_string_to_error_mapping_string.Item(i)) Then mlen = Len(enum_string_to_error_mapping_string.Item(i)) - Next - For i = 1 To enum_string_to_error_size - file.WriteLine " ScriptError::RegisterErrorMap(" & enum_string_to_error_mapping_string.Item(i) & ", " & Space(mlen - Len(enum_string_to_error_mapping_string.Item(i))) & cls & "::" & enum_string_to_error_mapping_error.Item(i) & ");" - Next - If enum_string_to_error_size <> 0 Then file.WriteLine "" - - ' Mapping of errors to human 'readable' strings. - mlen = 0 - For i = 1 To enum_error_to_string_size - If mlen <= Len(enum_error_to_string_mapping.Item(i)) Then mlen = Len(enum_error_to_string_mapping.Item(i)) - Next - For i = 1 To enum_error_to_string_size - file.WriteLine " ScriptError::RegisterErrorMapString(" & cls & "::" & enum_error_to_string_mapping.Item(i) & ", " & Space(mlen - Len(enum_error_to_string_mapping.Item(i))) & Chr(34) & enum_error_to_string_mapping.Item(i) & Chr(34) & ");" - Next - If enum_error_to_string_size <> 0 Then file.WriteLine "" - - ' Static methods - mlen = 0 - For i = 1 To static_method_size - If mlen <= Len(static_methods.Item(i)(0)) Then mlen = Len(static_methods.Item(i)(0)) - Next - For i = 1 To static_method_size - If static_methods.Item(i)(2) = "v" Then - spaces = mlen - Len(static_methods.Item(i)(0)) - 8 - If spaces < 0 Then spaces = 0 - file.WriteLine " SQ" & api_cls & ".DefSQAdvancedStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ");" - Else - file.WriteLine " SQ" & api_cls & ".DefSQStaticMethod(engine, &" & cls & "::" & static_methods.Item(i)(0) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & Chr(34) & static_methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(static_methods.Item(i)(0))) & static_methods.Item(i)(1) & ", " & Chr(34) & static_methods.Item(i)(2) & Chr(34) & ");" - End If - Next - If static_method_size <> 0 Then file.WriteLine "" - - ' Non-static methods - mlen = 0 - For i = 1 To method_size - If mlen <= Len(methods.Item(i)(0)) Then mlen = Len(methods.Item(i)(0)) - Next - For i = 1 To method_size - If methods.Item(i)(2) = "v" Then - spaces = mlen - Len(methods.Item(i)(0)) - 8 - If spaces < 0 Then spaces = 0 - file.WriteLine " SQ" & api_cls & ".DefSQAdvancedMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(spaces) & Chr(34) & methods.Item(i)(0) & Chr(34) & ");" - Else - file.WriteLine " SQ" & api_cls & ".DefSQMethod(engine, &" & cls & "::" & methods.Item(i)(0) & ", " & Space(mlen - Len(methods.Item(i)(0))) & Chr(34) & methods.Item(i)(0) & Chr(34) & ", " & Space(mlen - Len(methods.Item(i)(0))) & methods.Item(i)(1) & ", " & Chr(34) & methods.Item(i)(2) & Chr(34) & ");" - End If - Next - If method_size <> 0 Then file.WriteLine "" - - file.WriteLine " SQ" & api_cls & ".PostRegister(engine);" - file.WriteLine "}" - - ResetReader - - Exit Sub - End If - - ' Skip non-public functions - If Not is_public Then Exit Sub - - ' Add enums - If in_enum Then - enum_value_size = enum_value_size + 1 - re.Pattern = "[, ]" - re.Global = True - enum_value.Item(enum_value_size) = re.Replace(split(line)(0), "") - - ' Check if this a special error enum - re.Pattern = ".*::ErrorMessages" - If re.Test(enums.Item(enum_size)) Then - ' syntax: - ' enum ErrorMessages { - ' ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...] - ' } - - ' Set the mappings - re.Pattern = "\[.*\]" - If re.Test(line) Then - Dim mappings - mappings = re.Execute(line)(0).Value - re.Pattern = "[\[ \]]" - mappings = re.Replace(mappings, "") - - mappings = Split(mappings, ",") - For i = LBound(mappings) To UBound(mappings) - enum_string_to_error_size = enum_string_to_error_size + 1 - enum_string_to_error_mapping_string.Item(enum_string_to_error_size) = mappings(i) - enum_string_to_error_mapping_error.Item(enum_string_to_error_size) = enum_value.Item(enum_value_size) - Next - - enum_error_to_string_size = enum_error_to_string_size + 1 - enum_error_to_string_mapping.Item(enum_error_to_string_size) = enum_value.Item(enum_value_size) - End If - End If - re.Global = False - Exit Sub - End If - - ' Add a const (non-enum) value - re.Pattern = "^[ ]*static const \w+ \w+ = -?\(?\w*\)?\w+;" - If re.Test(line) Then - const_size = const_size + 1 - const_value.Item(const_size) = Split(line)(3) - Exit Sub - End If - - ' Add a method to the list - re.Pattern = "^.*\(.*\).*$" - If re.Test(line) Then - Dim is_static, param_s, func, funcname, params, types - If cls_level <> 1 Then Exit Sub - re.Pattern = "~" - If re.Test(line) Then - If api_selected <> "" Then - WScript.Echo "Destructor for '" & cls & "' has @api. Tag ignored." - api_selected = "" - End If - Exit Sub - End If - - re.Pattern = "static" - is_static = re.Test(line) - re.Pattern = "\bvirtual\b" - line = re.Replace(line, "") - re.Pattern = "\bstatic\b" - line = re.Replace(line, "") - re.Pattern = "\bconst\b" - line = re.Replace(line, "") - re.Pattern = "{.*" - line = re.Replace(line, "") - param_s = line - re.Pattern = "\*" - line = re.Replace(line, "") - re.Pattern = "\(.*" - line = re.Replace(line, "") - re.Pattern = "^[ ]*" - line = re.Replace(line, "") - - re.Pattern = ".*\(" - param_s = re.Replace(param_s, "") - re.Pattern = "\).*" - param_s = re.Replace(param_s, "") - - func = Split(line) - If UBound(func) > 0 Then - funcname = func(1) - Else - funcname = "" - End If - If func(0) = cls And funcname = "" Then - If api_selected <> "" Then - WScript.Echo "Constructor for '" & cls & "' has @api. Tag ignored." - api_selected = "" - End If - cls_param(0) = param_s - If param_s = "" Then Exit Sub - ElseIf funcname = "" Then - Exit Sub - End If - - params = Split(param_s, ",") - If is_static Then - types = "." - Else - types = "x" - End If - For i = LBound(params) To UBound(params) - Do ' null loop for logic short-circuit - re.Pattern = "^[ ]*" - params(i) = re.Replace(params(i), "") - re.Pattern = "\*|&" - If re.Test(params(i)) Then - re.Pattern = "^char" - If re.test(params(i)) Then - ' Many types can be converted to string, so use '.', not 's'. (handled by our glue code) - types = types & "." - Exit Do - End If - re.Pattern = "^void" - If re.test(params(i)) Then - types = types & "p" - Exit Do - End If - re.Pattern = "^Array" - If re.test(params(i)) Then - types = types & "a" - Exit Do - End If - re.Pattern = "^struct Array" - If re.test(params(i)) Then - types = types & "a" - Exit Do - End If - re.Pattern = "^Text" - If re.test(params(i)) Then - types = types & "." - Exit Do - End If - types = types & "x" - Exit Do - End If - re.Pattern = "^bool" - If re.Test(params(i)) Then - types = types & "b" - Exit Do - End If - re.Pattern = "^HSQUIRRELVM" - If re.Test(params(i)) Then - types = "v" - Exit Do - End If - types = types & "i" - Loop While False ' end of null loop - Next - i = i + 1 - - ' Check if we want to publish this function - If api_selected = "" Then api_selected = cls_in_api - If api_selected = "false" Then - api_selected = "" - Exit Sub - End If - api_selected = "" - - If func(0) = cls And funcname = "" Then - cls_param(1) = i - cls_param(2) = types - Exit Sub - End If - If Left(funcname, 1) = "_" And types <> "v" Then Exit Sub - If is_static Then - static_method_size = static_method_size + 1 - static_methods.Item(static_method_size) = Array(funcname, i, types) - Exit Sub - End If - method_size = method_size + 1 - methods.Item(method_size) = Array(funcname, i, types) - Exit Sub - End If -End Sub - -Sub SquirrelExport(api, srcfilename, dstfilename) - Dim src, dst, line - Set src = FSO.OpenTextFile(srcfilename, 1) - Set dst = FSO.OpenTextFile(dstfilename, 2, True) - - enum_size = 0 - Set enums = CreateObject("Scripting.Dictionary") - enum_value_size = 0 - Set enum_value = CreateObject("Scripting.Dictionary") - enum_string_to_error_size = 0 - Set enum_string_to_error_mapping_string = CreateObject("Scripting.Dictionary") - Set enum_string_to_error_mapping_error = CreateObject("Scripting.Dictionary") - enum_error_to_string_size = 0 - Set enum_error_to_string_mapping = CreateObject("Scripting.Dictionary") - const_size = 0 - Set const_value = CreateObject("Scripting.Dictionary") - struct_size = 0 - Set structs = CreateObject("Scripting.Dictionary") - method_size = 0 - Set methods = CreateObject("Scripting.Dictionary") - static_method_size = 0 - Set static_methods = CreateObject("Scripting.Dictionary") - super_cls = "" - cls = "" - api_selected = "" - cls_in_api = "" - start_squirrel_define_on_next_line = False - has_fileheader = False - cls_level = 0 - apis = LCase(api) - If apis = "gs" Then apis = "game" - - While Not src.AtEndOfStream - line = src.ReadLine - SquirrelExportParse api, line, dst - Wend - - src.Close - dst.Close -End Sub - -Function SortDict(dict) - Set SortDict = CreateObject("Scripting.Dictionary") - While dict.Count <> 0 - Dim first, i - first = "" - For Each i in dict - If first = "" Or StrComp(first, i) = 1 Then first = i - Next - SortDict.Add first, first - dict.Remove(first) - Wend -End Function - -Sub ExportInstanceParse(apiuc, apilc, line, file) - Dim re, fname, f, files, r, regs - Set re = New RegExp - - re.Pattern = "\.hpp\.sq" - If re.Test(line) Then - re.Pattern = "template" - If re.Test(line) Then - file.WriteLine line - End If - Exit Sub - End If - - re.Pattern = "SQ" & apiuc & "Controller_Register" - If re.Test(line) Then - file.WriteLine line - Exit Sub - End If - - re.Pattern = "SQ" & apiuc & ".*_Register" - If re.Test(line) Then Exit Sub - - re.Pattern = "Note: this line is a marker in squirrel_export.sh. Do not change!" - If re.Test(line) Then - file.WriteLine line - Set files = CreateObject("Scripting.Dictionary") - For Each fname In FSO.GetFolder(".").Files - Do ' null loop for logic short-circuit - re.Pattern = ".*_(.*)\.hpp\.sq" - If Not re.Test(fname) Then Exit Do - Set f = FSO.OpenTextFile(fname, 1) - fname = fname.Name - re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" - While Not f.AtEndOfStream - If re.Test(f.ReadLine) And Not files.Exists(fname) Then - files.Add fname, fname - End If - Wend - f.Close - Loop While False ' end of null loop - Next - Set files = SortDict(files) - For Each f in files - file.WriteLine "#include " & Chr(34) & "../script/api/" & apilc & "/" & f & Chr(34) - Next - Exit Sub - End If - - re.Pattern = "/\* Register all classes \*/" - If re.Test(line) Then - file.WriteLine line - Set regs = CreateObject("Scripting.Dictionary") - ' List needs to be registered with squirrel before all List subclasses - file.WriteLine " SQ" & apiuc & "List_Register(this->engine);" - For Each fname In FSO.GetFolder(".").Files - Do ' null loop for logic short-circuit - re.Pattern = ".*_(.*)\.hpp\.sq" - If Not re.Test(fname) Then Exit Do - Set f = FSO.OpenTextFile(fname, 1) - While Not f.AtEndOfStream - Do ' null loop for logic short-circuit - r = f.ReadLine - re.Pattern = "^void SQ" & apiuc & ".*Register\(Squirrel \*engine\)$" - If Not re.Test(r) Then Exit Do - re.Pattern = "SQ" & apiuc & "List_Register" - If re.Test(r) Then Exit Do - re.Pattern = "^.*void " - r = re.Replace(r, "") - re.Pattern = "Squirrel \*" - r = re.Replace(r, "this->") - re.Pattern = "$" - r = re.Replace(r, ";") - re.Pattern = "_Register" - r = re.Replace(r, "0000Register") - If Not regs.Exists(r) Then regs.Add r, r - Loop While False ' end of null loop - Wend - f.Close - Loop While False ' end of null loop - Next - Set regs = SortDict(regs) - re.Pattern = "0000Register" - For Each r in regs.Items - r = re.Replace(r, "_Register") - If r <> "SQ" & apiuc & "Controller_Register(this->engine);" Then file.WriteLine " " & r - Next - Exit Sub - End If - - file.WriteLine line -End Sub - -Sub ExportInstance(apiuc, apilc, srcfilename, dstfilename) - Dim src, dst, line - Set src = FSO.OpenTextFile(srcfilename, 1) - Set dst = FSO.OpenTextFile(dstfilename, 2, True) - - While Not src.AtEndOfStream - line = src.ReadLine - ExportInstanceParse apiuc, apilc, line, dst - Wend - - src.Close - dst.Close -End Sub - -' Recursive entry point -Sub Main - Dim WSH, scriptdir, apilc, re, api, apiuc, f, bf - Set WSH = CreateObject("WScript.Shell") - Set re = New RegExp - - ' This must be called from within a src/???/api directory. - scriptdir = FSO.GetParentFolderName(WScript.ScriptFullName) - apilc = WSH.CurrentDirectory - re.Pattern = "\\api" - apilc = re.Replace(apilc, "") - re.Pattern = ".*\\" - apilc = re.Replace(apilc, "") - - ' Check if we are in the root directory of the API, as then we generate all APIs - If apilc = "script" Then - For Each api In FSO.GetFolder(".").SubFolders - WScript.Echo "Generating for API '" & api.Name & "' ..." - WSH.CurrentDirectory = api - Main - Next - WScript.Quit 0 - End If - - Select Case apilc - Case "template" apiuc = "Template" - Case "ai" apiuc = "AI" - Case "game" apiuc = "GS" - Case Else - WScript.Echo "Unknown API type." - Exit Sub - End Select - - For Each f in FSO.GetFolder("..").Files - Do ' null loop for logic short-circuit - re.Pattern = ".*\.hpp" - If Not re.Test(f) Then Exit Do - ' ScriptController has custom code, and should not be generated - If f.Name = "script_controller.hpp" Then Exit Do - re.Pattern = "script_" - bf = re.Replace(f.name, apilc & "_") - SquirrelExport apiuc, f, bf & ".tmp" - If IsEmptyFile(bf & ".tmp") Then - If FSO.FileExists(bf & ".sq") Then - WScript.Echo "Deleted: " & bf & ".sq" - FSO.DeleteFile bf & ".sq" - End If - FSO.DeleteFile bf & ".tmp" - ElseIf Not FSO.FileExists(bf & ".sq") Or Not CompareFiles(bf & ".sq", bf & ".tmp") Then - If FSO.FileExists(bf & ".sq") Then FSO.DeleteFile bf & ".sq" - FSO.MoveFile bf & ".tmp", bf & ".sq" - WScript.Echo "Updated: " & bf & ".sq" - Else - FSO.DeleteFile bf & ".tmp" - End If - Loop While False ' end of null loop - Next - - ' Remove .hpp.sq if .hpp doesn't exist anymore - For Each f in FSO.GetFolder(".").Files - Do ' null loop for logic short-circuit - re.Pattern = ".*\.hpp\.sq" - If Not re.Test(f) Then Exit Do - f = f.Name - re.Pattern = "\.hpp\.sq$" - f = re.Replace(f, ".hpp") - re.Pattern = apilc & "_" - f = re.Replace(f, "script_") - If Not FSO.FileExists("..\" & f) Then - WScript.Echo "Deleted: " & f & ".sq" - 'FSO.DeleteFile f & ".sq" - End If - Loop While False ' end of null loop - Next - - If apilc = "template" Then Exit Sub - - ' Add stuff to ${apilc}_instance.cpp - f = "..\..\..\" & apilc & "\" & apilc & "_instance.cpp" - ExportInstance apiuc, apilc, f, f & ".tmp" - If Not FSO.FileExists(f) Or Not CompareFiles(f, f & ".tmp") Then - If FSO.FileExists(f) Then FSO.DeleteFile f - FSO.MoveFile f & ".tmp", f - WScript.Echo "Updated: " & f - Else - FSO.DeleteFile f & ".tmp" - End If -End Sub - -Main diff --git a/src/script/api/template/template_accounting.hpp.sq b/src/script/api/template/template_accounting.hpp.sq deleted file mode 100644 index 06be408c9..000000000 --- a/src/script/api/template/template_accounting.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_accounting.hpp" - -namespace SQConvert { - /* Allow ScriptAccounting to be used as Squirrel parameter */ - template <> inline ScriptAccounting *GetParam(ForceType<ScriptAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAccounting *)instance; } - template <> inline ScriptAccounting &GetParam(ForceType<ScriptAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAccounting *)instance; } - template <> inline const ScriptAccounting *GetParam(ForceType<const ScriptAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAccounting *)instance; } - template <> inline const ScriptAccounting &GetParam(ForceType<const ScriptAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAccounting *)instance; } - template <> inline int Return<ScriptAccounting *>(HSQUIRRELVM vm, ScriptAccounting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Accounting", res, nullptr, DefSQDestructorCallback<ScriptAccounting>, 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 deleted file mode 100644 index 3fd8a2fac..000000000 --- a/src/script/api/template/template_admin.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_admin.hpp" - -namespace SQConvert { - /* Allow ScriptAdmin to be used as Squirrel parameter */ - template <> inline ScriptAdmin *GetParam(ForceType<ScriptAdmin *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAdmin *)instance; } - template <> inline ScriptAdmin &GetParam(ForceType<ScriptAdmin &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAdmin *)instance; } - template <> inline const ScriptAdmin *GetParam(ForceType<const ScriptAdmin *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAdmin *)instance; } - template <> inline const ScriptAdmin &GetParam(ForceType<const ScriptAdmin &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAdmin *)instance; } - template <> inline int Return<ScriptAdmin *>(HSQUIRRELVM vm, ScriptAdmin *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Admin", res, nullptr, DefSQDestructorCallback<ScriptAdmin>, 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 deleted file mode 100644 index 7f8280813..000000000 --- a/src/script/api/template/template_airport.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_airport.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptAirport::AirportType GetParam(ForceType<ScriptAirport::AirportType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptAirport::AirportType)tmp; } - template <> inline int Return<ScriptAirport::AirportType>(HSQUIRRELVM vm, ScriptAirport::AirportType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptAirport::PlaneType GetParam(ForceType<ScriptAirport::PlaneType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptAirport::PlaneType)tmp; } - template <> inline int Return<ScriptAirport::PlaneType>(HSQUIRRELVM vm, ScriptAirport::PlaneType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptAirport to be used as Squirrel parameter */ - template <> inline ScriptAirport *GetParam(ForceType<ScriptAirport *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAirport *)instance; } - template <> inline ScriptAirport &GetParam(ForceType<ScriptAirport &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAirport *)instance; } - template <> inline const ScriptAirport *GetParam(ForceType<const ScriptAirport *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptAirport *)instance; } - template <> inline const ScriptAirport &GetParam(ForceType<const ScriptAirport &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptAirport *)instance; } - template <> inline int Return<ScriptAirport *>(HSQUIRRELVM vm, ScriptAirport *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Airport", res, nullptr, DefSQDestructorCallback<ScriptAirport>, 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 deleted file mode 100644 index b2ce11548..000000000 --- a/src/script/api/template/template_base.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_base.hpp" - -namespace SQConvert { - /* Allow ScriptBase to be used as Squirrel parameter */ - template <> inline ScriptBase *GetParam(ForceType<ScriptBase *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBase *)instance; } - template <> inline ScriptBase &GetParam(ForceType<ScriptBase &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBase *)instance; } - template <> inline const ScriptBase *GetParam(ForceType<const ScriptBase *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBase *)instance; } - template <> inline const ScriptBase &GetParam(ForceType<const ScriptBase &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBase *)instance; } - template <> inline int Return<ScriptBase *>(HSQUIRRELVM vm, ScriptBase *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Base", res, nullptr, DefSQDestructorCallback<ScriptBase>, 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 deleted file mode 100644 index 297bb0c4a..000000000 --- a/src/script/api/template/template_basestation.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_basestation.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptBaseStation::SpecialStationIDs GetParam(ForceType<ScriptBaseStation::SpecialStationIDs>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptBaseStation::SpecialStationIDs)tmp; } - template <> inline int Return<ScriptBaseStation::SpecialStationIDs>(HSQUIRRELVM vm, ScriptBaseStation::SpecialStationIDs res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptBaseStation to be used as Squirrel parameter */ - template <> inline ScriptBaseStation *GetParam(ForceType<ScriptBaseStation *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBaseStation *)instance; } - template <> inline ScriptBaseStation &GetParam(ForceType<ScriptBaseStation &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBaseStation *)instance; } - template <> inline const ScriptBaseStation *GetParam(ForceType<const ScriptBaseStation *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBaseStation *)instance; } - template <> inline const ScriptBaseStation &GetParam(ForceType<const ScriptBaseStation &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBaseStation *)instance; } - template <> inline int Return<ScriptBaseStation *>(HSQUIRRELVM vm, ScriptBaseStation *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BaseStation", res, nullptr, DefSQDestructorCallback<ScriptBaseStation>, 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 deleted file mode 100644 index f3f9371d9..000000000 --- a/src/script/api/template/template_bridge.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridge.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptBridge::ErrorMessages GetParam(ForceType<ScriptBridge::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptBridge::ErrorMessages)tmp; } - template <> inline int Return<ScriptBridge::ErrorMessages>(HSQUIRRELVM vm, ScriptBridge::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptBridge to be used as Squirrel parameter */ - template <> inline ScriptBridge *GetParam(ForceType<ScriptBridge *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridge *)instance; } - template <> inline ScriptBridge &GetParam(ForceType<ScriptBridge &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridge *)instance; } - template <> inline const ScriptBridge *GetParam(ForceType<const ScriptBridge *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridge *)instance; } - template <> inline const ScriptBridge &GetParam(ForceType<const ScriptBridge &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridge *)instance; } - template <> inline int Return<ScriptBridge *>(HSQUIRRELVM vm, ScriptBridge *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Bridge", res, nullptr, DefSQDestructorCallback<ScriptBridge>, 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 deleted file mode 100644 index d007a1aee..000000000 --- a/src/script/api/template/template_bridgelist.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_bridgelist.hpp" - -namespace SQConvert { - /* Allow ScriptBridgeList to be used as Squirrel parameter */ - template <> inline ScriptBridgeList *GetParam(ForceType<ScriptBridgeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridgeList *)instance; } - template <> inline ScriptBridgeList &GetParam(ForceType<ScriptBridgeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList *)instance; } - template <> inline const ScriptBridgeList *GetParam(ForceType<const ScriptBridgeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridgeList *)instance; } - template <> inline const ScriptBridgeList &GetParam(ForceType<const ScriptBridgeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList *)instance; } - template <> inline int Return<ScriptBridgeList *>(HSQUIRRELVM vm, ScriptBridgeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList", res, nullptr, DefSQDestructorCallback<ScriptBridgeList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptBridgeList_Length to be used as Squirrel parameter */ - template <> inline ScriptBridgeList_Length *GetParam(ForceType<ScriptBridgeList_Length *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptBridgeList_Length *)instance; } - template <> inline ScriptBridgeList_Length &GetParam(ForceType<ScriptBridgeList_Length &>, 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<const ScriptBridgeList_Length *>, 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<const ScriptBridgeList_Length &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptBridgeList_Length *)instance; } - template <> inline int Return<ScriptBridgeList_Length *>(HSQUIRRELVM vm, ScriptBridgeList_Length *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "BridgeList_Length", res, nullptr, DefSQDestructorCallback<ScriptBridgeList_Length>, 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 deleted file mode 100644 index 5d46fdd37..000000000 --- a/src/script/api/template/template_cargo.hpp.sq +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargo.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptCargo::CargoClass GetParam(ForceType<ScriptCargo::CargoClass>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCargo::CargoClass)tmp; } - template <> inline int Return<ScriptCargo::CargoClass>(HSQUIRRELVM vm, ScriptCargo::CargoClass res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCargo::TownEffect GetParam(ForceType<ScriptCargo::TownEffect>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCargo::TownEffect)tmp; } - template <> inline int Return<ScriptCargo::TownEffect>(HSQUIRRELVM vm, ScriptCargo::TownEffect res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCargo::SpecialCargoID GetParam(ForceType<ScriptCargo::SpecialCargoID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCargo::SpecialCargoID)tmp; } - template <> inline int Return<ScriptCargo::SpecialCargoID>(HSQUIRRELVM vm, ScriptCargo::SpecialCargoID res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCargo::DistributionType GetParam(ForceType<ScriptCargo::DistributionType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCargo::DistributionType)tmp; } - template <> inline int Return<ScriptCargo::DistributionType>(HSQUIRRELVM vm, ScriptCargo::DistributionType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptCargo to be used as Squirrel parameter */ - template <> inline ScriptCargo *GetParam(ForceType<ScriptCargo *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargo *)instance; } - template <> inline ScriptCargo &GetParam(ForceType<ScriptCargo &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargo *)instance; } - template <> inline const ScriptCargo *GetParam(ForceType<const ScriptCargo *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargo *)instance; } - template <> inline const ScriptCargo &GetParam(ForceType<const ScriptCargo &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargo *)instance; } - template <> inline int Return<ScriptCargo *>(HSQUIRRELVM vm, ScriptCargo *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Cargo", res, nullptr, DefSQDestructorCallback<ScriptCargo>, 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 deleted file mode 100644 index 394d20f91..000000000 --- a/src/script/api/template/template_cargolist.hpp.sq +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargolist.hpp" - -namespace SQConvert { - /* Allow ScriptCargoList to be used as Squirrel parameter */ - template <> inline ScriptCargoList *GetParam(ForceType<ScriptCargoList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList *)instance; } - template <> inline ScriptCargoList &GetParam(ForceType<ScriptCargoList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; } - template <> inline const ScriptCargoList *GetParam(ForceType<const ScriptCargoList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList *)instance; } - template <> inline const ScriptCargoList &GetParam(ForceType<const ScriptCargoList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; } - template <> inline int Return<ScriptCargoList *>(HSQUIRRELVM vm, ScriptCargoList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList", res, nullptr, DefSQDestructorCallback<ScriptCargoList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptCargoList_IndustryAccepting to be used as Squirrel parameter */ - template <> inline ScriptCargoList_IndustryAccepting *GetParam(ForceType<ScriptCargoList_IndustryAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_IndustryAccepting *)instance; } - template <> inline ScriptCargoList_IndustryAccepting &GetParam(ForceType<ScriptCargoList_IndustryAccepting &>, 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<const ScriptCargoList_IndustryAccepting *>, 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<const ScriptCargoList_IndustryAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryAccepting *)instance; } - template <> inline int Return<ScriptCargoList_IndustryAccepting *>(HSQUIRRELVM vm, ScriptCargoList_IndustryAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryAccepting", res, nullptr, DefSQDestructorCallback<ScriptCargoList_IndustryAccepting>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptCargoList_IndustryProducing to be used as Squirrel parameter */ - template <> inline ScriptCargoList_IndustryProducing *GetParam(ForceType<ScriptCargoList_IndustryProducing *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_IndustryProducing *)instance; } - template <> inline ScriptCargoList_IndustryProducing &GetParam(ForceType<ScriptCargoList_IndustryProducing &>, 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<const ScriptCargoList_IndustryProducing *>, 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<const ScriptCargoList_IndustryProducing &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryProducing *)instance; } - template <> inline int Return<ScriptCargoList_IndustryProducing *>(HSQUIRRELVM vm, ScriptCargoList_IndustryProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryProducing", res, nullptr, DefSQDestructorCallback<ScriptCargoList_IndustryProducing>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptCargoList_StationAccepting to be used as Squirrel parameter */ - template <> inline ScriptCargoList_StationAccepting *GetParam(ForceType<ScriptCargoList_StationAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoList_StationAccepting *)instance; } - template <> inline ScriptCargoList_StationAccepting &GetParam(ForceType<ScriptCargoList_StationAccepting &>, 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<const ScriptCargoList_StationAccepting *>, 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<const ScriptCargoList_StationAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_StationAccepting *)instance; } - template <> inline int Return<ScriptCargoList_StationAccepting *>(HSQUIRRELVM vm, ScriptCargoList_StationAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_StationAccepting", res, nullptr, DefSQDestructorCallback<ScriptCargoList_StationAccepting>, 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 deleted file mode 100644 index 6d6965777..000000000 --- a/src/script/api/template/template_cargomonitor.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_cargomonitor.hpp" - -namespace SQConvert { - /* Allow ScriptCargoMonitor to be used as Squirrel parameter */ - template <> inline ScriptCargoMonitor *GetParam(ForceType<ScriptCargoMonitor *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoMonitor *)instance; } - template <> inline ScriptCargoMonitor &GetParam(ForceType<ScriptCargoMonitor &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoMonitor *)instance; } - template <> inline const ScriptCargoMonitor *GetParam(ForceType<const ScriptCargoMonitor *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCargoMonitor *)instance; } - template <> inline const ScriptCargoMonitor &GetParam(ForceType<const ScriptCargoMonitor &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoMonitor *)instance; } - template <> inline int Return<ScriptCargoMonitor *>(HSQUIRRELVM vm, ScriptCargoMonitor *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoMonitor", res, nullptr, DefSQDestructorCallback<ScriptCargoMonitor>, 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 deleted file mode 100644 index c37bd9a6e..000000000 --- a/src/script/api/template/template_client.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_client.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptClient::ClientID GetParam(ForceType<ScriptClient::ClientID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptClient::ClientID)tmp; } - template <> inline int Return<ScriptClient::ClientID>(HSQUIRRELVM vm, ScriptClient::ClientID res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptClient to be used as Squirrel parameter */ - template <> inline ScriptClient *GetParam(ForceType<ScriptClient *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClient *)instance; } - template <> inline ScriptClient &GetParam(ForceType<ScriptClient &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } - template <> inline const ScriptClient *GetParam(ForceType<const ScriptClient *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClient *)instance; } - template <> inline const ScriptClient &GetParam(ForceType<const ScriptClient &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClient *)instance; } - template <> inline int Return<ScriptClient *>(HSQUIRRELVM vm, ScriptClient *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Client", res, nullptr, DefSQDestructorCallback<ScriptClient>, 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 deleted file mode 100644 index 7021a59cd..000000000 --- a/src/script/api/template/template_clientlist.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_clientlist.hpp" - -namespace SQConvert { - /* Allow ScriptClientList to be used as Squirrel parameter */ - template <> inline ScriptClientList *GetParam(ForceType<ScriptClientList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList *)instance; } - template <> inline ScriptClientList &GetParam(ForceType<ScriptClientList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } - template <> inline const ScriptClientList *GetParam(ForceType<const ScriptClientList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList *)instance; } - template <> inline const ScriptClientList &GetParam(ForceType<const ScriptClientList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList *)instance; } - template <> inline int Return<ScriptClientList *>(HSQUIRRELVM vm, ScriptClientList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList", res, nullptr, DefSQDestructorCallback<ScriptClientList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptClientList_Company to be used as Squirrel parameter */ - template <> inline ScriptClientList_Company *GetParam(ForceType<ScriptClientList_Company *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptClientList_Company *)instance; } - template <> inline ScriptClientList_Company &GetParam(ForceType<ScriptClientList_Company &>, 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<const ScriptClientList_Company *>, 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<const ScriptClientList_Company &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptClientList_Company *)instance; } - template <> inline int Return<ScriptClientList_Company *>(HSQUIRRELVM vm, ScriptClientList_Company *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ClientList_Company", res, nullptr, DefSQDestructorCallback<ScriptClientList_Company>, 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 deleted file mode 100644 index 97461448a..000000000 --- a/src/script/api/template/template_company.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_company.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptCompany::Quarter GetParam(ForceType<ScriptCompany::Quarter>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::Quarter)tmp; } - template <> inline int Return<ScriptCompany::Quarter>(HSQUIRRELVM vm, ScriptCompany::Quarter res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCompany::CompanyID GetParam(ForceType<ScriptCompany::CompanyID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::CompanyID)tmp; } - template <> inline int Return<ScriptCompany::CompanyID>(HSQUIRRELVM vm, ScriptCompany::CompanyID res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCompany::Gender GetParam(ForceType<ScriptCompany::Gender>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::Gender)tmp; } - template <> inline int Return<ScriptCompany::Gender>(HSQUIRRELVM vm, ScriptCompany::Gender res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCompany::LiveryScheme GetParam(ForceType<ScriptCompany::LiveryScheme>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::LiveryScheme)tmp; } - template <> inline int Return<ScriptCompany::LiveryScheme>(HSQUIRRELVM vm, ScriptCompany::LiveryScheme res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCompany::Colours GetParam(ForceType<ScriptCompany::Colours>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::Colours)tmp; } - template <> inline int Return<ScriptCompany::Colours>(HSQUIRRELVM vm, ScriptCompany::Colours res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptCompany::ExpensesType GetParam(ForceType<ScriptCompany::ExpensesType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::ExpensesType)tmp; } - template <> inline int Return<ScriptCompany::ExpensesType>(HSQUIRRELVM vm, ScriptCompany::ExpensesType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptCompany to be used as Squirrel parameter */ - template <> inline ScriptCompany *GetParam(ForceType<ScriptCompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompany *)instance; } - template <> inline ScriptCompany &GetParam(ForceType<ScriptCompany &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompany *)instance; } - template <> inline const ScriptCompany *GetParam(ForceType<const ScriptCompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompany *)instance; } - template <> inline const ScriptCompany &GetParam(ForceType<const ScriptCompany &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompany *)instance; } - template <> inline int Return<ScriptCompany *>(HSQUIRRELVM vm, ScriptCompany *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Company", res, nullptr, DefSQDestructorCallback<ScriptCompany>, 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 deleted file mode 100644 index aa3edd6b7..000000000 --- a/src/script/api/template/template_companymode.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_companymode.hpp" - -namespace SQConvert { - /* Allow ScriptCompanyMode to be used as Squirrel parameter */ - template <> inline ScriptCompanyMode *GetParam(ForceType<ScriptCompanyMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompanyMode *)instance; } - template <> inline ScriptCompanyMode &GetParam(ForceType<ScriptCompanyMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompanyMode *)instance; } - template <> inline const ScriptCompanyMode *GetParam(ForceType<const ScriptCompanyMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompanyMode *)instance; } - template <> inline const ScriptCompanyMode &GetParam(ForceType<const ScriptCompanyMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCompanyMode *)instance; } - template <> inline int Return<ScriptCompanyMode *>(HSQUIRRELVM vm, ScriptCompanyMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CompanyMode", res, nullptr, DefSQDestructorCallback<ScriptCompanyMode>, 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 deleted file mode 100644 index 747ead207..000000000 --- a/src/script/api/template/template_date.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_date.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptDate::Date GetParam(ForceType<ScriptDate::Date>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptDate::Date)tmp; } - template <> inline int Return<ScriptDate::Date>(HSQUIRRELVM vm, ScriptDate::Date res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptDate to be used as Squirrel parameter */ - template <> inline ScriptDate *GetParam(ForceType<ScriptDate *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDate *)instance; } - template <> inline ScriptDate &GetParam(ForceType<ScriptDate &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDate *)instance; } - template <> inline const ScriptDate *GetParam(ForceType<const ScriptDate *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDate *)instance; } - template <> inline const ScriptDate &GetParam(ForceType<const ScriptDate &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDate *)instance; } - template <> inline int Return<ScriptDate *>(HSQUIRRELVM vm, ScriptDate *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Date", res, nullptr, DefSQDestructorCallback<ScriptDate>, 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 deleted file mode 100644 index 9981f80ce..000000000 --- a/src/script/api/template/template_depotlist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_depotlist.hpp" - -namespace SQConvert { - /* Allow ScriptDepotList to be used as Squirrel parameter */ - template <> inline ScriptDepotList *GetParam(ForceType<ScriptDepotList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDepotList *)instance; } - template <> inline ScriptDepotList &GetParam(ForceType<ScriptDepotList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDepotList *)instance; } - template <> inline const ScriptDepotList *GetParam(ForceType<const ScriptDepotList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptDepotList *)instance; } - template <> inline const ScriptDepotList &GetParam(ForceType<const ScriptDepotList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptDepotList *)instance; } - template <> inline int Return<ScriptDepotList *>(HSQUIRRELVM vm, ScriptDepotList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "DepotList", res, nullptr, DefSQDestructorCallback<ScriptDepotList>, 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 deleted file mode 100644 index 4ae741eac..000000000 --- a/src/script/api/template/template_engine.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_engine.hpp" - -namespace SQConvert { - /* Allow ScriptEngine to be used as Squirrel parameter */ - template <> inline ScriptEngine *GetParam(ForceType<ScriptEngine *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngine *)instance; } - template <> inline ScriptEngine &GetParam(ForceType<ScriptEngine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } - template <> inline const ScriptEngine *GetParam(ForceType<const ScriptEngine *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngine *)instance; } - template <> inline const ScriptEngine &GetParam(ForceType<const ScriptEngine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } - template <> inline int Return<ScriptEngine *>(HSQUIRRELVM vm, ScriptEngine *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Engine", res, nullptr, DefSQDestructorCallback<ScriptEngine>, 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 deleted file mode 100644 index 3e98f9c8a..000000000 --- a/src/script/api/template/template_enginelist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_enginelist.hpp" - -namespace SQConvert { - /* Allow ScriptEngineList to be used as Squirrel parameter */ - template <> inline ScriptEngineList *GetParam(ForceType<ScriptEngineList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngineList *)instance; } - template <> inline ScriptEngineList &GetParam(ForceType<ScriptEngineList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngineList *)instance; } - template <> inline const ScriptEngineList *GetParam(ForceType<const ScriptEngineList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngineList *)instance; } - template <> inline const ScriptEngineList &GetParam(ForceType<const ScriptEngineList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngineList *)instance; } - template <> inline int Return<ScriptEngineList *>(HSQUIRRELVM vm, ScriptEngineList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EngineList", res, nullptr, DefSQDestructorCallback<ScriptEngineList>, 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 deleted file mode 100644 index 99b37eafe..000000000 --- a/src/script/api/template/template_error.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_error.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptError::ErrorCategories GetParam(ForceType<ScriptError::ErrorCategories>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptError::ErrorCategories)tmp; } - template <> inline int Return<ScriptError::ErrorCategories>(HSQUIRRELVM vm, ScriptError::ErrorCategories res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptError::ErrorMessages GetParam(ForceType<ScriptError::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptError::ErrorMessages)tmp; } - template <> inline int Return<ScriptError::ErrorMessages>(HSQUIRRELVM vm, ScriptError::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptError to be used as Squirrel parameter */ - template <> inline ScriptError *GetParam(ForceType<ScriptError *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptError *)instance; } - template <> inline ScriptError &GetParam(ForceType<ScriptError &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptError *)instance; } - template <> inline const ScriptError *GetParam(ForceType<const ScriptError *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptError *)instance; } - template <> inline const ScriptError &GetParam(ForceType<const ScriptError &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptError *)instance; } - template <> inline int Return<ScriptError *>(HSQUIRRELVM vm, ScriptError *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Error", res, nullptr, DefSQDestructorCallback<ScriptError>, 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 deleted file mode 100644 index 38ba818b4..000000000 --- a/src/script/api/template/template_event.hpp.sq +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptEvent::ScriptEventType GetParam(ForceType<ScriptEvent::ScriptEventType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptEvent::ScriptEventType)tmp; } - template <> inline int Return<ScriptEvent::ScriptEventType>(HSQUIRRELVM vm, ScriptEvent::ScriptEventType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptEvent to be used as Squirrel parameter */ - template <> inline ScriptEvent *GetParam(ForceType<ScriptEvent *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEvent *)instance; } - template <> inline ScriptEvent &GetParam(ForceType<ScriptEvent &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEvent *)instance; } - template <> inline const ScriptEvent *GetParam(ForceType<const ScriptEvent *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEvent *)instance; } - template <> inline const ScriptEvent &GetParam(ForceType<const ScriptEvent &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEvent *)instance; } - template <> inline int Return<ScriptEvent *>(HSQUIRRELVM vm, ScriptEvent *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "Event", res, nullptr, DefSQDestructorCallback<ScriptEvent>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventController to be used as Squirrel parameter */ - template <> inline ScriptEventController *GetParam(ForceType<ScriptEventController *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventController *)instance; } - template <> inline ScriptEventController &GetParam(ForceType<ScriptEventController &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventController *)instance; } - template <> inline const ScriptEventController *GetParam(ForceType<const ScriptEventController *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventController *)instance; } - template <> inline const ScriptEventController &GetParam(ForceType<const ScriptEventController &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventController *)instance; } - template <> inline int Return<ScriptEventController *>(HSQUIRRELVM vm, ScriptEventController *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventController", res, nullptr, DefSQDestructorCallback<ScriptEventController>, 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 deleted file mode 100644 index 4e82de63c..000000000 --- a/src/script/api/template/template_event_types.hpp.sq +++ /dev/null @@ -1,302 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_event_types.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptEventVehicleCrashed::CrashReason GetParam(ForceType<ScriptEventVehicleCrashed::CrashReason>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptEventVehicleCrashed::CrashReason)tmp; } - template <> inline int Return<ScriptEventVehicleCrashed::CrashReason>(HSQUIRRELVM vm, ScriptEventVehicleCrashed::CrashReason res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptEventVehicleCrashed to be used as Squirrel parameter */ - template <> inline ScriptEventVehicleCrashed *GetParam(ForceType<ScriptEventVehicleCrashed *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleCrashed *)instance; } - template <> inline ScriptEventVehicleCrashed &GetParam(ForceType<ScriptEventVehicleCrashed &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleCrashed *)instance; } - template <> inline const ScriptEventVehicleCrashed *GetParam(ForceType<const ScriptEventVehicleCrashed *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleCrashed *)instance; } - template <> inline const ScriptEventVehicleCrashed &GetParam(ForceType<const ScriptEventVehicleCrashed &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleCrashed *)instance; } - template <> inline int Return<ScriptEventVehicleCrashed *>(HSQUIRRELVM vm, ScriptEventVehicleCrashed *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleCrashed", res, nullptr, DefSQDestructorCallback<ScriptEventVehicleCrashed>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventSubsidyOffer to be used as Squirrel parameter */ - template <> inline ScriptEventSubsidyOffer *GetParam(ForceType<ScriptEventSubsidyOffer *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOffer *)instance; } - template <> inline ScriptEventSubsidyOffer &GetParam(ForceType<ScriptEventSubsidyOffer &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOffer *)instance; } - template <> inline const ScriptEventSubsidyOffer *GetParam(ForceType<const ScriptEventSubsidyOffer *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOffer *)instance; } - template <> inline const ScriptEventSubsidyOffer &GetParam(ForceType<const ScriptEventSubsidyOffer &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOffer *)instance; } - template <> inline int Return<ScriptEventSubsidyOffer *>(HSQUIRRELVM vm, ScriptEventSubsidyOffer *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOffer", res, nullptr, DefSQDestructorCallback<ScriptEventSubsidyOffer>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventSubsidyOfferExpired to be used as Squirrel parameter */ - template <> inline ScriptEventSubsidyOfferExpired *GetParam(ForceType<ScriptEventSubsidyOfferExpired *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOfferExpired *)instance; } - template <> inline ScriptEventSubsidyOfferExpired &GetParam(ForceType<ScriptEventSubsidyOfferExpired &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOfferExpired *)instance; } - template <> inline const ScriptEventSubsidyOfferExpired *GetParam(ForceType<const ScriptEventSubsidyOfferExpired *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyOfferExpired *)instance; } - template <> inline const ScriptEventSubsidyOfferExpired &GetParam(ForceType<const ScriptEventSubsidyOfferExpired &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyOfferExpired *)instance; } - template <> inline int Return<ScriptEventSubsidyOfferExpired *>(HSQUIRRELVM vm, ScriptEventSubsidyOfferExpired *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyOfferExpired", res, nullptr, DefSQDestructorCallback<ScriptEventSubsidyOfferExpired>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventSubsidyAwarded to be used as Squirrel parameter */ - template <> inline ScriptEventSubsidyAwarded *GetParam(ForceType<ScriptEventSubsidyAwarded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyAwarded *)instance; } - template <> inline ScriptEventSubsidyAwarded &GetParam(ForceType<ScriptEventSubsidyAwarded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyAwarded *)instance; } - template <> inline const ScriptEventSubsidyAwarded *GetParam(ForceType<const ScriptEventSubsidyAwarded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyAwarded *)instance; } - template <> inline const ScriptEventSubsidyAwarded &GetParam(ForceType<const ScriptEventSubsidyAwarded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyAwarded *)instance; } - template <> inline int Return<ScriptEventSubsidyAwarded *>(HSQUIRRELVM vm, ScriptEventSubsidyAwarded *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyAwarded", res, nullptr, DefSQDestructorCallback<ScriptEventSubsidyAwarded>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventSubsidyExpired to be used as Squirrel parameter */ - template <> inline ScriptEventSubsidyExpired *GetParam(ForceType<ScriptEventSubsidyExpired *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyExpired *)instance; } - template <> inline ScriptEventSubsidyExpired &GetParam(ForceType<ScriptEventSubsidyExpired &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyExpired *)instance; } - template <> inline const ScriptEventSubsidyExpired *GetParam(ForceType<const ScriptEventSubsidyExpired *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventSubsidyExpired *)instance; } - template <> inline const ScriptEventSubsidyExpired &GetParam(ForceType<const ScriptEventSubsidyExpired &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventSubsidyExpired *)instance; } - template <> inline int Return<ScriptEventSubsidyExpired *>(HSQUIRRELVM vm, ScriptEventSubsidyExpired *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventSubsidyExpired", res, nullptr, DefSQDestructorCallback<ScriptEventSubsidyExpired>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventEnginePreview to be used as Squirrel parameter */ - template <> inline ScriptEventEnginePreview *GetParam(ForceType<ScriptEventEnginePreview *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEnginePreview *)instance; } - template <> inline ScriptEventEnginePreview &GetParam(ForceType<ScriptEventEnginePreview &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEnginePreview *)instance; } - template <> inline const ScriptEventEnginePreview *GetParam(ForceType<const ScriptEventEnginePreview *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEnginePreview *)instance; } - template <> inline const ScriptEventEnginePreview &GetParam(ForceType<const ScriptEventEnginePreview &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEnginePreview *)instance; } - template <> inline int Return<ScriptEventEnginePreview *>(HSQUIRRELVM vm, ScriptEventEnginePreview *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEnginePreview", res, nullptr, DefSQDestructorCallback<ScriptEventEnginePreview>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyNew to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyNew *GetParam(ForceType<ScriptEventCompanyNew *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyNew *)instance; } - template <> inline ScriptEventCompanyNew &GetParam(ForceType<ScriptEventCompanyNew &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyNew *)instance; } - template <> inline const ScriptEventCompanyNew *GetParam(ForceType<const ScriptEventCompanyNew *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyNew *)instance; } - template <> inline const ScriptEventCompanyNew &GetParam(ForceType<const ScriptEventCompanyNew &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyNew *)instance; } - template <> inline int Return<ScriptEventCompanyNew *>(HSQUIRRELVM vm, ScriptEventCompanyNew *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyNew", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyNew>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyInTrouble to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyInTrouble *GetParam(ForceType<ScriptEventCompanyInTrouble *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyInTrouble *)instance; } - template <> inline ScriptEventCompanyInTrouble &GetParam(ForceType<ScriptEventCompanyInTrouble &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyInTrouble *)instance; } - template <> inline const ScriptEventCompanyInTrouble *GetParam(ForceType<const ScriptEventCompanyInTrouble *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyInTrouble *)instance; } - template <> inline const ScriptEventCompanyInTrouble &GetParam(ForceType<const ScriptEventCompanyInTrouble &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyInTrouble *)instance; } - template <> inline int Return<ScriptEventCompanyInTrouble *>(HSQUIRRELVM vm, ScriptEventCompanyInTrouble *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyInTrouble", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyInTrouble>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyAskMerger to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyAskMerger *GetParam(ForceType<ScriptEventCompanyAskMerger *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyAskMerger *)instance; } - template <> inline ScriptEventCompanyAskMerger &GetParam(ForceType<ScriptEventCompanyAskMerger &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyAskMerger *)instance; } - template <> inline const ScriptEventCompanyAskMerger *GetParam(ForceType<const ScriptEventCompanyAskMerger *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyAskMerger *)instance; } - template <> inline const ScriptEventCompanyAskMerger &GetParam(ForceType<const ScriptEventCompanyAskMerger &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyAskMerger *)instance; } - template <> inline int Return<ScriptEventCompanyAskMerger *>(HSQUIRRELVM vm, ScriptEventCompanyAskMerger *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyAskMerger", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyAskMerger>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyMerger to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyMerger *GetParam(ForceType<ScriptEventCompanyMerger *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyMerger *)instance; } - template <> inline ScriptEventCompanyMerger &GetParam(ForceType<ScriptEventCompanyMerger &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyMerger *)instance; } - template <> inline const ScriptEventCompanyMerger *GetParam(ForceType<const ScriptEventCompanyMerger *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyMerger *)instance; } - template <> inline const ScriptEventCompanyMerger &GetParam(ForceType<const ScriptEventCompanyMerger &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyMerger *)instance; } - template <> inline int Return<ScriptEventCompanyMerger *>(HSQUIRRELVM vm, ScriptEventCompanyMerger *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyMerger", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyMerger>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyBankrupt to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyBankrupt *GetParam(ForceType<ScriptEventCompanyBankrupt *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyBankrupt *)instance; } - template <> inline ScriptEventCompanyBankrupt &GetParam(ForceType<ScriptEventCompanyBankrupt &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyBankrupt *)instance; } - template <> inline const ScriptEventCompanyBankrupt *GetParam(ForceType<const ScriptEventCompanyBankrupt *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyBankrupt *)instance; } - template <> inline const ScriptEventCompanyBankrupt &GetParam(ForceType<const ScriptEventCompanyBankrupt &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyBankrupt *)instance; } - template <> inline int Return<ScriptEventCompanyBankrupt *>(HSQUIRRELVM vm, ScriptEventCompanyBankrupt *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyBankrupt", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyBankrupt>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventVehicleLost to be used as Squirrel parameter */ - template <> inline ScriptEventVehicleLost *GetParam(ForceType<ScriptEventVehicleLost *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleLost *)instance; } - template <> inline ScriptEventVehicleLost &GetParam(ForceType<ScriptEventVehicleLost &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleLost *)instance; } - template <> inline const ScriptEventVehicleLost *GetParam(ForceType<const ScriptEventVehicleLost *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleLost *)instance; } - template <> inline const ScriptEventVehicleLost &GetParam(ForceType<const ScriptEventVehicleLost &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleLost *)instance; } - template <> inline int Return<ScriptEventVehicleLost *>(HSQUIRRELVM vm, ScriptEventVehicleLost *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleLost", res, nullptr, DefSQDestructorCallback<ScriptEventVehicleLost>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventVehicleWaitingInDepot to be used as Squirrel parameter */ - template <> inline ScriptEventVehicleWaitingInDepot *GetParam(ForceType<ScriptEventVehicleWaitingInDepot *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleWaitingInDepot *)instance; } - template <> inline ScriptEventVehicleWaitingInDepot &GetParam(ForceType<ScriptEventVehicleWaitingInDepot &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleWaitingInDepot *)instance; } - template <> inline const ScriptEventVehicleWaitingInDepot *GetParam(ForceType<const ScriptEventVehicleWaitingInDepot *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleWaitingInDepot *)instance; } - template <> inline const ScriptEventVehicleWaitingInDepot &GetParam(ForceType<const ScriptEventVehicleWaitingInDepot &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleWaitingInDepot *)instance; } - template <> inline int Return<ScriptEventVehicleWaitingInDepot *>(HSQUIRRELVM vm, ScriptEventVehicleWaitingInDepot *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleWaitingInDepot", res, nullptr, DefSQDestructorCallback<ScriptEventVehicleWaitingInDepot>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventVehicleUnprofitable to be used as Squirrel parameter */ - template <> inline ScriptEventVehicleUnprofitable *GetParam(ForceType<ScriptEventVehicleUnprofitable *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleUnprofitable *)instance; } - template <> inline ScriptEventVehicleUnprofitable &GetParam(ForceType<ScriptEventVehicleUnprofitable &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleUnprofitable *)instance; } - template <> inline const ScriptEventVehicleUnprofitable *GetParam(ForceType<const ScriptEventVehicleUnprofitable *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleUnprofitable *)instance; } - template <> inline const ScriptEventVehicleUnprofitable &GetParam(ForceType<const ScriptEventVehicleUnprofitable &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleUnprofitable *)instance; } - template <> inline int Return<ScriptEventVehicleUnprofitable *>(HSQUIRRELVM vm, ScriptEventVehicleUnprofitable *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleUnprofitable", res, nullptr, DefSQDestructorCallback<ScriptEventVehicleUnprofitable>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventIndustryOpen to be used as Squirrel parameter */ - template <> inline ScriptEventIndustryOpen *GetParam(ForceType<ScriptEventIndustryOpen *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryOpen *)instance; } - template <> inline ScriptEventIndustryOpen &GetParam(ForceType<ScriptEventIndustryOpen &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryOpen *)instance; } - template <> inline const ScriptEventIndustryOpen *GetParam(ForceType<const ScriptEventIndustryOpen *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryOpen *)instance; } - template <> inline const ScriptEventIndustryOpen &GetParam(ForceType<const ScriptEventIndustryOpen &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryOpen *)instance; } - template <> inline int Return<ScriptEventIndustryOpen *>(HSQUIRRELVM vm, ScriptEventIndustryOpen *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryOpen", res, nullptr, DefSQDestructorCallback<ScriptEventIndustryOpen>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventIndustryClose to be used as Squirrel parameter */ - template <> inline ScriptEventIndustryClose *GetParam(ForceType<ScriptEventIndustryClose *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryClose *)instance; } - template <> inline ScriptEventIndustryClose &GetParam(ForceType<ScriptEventIndustryClose &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryClose *)instance; } - template <> inline const ScriptEventIndustryClose *GetParam(ForceType<const ScriptEventIndustryClose *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventIndustryClose *)instance; } - template <> inline const ScriptEventIndustryClose &GetParam(ForceType<const ScriptEventIndustryClose &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventIndustryClose *)instance; } - template <> inline int Return<ScriptEventIndustryClose *>(HSQUIRRELVM vm, ScriptEventIndustryClose *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventIndustryClose", res, nullptr, DefSQDestructorCallback<ScriptEventIndustryClose>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventEngineAvailable to be used as Squirrel parameter */ - template <> inline ScriptEventEngineAvailable *GetParam(ForceType<ScriptEventEngineAvailable *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEngineAvailable *)instance; } - template <> inline ScriptEventEngineAvailable &GetParam(ForceType<ScriptEventEngineAvailable &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEngineAvailable *)instance; } - template <> inline const ScriptEventEngineAvailable *GetParam(ForceType<const ScriptEventEngineAvailable *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventEngineAvailable *)instance; } - template <> inline const ScriptEventEngineAvailable &GetParam(ForceType<const ScriptEventEngineAvailable &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventEngineAvailable *)instance; } - template <> inline int Return<ScriptEventEngineAvailable *>(HSQUIRRELVM vm, ScriptEventEngineAvailable *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventEngineAvailable", res, nullptr, DefSQDestructorCallback<ScriptEventEngineAvailable>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventStationFirstVehicle to be used as Squirrel parameter */ - template <> inline ScriptEventStationFirstVehicle *GetParam(ForceType<ScriptEventStationFirstVehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStationFirstVehicle *)instance; } - template <> inline ScriptEventStationFirstVehicle &GetParam(ForceType<ScriptEventStationFirstVehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStationFirstVehicle *)instance; } - template <> inline const ScriptEventStationFirstVehicle *GetParam(ForceType<const ScriptEventStationFirstVehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStationFirstVehicle *)instance; } - template <> inline const ScriptEventStationFirstVehicle &GetParam(ForceType<const ScriptEventStationFirstVehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStationFirstVehicle *)instance; } - template <> inline int Return<ScriptEventStationFirstVehicle *>(HSQUIRRELVM vm, ScriptEventStationFirstVehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStationFirstVehicle", res, nullptr, DefSQDestructorCallback<ScriptEventStationFirstVehicle>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventDisasterZeppelinerCrashed to be used as Squirrel parameter */ - template <> inline ScriptEventDisasterZeppelinerCrashed *GetParam(ForceType<ScriptEventDisasterZeppelinerCrashed *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCrashed *)instance; } - template <> inline ScriptEventDisasterZeppelinerCrashed &GetParam(ForceType<ScriptEventDisasterZeppelinerCrashed &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCrashed *)instance; } - template <> inline const ScriptEventDisasterZeppelinerCrashed *GetParam(ForceType<const ScriptEventDisasterZeppelinerCrashed *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCrashed *)instance; } - template <> inline const ScriptEventDisasterZeppelinerCrashed &GetParam(ForceType<const ScriptEventDisasterZeppelinerCrashed &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCrashed *)instance; } - template <> inline int Return<ScriptEventDisasterZeppelinerCrashed *>(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCrashed *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCrashed", res, nullptr, DefSQDestructorCallback<ScriptEventDisasterZeppelinerCrashed>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventDisasterZeppelinerCleared to be used as Squirrel parameter */ - template <> inline ScriptEventDisasterZeppelinerCleared *GetParam(ForceType<ScriptEventDisasterZeppelinerCleared *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCleared *)instance; } - template <> inline ScriptEventDisasterZeppelinerCleared &GetParam(ForceType<ScriptEventDisasterZeppelinerCleared &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCleared *)instance; } - template <> inline const ScriptEventDisasterZeppelinerCleared *GetParam(ForceType<const ScriptEventDisasterZeppelinerCleared *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventDisasterZeppelinerCleared *)instance; } - template <> inline const ScriptEventDisasterZeppelinerCleared &GetParam(ForceType<const ScriptEventDisasterZeppelinerCleared &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventDisasterZeppelinerCleared *)instance; } - template <> inline int Return<ScriptEventDisasterZeppelinerCleared *>(HSQUIRRELVM vm, ScriptEventDisasterZeppelinerCleared *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventDisasterZeppelinerCleared", res, nullptr, DefSQDestructorCallback<ScriptEventDisasterZeppelinerCleared>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventTownFounded to be used as Squirrel parameter */ - template <> inline ScriptEventTownFounded *GetParam(ForceType<ScriptEventTownFounded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventTownFounded *)instance; } - template <> inline ScriptEventTownFounded &GetParam(ForceType<ScriptEventTownFounded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventTownFounded *)instance; } - template <> inline const ScriptEventTownFounded *GetParam(ForceType<const ScriptEventTownFounded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventTownFounded *)instance; } - template <> inline const ScriptEventTownFounded &GetParam(ForceType<const ScriptEventTownFounded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventTownFounded *)instance; } - template <> inline int Return<ScriptEventTownFounded *>(HSQUIRRELVM vm, ScriptEventTownFounded *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventTownFounded", res, nullptr, DefSQDestructorCallback<ScriptEventTownFounded>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventAircraftDestTooFar to be used as Squirrel parameter */ - template <> inline ScriptEventAircraftDestTooFar *GetParam(ForceType<ScriptEventAircraftDestTooFar *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAircraftDestTooFar *)instance; } - template <> inline ScriptEventAircraftDestTooFar &GetParam(ForceType<ScriptEventAircraftDestTooFar &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAircraftDestTooFar *)instance; } - template <> inline const ScriptEventAircraftDestTooFar *GetParam(ForceType<const ScriptEventAircraftDestTooFar *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAircraftDestTooFar *)instance; } - template <> inline const ScriptEventAircraftDestTooFar &GetParam(ForceType<const ScriptEventAircraftDestTooFar &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAircraftDestTooFar *)instance; } - template <> inline int Return<ScriptEventAircraftDestTooFar *>(HSQUIRRELVM vm, ScriptEventAircraftDestTooFar *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAircraftDestTooFar", res, nullptr, DefSQDestructorCallback<ScriptEventAircraftDestTooFar>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventAdminPort to be used as Squirrel parameter */ - template <> inline ScriptEventAdminPort *GetParam(ForceType<ScriptEventAdminPort *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAdminPort *)instance; } - template <> inline ScriptEventAdminPort &GetParam(ForceType<ScriptEventAdminPort &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAdminPort *)instance; } - template <> inline const ScriptEventAdminPort *GetParam(ForceType<const ScriptEventAdminPort *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventAdminPort *)instance; } - template <> inline const ScriptEventAdminPort &GetParam(ForceType<const ScriptEventAdminPort &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventAdminPort *)instance; } - template <> inline int Return<ScriptEventAdminPort *>(HSQUIRRELVM vm, ScriptEventAdminPort *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventAdminPort", res, nullptr, DefSQDestructorCallback<ScriptEventAdminPort>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventWindowWidgetClick to be used as Squirrel parameter */ - template <> inline ScriptEventWindowWidgetClick *GetParam(ForceType<ScriptEventWindowWidgetClick *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventWindowWidgetClick *)instance; } - template <> inline ScriptEventWindowWidgetClick &GetParam(ForceType<ScriptEventWindowWidgetClick &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventWindowWidgetClick *)instance; } - template <> inline const ScriptEventWindowWidgetClick *GetParam(ForceType<const ScriptEventWindowWidgetClick *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventWindowWidgetClick *)instance; } - template <> inline const ScriptEventWindowWidgetClick &GetParam(ForceType<const ScriptEventWindowWidgetClick &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventWindowWidgetClick *)instance; } - template <> inline int Return<ScriptEventWindowWidgetClick *>(HSQUIRRELVM vm, ScriptEventWindowWidgetClick *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventWindowWidgetClick", res, nullptr, DefSQDestructorCallback<ScriptEventWindowWidgetClick>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventGoalQuestionAnswer to be used as Squirrel parameter */ - template <> inline ScriptEventGoalQuestionAnswer *GetParam(ForceType<ScriptEventGoalQuestionAnswer *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventGoalQuestionAnswer *)instance; } - template <> inline ScriptEventGoalQuestionAnswer &GetParam(ForceType<ScriptEventGoalQuestionAnswer &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventGoalQuestionAnswer *)instance; } - template <> inline const ScriptEventGoalQuestionAnswer *GetParam(ForceType<const ScriptEventGoalQuestionAnswer *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventGoalQuestionAnswer *)instance; } - template <> inline const ScriptEventGoalQuestionAnswer &GetParam(ForceType<const ScriptEventGoalQuestionAnswer &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventGoalQuestionAnswer *)instance; } - template <> inline int Return<ScriptEventGoalQuestionAnswer *>(HSQUIRRELVM vm, ScriptEventGoalQuestionAnswer *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventGoalQuestionAnswer", res, nullptr, DefSQDestructorCallback<ScriptEventGoalQuestionAnswer>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventCompanyTown to be used as Squirrel parameter */ - template <> inline ScriptEventCompanyTown *GetParam(ForceType<ScriptEventCompanyTown *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyTown *)instance; } - template <> inline ScriptEventCompanyTown &GetParam(ForceType<ScriptEventCompanyTown &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyTown *)instance; } - template <> inline const ScriptEventCompanyTown *GetParam(ForceType<const ScriptEventCompanyTown *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventCompanyTown *)instance; } - template <> inline const ScriptEventCompanyTown &GetParam(ForceType<const ScriptEventCompanyTown &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventCompanyTown *)instance; } - template <> inline int Return<ScriptEventCompanyTown *>(HSQUIRRELVM vm, ScriptEventCompanyTown *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventCompanyTown", res, nullptr, DefSQDestructorCallback<ScriptEventCompanyTown>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventExclusiveTransportRights to be used as Squirrel parameter */ - template <> inline ScriptEventExclusiveTransportRights *GetParam(ForceType<ScriptEventExclusiveTransportRights *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventExclusiveTransportRights *)instance; } - template <> inline ScriptEventExclusiveTransportRights &GetParam(ForceType<ScriptEventExclusiveTransportRights &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventExclusiveTransportRights *)instance; } - template <> inline const ScriptEventExclusiveTransportRights *GetParam(ForceType<const ScriptEventExclusiveTransportRights *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventExclusiveTransportRights *)instance; } - template <> inline const ScriptEventExclusiveTransportRights &GetParam(ForceType<const ScriptEventExclusiveTransportRights &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventExclusiveTransportRights *)instance; } - template <> inline int Return<ScriptEventExclusiveTransportRights *>(HSQUIRRELVM vm, ScriptEventExclusiveTransportRights *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventExclusiveTransportRights", res, nullptr, DefSQDestructorCallback<ScriptEventExclusiveTransportRights>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventRoadReconstruction to be used as Squirrel parameter */ - template <> inline ScriptEventRoadReconstruction *GetParam(ForceType<ScriptEventRoadReconstruction *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventRoadReconstruction *)instance; } - template <> inline ScriptEventRoadReconstruction &GetParam(ForceType<ScriptEventRoadReconstruction &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventRoadReconstruction *)instance; } - template <> inline const ScriptEventRoadReconstruction *GetParam(ForceType<const ScriptEventRoadReconstruction *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventRoadReconstruction *)instance; } - template <> inline const ScriptEventRoadReconstruction &GetParam(ForceType<const ScriptEventRoadReconstruction &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventRoadReconstruction *)instance; } - template <> inline int Return<ScriptEventRoadReconstruction *>(HSQUIRRELVM vm, ScriptEventRoadReconstruction *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventRoadReconstruction", res, nullptr, DefSQDestructorCallback<ScriptEventRoadReconstruction>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventVehicleAutoReplaced to be used as Squirrel parameter */ - template <> inline ScriptEventVehicleAutoReplaced *GetParam(ForceType<ScriptEventVehicleAutoReplaced *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleAutoReplaced *)instance; } - template <> inline ScriptEventVehicleAutoReplaced &GetParam(ForceType<ScriptEventVehicleAutoReplaced &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleAutoReplaced *)instance; } - template <> inline const ScriptEventVehicleAutoReplaced *GetParam(ForceType<const ScriptEventVehicleAutoReplaced *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventVehicleAutoReplaced *)instance; } - template <> inline const ScriptEventVehicleAutoReplaced &GetParam(ForceType<const ScriptEventVehicleAutoReplaced &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventVehicleAutoReplaced *)instance; } - template <> inline int Return<ScriptEventVehicleAutoReplaced *>(HSQUIRRELVM vm, ScriptEventVehicleAutoReplaced *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventVehicleAutoReplaced", res, nullptr, DefSQDestructorCallback<ScriptEventVehicleAutoReplaced>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventStoryPageButtonClick to be used as Squirrel parameter */ - template <> inline ScriptEventStoryPageButtonClick *GetParam(ForceType<ScriptEventStoryPageButtonClick *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageButtonClick *)instance; } - template <> inline ScriptEventStoryPageButtonClick &GetParam(ForceType<ScriptEventStoryPageButtonClick &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageButtonClick *)instance; } - template <> inline const ScriptEventStoryPageButtonClick *GetParam(ForceType<const ScriptEventStoryPageButtonClick *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageButtonClick *)instance; } - template <> inline const ScriptEventStoryPageButtonClick &GetParam(ForceType<const ScriptEventStoryPageButtonClick &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageButtonClick *)instance; } - template <> inline int Return<ScriptEventStoryPageButtonClick *>(HSQUIRRELVM vm, ScriptEventStoryPageButtonClick *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStoryPageButtonClick", res, nullptr, DefSQDestructorCallback<ScriptEventStoryPageButtonClick>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventStoryPageTileSelect to be used as Squirrel parameter */ - template <> inline ScriptEventStoryPageTileSelect *GetParam(ForceType<ScriptEventStoryPageTileSelect *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageTileSelect *)instance; } - template <> inline ScriptEventStoryPageTileSelect &GetParam(ForceType<ScriptEventStoryPageTileSelect &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageTileSelect *)instance; } - template <> inline const ScriptEventStoryPageTileSelect *GetParam(ForceType<const ScriptEventStoryPageTileSelect *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageTileSelect *)instance; } - template <> inline const ScriptEventStoryPageTileSelect &GetParam(ForceType<const ScriptEventStoryPageTileSelect &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageTileSelect *)instance; } - template <> inline int Return<ScriptEventStoryPageTileSelect *>(HSQUIRRELVM vm, ScriptEventStoryPageTileSelect *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStoryPageTileSelect", res, nullptr, DefSQDestructorCallback<ScriptEventStoryPageTileSelect>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptEventStoryPageVehicleSelect to be used as Squirrel parameter */ - template <> inline ScriptEventStoryPageVehicleSelect *GetParam(ForceType<ScriptEventStoryPageVehicleSelect *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageVehicleSelect *)instance; } - template <> inline ScriptEventStoryPageVehicleSelect &GetParam(ForceType<ScriptEventStoryPageVehicleSelect &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageVehicleSelect *)instance; } - template <> inline const ScriptEventStoryPageVehicleSelect *GetParam(ForceType<const ScriptEventStoryPageVehicleSelect *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEventStoryPageVehicleSelect *)instance; } - template <> inline const ScriptEventStoryPageVehicleSelect &GetParam(ForceType<const ScriptEventStoryPageVehicleSelect &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEventStoryPageVehicleSelect *)instance; } - template <> inline int Return<ScriptEventStoryPageVehicleSelect *>(HSQUIRRELVM vm, ScriptEventStoryPageVehicleSelect *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "EventStoryPageVehicleSelect", res, nullptr, DefSQDestructorCallback<ScriptEventStoryPageVehicleSelect>, 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 deleted file mode 100644 index 7b93b2d1c..000000000 --- a/src/script/api/template/template_execmode.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_execmode.hpp" - -namespace SQConvert { - /* Allow ScriptExecMode to be used as Squirrel parameter */ - template <> inline ScriptExecMode *GetParam(ForceType<ScriptExecMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptExecMode *)instance; } - template <> inline ScriptExecMode &GetParam(ForceType<ScriptExecMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptExecMode *)instance; } - template <> inline const ScriptExecMode *GetParam(ForceType<const ScriptExecMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptExecMode *)instance; } - template <> inline const ScriptExecMode &GetParam(ForceType<const ScriptExecMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptExecMode *)instance; } - template <> inline int Return<ScriptExecMode *>(HSQUIRRELVM vm, ScriptExecMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "ExecMode", res, nullptr, DefSQDestructorCallback<ScriptExecMode>, 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 deleted file mode 100644 index a7f366f03..000000000 --- a/src/script/api/template/template_game.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_game.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptGame::LandscapeType GetParam(ForceType<ScriptGame::LandscapeType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGame::LandscapeType)tmp; } - template <> inline int Return<ScriptGame::LandscapeType>(HSQUIRRELVM vm, ScriptGame::LandscapeType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptGame to be used as Squirrel parameter */ - template <> inline ScriptGame *GetParam(ForceType<ScriptGame *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGame *)instance; } - template <> inline ScriptGame &GetParam(ForceType<ScriptGame &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGame *)instance; } - template <> inline const ScriptGame *GetParam(ForceType<const ScriptGame *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGame *)instance; } - template <> inline const ScriptGame &GetParam(ForceType<const ScriptGame &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGame *)instance; } - template <> inline int Return<ScriptGame *>(HSQUIRRELVM vm, ScriptGame *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Game", res, nullptr, DefSQDestructorCallback<ScriptGame>, 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 deleted file mode 100644 index 012d9240d..000000000 --- a/src/script/api/template/template_gamesettings.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_gamesettings.hpp" - -namespace SQConvert { - /* Allow ScriptGameSettings to be used as Squirrel parameter */ - template <> inline ScriptGameSettings *GetParam(ForceType<ScriptGameSettings *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGameSettings *)instance; } - template <> inline ScriptGameSettings &GetParam(ForceType<ScriptGameSettings &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGameSettings *)instance; } - template <> inline const ScriptGameSettings *GetParam(ForceType<const ScriptGameSettings *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGameSettings *)instance; } - template <> inline const ScriptGameSettings &GetParam(ForceType<const ScriptGameSettings &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGameSettings *)instance; } - template <> inline int Return<ScriptGameSettings *>(HSQUIRRELVM vm, ScriptGameSettings *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GameSettings", res, nullptr, DefSQDestructorCallback<ScriptGameSettings>, 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 deleted file mode 100644 index 984fe7fb6..000000000 --- a/src/script/api/template/template_goal.hpp.sq +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_goal.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptGoal::GoalID GetParam(ForceType<ScriptGoal::GoalID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGoal::GoalID)tmp; } - template <> inline int Return<ScriptGoal::GoalID>(HSQUIRRELVM vm, ScriptGoal::GoalID res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptGoal::GoalType GetParam(ForceType<ScriptGoal::GoalType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGoal::GoalType)tmp; } - template <> inline int Return<ScriptGoal::GoalType>(HSQUIRRELVM vm, ScriptGoal::GoalType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptGoal::QuestionType GetParam(ForceType<ScriptGoal::QuestionType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGoal::QuestionType)tmp; } - template <> inline int Return<ScriptGoal::QuestionType>(HSQUIRRELVM vm, ScriptGoal::QuestionType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptGoal::QuestionButton GetParam(ForceType<ScriptGoal::QuestionButton>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGoal::QuestionButton)tmp; } - template <> inline int Return<ScriptGoal::QuestionButton>(HSQUIRRELVM vm, ScriptGoal::QuestionButton res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptGoal to be used as Squirrel parameter */ - template <> inline ScriptGoal *GetParam(ForceType<ScriptGoal *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGoal *)instance; } - template <> inline ScriptGoal &GetParam(ForceType<ScriptGoal &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGoal *)instance; } - template <> inline const ScriptGoal *GetParam(ForceType<const ScriptGoal *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGoal *)instance; } - template <> inline const ScriptGoal &GetParam(ForceType<const ScriptGoal &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGoal *)instance; } - template <> inline int Return<ScriptGoal *>(HSQUIRRELVM vm, ScriptGoal *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Goal", res, nullptr, DefSQDestructorCallback<ScriptGoal>, 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 deleted file mode 100644 index e598d550c..000000000 --- a/src/script/api/template/template_group.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_group.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptGroup::GroupID GetParam(ForceType<ScriptGroup::GroupID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptGroup::GroupID)tmp; } - template <> inline int Return<ScriptGroup::GroupID>(HSQUIRRELVM vm, ScriptGroup::GroupID res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptGroup to be used as Squirrel parameter */ - template <> inline ScriptGroup *GetParam(ForceType<ScriptGroup *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroup *)instance; } - template <> inline ScriptGroup &GetParam(ForceType<ScriptGroup &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroup *)instance; } - template <> inline const ScriptGroup *GetParam(ForceType<const ScriptGroup *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroup *)instance; } - template <> inline const ScriptGroup &GetParam(ForceType<const ScriptGroup &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroup *)instance; } - template <> inline int Return<ScriptGroup *>(HSQUIRRELVM vm, ScriptGroup *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Group", res, nullptr, DefSQDestructorCallback<ScriptGroup>, 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 deleted file mode 100644 index 5431adb83..000000000 --- a/src/script/api/template/template_grouplist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_grouplist.hpp" - -namespace SQConvert { - /* Allow ScriptGroupList to be used as Squirrel parameter */ - template <> inline ScriptGroupList *GetParam(ForceType<ScriptGroupList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroupList *)instance; } - template <> inline ScriptGroupList &GetParam(ForceType<ScriptGroupList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroupList *)instance; } - template <> inline const ScriptGroupList *GetParam(ForceType<const ScriptGroupList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptGroupList *)instance; } - template <> inline const ScriptGroupList &GetParam(ForceType<const ScriptGroupList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptGroupList *)instance; } - template <> inline int Return<ScriptGroupList *>(HSQUIRRELVM vm, ScriptGroupList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "GroupList", res, nullptr, DefSQDestructorCallback<ScriptGroupList>, 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 deleted file mode 100644 index 711c3ab52..000000000 --- a/src/script/api/template/template_industry.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industry.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptIndustry::CargoAcceptState GetParam(ForceType<ScriptIndustry::CargoAcceptState>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptIndustry::CargoAcceptState)tmp; } - template <> inline int Return<ScriptIndustry::CargoAcceptState>(HSQUIRRELVM vm, ScriptIndustry::CargoAcceptState res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptIndustry to be used as Squirrel parameter */ - template <> inline ScriptIndustry *GetParam(ForceType<ScriptIndustry *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustry *)instance; } - template <> inline ScriptIndustry &GetParam(ForceType<ScriptIndustry &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustry *)instance; } - template <> inline const ScriptIndustry *GetParam(ForceType<const ScriptIndustry *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustry *)instance; } - template <> inline const ScriptIndustry &GetParam(ForceType<const ScriptIndustry &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustry *)instance; } - template <> inline int Return<ScriptIndustry *>(HSQUIRRELVM vm, ScriptIndustry *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Industry", res, nullptr, DefSQDestructorCallback<ScriptIndustry>, 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 deleted file mode 100644 index 9c44a3e4c..000000000 --- a/src/script/api/template/template_industrylist.hpp.sq +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrylist.hpp" - -namespace SQConvert { - /* Allow ScriptIndustryList to be used as Squirrel parameter */ - template <> inline ScriptIndustryList *GetParam(ForceType<ScriptIndustryList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList *)instance; } - template <> inline ScriptIndustryList &GetParam(ForceType<ScriptIndustryList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList *)instance; } - template <> inline const ScriptIndustryList *GetParam(ForceType<const ScriptIndustryList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList *)instance; } - template <> inline const ScriptIndustryList &GetParam(ForceType<const ScriptIndustryList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList *)instance; } - template <> inline int Return<ScriptIndustryList *>(HSQUIRRELVM vm, ScriptIndustryList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList", res, nullptr, DefSQDestructorCallback<ScriptIndustryList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptIndustryList_CargoAccepting to be used as Squirrel parameter */ - template <> inline ScriptIndustryList_CargoAccepting *GetParam(ForceType<ScriptIndustryList_CargoAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList_CargoAccepting *)instance; } - template <> inline ScriptIndustryList_CargoAccepting &GetParam(ForceType<ScriptIndustryList_CargoAccepting &>, 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<const ScriptIndustryList_CargoAccepting *>, 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<const ScriptIndustryList_CargoAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoAccepting *)instance; } - template <> inline int Return<ScriptIndustryList_CargoAccepting *>(HSQUIRRELVM vm, ScriptIndustryList_CargoAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoAccepting", res, nullptr, DefSQDestructorCallback<ScriptIndustryList_CargoAccepting>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptIndustryList_CargoProducing to be used as Squirrel parameter */ - template <> inline ScriptIndustryList_CargoProducing *GetParam(ForceType<ScriptIndustryList_CargoProducing *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryList_CargoProducing *)instance; } - template <> inline ScriptIndustryList_CargoProducing &GetParam(ForceType<ScriptIndustryList_CargoProducing &>, 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<const ScriptIndustryList_CargoProducing *>, 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<const ScriptIndustryList_CargoProducing &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryList_CargoProducing *)instance; } - template <> inline int Return<ScriptIndustryList_CargoProducing *>(HSQUIRRELVM vm, ScriptIndustryList_CargoProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryList_CargoProducing", res, nullptr, DefSQDestructorCallback<ScriptIndustryList_CargoProducing>, 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 deleted file mode 100644 index 06c7c18bb..000000000 --- a/src/script/api/template/template_industrytype.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytype.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptIndustryType::SpecialIndustryType GetParam(ForceType<ScriptIndustryType::SpecialIndustryType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptIndustryType::SpecialIndustryType)tmp; } - template <> inline int Return<ScriptIndustryType::SpecialIndustryType>(HSQUIRRELVM vm, ScriptIndustryType::SpecialIndustryType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptIndustryType to be used as Squirrel parameter */ - template <> inline ScriptIndustryType *GetParam(ForceType<ScriptIndustryType *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryType *)instance; } - template <> inline ScriptIndustryType &GetParam(ForceType<ScriptIndustryType &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryType *)instance; } - template <> inline const ScriptIndustryType *GetParam(ForceType<const ScriptIndustryType *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryType *)instance; } - template <> inline const ScriptIndustryType &GetParam(ForceType<const ScriptIndustryType &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryType *)instance; } - template <> inline int Return<ScriptIndustryType *>(HSQUIRRELVM vm, ScriptIndustryType *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryType", res, nullptr, DefSQDestructorCallback<ScriptIndustryType>, 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 deleted file mode 100644 index 71272b23e..000000000 --- a/src/script/api/template/template_industrytypelist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_industrytypelist.hpp" - -namespace SQConvert { - /* Allow ScriptIndustryTypeList to be used as Squirrel parameter */ - template <> inline ScriptIndustryTypeList *GetParam(ForceType<ScriptIndustryTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryTypeList *)instance; } - template <> inline ScriptIndustryTypeList &GetParam(ForceType<ScriptIndustryTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryTypeList *)instance; } - template <> inline const ScriptIndustryTypeList *GetParam(ForceType<const ScriptIndustryTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptIndustryTypeList *)instance; } - template <> inline const ScriptIndustryTypeList &GetParam(ForceType<const ScriptIndustryTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptIndustryTypeList *)instance; } - template <> inline int Return<ScriptIndustryTypeList *>(HSQUIRRELVM vm, ScriptIndustryTypeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "IndustryTypeList", res, nullptr, DefSQDestructorCallback<ScriptIndustryTypeList>, 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 deleted file mode 100644 index 11b839ae2..000000000 --- a/src/script/api/template/template_infrastructure.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_infrastructure.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptInfrastructure::Infrastructure GetParam(ForceType<ScriptInfrastructure::Infrastructure>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptInfrastructure::Infrastructure)tmp; } - template <> inline int Return<ScriptInfrastructure::Infrastructure>(HSQUIRRELVM vm, ScriptInfrastructure::Infrastructure res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptInfrastructure to be used as Squirrel parameter */ - template <> inline ScriptInfrastructure *GetParam(ForceType<ScriptInfrastructure *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptInfrastructure *)instance; } - template <> inline ScriptInfrastructure &GetParam(ForceType<ScriptInfrastructure &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptInfrastructure *)instance; } - template <> inline const ScriptInfrastructure *GetParam(ForceType<const ScriptInfrastructure *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptInfrastructure *)instance; } - template <> inline const ScriptInfrastructure &GetParam(ForceType<const ScriptInfrastructure &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptInfrastructure *)instance; } - template <> inline int Return<ScriptInfrastructure *>(HSQUIRRELVM vm, ScriptInfrastructure *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Infrastructure", res, nullptr, DefSQDestructorCallback<ScriptInfrastructure>, 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 deleted file mode 100644 index 9ca4da9c1..000000000 --- a/src/script/api/template/template_list.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_list.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptList::SorterType GetParam(ForceType<ScriptList::SorterType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptList::SorterType)tmp; } - template <> inline int Return<ScriptList::SorterType>(HSQUIRRELVM vm, ScriptList::SorterType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptList to be used as Squirrel parameter */ - template <> inline ScriptList *GetParam(ForceType<ScriptList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptList *)instance; } - template <> inline ScriptList &GetParam(ForceType<ScriptList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptList *)instance; } - template <> inline const ScriptList *GetParam(ForceType<const ScriptList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptList *)instance; } - template <> inline const ScriptList &GetParam(ForceType<const ScriptList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptList *)instance; } - template <> inline int Return<ScriptList *>(HSQUIRRELVM vm, ScriptList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "List", res, nullptr, DefSQDestructorCallback<ScriptList>, 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 deleted file mode 100644 index 2ebe7547d..000000000 --- a/src/script/api/template/template_log.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_log.hpp" - -namespace SQConvert { - /* Allow ScriptLog to be used as Squirrel parameter */ - template <> inline ScriptLog *GetParam(ForceType<ScriptLog *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptLog *)instance; } - template <> inline ScriptLog &GetParam(ForceType<ScriptLog &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptLog *)instance; } - template <> inline const ScriptLog *GetParam(ForceType<const ScriptLog *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptLog *)instance; } - template <> inline const ScriptLog &GetParam(ForceType<const ScriptLog &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptLog *)instance; } - template <> inline int Return<ScriptLog *>(HSQUIRRELVM vm, ScriptLog *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Log", res, nullptr, DefSQDestructorCallback<ScriptLog>, 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 deleted file mode 100644 index 3a1539027..000000000 --- a/src/script/api/template/template_map.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_map.hpp" - -namespace SQConvert { - /* Allow ScriptMap to be used as Squirrel parameter */ - template <> inline ScriptMap *GetParam(ForceType<ScriptMap *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMap *)instance; } - template <> inline ScriptMap &GetParam(ForceType<ScriptMap &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMap *)instance; } - template <> inline const ScriptMap *GetParam(ForceType<const ScriptMap *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMap *)instance; } - template <> inline const ScriptMap &GetParam(ForceType<const ScriptMap &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMap *)instance; } - template <> inline int Return<ScriptMap *>(HSQUIRRELVM vm, ScriptMap *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Map", res, nullptr, DefSQDestructorCallback<ScriptMap>, 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 deleted file mode 100644 index 115e88c26..000000000 --- a/src/script/api/template/template_marine.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_marine.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptMarine::ErrorMessages GetParam(ForceType<ScriptMarine::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptMarine::ErrorMessages)tmp; } - template <> inline int Return<ScriptMarine::ErrorMessages>(HSQUIRRELVM vm, ScriptMarine::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptMarine::BuildType GetParam(ForceType<ScriptMarine::BuildType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptMarine::BuildType)tmp; } - template <> inline int Return<ScriptMarine::BuildType>(HSQUIRRELVM vm, ScriptMarine::BuildType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptMarine to be used as Squirrel parameter */ - template <> inline ScriptMarine *GetParam(ForceType<ScriptMarine *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMarine *)instance; } - template <> inline ScriptMarine &GetParam(ForceType<ScriptMarine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMarine *)instance; } - template <> inline const ScriptMarine *GetParam(ForceType<const ScriptMarine *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptMarine *)instance; } - template <> inline const ScriptMarine &GetParam(ForceType<const ScriptMarine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptMarine *)instance; } - template <> inline int Return<ScriptMarine *>(HSQUIRRELVM vm, ScriptMarine *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Marine", res, nullptr, DefSQDestructorCallback<ScriptMarine>, 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 deleted file mode 100644 index 443e04c85..000000000 --- a/src/script/api/template/template_news.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_news.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptNews::NewsType GetParam(ForceType<ScriptNews::NewsType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptNews::NewsType)tmp; } - template <> inline int Return<ScriptNews::NewsType>(HSQUIRRELVM vm, ScriptNews::NewsType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptNews::NewsReferenceType GetParam(ForceType<ScriptNews::NewsReferenceType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptNews::NewsReferenceType)tmp; } - template <> inline int Return<ScriptNews::NewsReferenceType>(HSQUIRRELVM vm, ScriptNews::NewsReferenceType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptNews to be used as Squirrel parameter */ - template <> inline ScriptNews *GetParam(ForceType<ScriptNews *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptNews *)instance; } - template <> inline ScriptNews &GetParam(ForceType<ScriptNews &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptNews *)instance; } - template <> inline const ScriptNews *GetParam(ForceType<const ScriptNews *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptNews *)instance; } - template <> inline const ScriptNews &GetParam(ForceType<const ScriptNews &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptNews *)instance; } - template <> inline int Return<ScriptNews *>(HSQUIRRELVM vm, ScriptNews *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "News", res, nullptr, DefSQDestructorCallback<ScriptNews>, 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 deleted file mode 100644 index 155baa3a7..000000000 --- a/src/script/api/template/template_order.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_order.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptOrder::ErrorMessages GetParam(ForceType<ScriptOrder::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::ErrorMessages)tmp; } - template <> inline int Return<ScriptOrder::ErrorMessages>(HSQUIRRELVM vm, ScriptOrder::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptOrder::ScriptOrderFlags GetParam(ForceType<ScriptOrder::ScriptOrderFlags>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::ScriptOrderFlags)tmp; } - template <> inline int Return<ScriptOrder::ScriptOrderFlags>(HSQUIRRELVM vm, ScriptOrder::ScriptOrderFlags res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptOrder::OrderCondition GetParam(ForceType<ScriptOrder::OrderCondition>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::OrderCondition)tmp; } - template <> inline int Return<ScriptOrder::OrderCondition>(HSQUIRRELVM vm, ScriptOrder::OrderCondition res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptOrder::CompareFunction GetParam(ForceType<ScriptOrder::CompareFunction>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::CompareFunction)tmp; } - template <> inline int Return<ScriptOrder::CompareFunction>(HSQUIRRELVM vm, ScriptOrder::CompareFunction res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptOrder::OrderPosition GetParam(ForceType<ScriptOrder::OrderPosition>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::OrderPosition)tmp; } - template <> inline int Return<ScriptOrder::OrderPosition>(HSQUIRRELVM vm, ScriptOrder::OrderPosition res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptOrder::StopLocation GetParam(ForceType<ScriptOrder::StopLocation>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptOrder::StopLocation)tmp; } - template <> inline int Return<ScriptOrder::StopLocation>(HSQUIRRELVM vm, ScriptOrder::StopLocation res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptOrder to be used as Squirrel parameter */ - template <> inline ScriptOrder *GetParam(ForceType<ScriptOrder *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptOrder *)instance; } - template <> inline ScriptOrder &GetParam(ForceType<ScriptOrder &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptOrder *)instance; } - template <> inline const ScriptOrder *GetParam(ForceType<const ScriptOrder *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptOrder *)instance; } - template <> inline const ScriptOrder &GetParam(ForceType<const ScriptOrder &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptOrder *)instance; } - template <> inline int Return<ScriptOrder *>(HSQUIRRELVM vm, ScriptOrder *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Order", res, nullptr, DefSQDestructorCallback<ScriptOrder>, 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 deleted file mode 100644 index f45117540..000000000 --- a/src/script/api/template/template_rail.hpp.sq +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_rail.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptRail::ErrorMessages GetParam(ForceType<ScriptRail::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRail::ErrorMessages)tmp; } - template <> inline int Return<ScriptRail::ErrorMessages>(HSQUIRRELVM vm, ScriptRail::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRail::RailType GetParam(ForceType<ScriptRail::RailType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRail::RailType)tmp; } - template <> inline int Return<ScriptRail::RailType>(HSQUIRRELVM vm, ScriptRail::RailType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRail::RailTrack GetParam(ForceType<ScriptRail::RailTrack>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRail::RailTrack)tmp; } - template <> inline int Return<ScriptRail::RailTrack>(HSQUIRRELVM vm, ScriptRail::RailTrack res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRail::SignalType GetParam(ForceType<ScriptRail::SignalType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRail::SignalType)tmp; } - template <> inline int Return<ScriptRail::SignalType>(HSQUIRRELVM vm, ScriptRail::SignalType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRail::BuildType GetParam(ForceType<ScriptRail::BuildType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRail::BuildType)tmp; } - template <> inline int Return<ScriptRail::BuildType>(HSQUIRRELVM vm, ScriptRail::BuildType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptRail to be used as Squirrel parameter */ - template <> inline ScriptRail *GetParam(ForceType<ScriptRail *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRail *)instance; } - template <> inline ScriptRail &GetParam(ForceType<ScriptRail &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRail *)instance; } - template <> inline const ScriptRail *GetParam(ForceType<const ScriptRail *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRail *)instance; } - template <> inline const ScriptRail &GetParam(ForceType<const ScriptRail &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRail *)instance; } - template <> inline int Return<ScriptRail *>(HSQUIRRELVM vm, ScriptRail *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Rail", res, nullptr, DefSQDestructorCallback<ScriptRail>, 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 deleted file mode 100644 index 09f63f8e3..000000000 --- a/src/script/api/template/template_railtypelist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_railtypelist.hpp" - -namespace SQConvert { - /* Allow ScriptRailTypeList to be used as Squirrel parameter */ - template <> inline ScriptRailTypeList *GetParam(ForceType<ScriptRailTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRailTypeList *)instance; } - template <> inline ScriptRailTypeList &GetParam(ForceType<ScriptRailTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRailTypeList *)instance; } - template <> inline const ScriptRailTypeList *GetParam(ForceType<const ScriptRailTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRailTypeList *)instance; } - template <> inline const ScriptRailTypeList &GetParam(ForceType<const ScriptRailTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRailTypeList *)instance; } - template <> inline int Return<ScriptRailTypeList *>(HSQUIRRELVM vm, ScriptRailTypeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "RailTypeList", res, nullptr, DefSQDestructorCallback<ScriptRailTypeList>, 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 deleted file mode 100644 index f2f8c411d..000000000 --- a/src/script/api/template/template_road.hpp.sq +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_road.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptRoad::ErrorMessages GetParam(ForceType<ScriptRoad::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRoad::ErrorMessages)tmp; } - template <> inline int Return<ScriptRoad::ErrorMessages>(HSQUIRRELVM vm, ScriptRoad::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRoad::RoadType GetParam(ForceType<ScriptRoad::RoadType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRoad::RoadType)tmp; } - template <> inline int Return<ScriptRoad::RoadType>(HSQUIRRELVM vm, ScriptRoad::RoadType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRoad::RoadTramTypes GetParam(ForceType<ScriptRoad::RoadTramTypes>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRoad::RoadTramTypes)tmp; } - template <> inline int Return<ScriptRoad::RoadTramTypes>(HSQUIRRELVM vm, ScriptRoad::RoadTramTypes res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRoad::RoadVehicleType GetParam(ForceType<ScriptRoad::RoadVehicleType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRoad::RoadVehicleType)tmp; } - template <> inline int Return<ScriptRoad::RoadVehicleType>(HSQUIRRELVM vm, ScriptRoad::RoadVehicleType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptRoad::BuildType GetParam(ForceType<ScriptRoad::BuildType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptRoad::BuildType)tmp; } - template <> inline int Return<ScriptRoad::BuildType>(HSQUIRRELVM vm, ScriptRoad::BuildType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptRoad to be used as Squirrel parameter */ - template <> inline ScriptRoad *GetParam(ForceType<ScriptRoad *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRoad *)instance; } - template <> inline ScriptRoad &GetParam(ForceType<ScriptRoad &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoad *)instance; } - template <> inline const ScriptRoad *GetParam(ForceType<const ScriptRoad *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRoad *)instance; } - template <> inline const ScriptRoad &GetParam(ForceType<const ScriptRoad &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoad *)instance; } - template <> inline int Return<ScriptRoad *>(HSQUIRRELVM vm, ScriptRoad *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Road", res, nullptr, DefSQDestructorCallback<ScriptRoad>, true); return 1; } -} // namespace SQConvert diff --git a/src/script/api/template/template_roadtypelist.hpp.sq b/src/script/api/template/template_roadtypelist.hpp.sq deleted file mode 100644 index bd2c1931e..000000000 --- a/src/script/api/template/template_roadtypelist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_roadtypelist.hpp" - -namespace SQConvert { - /* Allow ScriptRoadTypeList to be used as Squirrel parameter */ - template <> inline ScriptRoadTypeList *GetParam(ForceType<ScriptRoadTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRoadTypeList *)instance; } - template <> inline ScriptRoadTypeList &GetParam(ForceType<ScriptRoadTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoadTypeList *)instance; } - template <> inline const ScriptRoadTypeList *GetParam(ForceType<const ScriptRoadTypeList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptRoadTypeList *)instance; } - template <> inline const ScriptRoadTypeList &GetParam(ForceType<const ScriptRoadTypeList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptRoadTypeList *)instance; } - template <> inline int Return<ScriptRoadTypeList *>(HSQUIRRELVM vm, ScriptRoadTypeList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "RoadTypeList", res, nullptr, DefSQDestructorCallback<ScriptRoadTypeList>, 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 deleted file mode 100644 index 76e7759eb..000000000 --- a/src/script/api/template/template_sign.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_sign.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptSign::ErrorMessages GetParam(ForceType<ScriptSign::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptSign::ErrorMessages)tmp; } - template <> inline int Return<ScriptSign::ErrorMessages>(HSQUIRRELVM vm, ScriptSign::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptSign to be used as Squirrel parameter */ - template <> inline ScriptSign *GetParam(ForceType<ScriptSign *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSign *)instance; } - template <> inline ScriptSign &GetParam(ForceType<ScriptSign &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSign *)instance; } - template <> inline const ScriptSign *GetParam(ForceType<const ScriptSign *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSign *)instance; } - template <> inline const ScriptSign &GetParam(ForceType<const ScriptSign &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSign *)instance; } - template <> inline int Return<ScriptSign *>(HSQUIRRELVM vm, ScriptSign *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Sign", res, nullptr, DefSQDestructorCallback<ScriptSign>, 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 deleted file mode 100644 index e76220250..000000000 --- a/src/script/api/template/template_signlist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_signlist.hpp" - -namespace SQConvert { - /* Allow ScriptSignList to be used as Squirrel parameter */ - template <> inline ScriptSignList *GetParam(ForceType<ScriptSignList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSignList *)instance; } - template <> inline ScriptSignList &GetParam(ForceType<ScriptSignList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSignList *)instance; } - template <> inline const ScriptSignList *GetParam(ForceType<const ScriptSignList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSignList *)instance; } - template <> inline const ScriptSignList &GetParam(ForceType<const ScriptSignList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSignList *)instance; } - template <> inline int Return<ScriptSignList *>(HSQUIRRELVM vm, ScriptSignList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SignList", res, nullptr, DefSQDestructorCallback<ScriptSignList>, 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 deleted file mode 100644 index ba5af93c1..000000000 --- a/src/script/api/template/template_station.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_station.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptStation::ErrorMessages GetParam(ForceType<ScriptStation::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStation::ErrorMessages)tmp; } - template <> inline int Return<ScriptStation::ErrorMessages>(HSQUIRRELVM vm, ScriptStation::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStation::StationType GetParam(ForceType<ScriptStation::StationType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStation::StationType)tmp; } - template <> inline int Return<ScriptStation::StationType>(HSQUIRRELVM vm, ScriptStation::StationType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptStation to be used as Squirrel parameter */ - template <> inline ScriptStation *GetParam(ForceType<ScriptStation *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStation *)instance; } - template <> inline ScriptStation &GetParam(ForceType<ScriptStation &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStation *)instance; } - template <> inline const ScriptStation *GetParam(ForceType<const ScriptStation *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStation *)instance; } - template <> inline const ScriptStation &GetParam(ForceType<const ScriptStation &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStation *)instance; } - template <> inline int Return<ScriptStation *>(HSQUIRRELVM vm, ScriptStation *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Station", res, nullptr, DefSQDestructorCallback<ScriptStation>, 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 deleted file mode 100644 index e6a1f0bba..000000000 --- a/src/script/api/template/template_stationlist.hpp.sq +++ /dev/null @@ -1,133 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_stationlist.hpp" - -namespace SQConvert { - /* Allow ScriptStationList to be used as Squirrel parameter */ - template <> inline ScriptStationList *GetParam(ForceType<ScriptStationList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList *)instance; } - template <> inline ScriptStationList &GetParam(ForceType<ScriptStationList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList *)instance; } - template <> inline const ScriptStationList *GetParam(ForceType<const ScriptStationList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList *)instance; } - template <> inline const ScriptStationList &GetParam(ForceType<const ScriptStationList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList *)instance; } - template <> inline int Return<ScriptStationList *>(HSQUIRRELVM vm, ScriptStationList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList", res, nullptr, DefSQDestructorCallback<ScriptStationList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptStationList_Cargo::CargoSelector GetParam(ForceType<ScriptStationList_Cargo::CargoSelector>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStationList_Cargo::CargoSelector)tmp; } - template <> inline int Return<ScriptStationList_Cargo::CargoSelector>(HSQUIRRELVM vm, ScriptStationList_Cargo::CargoSelector res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStationList_Cargo::CargoMode GetParam(ForceType<ScriptStationList_Cargo::CargoMode>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStationList_Cargo::CargoMode)tmp; } - template <> inline int Return<ScriptStationList_Cargo::CargoMode>(HSQUIRRELVM vm, ScriptStationList_Cargo::CargoMode res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptStationList_Cargo to be used as Squirrel parameter */ - template <> inline ScriptStationList_Cargo *GetParam(ForceType<ScriptStationList_Cargo *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_Cargo *)instance; } - template <> inline ScriptStationList_Cargo &GetParam(ForceType<ScriptStationList_Cargo &>, 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<const ScriptStationList_Cargo *>, 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<const ScriptStationList_Cargo &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Cargo *)instance; } - template <> inline int Return<ScriptStationList_Cargo *>(HSQUIRRELVM vm, ScriptStationList_Cargo *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Cargo", res, nullptr, DefSQDestructorCallback<ScriptStationList_Cargo>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoWaiting to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoWaiting *GetParam(ForceType<ScriptStationList_CargoWaiting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaiting *)instance; } - template <> inline ScriptStationList_CargoWaiting &GetParam(ForceType<ScriptStationList_CargoWaiting &>, 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<const ScriptStationList_CargoWaiting *>, 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<const ScriptStationList_CargoWaiting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaiting *)instance; } - template <> inline int Return<ScriptStationList_CargoWaiting *>(HSQUIRRELVM vm, ScriptStationList_CargoWaiting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaiting", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoWaiting>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoPlanned to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoPlanned *GetParam(ForceType<ScriptStationList_CargoPlanned *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlanned *)instance; } - template <> inline ScriptStationList_CargoPlanned &GetParam(ForceType<ScriptStationList_CargoPlanned &>, 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<const ScriptStationList_CargoPlanned *>, 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<const ScriptStationList_CargoPlanned &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlanned *)instance; } - template <> inline int Return<ScriptStationList_CargoPlanned *>(HSQUIRRELVM vm, ScriptStationList_CargoPlanned *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlanned", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoPlanned>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoWaitingByFrom to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoWaitingByFrom *GetParam(ForceType<ScriptStationList_CargoWaitingByFrom *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingByFrom *)instance; } - template <> inline ScriptStationList_CargoWaitingByFrom &GetParam(ForceType<ScriptStationList_CargoWaitingByFrom &>, 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<const ScriptStationList_CargoWaitingByFrom *>, 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<const ScriptStationList_CargoWaitingByFrom &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByFrom *)instance; } - template <> inline int Return<ScriptStationList_CargoWaitingByFrom *>(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByFrom", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoWaitingByFrom>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoWaitingViaByFrom to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoWaitingViaByFrom *GetParam(ForceType<ScriptStationList_CargoWaitingViaByFrom *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingViaByFrom *)instance; } - template <> inline ScriptStationList_CargoWaitingViaByFrom &GetParam(ForceType<ScriptStationList_CargoWaitingViaByFrom &>, 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<const ScriptStationList_CargoWaitingViaByFrom *>, 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<const ScriptStationList_CargoWaitingViaByFrom &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingViaByFrom *)instance; } - template <> inline int Return<ScriptStationList_CargoWaitingViaByFrom *>(HSQUIRRELVM vm, ScriptStationList_CargoWaitingViaByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingViaByFrom", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoWaitingViaByFrom>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoWaitingByVia to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoWaitingByVia *GetParam(ForceType<ScriptStationList_CargoWaitingByVia *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingByVia *)instance; } - template <> inline ScriptStationList_CargoWaitingByVia &GetParam(ForceType<ScriptStationList_CargoWaitingByVia &>, 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<const ScriptStationList_CargoWaitingByVia *>, 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<const ScriptStationList_CargoWaitingByVia &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingByVia *)instance; } - template <> inline int Return<ScriptStationList_CargoWaitingByVia *>(HSQUIRRELVM vm, ScriptStationList_CargoWaitingByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingByVia", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoWaitingByVia>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoWaitingFromByVia to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoWaitingFromByVia *GetParam(ForceType<ScriptStationList_CargoWaitingFromByVia *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoWaitingFromByVia *)instance; } - template <> inline ScriptStationList_CargoWaitingFromByVia &GetParam(ForceType<ScriptStationList_CargoWaitingFromByVia &>, 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<const ScriptStationList_CargoWaitingFromByVia *>, 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<const ScriptStationList_CargoWaitingFromByVia &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoWaitingFromByVia *)instance; } - template <> inline int Return<ScriptStationList_CargoWaitingFromByVia *>(HSQUIRRELVM vm, ScriptStationList_CargoWaitingFromByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoWaitingFromByVia", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoWaitingFromByVia>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoPlannedByFrom to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoPlannedByFrom *GetParam(ForceType<ScriptStationList_CargoPlannedByFrom *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedByFrom *)instance; } - template <> inline ScriptStationList_CargoPlannedByFrom &GetParam(ForceType<ScriptStationList_CargoPlannedByFrom &>, 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<const ScriptStationList_CargoPlannedByFrom *>, 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<const ScriptStationList_CargoPlannedByFrom &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByFrom *)instance; } - template <> inline int Return<ScriptStationList_CargoPlannedByFrom *>(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByFrom", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoPlannedByFrom>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoPlannedViaByFrom to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoPlannedViaByFrom *GetParam(ForceType<ScriptStationList_CargoPlannedViaByFrom *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedViaByFrom *)instance; } - template <> inline ScriptStationList_CargoPlannedViaByFrom &GetParam(ForceType<ScriptStationList_CargoPlannedViaByFrom &>, 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<const ScriptStationList_CargoPlannedViaByFrom *>, 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<const ScriptStationList_CargoPlannedViaByFrom &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedViaByFrom *)instance; } - template <> inline int Return<ScriptStationList_CargoPlannedViaByFrom *>(HSQUIRRELVM vm, ScriptStationList_CargoPlannedViaByFrom *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedViaByFrom", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoPlannedViaByFrom>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoPlannedByVia to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoPlannedByVia *GetParam(ForceType<ScriptStationList_CargoPlannedByVia *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedByVia *)instance; } - template <> inline ScriptStationList_CargoPlannedByVia &GetParam(ForceType<ScriptStationList_CargoPlannedByVia &>, 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<const ScriptStationList_CargoPlannedByVia *>, 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<const ScriptStationList_CargoPlannedByVia &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedByVia *)instance; } - template <> inline int Return<ScriptStationList_CargoPlannedByVia *>(HSQUIRRELVM vm, ScriptStationList_CargoPlannedByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedByVia", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoPlannedByVia>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_CargoPlannedFromByVia to be used as Squirrel parameter */ - template <> inline ScriptStationList_CargoPlannedFromByVia *GetParam(ForceType<ScriptStationList_CargoPlannedFromByVia *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_CargoPlannedFromByVia *)instance; } - template <> inline ScriptStationList_CargoPlannedFromByVia &GetParam(ForceType<ScriptStationList_CargoPlannedFromByVia &>, 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<const ScriptStationList_CargoPlannedFromByVia *>, 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<const ScriptStationList_CargoPlannedFromByVia &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_CargoPlannedFromByVia *)instance; } - template <> inline int Return<ScriptStationList_CargoPlannedFromByVia *>(HSQUIRRELVM vm, ScriptStationList_CargoPlannedFromByVia *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_CargoPlannedFromByVia", res, nullptr, DefSQDestructorCallback<ScriptStationList_CargoPlannedFromByVia>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptStationList_Vehicle to be used as Squirrel parameter */ - template <> inline ScriptStationList_Vehicle *GetParam(ForceType<ScriptStationList_Vehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStationList_Vehicle *)instance; } - template <> inline ScriptStationList_Vehicle &GetParam(ForceType<ScriptStationList_Vehicle &>, 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<const ScriptStationList_Vehicle *>, 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<const ScriptStationList_Vehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStationList_Vehicle *)instance; } - template <> inline int Return<ScriptStationList_Vehicle *>(HSQUIRRELVM vm, ScriptStationList_Vehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StationList_Vehicle", res, nullptr, DefSQDestructorCallback<ScriptStationList_Vehicle>, 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 deleted file mode 100644 index f06d53138..000000000 --- a/src/script/api/template/template_story_page.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_story_page.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptStoryPage::StoryPageID GetParam(ForceType<ScriptStoryPage::StoryPageID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageID)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageID>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageID res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStoryPage::StoryPageElementID GetParam(ForceType<ScriptStoryPage::StoryPageElementID>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageElementID)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageElementID>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageElementID res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStoryPage::StoryPageElementType GetParam(ForceType<ScriptStoryPage::StoryPageElementType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageElementType)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageElementType>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageElementType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStoryPage::StoryPageButtonFlags GetParam(ForceType<ScriptStoryPage::StoryPageButtonFlags>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageButtonFlags)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageButtonFlags>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageButtonFlags res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStoryPage::StoryPageButtonCursor GetParam(ForceType<ScriptStoryPage::StoryPageButtonCursor>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageButtonCursor)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageButtonCursor>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageButtonCursor res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptStoryPage::StoryPageButtonColour GetParam(ForceType<ScriptStoryPage::StoryPageButtonColour>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptStoryPage::StoryPageButtonColour)tmp; } - template <> inline int Return<ScriptStoryPage::StoryPageButtonColour>(HSQUIRRELVM vm, ScriptStoryPage::StoryPageButtonColour res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptStoryPage to be used as Squirrel parameter */ - template <> inline ScriptStoryPage *GetParam(ForceType<ScriptStoryPage *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPage *)instance; } - template <> inline ScriptStoryPage &GetParam(ForceType<ScriptStoryPage &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPage *)instance; } - template <> inline const ScriptStoryPage *GetParam(ForceType<const ScriptStoryPage *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPage *)instance; } - template <> inline const ScriptStoryPage &GetParam(ForceType<const ScriptStoryPage &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPage *)instance; } - template <> inline int Return<ScriptStoryPage *>(HSQUIRRELVM vm, ScriptStoryPage *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPage", res, nullptr, DefSQDestructorCallback<ScriptStoryPage>, 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 deleted file mode 100644 index 224f38c50..000000000 --- a/src/script/api/template/template_storypageelementlist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_storypageelementlist.hpp" - -namespace SQConvert { - /* Allow ScriptStoryPageElementList to be used as Squirrel parameter */ - template <> inline ScriptStoryPageElementList *GetParam(ForceType<ScriptStoryPageElementList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageElementList *)instance; } - template <> inline ScriptStoryPageElementList &GetParam(ForceType<ScriptStoryPageElementList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageElementList *)instance; } - template <> inline const ScriptStoryPageElementList *GetParam(ForceType<const ScriptStoryPageElementList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageElementList *)instance; } - template <> inline const ScriptStoryPageElementList &GetParam(ForceType<const ScriptStoryPageElementList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageElementList *)instance; } - template <> inline int Return<ScriptStoryPageElementList *>(HSQUIRRELVM vm, ScriptStoryPageElementList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageElementList", res, nullptr, DefSQDestructorCallback<ScriptStoryPageElementList>, 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 deleted file mode 100644 index 6b799dd18..000000000 --- a/src/script/api/template/template_storypagelist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_storypagelist.hpp" - -namespace SQConvert { - /* Allow ScriptStoryPageList to be used as Squirrel parameter */ - template <> inline ScriptStoryPageList *GetParam(ForceType<ScriptStoryPageList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageList *)instance; } - template <> inline ScriptStoryPageList &GetParam(ForceType<ScriptStoryPageList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageList *)instance; } - template <> inline const ScriptStoryPageList *GetParam(ForceType<const ScriptStoryPageList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptStoryPageList *)instance; } - template <> inline const ScriptStoryPageList &GetParam(ForceType<const ScriptStoryPageList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptStoryPageList *)instance; } - template <> inline int Return<ScriptStoryPageList *>(HSQUIRRELVM vm, ScriptStoryPageList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "StoryPageList", res, nullptr, DefSQDestructorCallback<ScriptStoryPageList>, 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 deleted file mode 100644 index 78a35e8de..000000000 --- a/src/script/api/template/template_subsidy.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidy.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptSubsidy::SubsidyParticipantType GetParam(ForceType<ScriptSubsidy::SubsidyParticipantType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptSubsidy::SubsidyParticipantType)tmp; } - template <> inline int Return<ScriptSubsidy::SubsidyParticipantType>(HSQUIRRELVM vm, ScriptSubsidy::SubsidyParticipantType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptSubsidy to be used as Squirrel parameter */ - template <> inline ScriptSubsidy *GetParam(ForceType<ScriptSubsidy *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidy *)instance; } - template <> inline ScriptSubsidy &GetParam(ForceType<ScriptSubsidy &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidy *)instance; } - template <> inline const ScriptSubsidy *GetParam(ForceType<const ScriptSubsidy *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidy *)instance; } - template <> inline const ScriptSubsidy &GetParam(ForceType<const ScriptSubsidy &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidy *)instance; } - template <> inline int Return<ScriptSubsidy *>(HSQUIRRELVM vm, ScriptSubsidy *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Subsidy", res, nullptr, DefSQDestructorCallback<ScriptSubsidy>, 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 deleted file mode 100644 index 98f2e1fd0..000000000 --- a/src/script/api/template/template_subsidylist.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_subsidylist.hpp" - -namespace SQConvert { - /* Allow ScriptSubsidyList to be used as Squirrel parameter */ - template <> inline ScriptSubsidyList *GetParam(ForceType<ScriptSubsidyList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidyList *)instance; } - template <> inline ScriptSubsidyList &GetParam(ForceType<ScriptSubsidyList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidyList *)instance; } - template <> inline const ScriptSubsidyList *GetParam(ForceType<const ScriptSubsidyList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptSubsidyList *)instance; } - template <> inline const ScriptSubsidyList &GetParam(ForceType<const ScriptSubsidyList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptSubsidyList *)instance; } - template <> inline int Return<ScriptSubsidyList *>(HSQUIRRELVM vm, ScriptSubsidyList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "SubsidyList", res, nullptr, DefSQDestructorCallback<ScriptSubsidyList>, 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 deleted file mode 100644 index c779df57f..000000000 --- a/src/script/api/template/template_testmode.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_testmode.hpp" - -namespace SQConvert { - /* Allow ScriptTestMode to be used as Squirrel parameter */ - template <> inline ScriptTestMode *GetParam(ForceType<ScriptTestMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTestMode *)instance; } - template <> inline ScriptTestMode &GetParam(ForceType<ScriptTestMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTestMode *)instance; } - template <> inline const ScriptTestMode *GetParam(ForceType<const ScriptTestMode *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTestMode *)instance; } - template <> inline const ScriptTestMode &GetParam(ForceType<const ScriptTestMode &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTestMode *)instance; } - template <> inline int Return<ScriptTestMode *>(HSQUIRRELVM vm, ScriptTestMode *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TestMode", res, nullptr, DefSQDestructorCallback<ScriptTestMode>, 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 deleted file mode 100644 index b93fad8c5..000000000 --- a/src/script/api/template/template_text.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_text.hpp" - -namespace SQConvert { - /* Allow ScriptText to be used as Squirrel parameter */ - template <> inline ScriptText *GetParam(ForceType<ScriptText *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptText *)instance; } - template <> inline ScriptText &GetParam(ForceType<ScriptText &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptText *)instance; } - template <> inline const ScriptText *GetParam(ForceType<const ScriptText *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptText *)instance; } - template <> inline const ScriptText &GetParam(ForceType<const ScriptText &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptText *)instance; } - - template <> inline Text *GetParam(ForceType<Text *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { - if (sq_gettype(vm, index) == OT_INSTANCE) { - return GetParam(ForceType<ScriptText *>(), vm, index, ptr); - } - if (sq_gettype(vm, index) == OT_STRING) { - return new RawText(GetParam(ForceType<const char *>(), vm, index, ptr)); - } - return nullptr; - } -} // namespace SQConvert diff --git a/src/script/api/template/template_tile.hpp.sq b/src/script/api/template/template_tile.hpp.sq deleted file mode 100644 index ac9365da7..000000000 --- a/src/script/api/template/template_tile.hpp.sq +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tile.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptTile::ErrorMessages GetParam(ForceType<ScriptTile::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::ErrorMessages)tmp; } - template <> inline int Return<ScriptTile::ErrorMessages>(HSQUIRRELVM vm, ScriptTile::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTile::Corner GetParam(ForceType<ScriptTile::Corner>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::Corner)tmp; } - template <> inline int Return<ScriptTile::Corner>(HSQUIRRELVM vm, ScriptTile::Corner res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTile::Slope GetParam(ForceType<ScriptTile::Slope>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::Slope)tmp; } - template <> inline int Return<ScriptTile::Slope>(HSQUIRRELVM vm, ScriptTile::Slope res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTile::TransportType GetParam(ForceType<ScriptTile::TransportType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::TransportType)tmp; } - template <> inline int Return<ScriptTile::TransportType>(HSQUIRRELVM vm, ScriptTile::TransportType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTile::BuildType GetParam(ForceType<ScriptTile::BuildType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::BuildType)tmp; } - template <> inline int Return<ScriptTile::BuildType>(HSQUIRRELVM vm, ScriptTile::BuildType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTile::TerrainType GetParam(ForceType<ScriptTile::TerrainType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTile::TerrainType)tmp; } - template <> inline int Return<ScriptTile::TerrainType>(HSQUIRRELVM vm, ScriptTile::TerrainType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptTile to be used as Squirrel parameter */ - template <> inline ScriptTile *GetParam(ForceType<ScriptTile *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTile *)instance; } - template <> inline ScriptTile &GetParam(ForceType<ScriptTile &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTile *)instance; } - template <> inline const ScriptTile *GetParam(ForceType<const ScriptTile *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTile *)instance; } - template <> inline const ScriptTile &GetParam(ForceType<const ScriptTile &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTile *)instance; } - template <> inline int Return<ScriptTile *>(HSQUIRRELVM vm, ScriptTile *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tile", res, nullptr, DefSQDestructorCallback<ScriptTile>, 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 deleted file mode 100644 index 7f1ae696c..000000000 --- a/src/script/api/template/template_tilelist.hpp.sq +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tilelist.hpp" - -namespace SQConvert { - /* Allow ScriptTileList to be used as Squirrel parameter */ - template <> inline ScriptTileList *GetParam(ForceType<ScriptTileList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList *)instance; } - template <> inline ScriptTileList &GetParam(ForceType<ScriptTileList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList *)instance; } - template <> inline const ScriptTileList *GetParam(ForceType<const ScriptTileList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList *)instance; } - template <> inline const ScriptTileList &GetParam(ForceType<const ScriptTileList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList *)instance; } - template <> inline int Return<ScriptTileList *>(HSQUIRRELVM vm, ScriptTileList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList", res, nullptr, DefSQDestructorCallback<ScriptTileList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptTileList_IndustryAccepting to be used as Squirrel parameter */ - template <> inline ScriptTileList_IndustryAccepting *GetParam(ForceType<ScriptTileList_IndustryAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_IndustryAccepting *)instance; } - template <> inline ScriptTileList_IndustryAccepting &GetParam(ForceType<ScriptTileList_IndustryAccepting &>, 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<const ScriptTileList_IndustryAccepting *>, 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<const ScriptTileList_IndustryAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryAccepting *)instance; } - template <> inline int Return<ScriptTileList_IndustryAccepting *>(HSQUIRRELVM vm, ScriptTileList_IndustryAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryAccepting", res, nullptr, DefSQDestructorCallback<ScriptTileList_IndustryAccepting>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptTileList_IndustryProducing to be used as Squirrel parameter */ - template <> inline ScriptTileList_IndustryProducing *GetParam(ForceType<ScriptTileList_IndustryProducing *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_IndustryProducing *)instance; } - template <> inline ScriptTileList_IndustryProducing &GetParam(ForceType<ScriptTileList_IndustryProducing &>, 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<const ScriptTileList_IndustryProducing *>, 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<const ScriptTileList_IndustryProducing &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_IndustryProducing *)instance; } - template <> inline int Return<ScriptTileList_IndustryProducing *>(HSQUIRRELVM vm, ScriptTileList_IndustryProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_IndustryProducing", res, nullptr, DefSQDestructorCallback<ScriptTileList_IndustryProducing>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptTileList_StationType to be used as Squirrel parameter */ - template <> inline ScriptTileList_StationType *GetParam(ForceType<ScriptTileList_StationType *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTileList_StationType *)instance; } - template <> inline ScriptTileList_StationType &GetParam(ForceType<ScriptTileList_StationType &>, 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<const ScriptTileList_StationType *>, 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<const ScriptTileList_StationType &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTileList_StationType *)instance; } - template <> inline int Return<ScriptTileList_StationType *>(HSQUIRRELVM vm, ScriptTileList_StationType *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TileList_StationType", res, nullptr, DefSQDestructorCallback<ScriptTileList_StationType>, 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 deleted file mode 100644 index 6134ecbe9..000000000 --- a/src/script/api/template/template_town.hpp.sq +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_town.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptTown::TownAction GetParam(ForceType<ScriptTown::TownAction>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTown::TownAction)tmp; } - template <> inline int Return<ScriptTown::TownAction>(HSQUIRRELVM vm, ScriptTown::TownAction res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTown::TownRating GetParam(ForceType<ScriptTown::TownRating>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTown::TownRating)tmp; } - template <> inline int Return<ScriptTown::TownRating>(HSQUIRRELVM vm, ScriptTown::TownRating res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTown::RoadLayout GetParam(ForceType<ScriptTown::RoadLayout>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTown::RoadLayout)tmp; } - template <> inline int Return<ScriptTown::RoadLayout>(HSQUIRRELVM vm, ScriptTown::RoadLayout res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTown::TownSize GetParam(ForceType<ScriptTown::TownSize>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTown::TownSize)tmp; } - template <> inline int Return<ScriptTown::TownSize>(HSQUIRRELVM vm, ScriptTown::TownSize res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptTown::TownGrowth GetParam(ForceType<ScriptTown::TownGrowth>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTown::TownGrowth)tmp; } - template <> inline int Return<ScriptTown::TownGrowth>(HSQUIRRELVM vm, ScriptTown::TownGrowth res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptTown to be used as Squirrel parameter */ - template <> inline ScriptTown *GetParam(ForceType<ScriptTown *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTown *)instance; } - template <> inline ScriptTown &GetParam(ForceType<ScriptTown &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTown *)instance; } - template <> inline const ScriptTown *GetParam(ForceType<const ScriptTown *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTown *)instance; } - template <> inline const ScriptTown &GetParam(ForceType<const ScriptTown &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTown *)instance; } - template <> inline int Return<ScriptTown *>(HSQUIRRELVM vm, ScriptTown *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Town", res, nullptr, DefSQDestructorCallback<ScriptTown>, 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 deleted file mode 100644 index ff97ef447..000000000 --- a/src/script/api/template/template_townlist.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_townlist.hpp" - -namespace SQConvert { - /* Allow ScriptTownList to be used as Squirrel parameter */ - template <> inline ScriptTownList *GetParam(ForceType<ScriptTownList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownList *)instance; } - template <> inline ScriptTownList &GetParam(ForceType<ScriptTownList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownList *)instance; } - template <> inline const ScriptTownList *GetParam(ForceType<const ScriptTownList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownList *)instance; } - template <> inline const ScriptTownList &GetParam(ForceType<const ScriptTownList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownList *)instance; } - template <> inline int Return<ScriptTownList *>(HSQUIRRELVM vm, ScriptTownList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownList", res, nullptr, DefSQDestructorCallback<ScriptTownList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptTownEffectList to be used as Squirrel parameter */ - template <> inline ScriptTownEffectList *GetParam(ForceType<ScriptTownEffectList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownEffectList *)instance; } - template <> inline ScriptTownEffectList &GetParam(ForceType<ScriptTownEffectList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownEffectList *)instance; } - template <> inline const ScriptTownEffectList *GetParam(ForceType<const ScriptTownEffectList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTownEffectList *)instance; } - template <> inline const ScriptTownEffectList &GetParam(ForceType<const ScriptTownEffectList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTownEffectList *)instance; } - template <> inline int Return<ScriptTownEffectList *>(HSQUIRRELVM vm, ScriptTownEffectList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "TownEffectList", res, nullptr, DefSQDestructorCallback<ScriptTownEffectList>, 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 deleted file mode 100644 index 49b25b7ef..000000000 --- a/src/script/api/template/template_tunnel.hpp.sq +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_tunnel.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptTunnel::ErrorMessages GetParam(ForceType<ScriptTunnel::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptTunnel::ErrorMessages)tmp; } - template <> inline int Return<ScriptTunnel::ErrorMessages>(HSQUIRRELVM vm, ScriptTunnel::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptTunnel to be used as Squirrel parameter */ - template <> inline ScriptTunnel *GetParam(ForceType<ScriptTunnel *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTunnel *)instance; } - template <> inline ScriptTunnel &GetParam(ForceType<ScriptTunnel &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTunnel *)instance; } - template <> inline const ScriptTunnel *GetParam(ForceType<const ScriptTunnel *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptTunnel *)instance; } - template <> inline const ScriptTunnel &GetParam(ForceType<const ScriptTunnel &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptTunnel *)instance; } - template <> inline int Return<ScriptTunnel *>(HSQUIRRELVM vm, ScriptTunnel *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Tunnel", res, nullptr, DefSQDestructorCallback<ScriptTunnel>, 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 deleted file mode 100644 index 87713b8b4..000000000 --- a/src/script/api/template/template_vehicle.hpp.sq +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehicle.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptVehicle::ErrorMessages GetParam(ForceType<ScriptVehicle::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptVehicle::ErrorMessages)tmp; } - template <> inline int Return<ScriptVehicle::ErrorMessages>(HSQUIRRELVM vm, ScriptVehicle::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptVehicle::VehicleType GetParam(ForceType<ScriptVehicle::VehicleType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptVehicle::VehicleType)tmp; } - template <> inline int Return<ScriptVehicle::VehicleType>(HSQUIRRELVM vm, ScriptVehicle::VehicleType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptVehicle::VehicleState GetParam(ForceType<ScriptVehicle::VehicleState>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptVehicle::VehicleState)tmp; } - template <> inline int Return<ScriptVehicle::VehicleState>(HSQUIRRELVM vm, ScriptVehicle::VehicleState res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptVehicle to be used as Squirrel parameter */ - template <> inline ScriptVehicle *GetParam(ForceType<ScriptVehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicle *)instance; } - template <> inline ScriptVehicle &GetParam(ForceType<ScriptVehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicle *)instance; } - template <> inline const ScriptVehicle *GetParam(ForceType<const ScriptVehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicle *)instance; } - template <> inline const ScriptVehicle &GetParam(ForceType<const ScriptVehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicle *)instance; } - template <> inline int Return<ScriptVehicle *>(HSQUIRRELVM vm, ScriptVehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Vehicle", res, nullptr, DefSQDestructorCallback<ScriptVehicle>, 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 deleted file mode 100644 index 701116748..000000000 --- a/src/script/api/template/template_vehiclelist.hpp.sq +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_vehiclelist.hpp" - -namespace SQConvert { - /* Allow ScriptVehicleList to be used as Squirrel parameter */ - template <> inline ScriptVehicleList *GetParam(ForceType<ScriptVehicleList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList *)instance; } - template <> inline ScriptVehicleList &GetParam(ForceType<ScriptVehicleList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList *)instance; } - template <> inline const ScriptVehicleList *GetParam(ForceType<const ScriptVehicleList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList *)instance; } - template <> inline const ScriptVehicleList &GetParam(ForceType<const ScriptVehicleList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList *)instance; } - template <> inline int Return<ScriptVehicleList *>(HSQUIRRELVM vm, ScriptVehicleList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList", res, nullptr, DefSQDestructorCallback<ScriptVehicleList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptVehicleList_Station to be used as Squirrel parameter */ - template <> inline ScriptVehicleList_Station *GetParam(ForceType<ScriptVehicleList_Station *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Station *)instance; } - template <> inline ScriptVehicleList_Station &GetParam(ForceType<ScriptVehicleList_Station &>, 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<const ScriptVehicleList_Station *>, 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<const ScriptVehicleList_Station &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Station *)instance; } - template <> inline int Return<ScriptVehicleList_Station *>(HSQUIRRELVM vm, ScriptVehicleList_Station *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Station", res, nullptr, DefSQDestructorCallback<ScriptVehicleList_Station>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptVehicleList_Depot to be used as Squirrel parameter */ - template <> inline ScriptVehicleList_Depot *GetParam(ForceType<ScriptVehicleList_Depot *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Depot *)instance; } - template <> inline ScriptVehicleList_Depot &GetParam(ForceType<ScriptVehicleList_Depot &>, 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<const ScriptVehicleList_Depot *>, 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<const ScriptVehicleList_Depot &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Depot *)instance; } - template <> inline int Return<ScriptVehicleList_Depot *>(HSQUIRRELVM vm, ScriptVehicleList_Depot *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Depot", res, nullptr, DefSQDestructorCallback<ScriptVehicleList_Depot>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptVehicleList_SharedOrders to be used as Squirrel parameter */ - template <> inline ScriptVehicleList_SharedOrders *GetParam(ForceType<ScriptVehicleList_SharedOrders *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_SharedOrders *)instance; } - template <> inline ScriptVehicleList_SharedOrders &GetParam(ForceType<ScriptVehicleList_SharedOrders &>, 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<const ScriptVehicleList_SharedOrders *>, 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<const ScriptVehicleList_SharedOrders &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_SharedOrders *)instance; } - template <> inline int Return<ScriptVehicleList_SharedOrders *>(HSQUIRRELVM vm, ScriptVehicleList_SharedOrders *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_SharedOrders", res, nullptr, DefSQDestructorCallback<ScriptVehicleList_SharedOrders>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptVehicleList_Group to be used as Squirrel parameter */ - template <> inline ScriptVehicleList_Group *GetParam(ForceType<ScriptVehicleList_Group *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_Group *)instance; } - template <> inline ScriptVehicleList_Group &GetParam(ForceType<ScriptVehicleList_Group &>, 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<const ScriptVehicleList_Group *>, 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<const ScriptVehicleList_Group &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_Group *)instance; } - template <> inline int Return<ScriptVehicleList_Group *>(HSQUIRRELVM vm, ScriptVehicleList_Group *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_Group", res, nullptr, DefSQDestructorCallback<ScriptVehicleList_Group>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptVehicleList_DefaultGroup to be used as Squirrel parameter */ - template <> inline ScriptVehicleList_DefaultGroup *GetParam(ForceType<ScriptVehicleList_DefaultGroup *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptVehicleList_DefaultGroup *)instance; } - template <> inline ScriptVehicleList_DefaultGroup &GetParam(ForceType<ScriptVehicleList_DefaultGroup &>, 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<const ScriptVehicleList_DefaultGroup *>, 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<const ScriptVehicleList_DefaultGroup &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptVehicleList_DefaultGroup *)instance; } - template <> inline int Return<ScriptVehicleList_DefaultGroup *>(HSQUIRRELVM vm, ScriptVehicleList_DefaultGroup *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "VehicleList_DefaultGroup", res, nullptr, DefSQDestructorCallback<ScriptVehicleList_DefaultGroup>, 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 deleted file mode 100644 index 845c82448..000000000 --- a/src/script/api/template/template_viewport.hpp.sq +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_viewport.hpp" - -namespace SQConvert { - /* Allow ScriptViewport to be used as Squirrel parameter */ - template <> inline ScriptViewport *GetParam(ForceType<ScriptViewport *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptViewport *)instance; } - template <> inline ScriptViewport &GetParam(ForceType<ScriptViewport &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptViewport *)instance; } - template <> inline const ScriptViewport *GetParam(ForceType<const ScriptViewport *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptViewport *)instance; } - template <> inline const ScriptViewport &GetParam(ForceType<const ScriptViewport &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptViewport *)instance; } - template <> inline int Return<ScriptViewport *>(HSQUIRRELVM vm, ScriptViewport *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Viewport", res, nullptr, DefSQDestructorCallback<ScriptViewport>, 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 deleted file mode 100644 index 179e62ae0..000000000 --- a/src/script/api/template/template_waypoint.hpp.sq +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypoint.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptWaypoint::ErrorMessages GetParam(ForceType<ScriptWaypoint::ErrorMessages>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWaypoint::ErrorMessages)tmp; } - template <> inline int Return<ScriptWaypoint::ErrorMessages>(HSQUIRRELVM vm, ScriptWaypoint::ErrorMessages res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWaypoint::WaypointType GetParam(ForceType<ScriptWaypoint::WaypointType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWaypoint::WaypointType)tmp; } - template <> inline int Return<ScriptWaypoint::WaypointType>(HSQUIRRELVM vm, ScriptWaypoint::WaypointType res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptWaypoint to be used as Squirrel parameter */ - template <> inline ScriptWaypoint *GetParam(ForceType<ScriptWaypoint *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypoint *)instance; } - template <> inline ScriptWaypoint &GetParam(ForceType<ScriptWaypoint &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypoint *)instance; } - template <> inline const ScriptWaypoint *GetParam(ForceType<const ScriptWaypoint *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypoint *)instance; } - template <> inline const ScriptWaypoint &GetParam(ForceType<const ScriptWaypoint &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypoint *)instance; } - template <> inline int Return<ScriptWaypoint *>(HSQUIRRELVM vm, ScriptWaypoint *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Waypoint", res, nullptr, DefSQDestructorCallback<ScriptWaypoint>, 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 deleted file mode 100644 index 1de9eb40e..000000000 --- a/src/script/api/template/template_waypointlist.hpp.sq +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_waypointlist.hpp" - -namespace SQConvert { - /* Allow ScriptWaypointList to be used as Squirrel parameter */ - template <> inline ScriptWaypointList *GetParam(ForceType<ScriptWaypointList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypointList *)instance; } - template <> inline ScriptWaypointList &GetParam(ForceType<ScriptWaypointList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList *)instance; } - template <> inline const ScriptWaypointList *GetParam(ForceType<const ScriptWaypointList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypointList *)instance; } - template <> inline const ScriptWaypointList &GetParam(ForceType<const ScriptWaypointList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList *)instance; } - template <> inline int Return<ScriptWaypointList *>(HSQUIRRELVM vm, ScriptWaypointList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList", res, nullptr, DefSQDestructorCallback<ScriptWaypointList>, true); return 1; } -} // namespace SQConvert - -namespace SQConvert { - /* Allow ScriptWaypointList_Vehicle to be used as Squirrel parameter */ - template <> inline ScriptWaypointList_Vehicle *GetParam(ForceType<ScriptWaypointList_Vehicle *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWaypointList_Vehicle *)instance; } - template <> inline ScriptWaypointList_Vehicle &GetParam(ForceType<ScriptWaypointList_Vehicle &>, 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<const ScriptWaypointList_Vehicle *>, 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<const ScriptWaypointList_Vehicle &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWaypointList_Vehicle *)instance; } - template <> inline int Return<ScriptWaypointList_Vehicle *>(HSQUIRRELVM vm, ScriptWaypointList_Vehicle *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "WaypointList_Vehicle", res, nullptr, DefSQDestructorCallback<ScriptWaypointList_Vehicle>, 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 deleted file mode 100644 index 723c98a91..000000000 --- a/src/script/api/template/template_window.hpp.sq +++ /dev/null @@ -1,263 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. - */ - -/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ - -#include "../script_window.hpp" - -namespace SQConvert { - /* Allow enums to be used as Squirrel parameters */ - template <> inline ScriptWindow::WindowNumberEnum GetParam(ForceType<ScriptWindow::WindowNumberEnum>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WindowNumberEnum)tmp; } - template <> inline int Return<ScriptWindow::WindowNumberEnum>(HSQUIRRELVM vm, ScriptWindow::WindowNumberEnum res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::WindowClass GetParam(ForceType<ScriptWindow::WindowClass>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WindowClass)tmp; } - template <> inline int Return<ScriptWindow::WindowClass>(HSQUIRRELVM vm, ScriptWindow::WindowClass res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TextColour GetParam(ForceType<ScriptWindow::TextColour>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TextColour)tmp; } - template <> inline int Return<ScriptWindow::TextColour>(HSQUIRRELVM vm, ScriptWindow::TextColour res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NumberType GetParam(ForceType<ScriptWindow::NumberType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NumberType)tmp; } - template <> inline int Return<ScriptWindow::NumberType>(HSQUIRRELVM vm, ScriptWindow::NumberType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::WidgetType GetParam(ForceType<ScriptWindow::WidgetType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WidgetType)tmp; } - template <> inline int Return<ScriptWindow::WidgetType>(HSQUIRRELVM vm, ScriptWindow::WidgetType res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AIListWidgets GetParam(ForceType<ScriptWindow::AIListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIListWidgets)tmp; } - template <> inline int Return<ScriptWindow::AIListWidgets>(HSQUIRRELVM vm, ScriptWindow::AIListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AISettingsWidgets GetParam(ForceType<ScriptWindow::AISettingsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AISettingsWidgets)tmp; } - template <> inline int Return<ScriptWindow::AISettingsWidgets>(HSQUIRRELVM vm, ScriptWindow::AISettingsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AIConfigWidgets GetParam(ForceType<ScriptWindow::AIConfigWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIConfigWidgets)tmp; } - template <> inline int Return<ScriptWindow::AIConfigWidgets>(HSQUIRRELVM vm, ScriptWindow::AIConfigWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AIDebugWidgets GetParam(ForceType<ScriptWindow::AIDebugWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIDebugWidgets)tmp; } - template <> inline int Return<ScriptWindow::AIDebugWidgets>(HSQUIRRELVM vm, ScriptWindow::AIDebugWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AirportToolbarWidgets GetParam(ForceType<ScriptWindow::AirportToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AirportToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::AirportToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::AirportToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AirportPickerWidgets GetParam(ForceType<ScriptWindow::AirportPickerWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AirportPickerWidgets)tmp; } - template <> inline int Return<ScriptWindow::AirportPickerWidgets>(HSQUIRRELVM vm, ScriptWindow::AirportPickerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ReplaceVehicleWidgets GetParam(ForceType<ScriptWindow::ReplaceVehicleWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ReplaceVehicleWidgets)tmp; } - template <> inline int Return<ScriptWindow::ReplaceVehicleWidgets>(HSQUIRRELVM vm, ScriptWindow::ReplaceVehicleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BootstrapBackgroundWidgets GetParam(ForceType<ScriptWindow::BootstrapBackgroundWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BootstrapBackgroundWidgets)tmp; } - template <> inline int Return<ScriptWindow::BootstrapBackgroundWidgets>(HSQUIRRELVM vm, ScriptWindow::BootstrapBackgroundWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BootstrapAskForDownloadWidgets GetParam(ForceType<ScriptWindow::BootstrapAskForDownloadWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BootstrapAskForDownloadWidgets)tmp; } - template <> inline int Return<ScriptWindow::BootstrapAskForDownloadWidgets>(HSQUIRRELVM vm, ScriptWindow::BootstrapAskForDownloadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildBridgeSelectionWidgets GetParam(ForceType<ScriptWindow::BuildBridgeSelectionWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildBridgeSelectionWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildBridgeSelectionWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildBridgeSelectionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildVehicleWidgets GetParam(ForceType<ScriptWindow::BuildVehicleWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildVehicleWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildVehicleWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildVehicleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CheatWidgets GetParam(ForceType<ScriptWindow::CheatWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CheatWidgets)tmp; } - template <> inline int Return<ScriptWindow::CheatWidgets>(HSQUIRRELVM vm, ScriptWindow::CheatWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CompanyWidgets GetParam(ForceType<ScriptWindow::CompanyWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyWidgets)tmp; } - template <> inline int Return<ScriptWindow::CompanyWidgets>(HSQUIRRELVM vm, ScriptWindow::CompanyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CompanyFinancesWidgets GetParam(ForceType<ScriptWindow::CompanyFinancesWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyFinancesWidgets)tmp; } - template <> inline int Return<ScriptWindow::CompanyFinancesWidgets>(HSQUIRRELVM vm, ScriptWindow::CompanyFinancesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SelectCompanyLiveryWidgets GetParam(ForceType<ScriptWindow::SelectCompanyLiveryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectCompanyLiveryWidgets)tmp; } - template <> inline int Return<ScriptWindow::SelectCompanyLiveryWidgets>(HSQUIRRELVM vm, ScriptWindow::SelectCompanyLiveryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SelectCompanyManagerFaceWidgets GetParam(ForceType<ScriptWindow::SelectCompanyManagerFaceWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectCompanyManagerFaceWidgets)tmp; } - template <> inline int Return<ScriptWindow::SelectCompanyManagerFaceWidgets>(HSQUIRRELVM vm, ScriptWindow::SelectCompanyManagerFaceWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CompanyInfrastructureWidgets GetParam(ForceType<ScriptWindow::CompanyInfrastructureWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyInfrastructureWidgets)tmp; } - template <> inline int Return<ScriptWindow::CompanyInfrastructureWidgets>(HSQUIRRELVM vm, ScriptWindow::CompanyInfrastructureWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuyCompanyWidgets GetParam(ForceType<ScriptWindow::BuyCompanyWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuyCompanyWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuyCompanyWidgets>(HSQUIRRELVM vm, ScriptWindow::BuyCompanyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ConsoleWidgets GetParam(ForceType<ScriptWindow::ConsoleWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ConsoleWidgets)tmp; } - template <> inline int Return<ScriptWindow::ConsoleWidgets>(HSQUIRRELVM vm, ScriptWindow::ConsoleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SetDateWidgets GetParam(ForceType<ScriptWindow::SetDateWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SetDateWidgets)tmp; } - template <> inline int Return<ScriptWindow::SetDateWidgets>(HSQUIRRELVM vm, ScriptWindow::SetDateWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::DepotWidgets GetParam(ForceType<ScriptWindow::DepotWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DepotWidgets)tmp; } - template <> inline int Return<ScriptWindow::DepotWidgets>(HSQUIRRELVM vm, ScriptWindow::DepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildDockDepotWidgets GetParam(ForceType<ScriptWindow::BuildDockDepotWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildDockDepotWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildDockDepotWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildDockDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::DockToolbarWidgets GetParam(ForceType<ScriptWindow::DockToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DockToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::DockToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::DockToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::DropdownMenuWidgets GetParam(ForceType<ScriptWindow::DropdownMenuWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DropdownMenuWidgets)tmp; } - template <> inline int Return<ScriptWindow::DropdownMenuWidgets>(HSQUIRRELVM vm, ScriptWindow::DropdownMenuWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::EnginePreviewWidgets GetParam(ForceType<ScriptWindow::EnginePreviewWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::EnginePreviewWidgets)tmp; } - template <> inline int Return<ScriptWindow::EnginePreviewWidgets>(HSQUIRRELVM vm, ScriptWindow::EnginePreviewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ErrorMessageWidgets GetParam(ForceType<ScriptWindow::ErrorMessageWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ErrorMessageWidgets)tmp; } - template <> inline int Return<ScriptWindow::ErrorMessageWidgets>(HSQUIRRELVM vm, ScriptWindow::ErrorMessageWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SaveLoadWidgets GetParam(ForceType<ScriptWindow::SaveLoadWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SaveLoadWidgets)tmp; } - template <> inline int Return<ScriptWindow::SaveLoadWidgets>(HSQUIRRELVM vm, ScriptWindow::SaveLoadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::FramerateWindowWidgets GetParam(ForceType<ScriptWindow::FramerateWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FramerateWindowWidgets)tmp; } - template <> inline int Return<ScriptWindow::FramerateWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::FramerateWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::FrametimeGraphWindowWidgets GetParam(ForceType<ScriptWindow::FrametimeGraphWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FrametimeGraphWindowWidgets)tmp; } - template <> inline int Return<ScriptWindow::FrametimeGraphWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::FrametimeGraphWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GenerateLandscapeWidgets GetParam(ForceType<ScriptWindow::GenerateLandscapeWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerateLandscapeWidgets)tmp; } - template <> inline int Return<ScriptWindow::GenerateLandscapeWidgets>(HSQUIRRELVM vm, ScriptWindow::GenerateLandscapeWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CreateScenarioWidgets GetParam(ForceType<ScriptWindow::CreateScenarioWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CreateScenarioWidgets)tmp; } - template <> inline int Return<ScriptWindow::CreateScenarioWidgets>(HSQUIRRELVM vm, ScriptWindow::CreateScenarioWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GenerationProgressWidgets GetParam(ForceType<ScriptWindow::GenerationProgressWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerationProgressWidgets)tmp; } - template <> inline int Return<ScriptWindow::GenerationProgressWidgets>(HSQUIRRELVM vm, ScriptWindow::GenerationProgressWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GoalListWidgets GetParam(ForceType<ScriptWindow::GoalListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GoalListWidgets)tmp; } - template <> inline int Return<ScriptWindow::GoalListWidgets>(HSQUIRRELVM vm, ScriptWindow::GoalListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GoalQuestionWidgets GetParam(ForceType<ScriptWindow::GoalQuestionWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GoalQuestionWidgets)tmp; } - template <> inline int Return<ScriptWindow::GoalQuestionWidgets>(HSQUIRRELVM vm, ScriptWindow::GoalQuestionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GraphLegendWidgets GetParam(ForceType<ScriptWindow::GraphLegendWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GraphLegendWidgets)tmp; } - template <> inline int Return<ScriptWindow::GraphLegendWidgets>(HSQUIRRELVM vm, ScriptWindow::GraphLegendWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CompanyValueWidgets GetParam(ForceType<ScriptWindow::CompanyValueWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyValueWidgets)tmp; } - template <> inline int Return<ScriptWindow::CompanyValueWidgets>(HSQUIRRELVM vm, ScriptWindow::CompanyValueWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::PerformanceHistoryGraphWidgets GetParam(ForceType<ScriptWindow::PerformanceHistoryGraphWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::PerformanceHistoryGraphWidgets)tmp; } - template <> inline int Return<ScriptWindow::PerformanceHistoryGraphWidgets>(HSQUIRRELVM vm, ScriptWindow::PerformanceHistoryGraphWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CargoPaymentRatesWidgets GetParam(ForceType<ScriptWindow::CargoPaymentRatesWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CargoPaymentRatesWidgets)tmp; } - template <> inline int Return<ScriptWindow::CargoPaymentRatesWidgets>(HSQUIRRELVM vm, ScriptWindow::CargoPaymentRatesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CompanyLeagueWidgets GetParam(ForceType<ScriptWindow::CompanyLeagueWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyLeagueWidgets)tmp; } - template <> inline int Return<ScriptWindow::CompanyLeagueWidgets>(HSQUIRRELVM vm, ScriptWindow::CompanyLeagueWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::PerformanceRatingDetailsWidgets GetParam(ForceType<ScriptWindow::PerformanceRatingDetailsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::PerformanceRatingDetailsWidgets)tmp; } - template <> inline int Return<ScriptWindow::PerformanceRatingDetailsWidgets>(HSQUIRRELVM vm, ScriptWindow::PerformanceRatingDetailsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GroupListWidgets GetParam(ForceType<ScriptWindow::GroupListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GroupListWidgets)tmp; } - template <> inline int Return<ScriptWindow::GroupListWidgets>(HSQUIRRELVM vm, ScriptWindow::GroupListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::HighscoreWidgets GetParam(ForceType<ScriptWindow::HighscoreWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::HighscoreWidgets)tmp; } - template <> inline int Return<ScriptWindow::HighscoreWidgets>(HSQUIRRELVM vm, ScriptWindow::HighscoreWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::DynamicPlaceIndustriesWidgets GetParam(ForceType<ScriptWindow::DynamicPlaceIndustriesWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DynamicPlaceIndustriesWidgets)tmp; } - template <> inline int Return<ScriptWindow::DynamicPlaceIndustriesWidgets>(HSQUIRRELVM vm, ScriptWindow::DynamicPlaceIndustriesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::IndustryViewWidgets GetParam(ForceType<ScriptWindow::IndustryViewWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryViewWidgets)tmp; } - template <> inline int Return<ScriptWindow::IndustryViewWidgets>(HSQUIRRELVM vm, ScriptWindow::IndustryViewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::IndustryDirectoryWidgets GetParam(ForceType<ScriptWindow::IndustryDirectoryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryDirectoryWidgets)tmp; } - template <> inline int Return<ScriptWindow::IndustryDirectoryWidgets>(HSQUIRRELVM vm, ScriptWindow::IndustryDirectoryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::IndustryCargoesWidgets GetParam(ForceType<ScriptWindow::IndustryCargoesWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryCargoesWidgets)tmp; } - template <> inline int Return<ScriptWindow::IndustryCargoesWidgets>(HSQUIRRELVM vm, ScriptWindow::IndustryCargoesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SelectGameIntroWidgets GetParam(ForceType<ScriptWindow::SelectGameIntroWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectGameIntroWidgets)tmp; } - template <> inline int Return<ScriptWindow::SelectGameIntroWidgets>(HSQUIRRELVM vm, ScriptWindow::SelectGameIntroWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::LinkGraphLegendWidgets GetParam(ForceType<ScriptWindow::LinkGraphLegendWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::LinkGraphLegendWidgets)tmp; } - template <> inline int Return<ScriptWindow::LinkGraphLegendWidgets>(HSQUIRRELVM vm, ScriptWindow::LinkGraphLegendWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::MainWidgets GetParam(ForceType<ScriptWindow::MainWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MainWidgets)tmp; } - template <> inline int Return<ScriptWindow::MainWidgets>(HSQUIRRELVM vm, ScriptWindow::MainWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::LandInfoWidgets GetParam(ForceType<ScriptWindow::LandInfoWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::LandInfoWidgets)tmp; } - template <> inline int Return<ScriptWindow::LandInfoWidgets>(HSQUIRRELVM vm, ScriptWindow::LandInfoWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ToolTipsWidgets GetParam(ForceType<ScriptWindow::ToolTipsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ToolTipsWidgets)tmp; } - template <> inline int Return<ScriptWindow::ToolTipsWidgets>(HSQUIRRELVM vm, ScriptWindow::ToolTipsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::AboutWidgets GetParam(ForceType<ScriptWindow::AboutWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AboutWidgets)tmp; } - template <> inline int Return<ScriptWindow::AboutWidgets>(HSQUIRRELVM vm, ScriptWindow::AboutWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::QueryStringWidgets GetParam(ForceType<ScriptWindow::QueryStringWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::QueryStringWidgets)tmp; } - template <> inline int Return<ScriptWindow::QueryStringWidgets>(HSQUIRRELVM vm, ScriptWindow::QueryStringWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::QueryWidgets GetParam(ForceType<ScriptWindow::QueryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::QueryWidgets)tmp; } - template <> inline int Return<ScriptWindow::QueryWidgets>(HSQUIRRELVM vm, ScriptWindow::QueryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TextfileWidgets GetParam(ForceType<ScriptWindow::TextfileWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TextfileWidgets)tmp; } - template <> inline int Return<ScriptWindow::TextfileWidgets>(HSQUIRRELVM vm, ScriptWindow::TextfileWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::MusicTrackSelectionWidgets GetParam(ForceType<ScriptWindow::MusicTrackSelectionWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MusicTrackSelectionWidgets)tmp; } - template <> inline int Return<ScriptWindow::MusicTrackSelectionWidgets>(HSQUIRRELVM vm, ScriptWindow::MusicTrackSelectionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::MusicWidgets GetParam(ForceType<ScriptWindow::MusicWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MusicWidgets)tmp; } - template <> inline int Return<ScriptWindow::MusicWidgets>(HSQUIRRELVM vm, ScriptWindow::MusicWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetWorkChatWidgets GetParam(ForceType<ScriptWindow::NetWorkChatWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetWorkChatWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetWorkChatWidgets>(HSQUIRRELVM vm, ScriptWindow::NetWorkChatWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkContentDownloadStatusWidgets GetParam(ForceType<ScriptWindow::NetworkContentDownloadStatusWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkContentDownloadStatusWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkContentDownloadStatusWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkContentDownloadStatusWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkContentListWidgets GetParam(ForceType<ScriptWindow::NetworkContentListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkContentListWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkContentListWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkContentListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkGameWidgets GetParam(ForceType<ScriptWindow::NetworkGameWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkGameWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkGameWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkGameWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkStartServerWidgets GetParam(ForceType<ScriptWindow::NetworkStartServerWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkStartServerWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkStartServerWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkStartServerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkLobbyWidgets GetParam(ForceType<ScriptWindow::NetworkLobbyWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkLobbyWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkLobbyWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkLobbyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ClientListWidgets GetParam(ForceType<ScriptWindow::ClientListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ClientListWidgets)tmp; } - template <> inline int Return<ScriptWindow::ClientListWidgets>(HSQUIRRELVM vm, ScriptWindow::ClientListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ClientListPopupWidgets GetParam(ForceType<ScriptWindow::ClientListPopupWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ClientListPopupWidgets)tmp; } - template <> inline int Return<ScriptWindow::ClientListPopupWidgets>(HSQUIRRELVM vm, ScriptWindow::ClientListPopupWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkJoinStatusWidgets GetParam(ForceType<ScriptWindow::NetworkJoinStatusWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkJoinStatusWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkJoinStatusWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkJoinStatusWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NetworkCompanyPasswordWidgets GetParam(ForceType<ScriptWindow::NetworkCompanyPasswordWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkCompanyPasswordWidgets)tmp; } - template <> inline int Return<ScriptWindow::NetworkCompanyPasswordWidgets>(HSQUIRRELVM vm, ScriptWindow::NetworkCompanyPasswordWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NewGRFInspectWidgets GetParam(ForceType<ScriptWindow::NewGRFInspectWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFInspectWidgets)tmp; } - template <> inline int Return<ScriptWindow::NewGRFInspectWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFInspectWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SpriteAlignerWidgets GetParam(ForceType<ScriptWindow::SpriteAlignerWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SpriteAlignerWidgets)tmp; } - template <> inline int Return<ScriptWindow::SpriteAlignerWidgets>(HSQUIRRELVM vm, ScriptWindow::SpriteAlignerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NewGRFParametersWidgets GetParam(ForceType<ScriptWindow::NewGRFParametersWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFParametersWidgets)tmp; } - template <> inline int Return<ScriptWindow::NewGRFParametersWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFParametersWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NewGRFStateWidgets GetParam(ForceType<ScriptWindow::NewGRFStateWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFStateWidgets)tmp; } - template <> inline int Return<ScriptWindow::NewGRFStateWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFStateWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SavePresetWidgets GetParam(ForceType<ScriptWindow::SavePresetWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SavePresetWidgets)tmp; } - template <> inline int Return<ScriptWindow::SavePresetWidgets>(HSQUIRRELVM vm, ScriptWindow::SavePresetWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ScanProgressWidgets GetParam(ForceType<ScriptWindow::ScanProgressWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScanProgressWidgets)tmp; } - template <> inline int Return<ScriptWindow::ScanProgressWidgets>(HSQUIRRELVM vm, ScriptWindow::ScanProgressWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::NewsWidgets GetParam(ForceType<ScriptWindow::NewsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewsWidgets)tmp; } - template <> inline int Return<ScriptWindow::NewsWidgets>(HSQUIRRELVM vm, ScriptWindow::NewsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::MessageHistoryWidgets GetParam(ForceType<ScriptWindow::MessageHistoryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MessageHistoryWidgets)tmp; } - template <> inline int Return<ScriptWindow::MessageHistoryWidgets>(HSQUIRRELVM vm, ScriptWindow::MessageHistoryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildObjectWidgets GetParam(ForceType<ScriptWindow::BuildObjectWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildObjectWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildObjectWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildObjectWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::OrderWidgets GetParam(ForceType<ScriptWindow::OrderWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::OrderWidgets)tmp; } - template <> inline int Return<ScriptWindow::OrderWidgets>(HSQUIRRELVM vm, ScriptWindow::OrderWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::OnScreenKeyboardWidgets GetParam(ForceType<ScriptWindow::OnScreenKeyboardWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::OnScreenKeyboardWidgets)tmp; } - template <> inline int Return<ScriptWindow::OnScreenKeyboardWidgets>(HSQUIRRELVM vm, ScriptWindow::OnScreenKeyboardWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::RailToolbarWidgets GetParam(ForceType<ScriptWindow::RailToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::RailToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::RailToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::RailToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildRailStationWidgets GetParam(ForceType<ScriptWindow::BuildRailStationWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRailStationWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildRailStationWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRailStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildSignalWidgets GetParam(ForceType<ScriptWindow::BuildSignalWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildSignalWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildSignalWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildSignalWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildRailDepotWidgets GetParam(ForceType<ScriptWindow::BuildRailDepotWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRailDepotWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildRailDepotWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRailDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildRailWaypointWidgets GetParam(ForceType<ScriptWindow::BuildRailWaypointWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRailWaypointWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildRailWaypointWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRailWaypointWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::RoadToolbarWidgets GetParam(ForceType<ScriptWindow::RoadToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::RoadToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::RoadToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::RoadToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildRoadDepotWidgets GetParam(ForceType<ScriptWindow::BuildRoadDepotWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRoadDepotWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildRoadDepotWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRoadDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildRoadStationWidgets GetParam(ForceType<ScriptWindow::BuildRoadStationWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRoadStationWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildRoadStationWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildRoadStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ScreenshotWindowWidgets GetParam(ForceType<ScriptWindow::ScreenshotWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScreenshotWindowWidgets)tmp; } - template <> inline int Return<ScriptWindow::ScreenshotWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::ScreenshotWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GameOptionsWidgets GetParam(ForceType<ScriptWindow::GameOptionsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameOptionsWidgets)tmp; } - template <> inline int Return<ScriptWindow::GameOptionsWidgets>(HSQUIRRELVM vm, ScriptWindow::GameOptionsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::GameSettingsWidgets GetParam(ForceType<ScriptWindow::GameSettingsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameSettingsWidgets)tmp; } - template <> inline int Return<ScriptWindow::GameSettingsWidgets>(HSQUIRRELVM vm, ScriptWindow::GameSettingsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::CustomCurrencyWidgets GetParam(ForceType<ScriptWindow::CustomCurrencyWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CustomCurrencyWidgets)tmp; } - template <> inline int Return<ScriptWindow::CustomCurrencyWidgets>(HSQUIRRELVM vm, ScriptWindow::CustomCurrencyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SignListWidgets GetParam(ForceType<ScriptWindow::SignListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SignListWidgets)tmp; } - template <> inline int Return<ScriptWindow::SignListWidgets>(HSQUIRRELVM vm, ScriptWindow::SignListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::QueryEditSignWidgets GetParam(ForceType<ScriptWindow::QueryEditSignWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::QueryEditSignWidgets)tmp; } - template <> inline int Return<ScriptWindow::QueryEditSignWidgets>(HSQUIRRELVM vm, ScriptWindow::QueryEditSignWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SmallMapWidgets GetParam(ForceType<ScriptWindow::SmallMapWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SmallMapWidgets)tmp; } - template <> inline int Return<ScriptWindow::SmallMapWidgets>(HSQUIRRELVM vm, ScriptWindow::SmallMapWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::StationViewWidgets GetParam(ForceType<ScriptWindow::StationViewWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StationViewWidgets)tmp; } - template <> inline int Return<ScriptWindow::StationViewWidgets>(HSQUIRRELVM vm, ScriptWindow::StationViewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::StationListWidgets GetParam(ForceType<ScriptWindow::StationListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StationListWidgets)tmp; } - template <> inline int Return<ScriptWindow::StationListWidgets>(HSQUIRRELVM vm, ScriptWindow::StationListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::JoinStationWidgets GetParam(ForceType<ScriptWindow::JoinStationWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::JoinStationWidgets)tmp; } - template <> inline int Return<ScriptWindow::JoinStationWidgets>(HSQUIRRELVM vm, ScriptWindow::JoinStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::StatusbarWidgets GetParam(ForceType<ScriptWindow::StatusbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StatusbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::StatusbarWidgets>(HSQUIRRELVM vm, ScriptWindow::StatusbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::StoryBookWidgets GetParam(ForceType<ScriptWindow::StoryBookWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StoryBookWidgets)tmp; } - template <> inline int Return<ScriptWindow::StoryBookWidgets>(HSQUIRRELVM vm, ScriptWindow::StoryBookWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::SubsidyListWidgets GetParam(ForceType<ScriptWindow::SubsidyListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SubsidyListWidgets)tmp; } - template <> inline int Return<ScriptWindow::SubsidyListWidgets>(HSQUIRRELVM vm, ScriptWindow::SubsidyListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TerraformToolbarWidgets GetParam(ForceType<ScriptWindow::TerraformToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TerraformToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::TerraformToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::TerraformToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::EditorTerraformToolbarWidgets GetParam(ForceType<ScriptWindow::EditorTerraformToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::EditorTerraformToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::EditorTerraformToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::EditorTerraformToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::VehicleTimetableWidgets GetParam(ForceType<ScriptWindow::VehicleTimetableWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::VehicleTimetableWidgets)tmp; } - template <> inline int Return<ScriptWindow::VehicleTimetableWidgets>(HSQUIRRELVM vm, ScriptWindow::VehicleTimetableWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ToolbarNormalWidgets GetParam(ForceType<ScriptWindow::ToolbarNormalWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ToolbarNormalWidgets)tmp; } - template <> inline int Return<ScriptWindow::ToolbarNormalWidgets>(HSQUIRRELVM vm, ScriptWindow::ToolbarNormalWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ToolbarEditorWidgets GetParam(ForceType<ScriptWindow::ToolbarEditorWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ToolbarEditorWidgets)tmp; } - template <> inline int Return<ScriptWindow::ToolbarEditorWidgets>(HSQUIRRELVM vm, ScriptWindow::ToolbarEditorWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TownDirectoryWidgets GetParam(ForceType<ScriptWindow::TownDirectoryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TownDirectoryWidgets)tmp; } - template <> inline int Return<ScriptWindow::TownDirectoryWidgets>(HSQUIRRELVM vm, ScriptWindow::TownDirectoryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TownAuthorityWidgets GetParam(ForceType<ScriptWindow::TownAuthorityWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TownAuthorityWidgets)tmp; } - template <> inline int Return<ScriptWindow::TownAuthorityWidgets>(HSQUIRRELVM vm, ScriptWindow::TownAuthorityWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TownViewWidgets GetParam(ForceType<ScriptWindow::TownViewWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TownViewWidgets)tmp; } - template <> inline int Return<ScriptWindow::TownViewWidgets>(HSQUIRRELVM vm, ScriptWindow::TownViewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TownFoundingWidgets GetParam(ForceType<ScriptWindow::TownFoundingWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TownFoundingWidgets)tmp; } - template <> inline int Return<ScriptWindow::TownFoundingWidgets>(HSQUIRRELVM vm, ScriptWindow::TownFoundingWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::TransparencyToolbarWidgets GetParam(ForceType<ScriptWindow::TransparencyToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TransparencyToolbarWidgets)tmp; } - template <> inline int Return<ScriptWindow::TransparencyToolbarWidgets>(HSQUIRRELVM vm, ScriptWindow::TransparencyToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::BuildTreesWidgets GetParam(ForceType<ScriptWindow::BuildTreesWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildTreesWidgets)tmp; } - template <> inline int Return<ScriptWindow::BuildTreesWidgets>(HSQUIRRELVM vm, ScriptWindow::BuildTreesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::VehicleViewWidgets GetParam(ForceType<ScriptWindow::VehicleViewWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::VehicleViewWidgets)tmp; } - template <> inline int Return<ScriptWindow::VehicleViewWidgets>(HSQUIRRELVM vm, ScriptWindow::VehicleViewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::VehicleRefitWidgets GetParam(ForceType<ScriptWindow::VehicleRefitWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::VehicleRefitWidgets)tmp; } - template <> inline int Return<ScriptWindow::VehicleRefitWidgets>(HSQUIRRELVM vm, ScriptWindow::VehicleRefitWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::VehicleDetailsWidgets GetParam(ForceType<ScriptWindow::VehicleDetailsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::VehicleDetailsWidgets)tmp; } - template <> inline int Return<ScriptWindow::VehicleDetailsWidgets>(HSQUIRRELVM vm, ScriptWindow::VehicleDetailsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::VehicleListWidgets GetParam(ForceType<ScriptWindow::VehicleListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::VehicleListWidgets)tmp; } - template <> inline int Return<ScriptWindow::VehicleListWidgets>(HSQUIRRELVM vm, ScriptWindow::VehicleListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::ExtraViewportWidgets GetParam(ForceType<ScriptWindow::ExtraViewportWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ExtraViewportWidgets)tmp; } - template <> inline int Return<ScriptWindow::ExtraViewportWidgets>(HSQUIRRELVM vm, ScriptWindow::ExtraViewportWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - template <> inline ScriptWindow::WaypointWidgets GetParam(ForceType<ScriptWindow::WaypointWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WaypointWidgets)tmp; } - template <> inline int Return<ScriptWindow::WaypointWidgets>(HSQUIRRELVM vm, ScriptWindow::WaypointWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } - - /* Allow ScriptWindow to be used as Squirrel parameter */ - template <> inline ScriptWindow *GetParam(ForceType<ScriptWindow *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWindow *)instance; } - template <> inline ScriptWindow &GetParam(ForceType<ScriptWindow &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWindow *)instance; } - template <> inline const ScriptWindow *GetParam(ForceType<const ScriptWindow *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptWindow *)instance; } - template <> inline const ScriptWindow &GetParam(ForceType<const ScriptWindow &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptWindow *)instance; } - template <> inline int Return<ScriptWindow *>(HSQUIRRELVM vm, ScriptWindow *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Window", res, nullptr, DefSQDestructorCallback<ScriptWindow>, true); return 1; } -} // namespace SQConvert |