--- 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
-	strcpy( candyCrisisResources, "CandyCrisisResources/" );
+	strcpy( candyCrisisResources, "@GENTOO_DATADIR@" );
 #endif
 
 	if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO ) < 0 )
@@ -626,7 +628,6 @@
 	}
 #else
     SDL_WM_IconifyWindow();
-	ShellExecute( NULL, "open", url, "", "c:\\", SW_SHOWNORMAL );
 	WaitForRegainFocus();
 #endif
 }
@@ -703,7 +704,7 @@
 
 void InitRegistration()
 {
-	playerIsRegistered = ValidateCode( registeredName, registeredKey );
+	playerIsRegistered = true;
 }
 
 
--- 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)
-LIBS   := $(shell sdl-config --libs) -lSDL_image -lmikmod
 
-TARGET := CandyCrisis
+TARGET := candycrisis
 
 OBJECTS :=	\
 	blitter.o \
@@ -18,7 +19,9 @@
 	keyselect.o \
 	level.o \
 	main.o \
-	midi.o \
+	fmodsoundfx.o \
+	fmodmusic.o \
+	RegAlgorithm.o \
 	moving.o \
 	MTypes.o \
 	next.o \
@@ -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( ".candycrisis", "r" );
 
 	if( F != NULL )
 	{
@@ -128,7 +128,7 @@
 	short count, size;
 	unsigned char* dataAt;
 	
-	F = fopen( QuickResourceName( "Preferences", 0, ".txt" ), "w" );
+	F = fopen( ".candycrisis", "w" );
 	
 	if( F != NULL )
 	{