diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2010-04-16 21:50:02 -0400 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-15 10:38:06 +0200 |
commit | 2420f03c14cbc8fc2d11fceefbe4d10dbb80aa44 (patch) | |
tree | e67c52ecdec34713c9511d6dfd16fe0d0a8a6ce3 /games/brainparty/patches | |
parent | 39e7e607e2d6a765ef0e696d8d79422fa8e93f0f (diff) | |
download | slackbuilds-2420f03c14cbc8fc2d11fceefbe4d10dbb80aa44.tar.gz |
games/brainparty: Added (puzzle game)
Diffstat (limited to 'games/brainparty/patches')
-rw-r--r-- | games/brainparty/patches/brainparty-0.5-data-directory.patch | 12 | ||||
-rw-r--r-- | games/brainparty/patches/brainparty-0.5-savegame.patch | 27 |
2 files changed, 39 insertions, 0 deletions
diff --git a/games/brainparty/patches/brainparty-0.5-data-directory.patch b/games/brainparty/patches/brainparty-0.5-data-directory.patch new file mode 100644 index 0000000000..10a35fc0eb --- /dev/null +++ b/games/brainparty/patches/brainparty-0.5-data-directory.patch @@ -0,0 +1,12 @@ +diff -Naur brainparty.orig/main.cpp brainparty/main.cpp +--- brainparty.orig/main.cpp 2010-03-11 00:15:34.000000000 +0000 ++++ brainparty/main.cpp 2010-04-03 22:35:45.000000000 +0000 +@@ -26,6 +26,8 @@ + BPGame* Game; + + int main(int argc, char *argv[]) { ++ chdir("/usr/share/brainparty"); ++ + if ( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) { + fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError()); + exit(1); diff --git a/games/brainparty/patches/brainparty-0.5-savegame.patch b/games/brainparty/patches/brainparty-0.5-savegame.patch new file mode 100644 index 0000000000..1b7b437ab4 --- /dev/null +++ b/games/brainparty/patches/brainparty-0.5-savegame.patch @@ -0,0 +1,27 @@ +--- a/BPGame.cpp 2010-03-11 00:15:34.000000000 +0000 ++++ b/BPGame.cpp 2010-04-02 04:17:02.640735675 +0100 +@@ -1294,8 +1294,10 @@ void BPGame::LoadSettings() { + Secret1 = Secret2 = Secret3 = Secret4 = false; + NumUnlockedGames = 0; + ++ string file = string("/.brainparty"); ++ file.insert(0, getenv("HOME")); + ifstream ifs; +- ifs.open(".brainparty"); ++ ifs.open(file.c_str()); + + FirstRun = false; + +@@ -1425,8 +1428,11 @@ void BPGame::LoadSettings() { + } + + void BPGame::SaveSettings() { ++ string file = string("/.brainparty"); ++ file.insert(0, getenv("HOME")); ++ + ofstream savefile; +- savefile.open(".brainparty"); ++ savefile.open(file.c_str()); + savefile << EnableSound << endl; + savefile << EnableMusic << endl; + savefile << endl; |