updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / alex4 / unix-port.patch
blobed960b0b1f99bf841654422b729d533fd4287779
1 Description: Support Unix-like operating systems.
2 Based on Hans de Goede's patch for Fedora.
3 Author: Hans de Goede <hdegoede@redhat.com>
4 Peter de Wachter <pdewacht@gmail.com>,
5 Peter Pentchev <roam@ringlet.net>
6 Forwarded: yes
7 Last-Update: 2011-03-09
9 --- a/src/main.c
10 +++ b/src/main.c
11 @@ -38,6 +38,7 @@
12 #include "main.h"
13 #include "edit.h"
14 #include "shooter.h"
15 +#include "unix.h"
17 #include "../data/data.h"
19 @@ -66,7 +67,6 @@
20 Tscroller hscroll;
21 Thisc *hisc_table;
22 Thisc *hisc_table_space;
23 -char working_directory[1024];
25 // the map
26 Tmap *map = NULL;
27 @@ -126,6 +126,7 @@
28 int playing_original_game = 1;
29 int init_ok = 0;
31 +static FILE* log_fp = NULL;
34 // // // // // // // // // // // // // // // // // // // // //
35 @@ -154,20 +155,18 @@
36 // loggs the text to the text file
37 void log2file(char *format, ...) {
38 va_list ptr; /* get an arg pointer */
39 - FILE *fp;
41 - fp = fopen("log.txt", "at");
42 - if (fp) {
43 + if (log_fp) {
44 /* initialize ptr to point to the first argument after the format string */
45 va_start(ptr, format);
47 /* Write to logfile. */
48 - vfprintf(fp, format, ptr); // Write passed text.
49 - fprintf(fp, "\n"); // New line..
50 + vfprintf(log_fp, format, ptr); // Write passed text.
51 + fprintf(log_fp, "\n"); // New line..
53 va_end(ptr);
55 - fclose(fp);
56 + fflush(log_fp);
60 @@ -618,6 +617,10 @@
61 BITMAP *bmp;
62 int i;
63 int w, h;
64 +#ifdef __unix__
65 + char filename[512];
66 + char *homedir = get_homedir();
67 +#endif
69 log2file("\nInit routines:");
71 @@ -625,7 +628,13 @@
72 log2file(" initializing allegro");
73 text_mode(-1);
74 garble_string(init_string, 53);
75 +#ifdef __unix__
76 + snprintf(filename, sizeof(filename), "%s/.alex4/alex4.ini",
77 + homedir? homedir:".");
78 + override_config_file(filename);
79 +#else
80 set_config_file("alex4.ini");
81 +#endif
82 set_window_close_button(FALSE);
84 // install timers
85 @@ -695,6 +704,7 @@
86 textout_centre(swap_screen, font, "loading...", 320, 200, 1);
87 blit_to_screen(swap_screen);
89 +#ifndef __unix__
90 // set switch modes and callbacks
91 if (set_display_switch_mode(SWITCH_PAUSE) < 0)
92 log2file(" * display switch mode failed");
93 @@ -702,6 +712,7 @@
94 log2file(" * display switch in failed");
95 if (set_display_switch_callback(SWITCH_OUT, display_switch_out) < 0)
96 log2file(" * display switch out failed");
97 +#endif
100 // set win title (no! really???)
101 @@ -718,7 +729,7 @@
102 // load data
103 log2file(" loading data");
104 packfile_password(init_string);
105 - data = load_datafile("data/data.dat");
106 + data = load_datafile(DATADIR "data.dat");
107 packfile_password(NULL);
108 if (data == NULL) {
109 log2file(" *** failed");
110 @@ -728,7 +739,13 @@
112 // load options
113 log2file(" loading options");
114 +#ifdef __unix__
115 + snprintf(filename, sizeof(filename), "%s/.alex4/alex4.sav",
116 + homedir? homedir:".");
117 + pf = pack_fopen(filename, "rp");
118 +#else
119 pf = pack_fopen("alex4.sav", "rp");
120 +#endif
121 if (pf) {
122 load_options(&options, pf);
123 pack_fclose(pf);
124 @@ -740,7 +757,13 @@
126 // loading highscores
127 log2file(" loading hiscores");
128 +#ifdef __unix__
129 + snprintf(filename, sizeof(filename), "%s/.alex4/alex4.hi",
130 + homedir? homedir:".");
131 + pf = pack_fopen(filename, "rp");
132 +#else
133 pf = pack_fopen("alex4.hi", "rp");
134 +#endif
135 if (pf) {
136 load_hisc_table(hisc_table, pf);
137 load_hisc_table(hisc_table_space, pf);
138 @@ -776,7 +799,7 @@
139 log2file(" loading original maps");
140 packfile_password(init_string);
141 num_levels = -1; // skip end object when counting
142 - maps = load_datafile_callback("data/maps.dat", count_maps_callback);
143 + maps = load_datafile_callback(DATADIR "maps.dat", count_maps_callback);
144 packfile_password(NULL);
145 if (maps == NULL) {
146 log2file(" *** failed");
147 @@ -835,11 +858,12 @@
148 // install sound
149 log2file(" installing sound");
150 set_volume_per_voice(0);
151 - switch(get_config_int("sound", "sound_device", 0)) {
152 + switch(get_config_int("sound", "sound_device", 1)) {
153 case 1:
154 i = DIGI_AUTODETECT;
155 log2file(" DIGI_AUTODETECT selected (%d)", i);
156 break;
157 +#ifdef ALLEGRO_WINDOWS
158 case 2:
159 i = DIGI_DIRECTX(0);
160 log2file(" DIGI_DIRECTX(0) selected (%d)", i);
161 @@ -848,6 +872,20 @@
162 i = DIGI_DIRECTAMX(0);
163 log2file(" DIGI_DIRECTAMX(0) selected (%d)", i);
164 break;
165 +#elif defined ALLEGRO_UNIX
166 +#ifdef DIGI_OSS
167 + case 2:
168 + i = DIGI_OSS;
169 + log2file(" DIGI_OSS selected (%d)", i);
170 + break;
171 +#endif
172 +#ifdef DIGI_ALSA
173 + case 3:
174 + i = DIGI_ALSA;
175 + log2file(" DIGI_ALSA selected (%d)", i);
176 + break;
177 +#endif
178 +#endif
179 default:
180 i = -770405; // dummy number
181 got_sound = 0;
182 @@ -870,9 +908,9 @@
183 if (get_config_int("sound", "use_sound_datafile", 1)) {
184 log2file(" loading sound datafile");
185 packfile_password(init_string);
186 - sfx_data = load_datafile("data/sfx_44.dat");
187 + sfx_data = load_datafile(DATADIR "sfx_44.dat");
188 if (sfx_data == NULL) {
189 - sfx_data = load_datafile("data/sfx_22.dat");
190 + sfx_data = load_datafile(DATADIR "sfx_22.dat");
191 log2file(" sfx_44.dat not found");
192 s = 0;
194 @@ -971,6 +1009,10 @@
195 void uninit_game() {
196 int i;
197 PACKFILE *pf;
198 +#ifdef __unix__
199 + char filename[512];
200 + char *homedir = get_homedir();
201 +#endif
203 log2file("\nExit routines:");
205 @@ -989,14 +1031,26 @@
206 // only save if everything was inited ok!
207 if (init_ok) {
208 log2file(" saving options");
209 +#ifdef __unix__
210 + snprintf(filename, sizeof(filename), "%s/.alex4/alex4.sav",
211 + homedir? homedir:".");
212 + pf = pack_fopen(filename, "wp");
213 +#else
214 pf = pack_fopen("alex4.sav", "wp");
215 +#endif
216 if (pf) {
217 save_options(&options, pf);
218 pack_fclose(pf);
221 log2file(" saving highscores");
222 +#ifdef __unix__
223 + snprintf(filename, sizeof(filename), "%s/.alex4/alex4.hi",
224 + homedir? homedir:".");
225 + pf = pack_fopen(filename, "wp");
226 +#else
227 pf = pack_fopen("alex4.hi", "wp");
228 +#endif
229 if (pf) {
230 save_hisc_table(hisc_table, pf);
231 save_hisc_table(hisc_table_space, pf);
232 @@ -1289,7 +1343,7 @@
233 // poll music machine
234 if (got_sound) al_poll_duh(dp);
236 - if (mode == 1 && (keypressed() || is_fire(&ctrl) || is_jump(&ctrl) ) || my_counter > 200) {
237 + if (((mode == 1) && (keypressed() || is_fire(&ctrl) || is_jump(&ctrl))) || (my_counter > 200)) {
238 mode = 2;
241 @@ -1343,7 +1397,7 @@
242 if (space) {
243 // get space bg
244 packfile_password(init_string);
245 - df = load_datafile_object("data/a45.dat", "BG1");
246 + df = load_datafile_object(DATADIR "a45.dat", "BG1");
247 packfile_password(NULL);
248 if (df != NULL) {
249 bg = df->dat;
250 @@ -2149,7 +2203,7 @@
252 // calculates camera pos for map m considering player p
253 void calculate_camera_pos(Tplayer *p, Tmap *m) {
254 - static camera_type = 1;
255 + static int camera_type = 1;
257 if (p->actor->status == AC_BALL) {
258 camera_type = 2;
259 @@ -2841,6 +2895,10 @@
261 else {
262 PACKFILE *pf;
263 +#ifdef __unix__
264 + char filename[512];
265 + char *homedir = get_homedir();
266 +#endif
267 log2file(" level complete");
268 if (got_sound) stop_music();
269 if (level < MAX_LEVELS && playing_original_game) {
270 @@ -2875,7 +2933,14 @@
272 // save options
273 log2file(" saving options");
274 +#ifdef __unix__
275 + snprintf(filename, sizeof(filename),
276 + "%s/.alex4/alex4.sav",
277 + homedir? homedir:".");
278 + pf = pack_fopen(filename, "wp");
279 +#else
280 pf = pack_fopen("alex4.sav", "wp");
281 +#endif
282 if (pf) {
283 save_options(&options, pf);
284 pack_fclose(pf);
285 @@ -2969,24 +3034,36 @@
287 // main
288 int main(int argc, char **argv) {
289 - FILE *fp;
290 int i;
291 char full_path[1024];
292 +#ifndef __unix__
293 + char working_directory[1024];
294 +#else
295 + char *homedir = get_homedir();
296 +#endif
298 // init allegro
299 allegro_init();
301 +#ifdef __unix__
302 + // start logfile
303 + snprintf(full_path, sizeof(full_path), "%s/.alex4",
304 + homedir? homedir:".");
305 + check_and_create_dir(full_path);
306 + snprintf(full_path, sizeof(full_path), "%s/.alex4/log.txt",
307 + homedir? homedir:".");
308 + log_fp = fopen(full_path, "wt");
309 +#else
310 // get working directory
311 get_executable_name(full_path, 1024);
312 replace_filename(working_directory, full_path, "", 1024);
313 chdir(working_directory);
316 // start logfile
317 - fp = fopen("log.txt", "wt");
318 - if (fp) {
319 - fprintf(fp, "Alex 4 (%s) - log file\n-------------------\n", GAME_VERSION_STR);
320 - fclose(fp);
321 + log_fp = fopen("log.txt", "wt");
322 +#endif
323 + if (log_fp) {
324 + fprintf(log_fp, "Alex 4 (%s) - log file\n-------------------\n", GAME_VERSION_STR);
327 // log program arguments
328 @@ -2994,7 +3071,9 @@
329 for(i = 0; i < argc; i ++) {
330 log2file(" %s", argv[i]);
332 +#ifndef __unix__
333 log2file("Working directory is:\n %s", working_directory);
334 +#endif
336 // test wether to play real game
337 // or custom levels
338 @@ -3022,6 +3101,8 @@
339 uninit_game();
340 allegro_exit();
341 log2file("\nDone...\n");
342 + if (log_fp)
343 + fclose(log_fp);
345 return 0;
346 } END_OF_MAIN();
347 --- a/src/player.h
348 +++ b/src/player.h
349 @@ -60,4 +60,4 @@
350 void wound_player(Tplayer *p);
351 void kill_player(Tplayer *p);
353 -#endif
354 \ No newline at end of file
355 +#endif
356 --- a/src/map.h
357 +++ b/src/map.h
358 @@ -111,4 +111,4 @@
362 -#endif
363 \ No newline at end of file
364 +#endif
365 --- /dev/null
366 +++ b/src/unix.c
367 @@ -0,0 +1,87 @@
368 +#ifdef __unix__
369 +#include <stdio.h>
370 +#include <stdlib.h>
371 +#include <unistd.h>
372 +#include <pwd.h>
373 +#include <errno.h>
374 +#include <sys/types.h>
375 +#include <sys/stat.h>
376 +#if defined(__DECC) && defined(VMS)
377 +#include <unixlib.h>
378 +static char *vms_to_unix_buffer = NULL;
379 +static int convert_vms_to_unix(char *vms_dir_name)
381 + vms_to_unix_buffer = vms_dir_name;
383 +#endif
385 +char *get_homedir(void)
387 + struct passwd *pw;
388 + char *home;
390 + home = getenv("HOME");
391 + if (home)
392 + return home;
394 + if (!(pw = getpwuid(getuid())))
396 + fprintf(stderr, "Who are you? Not found in passwd database!!\n");
397 + return NULL;
400 +#if defined(__DECC) && defined(VMS)
401 + /* Convert The OpenVMS Formatted "$HOME" Directory Path Into Unix
402 + Format. */
403 + decc$from_vms(pw->pw_dir, convert_vms_to_unix, 1);
404 + return vms_to_unix_buffer;
405 +#else
406 + return pw->pw_dir;
407 +#endif
409 +//-----------------------------------------------------------------------------
410 +int check_and_create_dir(const char *name)
412 + struct stat stat_buffer;
414 + if (stat(name, &stat_buffer))
416 + /* error check if it doesn't exist or something else is wrong */
417 + if (errno == ENOENT)
419 + /* doesn't exist letts create it ;) */
420 +#ifdef BSD43
421 + if (mkdir(name, 0775))
422 +#else
423 + if (mkdir(name, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH))
424 +#endif
426 + fprintf(stderr, "Error creating dir %s", name);
427 + perror(" ");
428 + return -1;
431 + else
433 + /* something else went wrong yell about it */
434 + fprintf(stderr, "Error opening %s", name);
435 + perror(" ");
436 + return -1;
439 + else
441 + /* file exists check it's a dir otherwise yell about it */
442 +#ifdef BSD43
443 + if (!(S_IFDIR & stat_buffer.st_mode))
444 +#else
445 + if (!S_ISDIR(stat_buffer.st_mode))
446 +#endif
448 + fprintf(stderr,"Error %s exists but isn't a dir\n", name);
449 + return -1;
452 + return 0;
454 +#endif
455 --- /dev/null
456 +++ b/src/Makefile
457 @@ -0,0 +1,24 @@
458 +PREFIX = /usr/local
459 +DATADIR = $(PREFIX)/share/$(TARGET)
460 +CFLAGS ?= -g -Wall -Wno-deprecated-declarations -O2
461 +LIBS = -laldmb -ldumb `allegro-config --libs`
462 +DEFINES = -DDATADIR=\"$(DATADIR)/\"
463 +OBJS = actor.o edit.o map.o player.o shooter.o unix.o \
464 + bullet.o hisc.o options.o script.o timer.o \
465 + control.o main.o particle.o scroller.o token.o
466 +TARGET = alex4
468 +$(TARGET): $(OBJS)
469 + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
471 +%.o: %.c
472 + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -o $@ -c $<
474 +install: $(TARGET)
475 + mkdir -p $(PREFIX)/bin
476 + mkdir -p $(DATADIR)
477 + install -p -m 755 $(TARGET) $(PREFIX)/bin
478 + install -p -m 644 ../data/*.dat $(DATADIR)
480 +clean:
481 + rm -f $(OBJS) $(TARGET) *~
482 --- a/src/token.h
483 +++ b/src/token.h
484 @@ -41,4 +41,4 @@
485 Ttoken *tokenize(char *str);
488 -#endif
489 \ No newline at end of file
490 +#endif
491 --- a/src/shooter.c
492 +++ b/src/shooter.c
493 @@ -1372,7 +1372,7 @@
494 // load data
495 log2file(" loading shooter data");
496 packfile_password(get_init_string());
497 - s_data = load_datafile("data/a45.dat");
498 + s_data = load_datafile(DATADIR "a45.dat");
499 if (!s_data) {
500 log2file(" *** failed");
501 return -1;
502 --- a/src/particle.h
503 +++ b/src/particle.h
504 @@ -54,4 +54,4 @@
505 void update_particle_with_map(Tparticle *p, Tmap *m);
506 void create_burst(Tparticle *ps, int x, int y, int spread, int num, int life, int bmp);
508 -#endif
509 \ No newline at end of file
510 +#endif
511 --- /dev/null
512 +++ b/src/unix.h
513 @@ -0,0 +1,6 @@
514 +#ifdef __unix__
516 +char *get_homedir();
517 +int check_and_create_dir(const char *name);
519 +#endif
520 --- a/src/scroller.h
521 +++ b/src/scroller.h
522 @@ -51,4 +51,4 @@
526 -#endif
527 \ No newline at end of file
528 +#endif
529 --- a/src/map.c
530 +++ b/src/map.c
531 @@ -24,6 +24,7 @@
532 #include <stdlib.h>
533 #include <stdio.h>
534 #include <string.h>
535 +#include <endian.h>
536 #include "allegro.h"
537 #include "map.h"
538 #include "timer.h"
539 @@ -64,7 +65,41 @@
541 return m;
545 +static void mem_to_int(int *dest, unsigned char *mem)
547 +#if __BYTE_ORDER == __LITTLE_ENDIAN
548 + memcpy(dest, mem, 4);
549 +#else
550 + *dest = mem[0] | (((int)mem[1]) << 8) | (((int)mem[2]) << 16) |
551 + (((int)mem[3]) << 24);
552 +#endif
555 +static void fread_int(int *dest, FILE *fp)
557 +#if __BYTE_ORDER == __LITTLE_ENDIAN
558 + fread(dest, 4, 1, fp);
559 +#else
560 + unsigned char buf[4];
561 + fread(buf, 1, 4, fp);
562 + mem_to_int(dest, buf);
563 +#endif
566 +static void fwrite_int(const int *src, FILE *fp)
568 +#if __BYTE_ORDER == __LITTLE_ENDIAN
569 + fwrite(src, 4, 1, fp);
570 +#else
571 + unsigned char buf[4];
572 + buf[0] = *src;
573 + buf[1] = *src >> 8;
574 + buf[2] = *src >> 16;
575 + buf[3] = *src >> 24;
576 + fwrite(buf, 1, 4, fp);
577 +#endif
580 // loads one splendind map from disk
581 Tmap *load_map(char *fname) {
582 @@ -93,7 +128,19 @@
585 // read datastruct
586 - fread(m, sizeof(Tmap), 1, fp);
587 + // a mapfile contain a raw dump of the Tmap struct made on an i386
588 + // the code below reads these struct dumps in an arch neutral manner
589 + // Note this dumps contains pointers, these are not used because these
590 + // ofcourse point to some no longer valid address.
591 + fread(m, 64, 1, fp); // first 64 bytes data
592 + fread_int(&(m->width), fp);
593 + fread_int(&(m->height), fp);
594 + fread(header, 4, 1, fp); // skip the first pointer
595 + fread_int(&(m->offset_x), fp);
596 + fread_int(&(m->offset_y), fp);
597 + fread(header, 4, 1, fp); // skip the second pointer
598 + fread_int(&(m->start_x), fp);
599 + fread_int(&(m->start_y), fp);
601 // read map data
602 m->dat = malloc(m->width * m->height * sizeof(Tmappos));
603 @@ -116,8 +163,8 @@
604 // loads one splendind map from memory
605 Tmap *load_map_from_memory(void *mem) {
606 Tmap *m;
607 - char header[6];
608 - char *c = (char *)mem;
609 + unsigned char header[6];
610 + unsigned char *c = (unsigned char *)mem;
613 // does the header match?
614 @@ -137,9 +184,19 @@
617 // read datastruct
618 - // fread(m, sizeof(Tmap), 1, fp);
619 - memcpy(m, c, sizeof(Tmap));
620 - c += sizeof(Tmap);
621 + // a mapfile contain a raw dump of the Tmap struct made on an i386
622 + // the code below reads these struct dumps in an arch neutral manner
623 + // Note this dumps contains pointers, these are not used because these
624 + // ofcourse point to some no longer valid address.
625 + memcpy(m, c, 64); c += 64; // first 64 bytes data
626 + mem_to_int(&(m->width), c); c += 4;
627 + mem_to_int(&(m->height), c); c += 4;
628 + c += 4; // skip the first pointer
629 + mem_to_int(&(m->offset_x), c); c += 4;
630 + mem_to_int(&(m->offset_y), c); c += 4;
631 + c += 4; // skip the second pointer
632 + mem_to_int(&(m->start_x), c); c+= 4;
633 + mem_to_int(&(m->start_y), c); c+= 4;
635 // read map data
636 m->dat = malloc(m->width * m->height * sizeof(Tmappos));
637 @@ -174,7 +231,18 @@
638 fwrite(header, 6, 1, fp);
640 // write datastruct
641 - fwrite(m, sizeof(Tmap), 1, fp);
642 + // a mapfile should contain a raw dump of the Tmap struct as made on an
643 + // i386 the code below writes a struct dump as an i386 in an arch
644 + // neutral manner
645 + fwrite(m, 64, 1, fp); // first 64 bytes data
646 + fwrite_int(&(m->width), fp);
647 + fwrite_int(&(m->height), fp);
648 + fwrite(header, 4, 1, fp); // skip the first pointer
649 + fwrite_int(&(m->offset_x), fp);
650 + fwrite_int(&(m->offset_y), fp);
651 + fwrite(header, 4, 1, fp); // skip the second pointer
652 + fwrite_int(&(m->start_x), fp);
653 + fwrite_int(&(m->start_y), fp);
655 // write map data
656 fwrite(m->dat, sizeof(Tmappos), m->width * m->height, fp);
657 @@ -409,7 +477,7 @@
660 if (mask == 5 && oy > 31 - ox) return mask; // 45 degree slope /
661 - if (mask == 6 && oy > ox) return mask; // 45 degree slope \
662 + if (mask == 6 && oy > ox) return mask; // 45 degree slope \ .
664 // the not so simple ones
665 if (mask == 3 && oy > 31 - ox / 2) return mask; // 22 degree slope / (low)
666 --- a/src/shooter.h
667 +++ b/src/shooter.h
668 @@ -83,8 +83,8 @@
669 int difficulty;
671 // player related
672 - long unsigned int score;
673 - long unsigned int show_score;
674 + unsigned int score;
675 + unsigned int show_score;
676 int lives;
677 int power_gauge;
678 int power_level;
679 @@ -118,4 +118,4 @@
680 int start_shooter(Tcontrol *c, int with_sound);
683 -#endif
684 \ No newline at end of file
685 +#endif
686 --- a/src/timer.h
687 +++ b/src/timer.h
688 @@ -37,4 +37,4 @@
689 void fps_counter(void);
690 void cycle_counter(void);
692 -#endif
693 \ No newline at end of file
694 +#endif
695 --- a/src/main.h
696 +++ b/src/main.h
697 @@ -93,5 +93,8 @@
698 #define check_bb_collision(x1,y1,w1,h1,x2,y2,w2,h2) (!( ((x1)>=(x2)+(w2)) || ((x2)>=(x1)+(w1)) || \
699 ((y1)>=(y2)+(h2)) || ((y2)>=(y1)+(h1)) ))
701 +#ifndef DATADIR
702 +#define DATADIR "data/"
703 +#endif
705 -#endif
706 \ No newline at end of file
707 +#endif
708 --- a/src/script.h
709 +++ b/src/script.h
710 @@ -51,4 +51,4 @@
714 -#endif
715 \ No newline at end of file
716 +#endif
717 --- a/src/edit.h
718 +++ b/src/edit.h
719 @@ -37,4 +37,4 @@
720 void draw_edit_mode(BITMAP *bmp, Tmap *map, int mx, int my);
721 void update_edit_mode(Tmap *map, BITMAP *bmp, int mx, int my, int mb);
723 -#endif
724 \ No newline at end of file
725 +#endif
726 --- a/src/token.c
727 +++ b/src/token.c
728 @@ -67,7 +67,7 @@
730 // tokenizes the string str
731 Ttoken *tokenize(char *str) {
732 - Ttoken *tok_list, *tok_tmp;
733 + Ttoken *tok_list, *tok_tmp = NULL;
734 char word[256];
735 int a, b, c;
736 int i = 0;
737 --- a/src/hisc.h
738 +++ b/src/hisc.h
739 @@ -48,4 +48,4 @@
740 void draw_hisc_post(Thisc *table, BITMAP *bmp, FONT *fnt, int x, int y, int color, int show_level);
741 void draw_hisc_table(Thisc *table, BITMAP *bmp, FONT *fnt, int x, int y, int color, int show_level);
743 -#endif
744 \ No newline at end of file
745 +#endif
746 --- a/src/options.h
747 +++ b/src/options.h
748 @@ -43,4 +43,4 @@
749 void load_options(Toptions *o, PACKFILE *fp);
750 void reset_options(Toptions *o);
752 -#endif
753 \ No newline at end of file
754 +#endif
755 --- a/src/timer.c
756 +++ b/src/timer.c
757 @@ -60,4 +60,4 @@
758 game_count ++;
760 return TRUE;
762 \ No newline at end of file
764 --- a/src/actor.h
765 +++ b/src/actor.h
766 @@ -91,4 +91,4 @@
767 void kill_actor(Tactor *a);
770 -#endif
771 \ No newline at end of file
772 +#endif
773 --- a/src/bullet.h
774 +++ b/src/bullet.h
775 @@ -52,4 +52,4 @@
776 void update_bullet(Tbullet *b);
777 void update_bullet_with_map(Tbullet *b, Tmap *m);
779 -#endif
780 \ No newline at end of file
781 +#endif