From 8f9c7005b7cb9187c5842bc92f7e2ed8a9384d0d Mon Sep 17 00:00:00 2001 From: Nick Gasson <nick@nickg.me.uk> Date: Wed, 26 Aug 2009 21:08:10 +0100 Subject: [PATCH] Revert "Store the correct ids in files" This reverts commit d7abd5d4b5501b66ce505f6ee40b81fe29ff828a. --- include/IBuilding.hpp | 1 - maps/coal_mine/coal_mine.xml | 56 ++++++------------------------------ src/Building.cpp | 1 - src/Map.cpp | 2 +- 4 files changed, 9 insertions(+), 51 deletions(-) diff --git a/include/IBuilding.hpp b/include/IBuilding.hpp index ec7b669..8947052 100644 --- a/include/IBuilding.hpp +++ b/include/IBuilding.hpp @@ -29,7 +29,6 @@ struct IBuilding { virtual IModelPtr model() const = 0; virtual const string& name() const = 0; - virtual string resId() const = 0; }; typedef shared_ptr<IBuilding> IBuildingPtr; diff --git a/maps/coal_mine/coal_mine.xml b/maps/coal_mine/coal_mine.xml index 91b2446..17b09cb 100644 --- a/maps/coal_mine/coal_mine.xml +++ b/maps/coal_mine/coal_mine.xml @@ -185,20 +185,12 @@ <stationPart id="2"/> </tile> -<tile x="12" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="13" y="6"> <straightTrack align="x"/> <stationPart id="2"/> </tile> -<tile x="13" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="13" y="50"> <curvedTrack startAngle="0" finishAngle="90" radius="5"/> </tile> @@ -209,40 +201,24 @@ <stationPart id="2"/> </tile> -<tile x="14" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="15" y="6"> <straightTrack align="x"/> <stationPart id="2"/> </tile> -<tile x="15" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="16" y="6"> <straightTrack align="x"/> <stationPart id="2"/> </tile> -<tile x="16" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="17" y="6"> <straightTrack align="x"/> <stationPart id="2"/> </tile> -<tile x="17" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="17" y="40"> <straightTrack align="y"/> </tile> @@ -273,28 +249,16 @@ <stationPart id="2"/> </tile> -<tile x="18" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="19" y="6"> <straightTrack align="x"/> <stationPart id="2"/> </tile> -<tile x="19" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="20" y="6"> <straightTrack align="x"/> </tile> -<tile x="20" y="7"> -<building>Platform middle segment</building> -</tile> - <tile x="21" y="6"> <straightTrack align="x"/> </tile> @@ -311,10 +275,6 @@ <points align="x" reflect="0"/> </tile> -<tile x="24" y="42"> -<building>Platform middle segment</building> -</tile> - <tile x="26" y="9"> <curvedTrack startAngle="90" finishAngle="180" radius="4"/> </tile> @@ -562,7 +522,7 @@ </tile> <tile x="37" y="12"> -<building>White House</building> +<building>white_house</building> </tile> <tile x="37" y="14"> @@ -652,7 +612,7 @@ </tile> <tile x="42" y="12"> -<building>White House</building> +<building>white_house</building> </tile> <tile x="42" y="14"> @@ -670,7 +630,7 @@ </tile> <tile x="43" y="10"> -<building>White House</building> +<building>white_house</building> </tile> <tile x="43" y="14"> @@ -724,7 +684,7 @@ </tile> <tile x="46" y="12"> -<building>White House</building> +<building>white_house</building> </tile> <tile x="46" y="14"> @@ -760,7 +720,7 @@ </tile> <tile x="48" y="17"> -<building>House 2</building> +<building>house2</building> </tile> <tile x="48" y="20"> @@ -808,7 +768,7 @@ </tile> <tile x="52" y="18"> -<building>House 2</building> +<building>house2</building> </tile> <tile x="52" y="20"> @@ -824,7 +784,7 @@ </tile> <tile x="54" y="11"> -<building>House 2</building> +<building>house2</building> </tile> <tile x="54" y="20"> @@ -904,7 +864,7 @@ </tile> <tile x="59" y="52"> -<building>House 2</building> +<building>house2</building> </tile> </tileset> </map> diff --git a/src/Building.cpp b/src/Building.cpp index 60afc6b..8260bbd 100644 --- a/src/Building.cpp +++ b/src/Building.cpp @@ -29,7 +29,6 @@ public: // IBuildingInterface IModelPtr model() const { return myModel; } const string& name() const { return myName; } - string resId() const { return myResource->name(); } // IXMLCallback interface void text(const string& localName, const string& aString); diff --git a/src/Map.cpp b/src/Map.cpp index 75e6110..3e05139 100644 --- a/src/Map.cpp +++ b/src/Map.cpp @@ -1178,7 +1178,7 @@ void Map::save() if (tile.building) { tileXml.addChild (xml::element("building") - .addText(tile.building->resId())); + .addText(tile.building->name())); useful = true; } -- 2.39.5