foxygit / doom Log in
commit 09f98f80fc8ed9e42ea937804618952f03244bde
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Nov 23 17:52:48 2008 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sun Nov 23 17:52:48 2008 +0000

    Shut up some Hexen compiler warnings.

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1386
---
 src/hexen/p_lights.c | 10 ++++++++++
 src/hexen/sb_bar.c   |  1 +
 2 files changed, 11 insertions(+)

diff --git a/src/hexen/p_lights.c b/src/hexen/p_lights.c
index cec7c302..c7e85f9b 100644
--- a/src/hexen/p_lights.c
+++ b/src/hexen/p_lights.c
@@ -124,6 +124,10 @@ boolean EV_SpawnLight(line_t * line, byte * arg, lighttype_t type)
     boolean think;
     boolean rtn;

+    /*
+    Original code; redundant considering that a byte value is always
+    in the range 0-255:
+
     arg1 = arg[1] > 255 ? 255 : arg[1];
     arg1 = arg1 < 0 ? 0 : arg1;
     arg2 = arg[2] > 255 ? 255 : arg[2];
@@ -132,6 +136,12 @@ boolean EV_SpawnLight(line_t * line, byte * arg, lighttype_t type)
     arg3 = arg3 < 0 ? 0 : arg3;
     arg4 = arg[4] > 255 ? 255 : arg[4];
     arg4 = arg4 < 0 ? 0 : arg4;
+    */
+
+    arg1 = arg[1];
+    arg2 = arg[2];
+    arg3 = arg[3];
+    arg4 = arg[4];

     secNum = -1;
     rtn = false;
diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c
index f190b1a3..4a9e4dd8 100644
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -29,6 +29,7 @@
 #include "i_video.h"
 #include "m_bbox.h"
 #include "m_cheat.h"
+#include "m_misc.h"
 #include "p_local.h"
 #include "s_sound.h"
 #include "v_video.h"