Commit 4c8935b5 authored by Steven Fuller's avatar Steven Fuller

I forget.. (has been several days since last checkin; nothing signifigant)

parent 2d34f001
CC = gcc
#CC = g++
#CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
#CFLAGS = -g -Wall
......
......@@ -83,3 +83,8 @@ draw loop.. start by cp wl_draw.c vi_ogl.c and just take out the actual
drawing bits and replace with opengl.
* rename visable to visible
* fix up windows port
* create 'sound channels' with priority.. ie a door can only make one sound
at a time
* beos is c++ (and uses gcc as a compiler i think) but wolf3d will need many
cleanups for c++
either that or use extern "C" { ... } in the header files
......@@ -73,7 +73,7 @@ void SavePCX256ToFile(unsigned char *buf, int width, int height, unsigned char *
}
#endif
fp = fopen(name, "w");
fp = fopen(name, "wb");
fwrite(&ph, sizeof(ph), 1, fp);
fwrite(dat, 1, z, fp);
fputc(12, fp);
......@@ -115,7 +115,7 @@ void SavePCXRGBToFile(unsigned char *buf, int width, int height, char *name)
}
}
fp = fopen(name, "w");
fp = fopen(name, "wb");
fwrite(&ph, sizeof(ph), 1, fp);
fwrite(dat, 1, width * height * 2 * 3, fp);
fclose(fp);
......
......@@ -179,9 +179,9 @@ boolean CA_ReadFile(char *filename, memptr *ptr)
if ((handle = open(filename, O_RDONLY | O_BINARY, S_IREAD)) == -1)
return false;
size = filelength(handle);
if (!CA_FarRead (handle, *ptr, size)) {
if (!CA_FarRead(handle, *ptr, size)) {
close(handle);
return false;
}
......
......@@ -13,9 +13,13 @@
#include <io.h>
#include <dos.h>
#ifdef __cplusplus
typedef bool boolean;
#else
#define boolean BOOLEAN
#define false FALSE
#define true TRUE
#endif
#define PACKED
#pragma pack(1) /* TODO: this unfortunately packs every struct... */
......@@ -34,7 +38,12 @@
#define LONGLONG long long
#define O_BINARY 0
typedef enum {false,true} boolean;
#ifdef __cplusplus
typedef bool boolean;
#else
typedef enum {false,true} boolean;
#endif
#endif
......
......@@ -63,7 +63,7 @@ void Quit(char *error)
}
if (error && *error) {
fprintf(stderr, "Quit: %s", error);
fprintf(stderr, "Quit: %s\n", error);
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
......
......@@ -36,7 +36,7 @@ void Quit(char *error)
}
if (error && *error) {
fprintf(stderr, "Quit: %s", error);
fprintf(stderr, "Quit: %s\n", error);
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
......
......@@ -76,7 +76,7 @@ void Quit(char *error)
}
if (error && *error) {
fprintf(stderr, "Quit: %s", error);
fprintf(stderr, "Quit: %s\n", error);
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment