diff --git a/JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c b/JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c index ef50d5d2c..10b654d8f 100644 --- a/JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c +++ b/JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c @@ -150,7 +150,7 @@ console_main(int argc, char *argv[]) /* This is where execution begins [windowed apps] */ int WINAPI -WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int sw) +WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR szCmdLine,int sw) { char **argv; int argc; diff --git a/JGE/include/DebugRoutines.h b/JGE/include/DebugRoutines.h index d8827f617..b2230dc20 100644 --- a/JGE/include/DebugRoutines.h +++ b/JGE/include/DebugRoutines.h @@ -23,7 +23,7 @@ std::string ToHex(T* pointer) return stream.str(); } -#ifdef LINUX +#if defined(LINUX) && !defined(OutputDebugString) #define OutputDebugString(val) (std::cerr << val); #endif diff --git a/JGE/include/Threading.h b/JGE/include/Threading.h index 8df78d59b..d69985a07 100644 --- a/JGE/include/Threading.h +++ b/JGE/include/Threading.h @@ -1,7 +1,7 @@ #ifndef THREADING_H #define THREADING_H -#if !defined(PSP) && !defined(QT_CONFIG) && !defined(WP8) +#if !defined(PSP) && !defined(QT_CONFIG) && !defined(WP8) && !(defined(SDL_CONFIG) && defined(__MINGW32__)) #include #ifdef WIN32 @@ -537,7 +537,7 @@ namespace boost } } -#elif defined(WP8) +#elif defined(WP8) || (defined(SDL_CONFIG) && defined(__MINGW32__)) #include #include diff --git a/JGE/src/pc/JGfx.cpp b/JGE/src/pc/JGfx.cpp index 18bdede53..8eeac7cce 100644 --- a/JGE/src/pc/JGfx.cpp +++ b/JGE/src/pc/JGfx.cpp @@ -53,7 +53,7 @@ extern "C" { #include "../../include/JFileSystem.h" #include "../../include/JAssert.h" -#if (defined WIN32) && (!defined QT_CONFIG) +#if (defined WIN32) && (!defined QT_CONFIG) && (!defined __MINGW32__) #ifndef __attribute__ #define __attribute__((a)) #endif diff --git a/projects/mtg/include/WResource_Fwd.h b/projects/mtg/include/WResource_Fwd.h index 139c08e01..38b1d3af6 100644 --- a/projects/mtg/include/WResource_Fwd.h +++ b/projects/mtg/include/WResource_Fwd.h @@ -1,7 +1,7 @@ #ifndef WRESOURCE_FWD_H #define WRESOURCE_FWD_H -#ifndef WP8 +#if !defined(WP8) && !defined(SDL_CONFIG) #include typedef boost::shared_ptr JQuadPtr; #else diff --git a/projects/mtg/src/GameApp.cpp b/projects/mtg/src/GameApp.cpp index 5648b778b..ec33b680b 100644 --- a/projects/mtg/src/GameApp.cpp +++ b/projects/mtg/src/GameApp.cpp @@ -89,7 +89,7 @@ void GameApp::Create() { srand((unsigned int) time(0)); // initialize random #if !defined(QT_CONFIG) && !defined(IOS) -#if defined (WIN32) +#if defined (WIN32) && !defined(__MINGW32__) _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #elif defined (PSP) pspFpuSetEnable(0); //disable FPU Exceptions until we find where the FPU errors come from diff --git a/projects/mtg/wagic-SDL.pro b/projects/mtg/wagic-SDL.pro index 39be85527..aec343ad8 100644 --- a/projects/mtg/wagic-SDL.pro +++ b/projects/mtg/wagic-SDL.pro @@ -2,16 +2,17 @@ #------------------------------------------------- include(wagic.pri) - +CONFIG -= qt DEFINES += SDL_CONFIG # # Project created by QtCreator 2010-06-30T19:48:30 # QT -= core gui opengl network declarative -#unix|windows:QMAKE_CXXFLAGS += -std=c++11 +unix|windows:QMAKE_CXXFLAGS += -std=c++11 INCLUDEPATH += ../../JGE/Dependencies/SDL/include +INCLUDEPATH += ../../JGE/Dependencies/libjpeg unix:INCLUDEPATH += /usr/include/GL unix:INCLUDEPATH += /usr/local/include/SDL OBJECTS_DIR = objs @@ -20,17 +21,64 @@ DESTDIR = bin macx|unix:LIBS += -lz -lboost_thread-mt unix:LIBS += -ljpeg -lgif -lpng12 -L/usr/local/lib -lGL -lGLU -lSDL -windows:LIBS += -L../../JGE/Dependencies/lib -L../../Boost/lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc - -CONFIG(debug, debug|release):SOURCES += src/TestSuiteAI.cpp +windows:LIBS += -L../../JGE/Dependencies/lib -L../../Boost/lib -lgiflib -llibpng -lfmodvc -lGdi32 -lopengl32 -lWinmm -lglu32 -lOle32 -lImm32 -lVersion -lOleAut32 # JGE, could probably be moved outside SOURCES += \ + ../../JGE/src/pc/JGfx.cpp\ ../../JGE/src/SDLmain.cpp\ + ../../JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c\ ../../JGE/src/JMD2Model.cpp windows{ + SOURCES += \ + ../../JGE/Dependencies/libjpeg/jcapimin.c \ + ../../JGE/Dependencies/libjpeg/jcapistd.c \ + ../../JGE/Dependencies/libjpeg/jccoefct.c \ + ../../JGE/Dependencies/libjpeg/jccolor.c \ + ../../JGE/Dependencies/libjpeg/jcdctmgr.c \ + ../../JGE/Dependencies/libjpeg/jchuff.c \ + ../../JGE/Dependencies/libjpeg/jcinit.c \ + ../../JGE/Dependencies/libjpeg/jcmainct.c \ + ../../JGE/Dependencies/libjpeg/jcmarker.c \ + ../../JGE/Dependencies/libjpeg/jcmaster.c \ + ../../JGE/Dependencies/libjpeg/jcomapi.c \ + ../../JGE/Dependencies/libjpeg/jcparam.c \ + ../../JGE/Dependencies/libjpeg/jcphuff.c \ + ../../JGE/Dependencies/libjpeg/jcprepct.c \ + ../../JGE/Dependencies/libjpeg/jcsample.c \ + ../../JGE/Dependencies/libjpeg/jdapimin.c \ + ../../JGE/Dependencies/libjpeg/jdapistd.c \ + ../../JGE/Dependencies/libjpeg/jdatadst.c \ + ../../JGE/Dependencies/libjpeg/jdatasrc.c \ + ../../JGE/Dependencies/libjpeg/jdcoefct.c \ + ../../JGE/Dependencies/libjpeg/jdcolor.c \ + ../../JGE/Dependencies/libjpeg/jddctmgr.c \ + ../../JGE/Dependencies/libjpeg/jdhuff.c \ + ../../JGE/Dependencies/libjpeg/jdinput.c \ + ../../JGE/Dependencies/libjpeg/jdmainct.c \ + ../../JGE/Dependencies/libjpeg/jdmarker.c \ + ../../JGE/Dependencies/libjpeg/jdmaster.c \ + ../../JGE/Dependencies/libjpeg/jdmerge.c \ + ../../JGE/Dependencies/libjpeg/jdphuff.c \ + ../../JGE/Dependencies/libjpeg/jdpostct.c \ + ../../JGE/Dependencies/libjpeg/jdsample.c \ + ../../JGE/Dependencies/libjpeg/jerror.c \ + ../../JGE/Dependencies/libjpeg/jfdctflt.c \ + ../../JGE/Dependencies/libjpeg/jfdctfst.c \ + ../../JGE/Dependencies/libjpeg/jfdctint.c \ + ../../JGE/Dependencies/libjpeg/jidctflt.c \ + ../../JGE/Dependencies/libjpeg/jidctfst.c \ + ../../JGE/Dependencies/libjpeg/jidctint.c \ + ../../JGE/Dependencies/libjpeg/jmemmgr.c \ + ../../JGE/Dependencies/libjpeg/jmemnobs.c \ + ../../JGE/Dependencies/libjpeg/jquant1.c \ + ../../JGE/Dependencies/libjpeg/jquant2.c \ + ../../JGE/Dependencies/libjpeg/jutils.c + + + DEFINES += SDL_ATOMIC_DISABLED SOURCES += \ ../../JGE/Dependencies/SDL/src/core/windows/SDL_windows.c\ ../../JGE/Dependencies/SDL/src/events/SDL_clipboardevents.c\ diff --git a/projects/mtg/wagic-qt.pro b/projects/mtg/wagic-qt.pro index 214da6334..9f8754264 100644 --- a/projects/mtg/wagic-qt.pro +++ b/projects/mtg/wagic-qt.pro @@ -39,7 +39,7 @@ android:INCLUDEPATH += $$ANDROID_NDK_ROOT/platforms/android-9/arch-arm/usr/inclu CONFIG(graphics, graphics|console){ HEADERS += \ ../../JGE/include/qt/filedownloader.h\ - ../../JGE/include/qt/corewrapper.h + ../../JGE/include/qt/qtcorewrapper.h SOURCES += \ ../../JGE/src/corewrapper.cpp\ diff --git a/projects/mtg/wagic.pri b/projects/mtg/wagic.pri index d797e9ebe..a5f3e2a76 100644 --- a/projects/mtg/wagic.pri +++ b/projects/mtg/wagic.pri @@ -22,6 +22,7 @@ DEFINES += TIXML_USE_STL windows:INCLUDEPATH += ../../JGE/Dependencies/include windows{ *-g++* { + DEFINES += WIN32 DEFINES += LINUX INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/Qt # INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/c++ @@ -42,7 +43,7 @@ INCLUDEPATH += include unix:!symbian:LIBS += -lz win32:LIBS += ../../JGE/Dependencies/lib/fmodvc.lib win32:LIBS += ../../JGE/Dependencies/lib/zlibd.lib -PRECOMPILED_HEADER = include/PrecompiledHeader.h +#PRECOMPILED_HEADER = include/PrecompiledHeader.h #DEFINES += TRACK_OBJECT_USAGE #DEFINES += AI_CHANGE_TESTING @@ -282,6 +283,7 @@ HEADERS += \ # JGE, could probably be moved outside SOURCES += \ + ../../JGE/src/corewrapper.cpp\ ../../JGE/src/Encoding.cpp\ ../../JGE/src/JAnimator.cpp\ ../../JGE/src/JApp.cpp\ @@ -319,6 +321,7 @@ SOURCES += \ ../../JGE/src/zipFS/zstream.cpp HEADERS += \ + ../../JGE/include/corewrapper.h\ ../../JGE/include/Threading.h\ ../../JGE/include/decoder_prx.h\ ../../JGE/include/DebugRoutines.h\