summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game_instance.cpp183
1 files changed, 4 insertions, 179 deletions
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);