diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-01 21:08:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-01 21:33:37 +0300 |
commit | b71b331bd14b337cb84c30bc36ba62428f1d261c (patch) | |
tree | 0e69d8501b65999ec48d683e49ecf4a952ac22f1 /src | |
parent | 23b307ad13024134908849b53b756dd6073f8d56 (diff) | |
download | mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.gz mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.bz2 mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.tar.xz mv-b71b331bd14b337cb84c30bc36ba62428f1d261c.zip |
fix dyecmd. now it works.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 12 | ||||
-rw-r--r-- | src/client.cpp | 1 | ||||
-rw-r--r-- | src/dyetool/dyemain.cpp | 15 | ||||
-rw-r--r-- | src/render/graphics.cpp | 2 |
4 files changed, 29 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index ff50b51e1..0ad010bd0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,6 +56,10 @@ dyecmd_SOURCES += dyetool/dyemain.cpp \ animationdelayload.h \ configuration.cpp \ configuration.h \ + graphicsmanager.cpp \ + graphicsmanager.h \ + graphicsvertexes.cpp \ + graphicsvertexes.h \ logger.cpp \ logger.h \ navigationmanager.cpp \ @@ -64,6 +68,10 @@ dyecmd_SOURCES += dyetool/dyemain.cpp \ walklayer.h \ render/graphics.cpp \ render/graphics.h \ + render/renderers.cpp \ + render/renderers.h \ + render/sdlgraphics.cpp \ + render/sdlgraphics.h \ resources/action.cpp \ resources/action.h \ resources/animation.cpp \ @@ -104,6 +112,10 @@ dyecmd_SOURCES += dyetool/dyemain.cpp \ utils/physfsrwops.h \ utils/physfstools.cpp \ utils/physfstools.h \ + utils/sdl2helper.cpp \ + utils/sdl2helper.h \ + utils/sdlhelper.cpp \ + utils/sdlhelper.h \ utils/stringutils.cpp \ utils/stringutils.h \ utils/timer.cpp \ diff --git a/src/client.cpp b/src/client.cpp index 5c542f6c5..d25261ab6 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -160,7 +160,6 @@ Client *client = nullptr; ChatLogger *chatLogger = nullptr; // Chat log object KeyboardConfig keyboard; UserPalette *userPalette = nullptr; -Graphics *mainGraphics = nullptr; SoundManager soundManager; RenderType openGLMode = RENDER_SOFTWARE; 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) diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 4ea219802..5a0adfeef 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -46,6 +46,8 @@ #endif #endif +Graphics *mainGraphics = nullptr; + Graphics::Graphics() : gcn::Graphics(), mWidth(0), |