From 318109158a313b22419a62f3bbbe482322f96dcf Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 12 Jun 2012 13:50:43 -0300 Subject: [PATCH] changes to make development easier in QtCreator --- src/framework/CMakeLists.txt | 266 +++++++++++++------ src/framework/graphics/painterogl1.cpp | 4 + src/framework/platform/unixcrashhandler.cpp | 4 + src/framework/platform/win32crashhandler.cpp | 4 + src/framework/platform/win32window.cpp | 4 + src/framework/platform/x11window.cpp | 4 + src/otclient/CMakeLists.txt | 91 +++++-- src/otclient/core/creature.h | 2 +- src/otclient/otclient.cpp | 23 -- 9 files changed, 276 insertions(+), 126 deletions(-) diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index a6d8238d..d6579ddb 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -20,7 +20,7 @@ ENDIF() SET(CXX_WARNS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNS} -std=gnu++0x -pipe") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb") -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb") +SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb -fno-omit-frame-pointer") SET(CMAKE_CXX_FLAGS_RELEASE "-O3") SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed") @@ -164,97 +164,213 @@ SET(framework_LIBRARIES ) SET(framework_SOURCES ${framework_SOURCES} - # framework ${CMAKE_CURRENT_LIST_DIR}/application.cpp + ${CMAKE_CURRENT_LIST_DIR}/application.h + ${CMAKE_CURRENT_LIST_DIR}/const.h + ${CMAKE_CURRENT_LIST_DIR}/global.h + ${CMAKE_CURRENT_LIST_DIR}/pch.h ${CMAKE_CURRENT_LIST_DIR}/luafunctions.cpp - # framework util - ${CMAKE_CURRENT_LIST_DIR}/util/color.cpp - ${CMAKE_CURRENT_LIST_DIR}/util/crypt.cpp - ${CMAKE_CURRENT_LIST_DIR}/util/rsa.cpp - - # framework core + # core ${CMAKE_CURRENT_LIST_DIR}/core/adaptativeframecounter.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/logger.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/configmanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/resourcemanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/eventdispatcher.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/modulemanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/module.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/adaptativeframecounter.h ${CMAKE_CURRENT_LIST_DIR}/core/clock.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/timer.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/clock.h + ${CMAKE_CURRENT_LIST_DIR}/core/configmanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/configmanager.h + ${CMAKE_CURRENT_LIST_DIR}/core/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/core/eventdispatcher.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/eventdispatcher.h ${CMAKE_CURRENT_LIST_DIR}/core/filestream.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/filestream.h + ${CMAKE_CURRENT_LIST_DIR}/core/inputevent.h + ${CMAKE_CURRENT_LIST_DIR}/core/logger.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/logger.h + ${CMAKE_CURRENT_LIST_DIR}/core/module.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/module.h + ${CMAKE_CURRENT_LIST_DIR}/core/modulemanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/modulemanager.h + ${CMAKE_CURRENT_LIST_DIR}/core/resourcemanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/resourcemanager.h + ${CMAKE_CURRENT_LIST_DIR}/core/timer.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/timer.h - # framework net - ${CMAKE_CURRENT_LIST_DIR}/net/connection.cpp - ${CMAKE_CURRENT_LIST_DIR}/net/inputmessage.cpp - ${CMAKE_CURRENT_LIST_DIR}/net/outputmessage.cpp - ${CMAKE_CURRENT_LIST_DIR}/net/protocol.cpp - ${CMAKE_CURRENT_LIST_DIR}/net/server.cpp - - # framework platform - ${CMAKE_CURRENT_LIST_DIR}/platform/platformwindow.cpp - - # framework graphics - ${CMAKE_CURRENT_LIST_DIR}/graphics/font.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/cachedtext.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/fontmanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/graphics.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/painter.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/texture.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/framebuffer.cpp + # graphics ${CMAKE_CURRENT_LIST_DIR}/graphics/animatedtexture.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/texturemanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/particlemanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/particlesystem.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/particleemitter.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/particleaffector.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/particle.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/shader.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/shaderprogram.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershaderprogram.cpp - ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershadermanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/animatedtexture.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/cachedtext.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/cachedtext.h ${CMAKE_CURRENT_LIST_DIR}/graphics/coordsbuffer.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/coordsbuffer.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/font.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/font.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/fontmanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/fontmanager.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/framebuffer.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/framebuffer.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/glutil.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/graphics.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/graphics.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/hardwarebuffer.h ${CMAKE_CURRENT_LIST_DIR}/graphics/image.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/image.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/painter.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/painter.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/painterogl1.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/painterogl1.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/painterogl2.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/painterogl2.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/painterogl2_shadersources.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershadermanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershadermanager.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershaderprogram.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/paintershaderprogram.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/particleaffector.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/particleaffector.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/particle.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/particleemitter.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/particleemitter.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/particle.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/particlemanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/particlemanager.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/particlesystem.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/particlesystem.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/shader.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/shader.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/shaderprogram.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/shaderprogram.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/texture.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/texture.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/texturemanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/graphics/texturemanager.h + ${CMAKE_CURRENT_LIST_DIR}/graphics/vertexarray.h - # framework sound - ${CMAKE_CURRENT_LIST_DIR}/sound/soundsource.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/soundbuffer.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/soundfile.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/soundmanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/oggsoundfile.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/streamsoundsource.cpp - ${CMAKE_CURRENT_LIST_DIR}/sound/combinedsoundsource.cpp - - # framework otml - ${CMAKE_CURRENT_LIST_DIR}/otml/otmldocument.cpp - ${CMAKE_CURRENT_LIST_DIR}/otml/otmlemitter.cpp - ${CMAKE_CURRENT_LIST_DIR}/otml/otmlnode.cpp - ${CMAKE_CURRENT_LIST_DIR}/otml/otmlparser.cpp - ${CMAKE_CURRENT_LIST_DIR}/otml/otmlexception.cpp - - # framework luascript - ${CMAKE_CURRENT_LIST_DIR}/luascript/luainterface.cpp - ${CMAKE_CURRENT_LIST_DIR}/luascript/luaobject.cpp + # luascript + ${CMAKE_CURRENT_LIST_DIR}/luascript/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/luascript/luabinder.h ${CMAKE_CURRENT_LIST_DIR}/luascript/luaexception.cpp + ${CMAKE_CURRENT_LIST_DIR}/luascript/luaexception.h + ${CMAKE_CURRENT_LIST_DIR}/luascript/luainterface.cpp + ${CMAKE_CURRENT_LIST_DIR}/luascript/luainterface.h + ${CMAKE_CURRENT_LIST_DIR}/luascript/luaobject.cpp + ${CMAKE_CURRENT_LIST_DIR}/luascript/luaobject.h ${CMAKE_CURRENT_LIST_DIR}/luascript/luavaluecasts.cpp + ${CMAKE_CURRENT_LIST_DIR}/luascript/luavaluecasts.h - # framework ui + # net + ${CMAKE_CURRENT_LIST_DIR}/net/connection.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/connection.h + ${CMAKE_CURRENT_LIST_DIR}/net/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/net/inputmessage.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/inputmessage.h + ${CMAKE_CURRENT_LIST_DIR}/net/outputmessage.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/outputmessage.h + ${CMAKE_CURRENT_LIST_DIR}/net/protocol.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/protocol.h + ${CMAKE_CURRENT_LIST_DIR}/net/server.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/server.h + + # otml + ${CMAKE_CURRENT_LIST_DIR}/otml/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otmldocument.cpp + ${CMAKE_CURRENT_LIST_DIR}/otml/otmldocument.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlemitter.cpp + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlemitter.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlexception.cpp + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlexception.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otml.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlnode.cpp + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlnode.h + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlparser.cpp + ${CMAKE_CURRENT_LIST_DIR}/otml/otmlparser.h + + # platform + ${CMAKE_CURRENT_LIST_DIR}/platform/crashhandler.h + ${CMAKE_CURRENT_LIST_DIR}/platform/platformwindow.cpp + ${CMAKE_CURRENT_LIST_DIR}/platform/platformwindow.h + ${CMAKE_CURRENT_LIST_DIR}/platform/unixcrashhandler.cpp + ${CMAKE_CURRENT_LIST_DIR}/platform/win32crashhandler.cpp + ${CMAKE_CURRENT_LIST_DIR}/platform/win32window.cpp + ${CMAKE_CURRENT_LIST_DIR}/platform/win32window.h + ${CMAKE_CURRENT_LIST_DIR}/platform/x11window.cpp + ${CMAKE_CURRENT_LIST_DIR}/platform/x11window.h + + # sound + ${CMAKE_CURRENT_LIST_DIR}/sound/combinedsoundsource.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/combinedsoundsource.h + ${CMAKE_CURRENT_LIST_DIR}/sound/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/sound/oggsoundfile.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/oggsoundfile.h + ${CMAKE_CURRENT_LIST_DIR}/sound/soundbuffer.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/soundbuffer.h + ${CMAKE_CURRENT_LIST_DIR}/sound/soundfile.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/soundfile.h + ${CMAKE_CURRENT_LIST_DIR}/sound/soundmanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/soundmanager.h + ${CMAKE_CURRENT_LIST_DIR}/sound/soundsource.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/soundsource.h + ${CMAKE_CURRENT_LIST_DIR}/sound/streamsoundsource.cpp + ${CMAKE_CURRENT_LIST_DIR}/sound/streamsoundsource.h + + # stdext + ${CMAKE_CURRENT_LIST_DIR}/stdext/cast.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/compiler.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/demangle.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/dumper.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/exception.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/math.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/stdext.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/string.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/time.h + ${CMAKE_CURRENT_LIST_DIR}/stdext/types.h + + # third party + ${CMAKE_CURRENT_LIST_DIR}/thirdparty/apngloader.cpp + ${CMAKE_CURRENT_LIST_DIR}/thirdparty/apngloader.h + ${CMAKE_CURRENT_LIST_DIR}/thirdparty/lbitlib-5.2.0-backport4.cpp + ${CMAKE_CURRENT_LIST_DIR}/thirdparty/lbitlib-5.2.0-backport4.h + + # ui + ${CMAKE_CURRENT_LIST_DIR}/ui/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uianchorlayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uianchorlayout.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uiboxlayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uiboxlayout.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uigridlayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uigridlayout.h + ${CMAKE_CURRENT_LIST_DIR}/ui/ui.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uihorizontallayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uihorizontallayout.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uilayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uilayout.h ${CMAKE_CURRENT_LIST_DIR}/ui/uimanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uimanager.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uirichtext.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uirichtext.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uitextedit.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uitextedit.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uitranslator.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uitranslator.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uiverticallayout.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uiverticallayout.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidgetbasestyle.cpp ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidget.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidget.h ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidgetimage.cpp ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidgettext.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uiwidgetbasestyle.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uitextedit.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uiboxlayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uihorizontallayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uiverticallayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uigridlayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uianchorlayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uilayout.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uitranslator.cpp - # framework third party - ${CMAKE_CURRENT_LIST_DIR}/thirdparty/apngloader.cpp - ${CMAKE_CURRENT_LIST_DIR}/thirdparty/lbitlib-5.2.0-backport4.cpp + # util + ${CMAKE_CURRENT_LIST_DIR}/util/boolean.h + ${CMAKE_CURRENT_LIST_DIR}/util/color.cpp + ${CMAKE_CURRENT_LIST_DIR}/util/color.h + ${CMAKE_CURRENT_LIST_DIR}/util/crypt.cpp + ${CMAKE_CURRENT_LIST_DIR}/util/crypt.h + ${CMAKE_CURRENT_LIST_DIR}/util/databuffer.h + ${CMAKE_CURRENT_LIST_DIR}/util/matrix.h + ${CMAKE_CURRENT_LIST_DIR}/util/point.h + ${CMAKE_CURRENT_LIST_DIR}/util/rect.h + ${CMAKE_CURRENT_LIST_DIR}/util/rsa.cpp + ${CMAKE_CURRENT_LIST_DIR}/util/rsa.h + ${CMAKE_CURRENT_LIST_DIR}/util/size.h ) diff --git a/src/framework/graphics/painterogl1.cpp b/src/framework/graphics/painterogl1.cpp index 82bae7fd..573319eb 100644 --- a/src/framework/graphics/painterogl1.cpp +++ b/src/framework/graphics/painterogl1.cpp @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#ifndef OPENGL_ES + #include "painterogl1.h" #include "graphics.h" @@ -279,3 +281,5 @@ void PainterOGL1::updateGlTextureState() glDisableClientState(GL_TEXTURE_COORD_ARRAY); } } + +#endif diff --git a/src/framework/platform/unixcrashhandler.cpp b/src/framework/platform/unixcrashhandler.cpp index 0d8ef790..8c6b7442 100644 --- a/src/framework/platform/unixcrashhandler.cpp +++ b/src/framework/platform/unixcrashhandler.cpp @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#ifdef __linux + #include "crashhandler.h" #include #include @@ -131,3 +133,5 @@ void installCrashHandler() sigaction(SIGFPE, &sa, NULL); // floating-point exception sigaction(SIGABRT, &sa, NULL); // process aborted (asserts) } + +#endif diff --git a/src/framework/platform/win32crashhandler.cpp b/src/framework/platform/win32crashhandler.cpp index c982fc74..7537358a 100644 --- a/src/framework/platform/win32crashhandler.cpp +++ b/src/framework/platform/win32crashhandler.cpp @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#ifdef WIN32 + #include "crashhandler.h" #include #include @@ -156,3 +158,5 @@ void installCrashHandler() { SetUnhandledExceptionFilter(ExceptionHandler); } + +#endif diff --git a/src/framework/platform/win32window.cpp b/src/framework/platform/win32window.cpp index 6b16ab97..faa46fe6 100644 --- a/src/framework/platform/win32window.cpp +++ b/src/framework/platform/win32window.cpp @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#ifdef WIN32 + #include "win32window.h" #include @@ -950,3 +952,5 @@ std::string WIN32Window::getPlatformType() return "WIN32-EGL"; #endif } + +#endif diff --git a/src/framework/platform/x11window.cpp b/src/framework/platform/x11window.cpp index c986c487..ad9812bf 100644 --- a/src/framework/platform/x11window.cpp +++ b/src/framework/platform/x11window.cpp @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#ifdef __linux + #include "x11window.h" #include #include @@ -1065,3 +1067,5 @@ std::string X11Window::getPlatformType() return "X11-EGL"; #endif } + +#endif diff --git a/src/otclient/CMakeLists.txt b/src/otclient/CMakeLists.txt index 18bde170..8f128bbb 100644 --- a/src/otclient/CMakeLists.txt +++ b/src/otclient/CMakeLists.txt @@ -26,39 +26,76 @@ ENDIF(BOT_PROTECTION) SET(otclient_SOURCES ${otclient_SOURCES} # otclient - ${CMAKE_CURRENT_LIST_DIR}/otclient.cpp + ${CMAKE_CURRENT_LIST_DIR}/const.h + ${CMAKE_CURRENT_LIST_DIR}/global.h ${CMAKE_CURRENT_LIST_DIR}/luafunctions.cpp + ${CMAKE_CURRENT_LIST_DIR}/otclient.cpp + ${CMAKE_CURRENT_LIST_DIR}/otclient.h - # otclient luascript - ${CMAKE_CURRENT_LIST_DIR}/luascript/luavaluecasts.cpp - - # otclient core - ${CMAKE_CURRENT_LIST_DIR}/core/game.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/map.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/mapview.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/thingtype.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/thingstype.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/spritemanager.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/item.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/container.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/tile.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/thing.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/creature.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/effect.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/missile.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/localplayer.cpp - ${CMAKE_CURRENT_LIST_DIR}/core/outfit.cpp + # core ${CMAKE_CURRENT_LIST_DIR}/core/animatedtext.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/animatedtext.h + ${CMAKE_CURRENT_LIST_DIR}/core/container.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/container.h + ${CMAKE_CURRENT_LIST_DIR}/core/creature.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/creature.h + ${CMAKE_CURRENT_LIST_DIR}/core/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/core/effect.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/effect.h + ${CMAKE_CURRENT_LIST_DIR}/core/game.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/game.h + ${CMAKE_CURRENT_LIST_DIR}/core/gameshadermanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/gameshadermanager.h + ${CMAKE_CURRENT_LIST_DIR}/core/item.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/item.h + ${CMAKE_CURRENT_LIST_DIR}/core/localplayer.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/localplayer.h + ${CMAKE_CURRENT_LIST_DIR}/core/map.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/map.h + ${CMAKE_CURRENT_LIST_DIR}/core/mapview.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/mapview.h + ${CMAKE_CURRENT_LIST_DIR}/core/missile.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/missile.h + ${CMAKE_CURRENT_LIST_DIR}/core/outfit.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/outfit.h + ${CMAKE_CURRENT_LIST_DIR}/core/player.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/player.h + ${CMAKE_CURRENT_LIST_DIR}/core/spritemanager.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/spritemanager.h ${CMAKE_CURRENT_LIST_DIR}/core/statictext.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/statictext.h + ${CMAKE_CURRENT_LIST_DIR}/core/thing.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/thing.h + ${CMAKE_CURRENT_LIST_DIR}/core/thingstype.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/thingstype.h + ${CMAKE_CURRENT_LIST_DIR}/core/thingtype.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/thingtype.h + ${CMAKE_CURRENT_LIST_DIR}/core/tile.cpp + ${CMAKE_CURRENT_LIST_DIR}/core/tile.h - # otclient ui - ${CMAKE_CURRENT_LIST_DIR}/ui/uiitem.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uicreature.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uimap.cpp - ${CMAKE_CURRENT_LIST_DIR}/ui/uiprogressrect.cpp + # lua + ${CMAKE_CURRENT_LIST_DIR}/luascript/luavaluecasts.cpp + ${CMAKE_CURRENT_LIST_DIR}/luascript/luavaluecasts.h - # otclient net + # net + ${CMAKE_CURRENT_LIST_DIR}/net/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/net/protocolcodes.h ${CMAKE_CURRENT_LIST_DIR}/net/protocolgame.cpp - ${CMAKE_CURRENT_LIST_DIR}/net/protocolgamesend.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/protocolgame.h ${CMAKE_CURRENT_LIST_DIR}/net/protocolgameparse.cpp + ${CMAKE_CURRENT_LIST_DIR}/net/protocolgamesend.cpp + + # ui + ${CMAKE_CURRENT_LIST_DIR}/ui/declarations.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uicreature.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uicreature.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uiitem.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uiitem.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uimap.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uimap.h + ${CMAKE_CURRENT_LIST_DIR}/ui/uiprogressrect.cpp + ${CMAKE_CURRENT_LIST_DIR}/ui/uiprogressrect.h + + # util + ${CMAKE_CURRENT_LIST_DIR}/util/position.h ) diff --git a/src/otclient/core/creature.h b/src/otclient/core/creature.h index bc8f89de..312ae207 100644 --- a/src/otclient/core/creature.h +++ b/src/otclient/core/creature.h @@ -129,7 +129,7 @@ protected: // walk related int m_walkAnimationPhase; - int m_footStep; + uint m_footStep; Timer m_walkTimer; Timer m_footTimer; TilePtr m_walkingTile; diff --git a/src/otclient/otclient.cpp b/src/otclient/otclient.cpp index 66330e24..4c73d8a3 100644 --- a/src/otclient/otclient.cpp +++ b/src/otclient/otclient.cpp @@ -51,29 +51,6 @@ void OTClient::init(const std::vector& args) "Compiled by: ", BUILD_COMPILER, "\n", "Build type: ", BUILD_TYPE, "\n"); return; - /* - * if(option == "-no-draw-arrays") - m_useDrawArrays = false; - else if(option == "-no-fbos") - m_useFBO = false; - else if(option == "-no-mipmaps") - m_useMipmaps = false; - else if(option == "-no-hardware-mipmaps") - m_useHardwareMipmaps = false; - else if(option == "-no-smooth") - m_useBilinearFiltering = false; - else if(option == "-hardware-buffers") - m_useHardwareBuffers = true; - else if(option == "-no-non-power-of-two-textures") - m_useNonPowerOfTwoTextures = false; - else if(option == "-no-clamp-to-edge") - m_useClampToEdge = false; - else if(option == "-no-backbuffer-cache") - m_cacheBackbuffer = false; - else if(option == "-opengl1") - m_prefferedPainterEngine = Painter_OpenGL1; - else if(option == "-opengl2") - */ } else if(arg == "-help" || arg == "--help" || arg == "-h" || arg == "-?" || arg == "/?") { stdext::print( "Usage: ", args[0], " [options]\n"