summaryrefslogtreecommitdiff
path: root/src/dyetool/dyemain.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-01 21:08:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-01 21:33:37 +0300
commitb71b331bd14b337cb84c30bc36ba62428f1d261c (patch)
tree0e69d8501b65999ec48d683e49ecf4a952ac22f1 /src/dyetool/dyemain.cpp
parent23b307ad13024134908849b53b756dd6073f8d56 (diff)
downloadmv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.gz
mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.bz2
mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.xz
mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.zip
fix dyecmd. now it works.
Diffstat (limited to 'src/dyetool/dyemain.cpp')
-rw-r--r--src/dyetool/dyemain.cpp15
1 files changed, 15 insertions, 0 deletions
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 <iostream>
+#include <SDL.h>
+
#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)