summaryrefslogtreecommitdiffstats
path: root/games/megamario/patches
diff options
context:
space:
mode:
Diffstat (limited to 'games/megamario/patches')
-rw-r--r--games/megamario/patches/compilefix.diff56
-rw-r--r--games/megamario/patches/logfile.diff30
-rw-r--r--games/megamario/patches/usemp3music.diff24
3 files changed, 110 insertions, 0 deletions
diff --git a/games/megamario/patches/compilefix.diff b/games/megamario/patches/compilefix.diff
new file mode 100644
index 0000000000..1b115a3aa1
--- /dev/null
+++ b/games/megamario/patches/compilefix.diff
@@ -0,0 +1,56 @@
+diff -Naur a/src/SDL_gfxPrimitives.c b/src/SDL_gfxPrimitives.c
+--- a/src/SDL_gfxPrimitives.c 2007-03-07 10:35:26.000000000 -0500
++++ b/src/SDL_gfxPrimitives.c 2016-08-14 15:36:20.470686223 -0400
+@@ -10,6 +10,7 @@
+ #include <stdlib.h>
+ #include <math.h>
+ #include <string.h>
++#include <limits.h>
+
+ #include "SDL_gfxPrimitives.h"
+ #include "SDL_gfxPrimitives_font.h"
+diff -Naur a/src/global.cpp b/src/global.cpp
+--- a/src/global.cpp 2007-03-07 10:34:56.000000000 -0500
++++ b/src/global.cpp 2016-08-14 15:39:23.252692634 -0400
+@@ -9,7 +9,7 @@
+
+ #include "Global.h"
+ #include "unixutils.h"
+-
++#include <limits.h>
+
+
+ SDL_Surface *screen;
+diff -Naur a/src/levels.cpp b/src/levels.cpp
+--- a/src/levels.cpp 2007-03-07 10:35:04.000000000 -0500
++++ b/src/levels.cpp 2016-08-14 15:38:08.660690018 -0400
+@@ -6,6 +6,7 @@
+ *********************************************************************/
+
+
++#include <limits.h>
+ #include "Global.h"
+ #include "unixutils.h"
+
+diff -Naur a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp 2007-03-07 10:35:04.000000000 -0500
++++ b/src/main.cpp 2016-08-14 15:38:42.660691210 -0400
+@@ -10,6 +10,7 @@
+ #include "iniparser.h"
+ #include "unixutils.h"
+ #include <time.h>
++#include <limits.h>
+
+
+ bool running;
+diff -Naur a/src/menu.cpp b/src/menu.cpp
+--- a/src/menu.cpp 2007-03-07 10:35:10.000000000 -0500
++++ b/src/menu.cpp 2016-08-14 15:40:10.108694278 -0400
+@@ -7,6 +7,7 @@
+
+ #include "Global.h"
+ #include "unixutils.h"
++#include <limits.h>
+
+ bool hideMenu;
+
diff --git a/games/megamario/patches/logfile.diff b/games/megamario/patches/logfile.diff
new file mode 100644
index 0000000000..741e0ffc8e
--- /dev/null
+++ b/games/megamario/patches/logfile.diff
@@ -0,0 +1,30 @@
+diff -Naur a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp 2007-03-07 10:35:04.000000000 -0500
++++ b/src/main.cpp 2016-08-14 16:53:05.113847723 -0400
+@@ -47,21 +47,24 @@
+ NoFrameCheck = 1;
+
+ NoFrameCheck = 1;
++ out_logfile.open ("log.txt");
+
+ #else /* defined __unix__ */
+
+ int main(int argc, char *argv[])
+ {
++ char logfile[MAX_PATH];
+ char *home_dir = get_homedir();
+ snprintf(szIniFile, MAX_PATH, "%s/.megamario",
+ home_dir? home_dir:".");
+ check_and_create_dir(szIniFile);
+ snprintf(szIniFile, MAX_PATH, "%s/.megamario/mario.ini",
+ home_dir? home_dir:".");
+-
++ snprintf(logfile, MAX_PATH, "%s/.megamario/log.txt",
++ home_dir? home_dir:".");
++ out_logfile.open (logfile);
+ #endif /* defined __unix__ */
+
+- out_logfile.open ("log.txt");
+
+ dictionary * d = iniparser_new(szIniFile);
+ pixelation = iniparser_getboolean (d, "Mario:Pixelation", 1);
diff --git a/games/megamario/patches/usemp3music.diff b/games/megamario/patches/usemp3music.diff
new file mode 100644
index 0000000000..d284491e1b
--- /dev/null
+++ b/games/megamario/patches/usemp3music.diff
@@ -0,0 +1,24 @@
+diff -Naur a/src/functions.cpp b/src/functions.cpp
+--- a/src/functions.cpp 2007-03-07 10:34:56.000000000 -0500
++++ b/src/functions.cpp 2016-08-14 16:26:04.208790873 -0400
+@@ -447,7 +447,7 @@
+ }
+ else
+ {
+- sprintf(tmp, "mp3music/%s",filename);
++ sprintf(tmp, DATADIR "mp3music/%s",filename);
+ tmp[strlen(tmp)-3]='m';
+ tmp[strlen(tmp)-2]='p';
+ tmp[strlen(tmp)-1]='3';
+diff -Naur a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp 2007-03-07 10:35:04.000000000 -0500
++++ b/src/main.cpp 2016-08-14 16:25:41.230790067 -0400
+@@ -413,7 +413,7 @@
+
+
+ fstream fin;
+-fin.open("mp3music/music_available.dat",ios::in);
++fin.open(DATADIR "mp3music/music_available.dat",ios::in);
+ if( fin.is_open() )
+ {
+ HighQualityMusicFound=1;