From dd5faacd4f332d260c373da3d298fc035fa1a2a0 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 9 Jun 2015 11:31:59 -0400 Subject: [PATCH] Mac: Make preset sounds and graphics show as file packages - Remove legacy sound/graphic file definitions - Fix a couple of compiler warnings --- src/BoE-Info.plist | 100 +++++++++++++++++++------------------- src/boe.startup.cpp | 2 +- src/tools/fileio_scen.cpp | 4 +- 3 files changed, 54 insertions(+), 52 deletions(-) diff --git a/src/BoE-Info.plist b/src/BoE-Info.plist index d3c0190d..8cc18daf 100644 --- a/src/BoE-Info.plist +++ b/src/BoE-Info.plist @@ -80,50 +80,6 @@ NSPersistentStoreTypeKey Binary - - CFBundleTypeExtensions - - meg - - CFBundleTypeIconFile - boegraphics - CFBundleTypeName - LegacyMacGraphics - CFBundleTypeOSTypes - - beGR - - CFBundleTypeRole - None - LSItemContentTypes - - com.spidweb.bladesofexile.oldgraphics - - LSTypeIsPackage - - NSPersistentStoreTypeKey - Binary - - - CFBundleTypeIconFile - boesounds - CFBundleTypeName - LegacySounds - CFBundleTypeOSTypes - - beSN - - CFBundleTypeRole - Viewer - LSItemContentTypes - - com.spidweb.bladesofexile.oldsounds - - LSTypeIsPackage - - NSPersistentStoreTypeKey - Binary - CFBundleTypeExtensions @@ -132,7 +88,7 @@ CFBundleTypeIconFile boesave CFBundleTypeName - Saved Game + Blades of Exile Saved Game CFBundleTypeOSTypes game @@ -157,7 +113,7 @@ CFBundleTypeIconFile boescenario CFBundleTypeName - Scenario + Blades of Exile Scenario CFBundleTypeOSTypes BETM @@ -201,7 +157,7 @@ CFBundleTypeIconFile boegraphics CFBundleTypeName - Preset Graphics + Blades of Exile Graphics CFBundleTypeRole None LSItemContentTypes @@ -221,7 +177,7 @@ CFBundleTypeIconFile boesounds CFBundleTypeName - Preset Sounds + Blades of Exile Sounds CFBundleTypeRole None LSItemContentTypes @@ -268,7 +224,9 @@ UTTypeTagSpecification com.apple.ostype - + + BETM + public.filename-extension exs @@ -291,6 +249,10 @@ com.spidweb.bladesofexile.savegame UTTypeTagSpecification + com.apple.ostype + + beSV + public.filename-extension exg @@ -316,6 +278,46 @@ + + UTTypeConformsTo + + com.apple.package + + UTTypeDescription + Blades of Exile Graphics + UTTypeIconFile + boegraphics + UTTypeIdentifier + com.spidweb.bladesofexile.graphics + UTTypeReferenceURL + + UTTypeTagSpecification + + public.filename-extension + + exd + + + + + UTTypeConformsTo + + com.apple.package + + UTTypeDescription + Blades of Exile Sounds + UTTypeIconFile + boesounds + UTTypeIdentifier + com.spidweb.bladesofexile.sounds + UTTypeTagSpecification + + public.filename-extension + + exa + + + diff --git a/src/boe.startup.cpp b/src/boe.startup.cpp index 79653aba..cc5cc8ef 100644 --- a/src/boe.startup.cpp +++ b/src/boe.startup.cpp @@ -11,7 +11,7 @@ #include "boe.graphutil.hpp" #include "boe.items.hpp" #include "boe.party.hpp" -#include "boe.party.hpp" +#include "boe.main.hpp" #include "soundtool.hpp" #include "fileio.hpp" #include "dlogutil.hpp" diff --git a/src/tools/fileio_scen.cpp b/src/tools/fileio_scen.cpp index ceeb1055..21f3ac1a 100644 --- a/src/tools/fileio_scen.cpp +++ b/src/tools/fileio_scen.cpp @@ -451,7 +451,7 @@ static void readQuestFromXml(ticpp::Element& data, cQuest& quest) { } } -static void readShopFromXml(ticpp::Element& data, cShop& shop, cScenario& scen) { +static void readShopFromXml(ticpp::Element& data, cShop& shop) { using namespace ticpp; std::string type, name, val, fname; data.GetDocument()->GetValue(&fname); @@ -733,7 +733,7 @@ static void readScenarioFromXml(ticpp::Document&& data, cScenario& scenario) { quests++; } else if(type == "shop") { scenario.shops.emplace_back(); - readShopFromXml(*game, scenario.shops[shops], scenario); + readShopFromXml(*game, scenario.shops[shops]); shops++; } else if(type == "timer") { if(timers >= 20)