summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-08 16:53:28 +0000
committertron <tron@openttd.org>2005-02-08 16:53:28 +0000
commita17d6e392275dd4bbdc0e4447f5a9b42afc45b24 (patch)
treec3cfb0dfd757435cbf9f40f03a8f48d021486688 /misc_gui.c
parent76325c2bb200c747226dd46f72d3d0557d8046dc (diff)
downloadopenttd-a17d6e392275dd4bbdc0e4447f5a9b42afc45b24.tar.xz
(svn r1849) Use the cheat entry enum for CheatEntry.type and remove unused enum values
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 104ebf6f5..a2dba86a4 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -1554,8 +1554,18 @@ static int32 ClickChangeDateCheat(int32 p1, int32 p2)
typedef int32 CheckButtonClick(int32, int32);
+typedef enum ce_type {
+ CE_BOOL = 0,
+ CE_UINT8 = 1,
+ CE_INT16 = 2,
+ CE_UINT16 = 3,
+ CE_INT32 = 4,
+ CE_BYTE = 5,
+ CE_CLICK = 6,
+} ce_type;
+
typedef struct CheatEntry {
- byte type; // type of selector
+ ce_type type; // type of selector
byte flags; // selector flags
StringID str; // string with descriptive text
void *variable; // pointer to the variable
@@ -1565,19 +1575,6 @@ typedef struct CheatEntry {
uint16 step; // step for spinbox
} CheatEntry;
-enum {
- CE_BOOL = 0,
- CE_UINT8 = 1,
- CE_INT16 = 2,
- CE_UINT16 = 3,
- CE_INT32 = 4,
- CE_BYTE = 5,
- CE_CLICK = 6,
-
- CF_0ISDIS = 1,
- CF_NOCOMMA = 2,
-};
-
static int32 ReadCE(const CheatEntry*ce)
{
switch(ce->type) {