aboutsummaryrefslogtreecommitdiff
path: root/games/super_methane_brothers
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-07-26 18:52:59 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-07-26 18:52:59 +0000
commit34c14ef0b9a8d4e7004c75e57d74bce1200fdb5d (patch)
tree716a25a8326b03b0d52b5732012af1431839960d /games/super_methane_brothers
parent7788fa551c750796e572ffa1952a95bb7a618583 (diff)
downloadports-34c14ef0b9a8d4e7004c75e57d74bce1200fdb5d.tar.gz
ports-34c14ef0b9a8d4e7004c75e57d74bce1200fdb5d.zip
Notes
Diffstat (limited to 'games/super_methane_brothers')
-rw-r--r--games/super_methane_brothers/Makefile2
-rw-r--r--games/super_methane_brothers/files/patch-sources__methane.cpp24
-rw-r--r--games/super_methane_brothers/files/patch-sources_methane.cpp99
3 files changed, 100 insertions, 25 deletions
diff --git a/games/super_methane_brothers/Makefile b/games/super_methane_brothers/Makefile
index 5e66afa2b8b7..3356cb34e315 100644
--- a/games/super_methane_brothers/Makefile
+++ b/games/super_methane_brothers/Makefile
@@ -3,7 +3,7 @@
PORTNAME= super_methane_brothers
PORTVERSION= 1.5.1
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= games
MASTER_SITES= SF/methane/Methane%20Stable/Methane%20V${PORTVERSION}
DISTNAME= methane-${PORTVERSION}
diff --git a/games/super_methane_brothers/files/patch-sources__methane.cpp b/games/super_methane_brothers/files/patch-sources__methane.cpp
deleted file mode 100644
index 0969aa7e2d63..000000000000
--- a/games/super_methane_brothers/files/patch-sources__methane.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
---- sources/methane.cpp.orig 2011-12-11 14:18:38.301132904 +0100
-+++ sources/methane.cpp 2011-12-11 14:15:32.669126965 +0100
-@@ -105,15 +105,15 @@
- return 0;
- }
-
-- CL_AutoPtr<CL_SetupSound> setup_sound;
-- CL_AutoPtr<CL_SoundOutput> sound_output;
-- CL_AutoPtr<CL_SetupMikMod> setup_mikmod;
-+ CL_UniquePtr<CL_SetupSound> setup_sound;
-+ CL_UniquePtr<CL_SoundOutput> sound_output;
-+ CL_UniquePtr<CL_SetupMikMod> setup_mikmod;
-
- if (GLOBAL_SoundEnable)
- {
-- setup_sound = new CL_SetupSound;
-- sound_output = new CL_SoundOutput(44100);
-- setup_mikmod = new CL_SetupMikMod;
-+ setup_sound = cl_move(CL_UniquePtr<CL_SetupSound>(new CL_SetupSound));
-+ sound_output = cl_move(CL_UniquePtr<CL_SoundOutput>(new CL_SoundOutput(44100)));
-+ setup_mikmod = cl_move(CL_UniquePtr<CL_SetupMikMod>(new CL_SetupMikMod));
- }
-
- // Set the video mode
diff --git a/games/super_methane_brothers/files/patch-sources_methane.cpp b/games/super_methane_brothers/files/patch-sources_methane.cpp
new file mode 100644
index 000000000000..fa2276ea6773
--- /dev/null
+++ b/games/super_methane_brothers/files/patch-sources_methane.cpp
@@ -0,0 +1,99 @@
+--- sources/methane.cpp.orig 2011-04-05 07:08:02 UTC
++++ sources/methane.cpp
+@@ -12,10 +12,17 @@
+ //------------------------------------------------------------------------------
+ // Methane brothers main source file
+ //------------------------------------------------------------------------------
++
++#if !defined(__i386__) && !defined(__x86_64__)
++#define CL_DISABLE_SSE2
++#endif
++
+ #include <ClanLib/core.h>
+ #include <ClanLib/application.h>
+ #include <ClanLib/display.h>
++#ifndef CL_DISABLE_SSE2
+ #include <ClanLib/swrender.h>
++#endif
+ #include <ClanLib/gl.h>
+ #include <ClanLib/gl1.h>
+ #include <ClanLib/sound.h>
+@@ -54,10 +61,14 @@ class SuperMethaneBrothers (public)
+ {
+ CL_SetupGL target_opengl2;
+ CL_SetupGL1 target_opengl1;
++#ifndef CL_DISABLE_SSE2
+ CL_SetupSWRender target_swrender;
+
+ // Since SWRender is compatible and fast - Use that as the default setting options
+ target_swrender.set_current();
++#else
++ target_opengl2.set_current();
++#endif
+
+ if (get_options())
+ {
+@@ -69,9 +80,11 @@ class SuperMethaneBrothers (public)
+ case (opengl1):
+ target_opengl1.set_current();
+ break;
++#ifndef CL_DISABLE_SSE2
+ case (swrender):
+ target_swrender.set_current();
+ break;
++#endif
+ }
+ }
+ else
+@@ -80,15 +93,15 @@ class SuperMethaneBrothers (public)
+ return 0;
+ }
+
+- CL_AutoPtr<CL_SetupSound> setup_sound;
+- CL_AutoPtr<CL_SoundOutput> sound_output;
+- CL_AutoPtr<CL_SetupMikMod> setup_mikmod;
++ CL_UniquePtr<CL_SetupSound> setup_sound;
++ CL_UniquePtr<CL_SoundOutput> sound_output;
++ CL_UniquePtr<CL_SetupMikMod> setup_mikmod;
+
+ if (GLOBAL_SoundEnable)
+ {
+- setup_sound = new CL_SetupSound;
+- sound_output = new CL_SoundOutput(44100);
+- setup_mikmod = new CL_SetupMikMod;
++ setup_sound = cl_move(CL_UniquePtr<CL_SetupSound>(new CL_SetupSound));
++ sound_output = cl_move(CL_UniquePtr<CL_SoundOutput>(new CL_SoundOutput(44100)));
++ setup_mikmod = cl_move(CL_UniquePtr<CL_SetupMikMod>(new CL_SetupMikMod));
+ }
+
+ // Set the video mode
+@@ -302,11 +315,13 @@ class SuperMethaneBrothers (public)
+ LastKey = 0;
+ GLOBAL_RenderTarget = opengl1;
+ }
++#ifndef CL_DISABLE_SSE2
+ if ( (LastKey == 'r') || (LastKey == 'R') )
+ {
+ LastKey = 0;
+ GLOBAL_RenderTarget = swrender;
+ }
++#endif
+
+ gc.clear(CL_Colorf(0.0f,0.0f,0.2f));
+
+@@ -330,6 +345,7 @@ class SuperMethaneBrothers (public)
+ {
+ options_font.draw_text(gc, 10, ypos, "OpenGL V1 - Disabled. Press 'E' to select");
+ }
++#ifndef CL_DISABLE_SSE2
+ ypos += 50;
+ if (GLOBAL_RenderTarget == swrender)
+ {
+@@ -339,6 +355,7 @@ class SuperMethaneBrothers (public)
+ {
+ options_font.draw_text(gc, 10, ypos, "Software Renderer - Disabled. Press 'R' to select");
+ }
++#endif
+ ypos += 100;
+ if (GLOBAL_SoundEnable)
+ {