updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / overgod / overgod.patch
blob7cee08f8b7b0e93e516756e66f885397505378aa
1 diff -rupN overgod-original//displ_in.c overgod-1.0//displ_in.c
2 --- overgod-original//displ_in.c 2010-07-08 05:54:55.000000000 +0200
3 +++ overgod-1.0//displ_in.c 2010-07-06 07:43:09.000000000 +0200
4 @@ -143,7 +143,7 @@ void init_display(void)
5 RGB temp_palette [256];
6 RGB temp_palette3 [1024];
8 - DATAFILE *datf = load_datafile("gfx//data.dat");
9 + DATAFILE *datf = load_datafile("//usr//share//overgod//gfx//data.dat");
10 if (datf == NULL)
12 set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
13 @@ -166,7 +166,7 @@ progress_update("Data.dat");
15 //rest(1000);
17 - BITMAP *temp_bitmap = load_bitmap("gfx//gb_si.bmp", temp_palette);
18 + BITMAP *temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_si.bmp", temp_palette);
19 if (temp_bitmap == NULL)
21 bitmap_error("temp_bitmap (ships)");
22 @@ -321,8 +321,8 @@ progress_update("Data.dat");
23 #ifdef FIX_FONT
25 RGB font_palette [256];
26 -// BITMAP *fbmp = load_bitmap("gfx//font_cel.bmp", font_palette);
27 - BITMAP *fbmp = load_bitmap("gfx//font_oc.bmp", font_palette);
28 +// BITMAP *fbmp = load_bitmap("//usr//share//overgod//gfx//font_cel.bmp", font_palette);
29 + BITMAP *fbmp = load_bitmap("//usr//share//overgod//gfx//font_oc.bmp", font_palette);
30 if (temp_bitmap == NULL)
32 bitmap_error("temp_bitmap (font_cel)");
33 @@ -395,7 +395,7 @@ progress_update("Data.dat");
34 #ifdef GENERATE_SHIPS
37 - temp_bitmap = load_bitmap("gfx//gb_ship.bmp", temp_palette);
38 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_ship.bmp", temp_palette);
39 if (temp_bitmap == NULL)
41 bitmap_error("gb_ship");
42 @@ -472,7 +472,7 @@ progress_update("More Vehicles");
44 // Load in enemy bitmaps:
46 - temp_bitmap = load_bitmap("gfx//gb_nme1.bmp", temp_palette);
47 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_nme1.bmp", temp_palette);
48 if (temp_bitmap == NULL)
50 bitmap_error("temp_bitmap (gb_nme1.bmp not loaded correctly?)");
51 @@ -496,7 +496,7 @@ progress_update("More Vehicles");
52 progress_update("Enemies 1");
55 - temp_bitmap = load_bitmap("gfx//gb_nme2.bmp", temp_palette);
56 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_nme2.bmp", temp_palette);
57 if (temp_bitmap == NULL)
59 bitmap_error("temp_bitmap (gb_nme2.bmp not loaded correctly?)");
60 @@ -519,7 +519,7 @@ progress_update("More Vehicles");
61 //extern BITMAP *enemy_bmps [ENEMY_BMPS];
64 - temp_bitmap = load_bitmap("gfx//gb_nmebm.bmp", temp_palette);
65 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_nmebm.bmp", temp_palette);
66 if (temp_bitmap == NULL)
68 bitmap_error("temp_bitmap (gb_nmebm.bmp not loaded correctly?)");
69 @@ -533,7 +533,7 @@ progress_update("More Vehicles");
71 progress_update("Enemies 3");
73 - temp_bitmap = load_bitmap("gfx//gb_big1.bmp", temp_palette);
74 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_big1.bmp", temp_palette);
75 if (temp_bitmap == NULL)
77 bitmap_error("temp_bitmap (gb_big1.bmp not loaded correctly?)");
78 @@ -548,7 +548,7 @@ progress_update("More Vehicles");
80 progress_update("Enemies 4");
82 - temp_bitmap = load_bitmap("gfx//gb_big2.bmp", temp_palette);
83 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_big2.bmp", temp_palette);
84 if (temp_bitmap == NULL)
86 bitmap_error("temp_bitmap (gb_big2.bmp not loaded correctly?)");
87 @@ -564,7 +564,7 @@ progress_update("More Vehicles");
89 progress_update("Enemies 5");
91 - temp_bitmap = load_bitmap("gfx//gb_big3.bmp", temp_palette);
92 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_big3.bmp", temp_palette);
93 if (temp_bitmap == NULL)
95 bitmap_error("temp_bitmap (gb_big3.bmp not loaded correctly?)");
96 @@ -580,7 +580,7 @@ progress_update("More Vehicles");
97 progress_update("Enemies 6");
100 - temp_bitmap = load_bitmap("gfx//gb_med1.bmp", temp_palette);
101 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_med1.bmp", temp_palette);
102 if (temp_bitmap == NULL)
104 bitmap_error("temp_bitmap (gb_med1.bmp not loaded correctly?)");
105 @@ -597,7 +597,7 @@ progress_update("More Vehicles");
107 progress_update("Enemies 7");
109 -/* temp_bitmap = load_bitmap("gfx//enemy3.bmp", temp_palette);
110 +/* temp_bitmap = load_bitmap("//usr//share//overgod//gfx//enemy3.bmp", temp_palette);
111 if (temp_bitmap == NULL)
113 bitmap_error("temp_bitmap (enemy3.bmp not loaded correctly?)");
114 @@ -621,7 +621,7 @@ progress_update("More Vehicles");
116 /* progress_update("Enemy3 Loaded");
118 - temp_bitmap = load_bitmap("gfx//small1.bmp", temp_palette);
119 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//small1.bmp", temp_palette);
120 if (temp_bitmap == NULL)
122 bitmap_error("temp_bitmap (small1.bmp not loaded correctly?)");
123 @@ -635,7 +635,7 @@ progress_update("More Vehicles");
125 progress_update("Small1 Loaded");
127 - temp_bitmap = load_bitmap("gfx//gb_small.bmp", temp_palette);
128 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_small.bmp", temp_palette);
129 if (temp_bitmap == NULL)
131 bitmap_error("temp_bitmap (gm_small.bmp not loaded correctly?)");
132 @@ -682,7 +682,7 @@ progress_update("More Vehicles");
134 progress_update("Small Things");
136 - temp_bitmap = load_bitmap("gfx//gb_small2.bmp", temp_palette);
137 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_small2.bmp", temp_palette);
138 if (temp_bitmap == NULL)
140 bitmap_error("temp_bitmap (gm_small2.bmp not loaded correctly?)");
141 @@ -733,7 +733,7 @@ progress_update("More Vehicles");
145 - temp_bitmap = load_bitmap("gfx//small2.bmp", temp_palette);
146 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//small2.bmp", temp_palette);
147 if (temp_bitmap == NULL)
149 bitmap_error("temp_bitmap (small2.bmp not loaded correctly?)");
150 @@ -748,7 +748,7 @@ progress_update("More Vehicles");
152 progress_update("Small3 Loaded");
154 - temp_bitmap = load_bitmap("gfx//enemy2.bmp", temp_palette);
155 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//enemy2.bmp", temp_palette);
156 if (temp_bitmap == NULL)
158 bitmap_error("temp_bitmap (enemy2.bmp not loaded correctly?)");
159 @@ -763,7 +763,7 @@ progress_update("More Vehicles");
161 progress_update("Enemy2 Loaded");
163 - temp_bitmap = load_bitmap("gfx//gb_lsh.bmp", temp_palette);
164 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_lsh.bmp", temp_palette);
165 if (temp_bitmap == NULL)
167 bitmap_error("temp_bitmap (gb_lsh.bmp not loaded correctly?)");
168 @@ -1138,7 +1138,7 @@ void make_bmp_tiles(void)
169 RGB temp_palette [256];
170 // RGB temp_palette3 [1024];
172 - BITMAP *temp_bitmap = load_bitmap("gfx//gb_tiles.bmp", temp_palette);
173 + BITMAP *temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_tiles.bmp", temp_palette);
175 if (temp_bitmap == NULL)
177 @@ -1164,7 +1164,7 @@ void make_bmp_tiles(void)
179 destroy_bitmap(temp_bitmap);
181 - temp_bitmap = load_bitmap("gfx//gb_maze.bmp", temp_palette);
182 + temp_bitmap = load_bitmap("//usr//share//overgod//gfx//gb_maze.bmp", temp_palette);
184 if (temp_bitmap == NULL)
186 diff -rupN overgod-original//main.c overgod-1.0//main.c
187 --- overgod-original//main.c 2010-07-08 05:54:54.000000000 +0200
188 +++ overgod-1.0//main.c 2010-07-06 19:32:12.000000000 +0200
189 @@ -101,8 +101,8 @@ display.h
191 //#include <conio.h>
192 #include <string.h>
193 -//#include <stdlib.h>
194 -//#include <stdio.h>
195 +#include <stdlib.h>
196 +#include <stdio.h>
197 //#include <pc.h>
198 #include <math.h>
200 @@ -253,8 +253,14 @@ void init_at_startup(void)
201 install_int (tickover, 30);
203 set_color_depth(8);
205 - set_config_file("overgod.cfg");
207 + char *home, config_file[4096];
208 + home = getenv("HOME");
209 + if(!home)
210 + home = ".";
211 + snprintf(config_file, 4095, "%s/.overgod.cfg", home);
212 + config_file[4095] = '\0';
213 + set_config_file(config_file);
215 options.resolution = get_config_int("Options", "Resolution", 0);
217 diff -rupN overgod-original//menu.c overgod-1.0//menu.c
218 --- overgod-original//menu.c 2010-07-08 05:54:54.000000000 +0200
219 +++ overgod-1.0//menu.c 2010-07-06 07:44:06.000000000 +0200
220 @@ -414,7 +414,7 @@ void init_menus_once_only(void)
222 destroy_bitmap(temp_bmp);
224 - BITMAP *temp_bmp = load_bitmap("gfx//gb_title.bmp", temp_palette);
225 + BITMAP *temp_bmp = load_bitmap("//usr//share//overgod//gfx//gb_title.bmp", temp_palette);
227 if (!temp_bmp)
229 @@ -464,7 +464,7 @@ void init_menus_once_only(void)
230 destroy_bitmap(temp_bmp);*/
233 - temp_bmp = load_bitmap("gfx//title_s.bmp", temp_palette);
234 + temp_bmp = load_bitmap("//usr//share//overgod//gfx//title_s.bmp", temp_palette);
236 if (!temp_bmp)
238 @@ -484,7 +484,7 @@ void init_menus_once_only(void)
240 destroy_bitmap(temp_bmp);
242 -/* upgrade_box1 = load_bitmap("gfx//upg_box.bmp", temp_palette);
243 +/* upgrade_box1 = load_bitmap("//usr//share//overgod//gfx//upg_box.bmp", temp_palette);
245 if (!upgrade_box1)
247 @@ -493,7 +493,7 @@ void init_menus_once_only(void)
248 exit(1);
251 - upgrade_box2 = load_bitmap("gfx//upg_box2.bmp", temp_palette);
252 + upgrade_box2 = load_bitmap("//usr//share//overgod//gfx//upg_box2.bmp", temp_palette);
254 if (!upgrade_box2)
256 @@ -502,7 +502,7 @@ void init_menus_once_only(void)
257 exit(1);
260 - upgrade_box3 = load_bitmap("gfx//upg_box3.bmp", temp_palette);
261 + upgrade_box3 = load_bitmap("//usr//share//overgod//gfx//upg_box3.bmp", temp_palette);
263 if (!upgrade_box3)
265 diff -rupN overgod-original//sound.c overgod-1.0//sound.c
266 --- overgod-original//sound.c 2010-07-08 05:54:55.000000000 +0200
267 +++ overgod-1.0//sound.c 2010-07-08 07:24:40.000000000 +0200
268 @@ -448,7 +448,7 @@ void load_new_sample_in(int samp, const
270 char sfile_name [50];
272 - strcpy(sfile_name, ".//wavs//");
273 + strcpy(sfile_name, "//usr//share//overgod//wavs//");
274 strcat(sfile_name, sfile);
275 strcat(sfile_name, ".wav");
277 @@ -1547,7 +1547,7 @@ void load_beat_sample_in(int samp, const
279 char sfile_name [50];
281 - strcpy(sfile_name, ".//wavs//beat//");
282 + strcpy(sfile_name, "//usr/share//overgod//wavs//beat//");
283 strcat(sfile_name, sfile);
284 strcat(sfile_name, ".wav");