Changeset 731 for abuse/trunk
- Timestamp:
- Jul 21, 2014, 12:50:29 AM (4 years ago)
- Location:
- abuse/trunk
- Files:
-
- 15 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/AUTHORS
r618 r731 6 6 Current code maintainer 7 7 Debian package maintainer 8 9 Jonathan Simpson <jjsimpso@gmail.com> 10 SDL2 port 11 Game controller support 8 12 9 13 Anthony Kruize <trandor@labyrinth.net.au> -
abuse/trunk/configure.ac
r651 r731 51 51 52 52 dnl Check for SDL 53 SDL_VERSION=1.1.6 54 AM_PATH_SDL($SDL_VERSION, :, 55 AC_MSG_ERROR([*** SDL version $SDL_VERSION or above not found!])) 53 SDL2_VERSION=2.0.0 54 SDL2_FOUND="no" 55 SDLPORT_DIR=sdl2port 56 AM_PATH_SDL2($SDL2_VERSION, SDL2_FOUND="yes", 57 AC_MSG_ERROR([*** SDL2 version $SDL2_VERSION or above not found!])) 58 59 if test $SDL2_FOUND = "no"; then 60 SDL_VERSION=1.1.6 61 SDLPORT_DIR=sdlport 62 AM_PATH_SDL($SDL_VERSION, :, 63 AC_MSG_ERROR([*** SDL version $SDL_VERSION or above not found!])) 64 fi 65 56 66 CFLAGS="$CFLAGS $SDL_CFLAGS" 57 67 LIBS="$LIBS $SDL_LIBS $X_LIBS" 68 AC_SUBST(SDLPORT_DIR) 58 69 59 70 dnl Check for SDL mixer 60 ac_cv_my_have_sdl_mixer="no" 61 save_CPPFLAGS="${CPPFLAGS}" 62 CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}" 63 AC_CHECK_HEADERS(SDL/SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"]) 64 CPPFLAGS="${save_CPPFLAGS}" 65 if test "${ac_cv_my_have_sdl_mixer}" = "no"; then 66 AC_MSG_ERROR([*** SDL_mixer not found!]) 67 fi 68 LIBS="$LIBS -lSDL_mixer" 71 if test $SDL2_FOUND = "yes"; then 72 ac_cv_my_have_sdl_mixer="no" 73 save_CPPFLAGS="${CPPFLAGS}" 74 CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}" 75 AC_CHECK_HEADERS(SDL2/SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"]) 76 CPPFLAGS="${save_CPPFLAGS}" 77 if test "${ac_cv_my_have_sdl_mixer}" = "no"; then 78 AC_MSG_ERROR([*** SDL_mixer not found!]) 79 fi 80 LIBS="$LIBS -lSDL2_mixer" 81 else 82 ac_cv_my_have_sdl_mixer="no" 83 save_CPPFLAGS="${CPPFLAGS}" 84 CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}" 85 AC_CHECK_HEADERS(SDL/SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"]) 86 CPPFLAGS="${save_CPPFLAGS}" 87 if test "${ac_cv_my_have_sdl_mixer}" = "no"; then 88 AC_MSG_ERROR([*** SDL_mixer not found!]) 89 fi 90 LIBS="$LIBS -lSDL_mixer" 91 fi 69 92 70 93 if test "${enable_debug}" = "yes"; then … … 150 173 src/net/Makefile 151 174 src/imlib/Makefile 152 src/sdlport/Makefile153 175 data/Makefile 154 176 doc/Makefile … … 156 178 doc/abuse-tool.6]) 157 179 180 if test $SDL2_FOUND = "yes"; then 181 AC_OUTPUT([src/sdl2port/Makefile]) 182 else 183 AC_OUTPUT([src/sdlport/Makefile]) 184 fi 185 186 if test $SDL2_FOUND = "yes"; then 187 echo " 188 ------ Configuration for $PACKAGE $VERSION ------ 189 Compiler: ${CC} (`${CC} --version | head -n 1`) 190 Install prefix: ${prefix} 191 Asset directory: ${with_assetdir} 192 SDL version: `sdl2-config --version` 193 194 Now type 'make' to build $PACKAGE. 195 " 196 else 158 197 echo " 159 198 ------ Configuration for $PACKAGE $VERSION ------ … … 166 205 Now type 'make' to build $PACKAGE. 167 206 " 207 fi -
abuse/trunk/src/Makefile.am
r651 r731 1 1 ## Process this file with automake to produce Makefile.in 2 2 3 SUBDIRS = lisp net imlib sdlport3 SUBDIRS = lisp net imlib @SDLPORT_DIR@ 4 4 5 5 bin_PROGRAMS = abuse abuse-tool … … 65 65 $(NULL) 66 66 67 EXTRALIBS = lisp/liblisp.a sdlport/libsdlport.a imlib/libimlib.a net/libnet.a67 EXTRALIBS = lisp/liblisp.a @SDLPORT_DIR@/libsdlport.a imlib/libimlib.a net/libnet.a 68 68 abuse_LDADD = $(EXTRALIBS) 69 69 abuse_DEPENDENCIES = $(EXTRALIBS) … … 75 75 abuse_tool_DEPENDENCIES = $(abuse_tool_LDADD) 76 76 77 INCLUDES = -I$(srcdir) -I $(srcdir)/lisp -I$(srcdir)/imlib \77 INCLUDES = -I$(srcdir) -I $(srcdir)/lisp -I$(srcdir)/imlib \ 78 78 -I$(srcdir)/net $(SDL_CFLAGS) 79 79 80 80 CPPFLAGS = @CPPFLAGS@ -DNO_CHECK 81 -
abuse/trunk/src/imlib/event.h
r682 r731 90 90 } 91 91 92 // To enable/disable game controller 93 // enables switching between mouse and gamepad when entering certain screens 94 // Added for SDL2 game controller support 95 void enable_controller(bool enabled) 96 { 97 controller_enabled = enabled; 98 } 99 92 100 private: 93 101 linked_list m_events; … … 95 103 96 104 image *m_screen; 105 bool controller_enabled; 97 106 98 107 protected: -
abuse/trunk/src/loadgame.cpp
r682 r731 243 243 do 244 244 { 245 // disable game controller during save/load screen so that mouse can be used 246 wm->enable_controller(false); 247 245 248 wm->flush_screen(); 246 249 wm->get_event(ev); … … 259 262 } while (!got_level && !quit); 260 263 264 wm->enable_controller(true); 265 261 266 wm->close_window(l_win); 262 267 wm->close_window(preview);
Note: See TracChangeset
for help on using the changeset viewer.