summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/doomtype.h24
-rw-r--r--src/m_fixed.c6
2 files changed, 20 insertions, 10 deletions
diff --git a/src/doomtype.h b/src/doomtype.h
index b330eb9a..2bd67415 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -29,20 +29,30 @@
#ifndef __DOOMTYPE__
#define __DOOMTYPE__
+// C99 integer types; with gcc we just use this. Other compilers
+// should add conditional statements that define the C99 types.
+
+#include <stdint.h>
-#ifndef __BYTEBOOL__
-#define __BYTEBOOL__
-// Fixed to use builtin bool type with C++.
#ifdef __cplusplus
+
+// Use builtin bool type with C++.
+
typedef bool boolean;
+
#else
-typedef enum {false, true} boolean;
-#endif
-typedef unsigned char byte;
+
+typedef enum
+{
+ false,
+ true
+} boolean;
+
#endif
+typedef uint8_t byte;
#include <limits.h>
-
#endif
+
diff --git a/src/m_fixed.c b/src/m_fixed.c
index 5e3050bc..ba76b36c 100644
--- a/src/m_fixed.c
+++ b/src/m_fixed.c
@@ -43,7 +43,7 @@ FixedMul
( fixed_t a,
fixed_t b )
{
- return ((long long) a * (long long) b) >> FRACBITS;
+ return ((int64_t) a * (int64_t) b) >> FRACBITS;
}
@@ -60,9 +60,9 @@ fixed_t FixedDiv(fixed_t a, fixed_t b)
}
else
{
- long long result;
+ int64_t result;
- result = ((long long) a << 16) / b;
+ result = ((int64_t) a << 16) / b;
return (fixed_t) result;
}