summaryrefslogtreecommitdiff
blob: 4be3d0f12934b2da4749b0c838a7fe2cf2cc2d02 (plain)
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
--- io.cpp.orig	2004-06-01 19:11:16.000000000 +0300
+++ io.cpp	2004-06-01 19:21:14.000000000 +0300
@@ -42,7 +42,11 @@
 {
 	SDL_Surface *image, *surface;
 
-	image = IMG_Load(datafile);
+	char data_path[100];
+	strcpy(data_path, "/usr/share/games/insaneodyssey/");
+	strcat(data_path, datafile);
+
+	image = IMG_Load(data_path);
 	if ( image == NULL ) {
 		fprintf(stderr, "Couldn't load image %s\n",
 					datafile);
@@ -67,7 +71,11 @@
 {
 	SDL_Surface *image, *surface;
 
-	image = IMG_Load(datafile);
+	char data_path[100];
+	strcpy(data_path, "/usr/share/games/insaneodyssey/");
+	strcat(data_path, datafile);
+
+	image = IMG_Load(data_path);
 	if ( image == NULL ) {
 		fprintf(stderr, "Couldn't load image %s\n", datafile);
 		return(NULL);
@@ -87,8 +95,12 @@
 {
         SDL_Surface *image;
 
+	char data_path[100];
+	strcpy(data_path, "/usr/share/games/insaneodyssey/");
+	strcat(data_path, datafile);
+
         /* Load the BMP file into a surface */
-        image = IMG_Load(datafile);
+        image = IMG_Load(data_path);
         if ( image == NULL ) {
                 fprintf(stderr, "Couldn't load %s: %s\n", datafile,
                                                         SDL_GetError());