Added makefile and made some small fixes for it.
authorFlorian Schulze <crow@icculus.org>
Fri, 22 Feb 2002 21:39:36 +0000 (21:39 +0000)
committerFlorian Schulze <crow@icculus.org>
Fri, 22 Feb 2002 21:39:36 +0000 (21:39 +0000)
Makefile [new file with mode: 0644]
dj.h
globals.h
sdl/gfx.c

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..adf4fea
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+OBJS = sdl/gfx.o sdl/interrpt.o sdl/sound.o sdl/input.o fireworks.o main.o menu.o
+TARGET = jumpnbump
+
+
+CC = gcc -g3
+CFLAGS = -Wall -O2 -ffast-math -funroll-loops -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DUSE_SDL -I.
+LIBS =  -lm -lSDL -lSDL_mixer
+
+$(TARGET): $(OBJS)
+       $(CC) $(LFLAGS) $(LIBS) -o $(TARGET) $(OBJS)
+
+
+clean:
+       rm -f $(TARGET) *.o *~ log
+
diff --git a/dj.h b/dj.h
index 0898b02..ab294eb 100644 (file)
--- a/dj.h
+++ b/dj.h
@@ -29,7 +29,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <conio.h>
+//#include <conio.h>
 
 #ifdef DOS
 #include <pc.h>
index 180d41c..9155fea 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -307,7 +307,7 @@ void register_mask(void *pixels);
 /* gfx.c */
 
 #ifdef USE_SDL
-#ifndef _MSC_VER
+#if ((!defined _MSC_VER) && (!defined __CYGWIN__))
 long filelength(int handle);
 #endif
 void fs_toggle();
index 29e8996..655a963 100644 (file)
--- a/sdl/gfx.c
+++ b/sdl/gfx.c
@@ -1072,8 +1072,9 @@ int pob_hs_y(int image, gob_t *gob)
 }
 
 
-int read_pcx(FILE * handle, char *buffer, int buf_len, char *pal)
+int read_pcx(FILE * handle, void *buf, int buf_len, char *pal)
 {
+       unsigned char *buffer=buf;
        short c1;
        short a, b;
        long ofs1;
@@ -1188,7 +1189,7 @@ void recalculate_gob(gob_t *gob, char pal[768])
        }
 }
 
-void register_mask(char *pixels)
+void register_mask(void *pixels)
 {
        if (mask) {
                free(mask);