| @@ -84,9 +84,14 @@ if test "x${ac_cv_my_have_sdl}" = xno; then | |||
| AC_CHECK_HEADERS(SDL_image.h SDL/SDL_image.h, [ac_cv_my_have_sdl_image="yes"]) | |||
| AC_CHECK_LIB(SDL, main, | |||
| [SDL_LIBS="${SDL_LIBS} -lSDL"], | |||
| [ac_cv_my_have_sdl="no"]) | |||
| [AC_CHECK_LIB(SDL2, main, | |||
| [SDL_LIBS="${SDL_LIBS} -lSDL2" | |||
| ac_cv_my_have_sdl2="yes"], | |||
| [ac_cv_my_have_sdl="no"])]) | |||
| AC_CHECK_LIB(SDLmain, main, | |||
| [SDL_LIBS="${SDL_LIBS} -lSDLmain -lSDL"]) | |||
| AC_CHECK_LIB(SDL2main, main, | |||
| [SDL_LIBS="${SDL_LIBS} -lSDL2main -lSDL2"]) | |||
| AC_CHECK_LIB(SDL_mixer, main, | |||
| [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"], | |||
| [ac_cv_my_have_sdl_mixer="no"]) | |||
| @@ -168,7 +168,7 @@ configure() | |||
| PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/gtkglarea-2.0.1/lib/pkgconfig" | |||
| PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/libcaca-0.99.beta18/lib/pkgconfig" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/glew-1.9.0/lib/i686-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-1.2.15/lib/i686-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-2.0.3/lib/i686-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-image-1.2.12/lib/i686-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-mixer-1.2.12/lib/i686-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/gtk-2.22.1/lib" | |||
| @@ -193,7 +193,7 @@ configure() | |||
| PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/gtkglarea-2.0.1/lib/pkgconfig" | |||
| PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/libcaca-0.99.beta18/lib/pkgconfig" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/glew-1.9.0/lib/x86_64-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-1.2.15/lib/x86_64-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-2.0.3/lib/x86_64-w64-mingw32" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-image-1.2.12/lib/x86_64-msvc" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/sdl-mixer-1.2.12/lib/x86_64-msvc" | |||
| LDFLAGS="$LDFLAGS -L$PWD/external/libcaca-0.99.beta18/lib/x86_64-w64-mingw32" | |||
| @@ -251,7 +251,7 @@ configure() | |||
| PATH="$PATH" do_configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=powerpc | |||
| ;; | |||
| win*-i386|win*-amd64) | |||
| CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-1.2.15/include" | |||
| CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-2.0.3/include" | |||
| CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-image-1.2.12/include" | |||
| CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-mixer-1.2.12/include" | |||
| CPPFLAGS="$CPPFLAGS -I$PWD/external/glew-1.9.0/include/GL -DGLEW_STATIC" | |||
| @@ -9,15 +9,15 @@ | |||
| <FlexIncludes>$(FlexDir)\include</FlexIncludes> | |||
| <!-- SDL --> | |||
| <SdlDir>$(ExternalDir)\sdl-1.2.15</SdlDir> | |||
| <SdlDir>$(ExternalDir)\sdl-2.0.3</SdlDir> | |||
| <SdlImageDir>$(ExternalDir)\sdl-image-1.2.12</SdlImageDir> | |||
| <SdlMixerDir>$(ExternalDir)\sdl-mixer-1.2.12</SdlMixerDir> | |||
| <SdlIncludes>$(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include</SdlIncludes> | |||
| <SdlLibs Condition="'$(Platform)'=='Win32'">$(SdlDir)\lib\i686-w64-mingw32;$(SdlImageDir)\lib\i686-w64-mingw32;$(SdlMixerDir)\lib\i686-w64-mingw32</SdlLibs> | |||
| <SdlLibs Condition="'$(Platform)'=='x64'">$(SdlDir)\lib\x86_64-msvc;$(SdlImageDir)\lib\x86_64-msvc;$(SdlMixerDir)\lib\x86_64-msvc</SdlLibs> | |||
| <SdlDeps Condition="'$(Platform)'=='Win32'">SDL.lib;SDLmain.lib;SDL_image.lib;SDL_mixer.lib</SdlDeps> | |||
| <SdlDeps Condition="'$(Platform)'=='x64'">SDL.lib;SDLmain.lib;SDL_image.lib;SDL_mixer.lib</SdlDeps> | |||
| <Win32Defines>HAVE_SDL_H;USE_SDL;$(Win32Defines)</Win32Defines> | |||
| <SdlDeps Condition="'$(Platform)'=='Win32'">SDL2.lib;SDL2main.lib;SDL_image.lib;SDL_mixer.lib</SdlDeps> | |||
| <SdlDeps Condition="'$(Platform)'=='x64'">SDL2.lib;SDL2main.lib;SDL_image.lib;SDL_mixer.lib</SdlDeps> | |||
| <Win32Defines>HAVE_SDL_H;USE_SDL;USE_SDL2;$(Win32Defines)</Win32Defines> | |||
| <Win32Defines>USE_SDL_MIXER;USE_SDL_IMAGE;$(Win32Defines)</Win32Defines> | |||
| <!-- GTK+ & GtkGl --> | |||
| @@ -8,16 +8,21 @@ | |||
| // http://www.wtfpl.net/ for more details. | |||
| // | |||
| #include <lol/engine-internal.h> | |||
| #if defined USE_GDIPLUS | |||
| #include <algorithm> | |||
| #if HAVE_CONFIG_H | |||
| # include "config.h" | |||
| #endif | |||
| #if USE_GDIPLUS | |||
| # include <algorithm> | |||
| using std::min; | |||
| using std::max; | |||
| # include <windows.h> | |||
| # include <objidl.h> // for DEFINE_GUID | |||
| # include <gdiplus.h> | |||
| #endif | |||
| #include <lol/engine-internal.h> | |||
| #include <windows.h> | |||
| #include <gdiplus.h> | |||
| #if USE_GDIPLUS | |||
| #include "../../image/image-private.h" | |||
| @@ -13,28 +13,28 @@ | |||
| // --------------- | |||
| // | |||
| #if !defined __LOL_MAIN_H__ | |||
| #define __LOL_MAIN_H__ | |||
| #if !defined__LOL_ENGINE_INTERNAL_H__ | |||
| #define __LOL_ENGINE_INTERNAL_H__ | |||
| /* Include this as early as possible */ | |||
| #if defined HAVE_CONFIG_H | |||
| #if HAVE_CONFIG_H | |||
| # include "config.h" | |||
| #endif | |||
| /* If using NaCl or Android, override main() with our version */ | |||
| #if defined __native_client__ | |||
| #if __native_client__ | |||
| # define main lol_nacl_main | |||
| #elif defined __ANDROID__ | |||
| #elif __ANDROID__ | |||
| # define main lol_android_main | |||
| #endif | |||
| /* If using SDL on Windows or OS X, let it override main() */ | |||
| #if defined USE_SDL && (defined _WIN32 || defined __APPLE__) | |||
| #if USE_SDL && (_WIN32 || __APPLE__) | |||
| # include <SDL_main.h> | |||
| #endif | |||
| #include <lol/public.h> | |||
| #include <lol/extras.h> | |||
| #endif // __LOL_MAIN_H__ | |||
| #endif // __LOL_ENGINE_INTERNAL_H__ | |||
| @@ -13,23 +13,23 @@ | |||
| // --------------- | |||
| // | |||
| #if !defined __LOL_MAIN_H__ | |||
| #define __LOL_MAIN_H__ | |||
| #if !defined __LOL_ENGINE_H__ | |||
| #define __LOL_ENGINE_H__ | |||
| /* If using NaCl or Android, override main() with our version */ | |||
| #if defined __native_client__ | |||
| #if __native_client__ | |||
| # define main lol_nacl_main | |||
| #elif defined __ANDROID__ | |||
| #elif __ANDROID__ | |||
| # define main lol_android_main | |||
| #endif | |||
| /* If using SDL on Windows or OS X, let it override main() */ | |||
| #if defined USE_SDL && (defined _WIN32 || defined __APPLE__) | |||
| #if USE_SDL && (_WIN32 || __APPLE__) | |||
| # include <SDL_main.h> | |||
| #endif | |||
| #include <lol/public.h> | |||
| #include <lol/extras.h> | |||
| #endif // __LOL_MAIN_H__ | |||
| #endif // __LOL_ENGINE_H__ | |||
| @@ -8,13 +8,16 @@ | |||
| // http://www.wtfpl.net/ for more details. | |||
| // | |||
| #include <lol/engine-internal.h> | |||
| #if HAVE_CONFIG_H | |||
| # include "config.h" | |||
| #endif | |||
| #if defined USE_XINPUT | |||
| # include <d3d9.h> | |||
| # include <xinput.h> | |||
| #endif | |||
| #include <lol/engine-internal.h> | |||
| #include "d3d9input.h" | |||
| #include "input/input_internal.h" | |||