From 5650b4ce48f5f3b89859eed16e8e485539b11d40 Mon Sep 17 00:00:00 2001 From: kreatordxx <> Date: Mon, 3 May 2010 08:44:46 +0000 Subject: [PATCH] Merge d_event and newmenu_event enum's, hopefully fixing compiler warnings in GCC 4.5.0 --- CHANGELOG.txt | 1 + arch/include/event.h | 10 ++++++++-- main/newmenu.h | 7 ------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cbe05d7cc..591894b37 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20100503 -------- main/menu.c: Properly specify number of items for do_options_menu, so the options menu actually shows +arch/include/event.h, main/newmenu.h: Merge d_event and newmenu_event enum's, hopefully fixing compiler warnings in GCC 4.5.0 20100405 -------- diff --git a/arch/include/event.h b/arch/include/event.h index b58a83c8c..9f2843f57 100644 --- a/arch/include/event.h +++ b/arch/include/event.h @@ -6,16 +6,22 @@ typedef enum event_type { EVENT_IDLE = 0, + EVENT_QUIT, + EVENT_MOUSE_BUTTON_DOWN, EVENT_MOUSE_BUTTON_UP, + EVENT_KEY_COMMAND, + EVENT_WINDOW_ACTIVATED, EVENT_WINDOW_DEACTIVATED, EVENT_WINDOW_DRAW, EVENT_WINDOW_CLOSE, EVENT_WINDOW_CLOSED, - EVENT_QUIT, - EVENT_USER // spare for use by modules that use windows (e.g. newmenu) + + EVENT_NEWMENU_DRAW, // draw after the newmenu stuff is drawn (e.g. savegame previews) + EVENT_NEWMENU_CHANGED, // an item had its value/text changed + EVENT_NEWMENU_SELECTED // user chose something - pressed enter/clicked on it } event_type; // A vanilla event. Cast to the correct type of event according to 'type'. diff --git a/main/newmenu.h b/main/newmenu.h index 813decae0..bb4dca526 100644 --- a/main/newmenu.h +++ b/main/newmenu.h @@ -38,13 +38,6 @@ typedef struct listbox listbox; #define NM_MAX_TEXT_LEN 255 -enum newmenu_event -{ - EVENT_NEWMENU_DRAW = EVENT_USER, // draw after the newmenu stuff is drawn (e.g. savegame previews) - EVENT_NEWMENU_CHANGED, // an item had its value/text changed - EVENT_NEWMENU_SELECTED // user chose something - pressed enter/clicked on it -}; - typedef struct newmenu_item { int type; // What kind of item this is, see NM_TYPE_????? defines int value; // For checkboxes and radio buttons, this is 1 if marked initially, else 0