summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2011-10-15 13:55:18 +0000
committerSimon Howard2011-10-15 13:55:18 +0000
commitef848275bcf6dd978499cfc6a28cc81256a82447 (patch)
treee9383f09108916aeb7f7a718bd34c26dd0dc720f /src
parent55a39ccab15bfb8082149f9aec2d1273211c1605 (diff)
downloadchocolate-doom-ef848275bcf6dd978499cfc6a28cc81256a82447.tar.gz
chocolate-doom-ef848275bcf6dd978499cfc6a28cc81256a82447.tar.bz2
chocolate-doom-ef848275bcf6dd978499cfc6a28cc81256a82447.zip
Revert previous change to angle constants and apply a more specific fix.
Changing the angle constants to unsigned causes other problems to occur. Subversion-branch: /branches/v2-branch Subversion-revision: 2429
Diffstat (limited to 'src')
-rw-r--r--src/hexen/g_game.c2
-rw-r--r--src/tables.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c
index 1560c05f..5dcfb478 100644
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -1150,7 +1150,7 @@ boolean G_CheckSpot(int playernum, mapthing_t * mthing)
// spawn a teleport fog
ss = R_PointInSubsector(x, y);
- an = (ANG45 * (mthing->angle / 45)) >> ANGLETOFINESHIFT;
+ an = ((unsigned) ANG45 * (mthing->angle / 45)) >> ANGLETOFINESHIFT;
mo = P_SpawnMobj(x + 20 * finecosine[an], y + 20 * finesine[an],
ss->sector->floorheight + TELEFOGHEIGHT, MT_TFOG);
diff --git a/src/tables.h b/src/tables.h
index cac33f27..f4fd1f55 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -68,11 +68,11 @@ extern const byte gammatable[5][256];
// Binary Angle Measument, BAM.
-#define ANG45 0x20000000U
-#define ANG90 0x40000000U
-#define ANG180 0x80000000U
-#define ANG270 0xc0000000U
-#define ANG_MAX 0xffffffffU
+#define ANG45 0x20000000
+#define ANG90 0x40000000
+#define ANG180 0x80000000
+#define ANG270 0xc0000000
+#define ANG_MAX 0xffffffff
#define ANG1 (ANG45 / 45)
#define ANG60 (ANG180 / 3)
@@ -80,7 +80,7 @@ extern const byte gammatable[5][256];
// Heretic code uses this definition as though it represents one
// degree, but it is not! This is actually ~1.40 degrees.
-#define ANG1_X 0x01000000U
+#define ANG1_X 0x01000000
#define SLOPERANGE 2048
#define SLOPEBITS 11