summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-04-17 22:19:23 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-04-17 22:19:23 +0200
commit57ad566dfc30b250229852619fc1073d47375dfa (patch)
tree8ceb9022882a96914548e03aef6d9b36f45d9eef /sys/src/games
parent82a797da707881fa3188cab7424738cd07fe9c92 (diff)
games/doom: fix mips
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/doom/d_net.c6
-rw-r--r--sys/src/games/doom/d_net.h1
-rw-r--r--sys/src/games/doom/m_swap.c4
-rw-r--r--sys/src/games/doom/m_swap.h4
-rw-r--r--sys/src/games/doom/mkfile5
5 files changed, 9 insertions, 11 deletions
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}\
-</sys/src/cmd/mkone
+CFLAGS=$CFLAGS `{~ $objtype mips && echo -D__BIG_ENDIAN__}
-d_net.$O : d_net.c
- $CC -FVw d_net.c
+</sys/src/cmd/mkone