diff --git a/sys/src/games/doom/d_net.c b/sys/src/games/doom/d_net.c index 2df926410..fd0ef6450 100644 --- a/sys/src/games/doom/d_net.c +++ b/sys/src/games/doom/d_net.c @@ -25,14 +25,15 @@ static const char rcsid[] = "$Id: d_net.c,v 1.3 1997/02/03 22:01:47 b1 Exp $"; +#include "doomdef.h" +#include "doomstat.h" #include "m_menu.h" #include "i_system.h" #include "i_video.h" #include "i_net.h" +#include "r_data.h" #include "g_game.h" -#include "doomdef.h" -#include "doomstat.h" #define NCMD_EXIT 0x80000000 #define NCMD_RETRANSMIT 0x40000000 @@ -40,7 +41,6 @@ static const char rcsid[] = "$Id: d_net.c,v 1.3 1997/02/03 22:01:47 b1 Exp $"; #define NCMD_KILL 0x10000000 // kill game #define NCMD_CHECKSUM 0x0fffffff - doomcom_t* doomcom; doomdata_t* netbuffer; // points inside doomcom diff --git a/sys/src/games/doom/d_net.h b/sys/src/games/doom/d_net.h index b27747233..63628ef0f 100644 --- a/sys/src/games/doom/d_net.h +++ b/sys/src/games/doom/d_net.h @@ -25,7 +25,6 @@ #include "d_player.h" - #ifdef __GNUG__ #pragma interface #endif diff --git a/sys/src/games/doom/m_swap.c b/sys/src/games/doom/m_swap.c index 1db93c86f..5fbb28cab 100644 --- a/sys/src/games/doom/m_swap.c +++ b/sys/src/games/doom/m_swap.c @@ -31,8 +31,8 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $"; #include "m_swap.h" -// Not needed with big endian. -#ifndef __BIG_ENDIAN__ +// Not needed with little endian. +#ifdef __BIG_ENDIAN__ // Swap 16bit, that is, MSB and LSB byte. unsigned short SwapSHORT(unsigned short x) diff --git a/sys/src/games/doom/m_swap.h b/sys/src/games/doom/m_swap.h index 86f6e0a14..5d32fdf4a 100644 --- a/sys/src/games/doom/m_swap.h +++ b/sys/src/games/doom/m_swap.h @@ -32,8 +32,8 @@ // Endianess handling. // WAD files are stored little endian. #ifdef __BIG_ENDIAN__ -short SwapSHORT(short); -long SwapLONG(long); +unsigned short SwapSHORT(unsigned short); +unsigned long SwapLONG(unsigned long); #define SHORT(x) ((short)SwapSHORT((unsigned short) (x))) #define LONG(x) ((long)SwapLONG((unsigned long) (x))) #else diff --git a/sys/src/games/doom/mkfile b/sys/src/games/doom/mkfile index 5a477ad9b..82cc15a78 100644 --- a/sys/src/games/doom/mkfile +++ b/sys/src/games/doom/mkfile @@ -136,8 +136,7 @@ UPDATE=\ $HFILES\ ${OFILES:%.$O=%.c}\ +CFLAGS=$CFLAGS `{~ $objtype mips && echo -D__BIG_ENDIAN__} +