diff --git a/games/blobwars/Makefile b/games/blobwars/Makefile index ebb4b49ec9e..5e3bd5a6a2b 100644 --- a/games/blobwars/Makefile +++ b/games/blobwars/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.5 2011/03/31 16:37:17 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.6 2011/04/02 17:39:33 kili Exp $ COMMENT = 2D arcade game DISTNAME = blobwars-1.18 -REVISION = 0 +REVISION = 1 CATEGORIES = games diff --git a/games/blobwars/patches/patch-src_init_cpp b/games/blobwars/patches/patch-src_init_cpp new file mode 100644 index 00000000000..894838bda64 --- /dev/null +++ b/games/blobwars/patches/patch-src_init_cpp @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_init_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $ +--- src/init.cpp.orig Fri Apr 1 03:03:11 2011 ++++ src/init.cpp Fri Apr 1 03:29:23 2011 +@@ -461,9 +461,11 @@ void cleanup() + if (SDL_NumJoysticks() > 0) + { + SDL_JoystickEventState(SDL_DISABLE); +- for (int i = 0 ; i < SDL_NumJoysticks() ; i++) ++ // Blobwars tries to open only the first joystick, ++ // so test only the first here as well. ++ if (SDL_JoystickOpened(0)) + { +- debug(("Closing Joystick #%d - %s...\n", i, SDL_JoystickName(i))); ++ debug(("Closing Joystick #%d - %s...\n", 0, SDL_JoystickName(0))); + SDL_JoystickClose(config.sdlJoystick); + } + } diff --git a/games/blobwars/patches/patch-src_map_cpp b/games/blobwars/patches/patch-src_map_cpp new file mode 100644 index 00000000000..7fec6ddc138 --- /dev/null +++ b/games/blobwars/patches/patch-src_map_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_map_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $ +--- src/map.cpp.orig Sun Feb 13 18:22:21 2011 ++++ src/map.cpp Sat Apr 2 16:41:32 2011 +@@ -400,7 +400,7 @@ void showMap(int centerX, int centerY) + engine.flushInput(); + engine.clearInput(); + +- doMusicInfo(-1); ++ doMusicInfo((unsigned int) -1); + + while (true) + { diff --git a/games/blobwars/patches/patch-src_player_cpp b/games/blobwars/patches/patch-src_player_cpp new file mode 100644 index 00000000000..9db941562f7 --- /dev/null +++ b/games/blobwars/patches/patch-src_player_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_player_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $ +--- src/player.cpp.orig Sat Apr 2 17:12:34 2011 ++++ src/player.cpp Sat Apr 2 17:13:21 2011 +@@ -66,7 +66,7 @@ void presentPlayerMedal(const char *tname) + // Copy the input, so that threading + // doesn't trip us up! + char *data = new char[128]; +- strlcpy(data, tname, sizeof data); ++ strlcpy(data, tname, 128); + + SDL_Thread *thread = SDL_CreateThread(medalWorker, (void*)data); +