From b71b331bd14b337cb84c30bc36ba62428f1d261c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 Nov 2013 21:08:03 +0300 Subject: fix dyecmd. now it works. --- src/dyetool/dyemain.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/dyetool/dyemain.cpp') diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp index 9bab265e8..3199a5c49 100644 --- a/src/dyetool/dyemain.cpp +++ b/src/dyetool/dyemain.cpp @@ -20,6 +20,9 @@ #include "logger.h" +#include "graphicsmanager.h" +#include "sdlshared.h" + #include "resources/image.h" #include "resources/imagehelper.h" #include "resources/imagewriter.h" @@ -31,9 +34,12 @@ #endif #include "utils/gettext.h" +#include "utils/physfstools.h" #include +#include + #include "debug.h" int serverVersion = 0; @@ -50,6 +56,12 @@ int main(int argc, char **argv) printHelp(); logger = new Logger; + logger->setLogToStandardOut(false); + + PhysFs::init(argv[0]); + SDL_Init(SDL_INIT_VIDEO); + + graphicsManager.createWindow(10, 10, 0, SDL_ANYFORMAT); #ifdef USE_SDL2 imageHelper = new SurfaceImageHelper; @@ -58,6 +70,9 @@ int main(int argc, char **argv) #endif ResourceManager *resman = new ResourceManager; + resman->setWriteDir("."); + resman->addToSearchPath(".", false); + resman->addToSearchPath("/", false); Image *image = resman->getImage(std::string( argv[1]).append("|").append(argv[2])); if (!image) -- cgit v1.2.3-70-g09d2