1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff --git a/Makefile b/Makefile
index 821b6a9..50df3d9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # Makefile for et-sdl-sound
 
-_GCC_PATH=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6/
+_GCC_PATH=/usr/bin/
 
 LD = $(_GCC_PATH)g++
 CPP = $(_GCC_PATH)g++
diff --git a/hooks.cpp b/hooks.cpp
index 9da834b..4ade089 100644
--- a/hooks.cpp
+++ b/hooks.cpp
@@ -159,7 +159,7 @@ void initHooks()
 		dma = (dma_t *) 0x08aedc04;
 		break;
 	
-	case 0x6ab49f82:
+	case 0x00000000:
 		version = "ET 2.60b";
 		
 		writeJump((void *) 0x08188250, (void *) SNDDMA_Init);
@@ -218,34 +218,27 @@ void initHooks()
 		break;
 	
 	default:
-		std::cout << "You are not running a recognized version of Enemy Territory or RTCW (CRC32 = " << (void *) CRC32  << ")" << std::endl;
 		return; // we don't need to exit( 1 )
 	}
 	
-	std::cout << "Found " << version << " (CRC32 = " << (void *) CRC32 << ")" << std::endl;
 	
 	if (backend == OSS) {
-		std::cout << "Using default OSS backend." << std::endl;
 		return;
 	}
 #ifdef __ALSA
 	else if (backend == ALSA) {
-		std::cout << "Using ALSA backend." << std::endl;
 		etalsa = new EtALSA(dma);
 	}
 #endif
 #ifdef __SDL
 	else if (backend == SDL) {
-		std::cout << "Using SDL backend." << std::endl;
 		etsdl = new EtSDL(dma, (void *) sdl_audio_callback, quake3);
 	}
 #endif
 	else {
-		std::cout << "Requested backend is not available, using OSS." << std::endl;
 		return;
 	}
 	
-	std::cout << "et-sdl-sound-" << __ETSDL_VERSION << " (" << __DATE__ << " " << __TIME__ << ", " << __VERSION__ << ") loaded." << std::endl;
 }
 
 void writeAddr(void *addr, void *dest)
@@ -273,16 +266,13 @@ void unprotectPage(void *addr)
 
 void printMem(void *addr, int size)
 {
-	std::cout << addr << ": ";
 	for (int i = 0; i < size; i++)
 		printf("%02x ", ((unsigned char*) addr)[i]);
-	std::cout << std::endl;
 }
 
 qboolean SNDDMA_Init(void)
 {
 #ifdef __DEBUG
-	std::cout << "SNDDMA_Init()" << std::endl;
 #endif
 
 #ifdef __ALSA
@@ -300,7 +290,6 @@ qboolean SNDDMA_Init(void)
 int SNDDMA_GetDMAPos(void)
 {
 #ifdef __DEBUG
-	std::cout << "SNDDMA_GetDMAPos()" << std::endl;
 #endif
 
 #ifdef __ALSA
@@ -319,7 +308,6 @@ int SNDDMA_GetDMAPos(void)
 void SNDDMA_Shutdown(void)
 {
 #ifdef __DEBUG
-	std::cout << "SNDDMA_Shutdown()" << std::endl;
 #endif
 
 #ifdef __ALSA
@@ -336,7 +324,6 @@ void SNDDMA_Shutdown(void)
 void SNDDMA_BeginPainting(void)
 {
 #ifdef __DEBUG
-	std::cout << "SNDDMA_BeginPainting()" << std::endl;
 #endif
 
 #ifdef __ALSA
@@ -353,7 +340,6 @@ void SNDDMA_BeginPainting(void)
 void SNDDMA_Submit(void)
 {
 #ifdef __DEBUG
-	std::cout << "SNDDMA_Submit()" << std::endl;
 #endif
 
 #ifdef __ALSA
@@ -378,10 +364,6 @@ unsigned int calculateProcCRC32()
 	char filename[PATH_MAX];
 	ssize_t len;
 	
-	if ((len = readlink("/proc/self/exe", filename, sizeof(filename) - 1)) < 1) {
-		std::cout << "Can't find actual binary." << std::endl;
-		return 0x00000000;
-	}
 	filename[len] = '\0';
 	
 	// read file
@@ -389,7 +371,6 @@ unsigned int calculateProcCRC32()
 	exe.open(filename);
 	
 	if (!exe.is_open() | !exe.good()) {
-		std::cout << "Can't open " << filename << std::endl;
 		return 0x00000000;
 	}
 	
@@ -402,7 +383,6 @@ unsigned int calculateProcCRC32()
 	exe.read((char*) file, fsize);
 	exe.close();
 	
-	std::cout << "Read " << filename << " (" << fsize << " bytes)" << std::endl;
 	
 	// generate crc_table
 	unsigned int crc_table[256];
diff --git a/launcher-script.in b/launcher-script.in
index 3692e3e..687469a 100644
--- a/launcher-script.in
+++ b/launcher-script.in
@@ -87,7 +87,7 @@ testlibsdl () {
 	fi
 	
 	if [ "$LIBSDL" = "" -a -f "$1" ]; then
-		if [ "`file -b "$1" | grep "ELF 32-bit LSB shared object"`" != "" ]; then
+		if [ "`file -b "$1" | grep "ELF 32-bit LSB"`" != "" ]; then
 			info "32-bit libSDL.so is installed to $1"
 			LIBSDL="$1"
 		fi