From f651273ebf2a8b11aa01ed1434ecb613177ced6a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Aug 2015 16:13:36 +0300 Subject: Add gui mode for dyecmd. Now only basic code added. --- src/resources/dyepalette.cpp | 5 ++++- src/resources/resourcemanager.cpp | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/resources') diff --git a/src/resources/dyepalette.cpp b/src/resources/dyepalette.cpp index 895f9c03f..5ebbdf626 100644 --- a/src/resources/dyepalette.cpp +++ b/src/resources/dyepalette.cpp @@ -24,7 +24,9 @@ #include "logger.h" +#ifndef DYECMD #include "resources/db/palettedb.h" +#endif #include @@ -68,6 +70,7 @@ DyePalette::DyePalette(const std::string &description, ++pos; } } +#ifndef DYECMD else if (description[0] == '@') { size_t pos = 1; @@ -83,7 +86,7 @@ DyePalette::DyePalette(const std::string &description, pos = idx + 1; } } - +#endif logger->log("Error, invalid embedded palette: %s", description.c_str()); } diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 0c0a5bd7c..bec7914fc 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -778,6 +778,7 @@ Resource *ResourceManager::getShaderProgram(const std::string &vertex, } #endif +#ifndef DYECMD struct WalkLayerLoader final { const std::string name; @@ -788,17 +789,15 @@ struct WalkLayerLoader final if (!v) return nullptr; -#ifdef DYECMD - return nullptr; -#else const WalkLayerLoader *const rl = static_cast(v); Resource *const resource = NavigationManager::loadWalkLayer(rl->map); return resource; -#endif } }; +#endif +#ifndef DYECMD WalkLayer *ResourceManager::getWalkLayer(const std::string &name, Map *const map) { @@ -806,6 +805,13 @@ WalkLayer *ResourceManager::getWalkLayer(const std::string &name, return static_cast(get("map_" + name, WalkLayerLoader::load, &rl)); } +#else +WalkLayer *ResourceManager::getWalkLayer(const std::string &name A_UNUSED, + Map *const map A_UNUSED) +{ + return nullptr; +} +#endif struct SpriteDefLoader final { -- cgit v1.2.3-70-g09d2