summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-29 18:13:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-29 18:13:35 +0300
commit366d596688506c70cbc510392be7f1224e585185 (patch)
treedf47f42c4fb6d240898427c2281b13054076f5ba
parentb4658b5317715e13f4294e5a8c60e20af8db0744 (diff)
downloadplus-366d596688506c70cbc510392be7f1224e585185.tar.gz
plus-366d596688506c70cbc510392be7f1224e585185.tar.bz2
plus-366d596688506c70cbc510392be7f1224e585185.tar.xz
plus-366d596688506c70cbc510392be7f1224e585185.zip
Fix compilation with different flags and fix redefines in new SDL2.
-rw-r--r--src/actions/commands.cpp8
-rw-r--r--src/render/opengl/mgl.h2
-rw-r--r--src/render/opengl/mgldefines.h9
-rw-r--r--src/render/opengl/mgltypes.h3
4 files changed, 16 insertions, 6 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 1a1b07dd5..5a329f2c7 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -39,11 +39,11 @@
#ifdef EATHENA_SUPPORT
#include "gui/shortcut/emoteshortcut.h"
-#include "gui/windows/npcdialog.h"
#endif
#include "gui/windows/chatwindow.h"
#include "gui/windows/inventorywindow.h"
+#include "gui/windows/npcdialog.h"
#include "gui/windows/outfitwindow.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
@@ -59,8 +59,8 @@
#include "net/homunculushandler.h"
#include "net/mailhandler.h"
#include "net/net.h"
-#include "net/npchandler.h"
#endif
+#include "net/npchandler.h"
#include "net/partyhandler.h"
#include "net/serverfeatures.h"
@@ -1139,12 +1139,16 @@ impHandler(skill)
impHandler(craft)
{
+#ifdef EATHENA_SUPPORT
const std::string args = event.args;
if (args.empty() || !inventoryWindow)
return false;
inventoryWindow->moveItemToCraft(atoi(args.c_str()));
return true;
+#else
+ return false;
+#endif
}
impHandler(npcClipboard)
diff --git a/src/render/opengl/mgl.h b/src/render/opengl/mgl.h
index d59e75b37..07c5b7cf7 100644
--- a/src/render/opengl/mgl.h
+++ b/src/render/opengl/mgl.h
@@ -25,8 +25,8 @@
#ifdef USE_OPENGL
-#include "render/opengl/mgldefines.h"
#include "render/opengl/mgltypes.h"
+#include "render/opengl/mgldefines.h"
#define defName(name) extern name##_t m##name
diff --git a/src/render/opengl/mgldefines.h b/src/render/opengl/mgldefines.h
index f2e2193f3..05d4bafcc 100644
--- a/src/render/opengl/mgldefines.h
+++ b/src/render/opengl/mgldefines.h
@@ -57,14 +57,19 @@
#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
#define GL_DEBUG_TYPE_OTHER 0x8251
#define GL_DEBUG_TYPE_MARKER 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP 0x826a
#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
#define GL_DEBUG_SEVERITY_HIGH 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
#define GL_DEBUG_SEVERITY_LOW 0x9148
#endif
+#ifndef GL_DEBUG_TYPE_PUSH_GROUP
+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
+#endif
+#ifndef GL_DEBUG_TYPE_POP_GROUP
+#define GL_DEBUG_TYPE_POP_GROUP 0x826a
+#endif
+
#ifndef GL_EXT_debug_label
#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
#define GL_PROGRAM_OBJECT_EXT 0x8B40
diff --git a/src/render/opengl/mgltypes.h b/src/render/opengl/mgltypes.h
index 815d05d64..cea84350b 100644
--- a/src/render/opengl/mgltypes.h
+++ b/src/render/opengl/mgltypes.h
@@ -25,7 +25,6 @@
#ifdef USE_OPENGL
-#include "render/opengl/mgldefines.h"
#ifdef ANDROID
#include <GLES/gl.h>
@@ -43,6 +42,8 @@
#endif
#endif
+#include "render/opengl/mgldefines.h"
+
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
#include <cstdint>
#else