From 9c6e217f29bb0a76ec153574a3d493b020e5fb60 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 29 May 2010 08:12:39 +0000 Subject: Doom plugin: In anticipation of moving to the EABI toolchain, because of its assumptions about enums being sized as ints, convert enum typdefs to int or unsigned depending upon whether they have negative values in the enumeration. This should effectively preserve the manner in which it is compiled under the old toolchain and avoids having to closely inspect and possibly change many places in the code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26368 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/doomtype.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'apps/plugins/doom/doomtype.h') diff --git a/apps/plugins/doom/doomtype.h b/apps/plugins/doom/doomtype.h index 59b33758da..22e3ec6009 100644 --- a/apps/plugins/doom/doomtype.h +++ b/apps/plugins/doom/doomtype.h @@ -33,18 +33,9 @@ #define __DOOMTYPE__ #include "rockmacros.h" -#ifndef __BYTEBOOL__ -#define __BYTEBOOL__ // Fixed to use builtin bool type with C++. -#ifdef __cplusplus -typedef bool boolean; -#else -//typedef enum {false, true} boolean; -//#define boolean bool -typedef enum _boolean { FALSE, TRUE } boolean; -#endif +typedef unsigned int boolean; typedef unsigned char byte; -#endif typedef signed long long int_64_t; typedef unsigned long long uint_64_t; @@ -63,7 +54,7 @@ typedef unsigned long long uint_64_t; #define MINLONG ((long)0x80000000) /* cph - move compatibility levels here so we can use them in d_server.c */ -typedef enum { +enum { doom_12_compatibility, /* Behave like early doom versions */ doom_demo_compatibility, /* As compatible as possible for * playing original Doom demos */ @@ -80,6 +71,7 @@ typedef enum { /* Aliases follow */ boom_compatibility = boom_201_compatibility, /* Alias used by G_Compatibility */ best_compatibility = prboom_3_compatibility, -} complevel_t; +}; +typedef unsigned complevel_t; #endif -- cgit v1.2.3