summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch')
-rw-r--r--games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch87
1 files changed, 59 insertions, 28 deletions
diff --git a/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch b/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch
index aae9cfe74fa9..235cab0fffcc 100644
--- a/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch
+++ b/games-puzzle/candycrisis/files/candycrisis-1.0-gentoo.patch
@@ -1,6 +1,33 @@
---- main.cpp.old 2007-12-10 22:33:59.000000000 +0100
-+++ main.cpp 2007-12-10 22:34:30.000000000 +0100
-@@ -592,7 +592,7 @@
+--- fmodsoundfx.cpp
++++ fmodsoundfx.cpp
+@@ -22,7 +22,7 @@
+
+ for( index=0; index<kNumSounds; index++ )
+ {
+- sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0 );
++ sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0, 0 );
+ if( sound[index] == NULL )
+ {
+ Error( "InitSound: files are missing" );
+--- main.cpp
++++ main.cpp
+@@ -232,6 +232,7 @@
+
+ #include <string.h>
+ #include <stdlib.h>
++#include <unistd.h>
+
+ #include "hiscore.h"
+ #include "control.h"
+@@ -283,6 +284,7 @@
+ int main(int argc, char *argv[])
+ {
+ argc, argv;
++ chdir(getenv("HOME"));
+
+ Initialize( );
+ if( IsRegistered( ) ) exit(0);
+@@ -592,7 +594,7 @@
strcpy( candyCrisisResources, ":CandyCrisisResources:" );
#endif
#ifdef linux
@@ -9,7 +36,7 @@
#endif
if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO ) < 0 )
-@@ -626,7 +626,6 @@
+@@ -626,7 +628,6 @@
}
#else
SDL_WM_IconifyWindow();
@@ -17,7 +44,7 @@
WaitForRegainFocus();
#endif
}
-@@ -703,7 +703,7 @@
+@@ -703,7 +704,7 @@
void InitRegistration()
{
@@ -26,18 +53,24 @@
}
---- Makefile.old 2007-12-10 22:38:42.000000000 +0100
-+++ Makefile 2007-12-10 22:39:59.000000000 +0100
-@@ -1,7 +1,7 @@
+--- Makefile
++++ Makefile
+@@ -1,9 +1,10 @@
++CXX ?= g++
++CXXFLAGS ?= -O3
++CXXFLAGS += $(shell sdl-config --cflags)
++LIBS := $(shell sdl-config --libs) -lSDL_image -lfmod
- OPTIMIZE := -O3
- CXXFLAGS := $(shell sdl-config --cflags) -DHAVE_MIKMOD $(OPTIMIZE)
+-OPTIMIZE := -O3
+-CXXFLAGS := $(shell sdl-config --cflags) -DHAVE_MIKMOD $(OPTIMIZE)
-LIBS := $(shell sdl-config --libs) -lSDL_image -lmikmod
-+LIBS := $(shell sdl-config --libs) -lSDL_image -lfmod
- TARGET := CandyCrisis
+-TARGET := CandyCrisis
++TARGET := candycrisis
-@@ -18,7 +18,9 @@
+ OBJECTS := \
+ blitter.o \
+@@ -18,7 +19,9 @@
keyselect.o \
level.o \
main.o \
@@ -48,25 +81,23 @@
moving.o \
MTypes.o \
next.o \
---- fmodsoundfx.cpp.old 2007-12-10 22:41:02.000000000 +0100
-+++ fmodsoundfx.cpp 2007-12-10 22:41:37.000000000 +0100
-@@ -22,7 +22,7 @@
-
- for( index=0; index<kNumSounds; index++ )
- {
-- sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0 );
-+ sound[index] = FSOUND_Sample_Load( FSOUND_UNMANAGED, QuickResourceName( "snd", index+128, ".wav" ), FSOUND_NORMAL | FSOUND_LOOP_OFF | FSOUND_2D, 0, 0 );
- if( sound[index] == NULL )
- {
- Error( "InitSound: files are missing" );
---- prefs.cpp.old 2007-12-10 23:10:49.000000000 +0100
-+++ prefs.cpp 2007-12-10 23:18:45.000000000 +0100
+@@ -36,7 +39,7 @@
+ zap.o
+
+ $(TARGET): $(OBJECTS)
+- $(CXX) -o $@ $^ $(LIBS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $(TARGET) $(LIBS)
+
+ clean:
+ $(RM) $(OBJECTS)
+--- prefs.cpp
++++ prefs.cpp
@@ -37,7 +37,7 @@
int fileSize, count, digitsLeft;
unsigned char info, *infoAt, *dataAt, *fileData;
- F = fopen( QuickResourceName( "Preferences", 0, ".txt" ), "r" );
-+ F = fopen( "@GENTOO_STATEDIR@/Preferences.txt", "r" );
++ F = fopen( ".candycrisis", "r" );
if( F != NULL )
{
@@ -75,7 +106,7 @@
unsigned char* dataAt;
- F = fopen( QuickResourceName( "Preferences", 0, ".txt" ), "w" );
-+ F = fopen( "@GENTOO_STATEDIR@/Preferences.txt", "w" );
++ F = fopen( ".candycrisis", "w" );
if( F != NULL )
{