Index: binaries/data/mods/public/maps/scenario.rnc =================================================================== --- binaries/data/mods/public/maps/scenario.rnc +++ binaries/data/mods/public/maps/scenario.rnc @@ -123,8 +123,5 @@ element Target { pos_xyz }? }* }* - }? & - element Triggers { # Unused - empty }? } Index: binaries/data/mods/public/maps/scenario.rng =================================================================== --- binaries/data/mods/public/maps/scenario.rng +++ binaries/data/mods/public/maps/scenario.rng @@ -306,12 +306,6 @@ - - - - - - Index: binaries/data/mods/public/maps/scenarios/Units_demo.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Units_demo.xml +++ binaries/data/mods/public/maps/scenarios/Units_demo.xml @@ -47,5 +47,4 @@ ]]> - Index: source/graphics/MapReader.h =================================================================== --- source/graphics/MapReader.h +++ source/graphics/MapReader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -33,7 +33,6 @@ class CLightEnv; class CCinemaManager; class CPostprocManager; -class CTriggerManager; class CSimulation2; class CSimContext; class CTerrainTextureEntry; @@ -53,10 +52,11 @@ // LoadMap: try to load the map from given file; reinitialise the scene to new data if successful void LoadMap(const VfsPath& pathname, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, - CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, + CCinemaManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, int playerID, bool skipEntities); - void LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc_, CSimulation2*, int playerID); + void LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, + CCinemaManager*, CPostprocManager* pPostproc_, CSimulation2*, int playerID); private: // Load script settings for use by scripts @@ -137,7 +137,6 @@ CLightEnv* pLightEnv; CGameView* pGameView; CCinemaManager* pCinema; - CTriggerManager* pTrigMan; CSimulation2* pSimulation2; const CSimContext* pSimContext; int m_PlayerID; Index: source/graphics/MapReader.cpp =================================================================== --- source/graphics/MapReader.cpp +++ source/graphics/MapReader.cpp @@ -67,7 +67,7 @@ // LoadMap: try to load the map from given file; reinitialise the scene to new data if successful void CMapReader::LoadMap(const VfsPath& pathname, JSRuntime* rt, JS::HandleValue settings, CTerrain *pTerrain_, WaterManager* pWaterMan_, SkyManager* pSkyMan_, - CLightEnv *pLightEnv_, CGameView *pGameView_, CCinemaManager* pCinema_, CTriggerManager* pTrigMan_, CPostprocManager* pPostproc_, + CLightEnv *pLightEnv_, CGameView *pGameView_, CCinemaManager* pCinema_, CPostprocManager* pPostproc_, CSimulation2 *pSimulation2_, const CSimContext* pSimContext_, int playerID_, bool skipEntities) { // latch parameters (held until DelayedLoadFinished) @@ -77,7 +77,6 @@ pWaterMan = pWaterMan_; pSkyMan = pSkyMan_; pCinema = pCinema_; - pTrigMan = pTrigMan_; pPostproc = pPostproc_; pSimulation2 = pSimulation2_; pSimContext = pSimContext_; @@ -152,7 +151,7 @@ // LoadRandomMap: try to load the map data; reinitialise the scene to new data if successful void CMapReader::LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::HandleValue settings, CTerrain *pTerrain_, WaterManager* pWaterMan_, SkyManager* pSkyMan_, - CLightEnv *pLightEnv_, CGameView *pGameView_, CCinemaManager* pCinema_, CTriggerManager* pTrigMan_, CPostprocManager* pPostproc_, + CLightEnv *pLightEnv_, CGameView *pGameView_, CCinemaManager* pCinema_, CPostprocManager* pPostproc_, CSimulation2 *pSimulation2_, int playerID_) { // latch parameters (held until DelayedLoadFinished) @@ -166,7 +165,6 @@ pWaterMan = pWaterMan_; pSkyMan = pSkyMan_; pCinema = pCinema_; - pTrigMan = pTrigMan_; pPostproc = pPostproc_; m_PlayerID = playerID_; m_SkipEntities = false; @@ -458,7 +456,6 @@ void ReadEnvironment(XMBElement parent); void ReadCamera(XMBElement parent); void ReadPaths(XMBElement parent); - void ReadTriggers(XMBElement parent); int ReadEntities(XMBElement parent, double end_time); }; @@ -936,10 +933,6 @@ } } -void CXMLReader::ReadTriggers(XMBElement UNUSED(parent)) -{ -} - int CXMLReader::ReadEntities(XMBElement parent, double end_time) { XMBElementList entities = parent.GetChildNodes(); @@ -1108,10 +1101,6 @@ { ReadPaths(node); } - else if (name == "Triggers") - { - ReadTriggers(node); - } else if (name == "Script") { if (m_MapReader.pSimulation2) Index: source/graphics/MapWriter.h =================================================================== --- source/graphics/MapWriter.h +++ source/graphics/MapWriter.h @@ -30,12 +30,9 @@ class CCamera; class CCinemaManager; class CPostprocManager; -class CTriggerManager; class WaterManager; class SkyManager; class CSimulation2; -struct MapTrigger; -struct MapTriggerGroup; class XMLWriter_File; class CMapWriter : public CMapIO Index: source/ps/World.cpp =================================================================== --- source/ps/World.cpp +++ source/ps/World.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -26,17 +26,12 @@ #include "graphics/GameView.h" #include "graphics/LightEnv.h" #include "graphics/MapReader.h" -#include "graphics/MapWriter.h" -#include "graphics/Terrain.h" #include "graphics/Terrain.h" #include "graphics/UnitManager.h" -#include "lib/timer.h" #include "ps/CLogger.h" #include "ps/CStr.h" #include "ps/Errors.h" #include "ps/Game.h" -#include "ps/Loader.h" -#include "ps/LoaderThunks.h" #include "ps/World.h" #include "renderer/Renderer.h" #include "simulation2/Simulation2.h" @@ -76,13 +71,12 @@ try { reader = new CMapReader; - CTriggerManager* pTriggerManager = NULL; reader->LoadMap(mapfilename, rt, settings, m_Terrain, CRenderer::IsInitialised() ? g_Renderer.GetWaterManager() : NULL, CRenderer::IsInitialised() ? g_Renderer.GetSkyManager() : NULL, &g_LightEnv, m_pGame->GetView(), m_pGame->GetView() ? m_pGame->GetView()->GetCinema() : NULL, - pTriggerManager, CRenderer::IsInitialised() ? &g_Renderer.GetPostprocManager() : NULL, + CRenderer::IsInitialised() ? &g_Renderer.GetPostprocManager() : NULL, m_pGame->GetSimulation2(), &m_pGame->GetSimulation2()->GetSimContext(), playerID, false); // fails immediately, or registers for delay loading } @@ -101,13 +95,12 @@ CMapReader* reader = 0; reader = new CMapReader; - CTriggerManager* pTriggerManager = NULL; reader->LoadRandomMap(scriptFile, rt, settings, m_Terrain, CRenderer::IsInitialised() ? g_Renderer.GetWaterManager() : NULL, CRenderer::IsInitialised() ? g_Renderer.GetSkyManager() : NULL, &g_LightEnv, m_pGame->GetView(), m_pGame->GetView() ? m_pGame->GetView()->GetCinema() : NULL, - pTriggerManager, CRenderer::IsInitialised() ? &g_Renderer.GetPostprocManager() : NULL, + CRenderer::IsInitialised() ? &g_Renderer.GetPostprocManager() : NULL, m_pGame->GetSimulation2(), playerID); // registers for delay loading } Index: source/simulation2/Simulation2.cpp =================================================================== --- source/simulation2/Simulation2.cpp +++ source/simulation2/Simulation2.cpp @@ -427,7 +427,7 @@ VfsPath mapfilename = VfsPath(mapFile).ChangeExtension(L".pmp"); mapReader->LoadMap(mapfilename, scriptInterface.GetJSRuntime(), JS::UndefinedHandleValue, m_SecondaryTerrain, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, m_SecondaryContext, INVALID_PLAYER, true); // throws exception on failure + NULL, m_SecondaryContext, INVALID_PLAYER, true); // throws exception on failure } LDR_EndRegistering(); Index: source/simulation2/components/tests/test_Pathfinder.h =================================================================== --- source/simulation2/components/tests/test_Pathfinder.h +++ source/simulation2/components/tests/test_Pathfinder.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -77,7 +77,7 @@ LDR_BeginRegistering(); mapReader->LoadMap(L"maps/skirmishes/Median Oasis (2).pmp", sim2.GetScriptInterface().GetJSRuntime(), JS::UndefinedHandleValue, - &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + &terrain, NULL, NULL, NULL, NULL, NULL, NULL, &sim2, &sim2.GetSimContext(), -1, false); LDR_EndRegistering(); TS_ASSERT_OK(LDR_NonprogressiveLoad()); @@ -188,7 +188,7 @@ LDR_BeginRegistering(); mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", sim2.GetScriptInterface().GetJSRuntime(), JS::UndefinedHandleValue, - &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + &terrain, NULL, NULL, NULL, NULL, NULL, NULL, &sim2, &sim2.GetSimContext(), -1, false); LDR_EndRegistering(); TS_ASSERT_OK(LDR_NonprogressiveLoad()); @@ -243,7 +243,7 @@ LDR_BeginRegistering(); mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", sim2.GetScriptInterface().GetJSRuntime(), JS::UndefinedHandleValue, - &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + &terrain, NULL, NULL, NULL, NULL, NULL, NULL, &sim2, &sim2.GetSimContext(), -1, false); LDR_EndRegistering(); TS_ASSERT_OK(LDR_NonprogressiveLoad()); Index: source/simulation2/tests/test_Serializer.h =================================================================== --- source/simulation2/tests/test_Serializer.h +++ source/simulation2/tests/test_Serializer.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -844,7 +844,7 @@ LDR_BeginRegistering(); mapReader->LoadMap(L"maps/skirmishes/Greek Acropolis (2).pmp", sim2.GetScriptInterface().GetJSRuntime(), JS::UndefinedHandleValue, - &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + &terrain, NULL, NULL, NULL, NULL, NULL, NULL, &sim2, &sim2.GetSimContext(), -1, false); LDR_EndRegistering(); TS_ASSERT_OK(LDR_NonprogressiveLoad());