diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-29 08:12:39 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-29 08:12:39 +0000 |
commit | 9c6e217f29bb0a76ec153574a3d493b020e5fb60 (patch) | |
tree | b38acde6c091b7f8b0e3205645f9d232f19eeabb /apps/plugins/doom/m_misc.h | |
parent | 6980c1e9988a7c959876ad77b760e042272a9ec2 (diff) | |
download | rockbox-9c6e217f29bb0a76ec153574a3d493b020e5fb60.tar.gz rockbox-9c6e217f29bb0a76ec153574a3d493b020e5fb60.zip |
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
Diffstat (limited to 'apps/plugins/doom/m_misc.h')
-rw-r--r-- | apps/plugins/doom/m_misc.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/plugins/doom/m_misc.h b/apps/plugins/doom/m_misc.h index 25eb8540c0..3ea6af987f 100644 --- a/apps/plugins/doom/m_misc.h +++ b/apps/plugins/doom/m_misc.h | |||
@@ -61,6 +61,17 @@ struct default_s *M_LookupDefault(const char *name); /* killough 11/98 */ | |||
61 | 61 | ||
62 | // CPhipps - struct to hold a value in a config file | 62 | // CPhipps - struct to hold a value in a config file |
63 | // Cannot be a union, as it must be initialised | 63 | // Cannot be a union, as it must be initialised |
64 | enum { | ||
65 | def_none, // Dummy entry | ||
66 | def_str, // A string | ||
67 | def_int, // Integer | ||
68 | def_hex, // Integer (write in hex) | ||
69 | def_bool = def_int, // Boolean | ||
70 | def_key = def_hex, // Key code (byte) | ||
71 | def_mouseb = def_int,// Mouse button | ||
72 | def_colour = def_hex // Colour (256 colour palette entry) | ||
73 | }; /* type */ | ||
74 | |||
64 | typedef struct default_s | 75 | typedef struct default_s |
65 | { | 76 | { |
66 | const char* name; | 77 | const char* name; |
@@ -84,16 +95,7 @@ typedef struct default_s | |||
84 | // Limits (for an int) | 95 | // Limits (for an int) |
85 | int minvalue; // jff 3/3/98 minimum allowed value | 96 | int minvalue; // jff 3/3/98 minimum allowed value |
86 | int maxvalue; // jff 3/3/98 maximum allowed value | 97 | int maxvalue; // jff 3/3/98 maximum allowed value |
87 | enum { | 98 | unsigned type; // CPhipps - type of entry |
88 | def_none, // Dummy entry | ||
89 | def_str, // A string | ||
90 | def_int, // Integer | ||
91 | def_hex, // Integer (write in hex) | ||
92 | def_bool = def_int, // Boolean | ||
93 | def_key = def_hex, // Key code (byte) | ||
94 | def_mouseb = def_int,// Mouse button | ||
95 | def_colour = def_hex // Colour (256 colour palette entry) | ||
96 | } type; // CPhipps - type of entry | ||
97 | int setupscreen; // phares 4/19/98: setup screen where this appears | 99 | int setupscreen; // phares 4/19/98: setup screen where this appears |
98 | int *current; /* cph - MBF-like pointer to current value */ | 100 | int *current; /* cph - MBF-like pointer to current value */ |
99 | // cph - removed the help strings from the config file | 101 | // cph - removed the help strings from the config file |