From 80597ad64f4b166f9e447ed39d5accf1dca50000 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Fri, 14 Jan 2011 17:49:33 +0800 Subject: [PATCH] Fix compile errors introduced when merging --- CHANGELOG.txt | 4 ++++ main/credits.c | 2 +- main/menu.c | 5 +++-- main/net_udp.c | 4 ++-- main/scores.c | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 42924d975..01c24d9d4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20110114 +-------- +main/credits.c, main/menu.c, main/net_udp.c, main/scores.c: Fix compile errors introduced when merging + 20110113 -------- arch/include/event.h, arch/include/key.h, arch/include/mouse.h, arch/sdl/event.c, arch/sdl/key.c, arch/sdl/mouse.c, editor/med.c, include/ui.h, main/automap.c, main/gamecntl.c, main/inferno.c, main/inferno.h, main/kconfig.c, main/kmatrix.c, main/menu.c, main/net_ipx.c, main/net_udp.c, main/newmenu.c, main/scores.c, main/titles.c, ui/file.c, ui/keypress.c, ui/menu.c, ui/menubar.c, ui/message.c, ui/mouse.c, ui/popup.c, ui/window.c: For editor, replace use of ui_mega_process() with event_process(), with the editor's own default event handler; add EVENT_MOUSE_MOVED event with event_mouse_get_delta() accessor; add event_key_get() to replace ugly casting; rename mouse_get_button() with event_mouse_get_button() to keep with name convention; only send idle events when there are no input events so editor still works properly (or the same anyway); add and use event_send() function for input events (including idle) diff --git a/main/credits.c b/main/credits.c index 18f0c2a61..86ef90a54 100644 --- a/main/credits.c +++ b/main/credits.c @@ -75,7 +75,7 @@ int credits_handler(window *wind, d_event *event, credits *cr) case EVENT_MOUSE_BUTTON_DOWN: case EVENT_MOUSE_BUTTON_UP: - if (mouse_get_button(event) == MBTN_LEFT || mouse_get_button(event) == MBTN_RIGHT) + if (event_mouse_get_button(event) == MBTN_LEFT || event_mouse_get_button(event) == MBTN_RIGHT) { window_close(wind); return 1; diff --git a/main/menu.c b/main/menu.c index d8c2c758c..1c215bd84 100644 --- a/main/menu.c +++ b/main/menu.c @@ -416,7 +416,7 @@ int main_menu_handler(newmenu *menu, d_event *event, int *menu_choice ) case EVENT_MOUSE_BUTTON_DOWN: case EVENT_MOUSE_BUTTON_UP: // Don't allow mousebutton-closing in main menu. - if (mouse_get_button(event) == MBTN_RIGHT) + if (event_mouse_get_button(event) == MBTN_RIGHT) return 1; break; @@ -1231,10 +1231,11 @@ void graphics_config() { #ifdef OGL newmenu_item m[11]; + int i = 0; #else newmenu_item m[2]; #endif - int nitems = 0, i = 0; + int nitems = 0; #ifdef OGL m[nitems].type = NM_TYPE_TEXT; m[nitems].text = "Texture Filtering (restart required):"; nitems++; diff --git a/main/net_udp.c b/main/net_udp.c index 8c364ed64..421054c0d 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -537,7 +537,7 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj ) newpage++; if (NLPage < 0) NLPage = UDP_NETGAMES_PAGES-1; - ((d_event_keycommand *)event)->keycode = 0; + key = 0; break; } if (key == KEY_PAGEDOWN) @@ -546,7 +546,7 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj ) newpage++; if (NLPage >= UDP_NETGAMES_PAGES) NLPage = 0; - ((d_event_keycommand *)event)->keycode = 0; + key = 0; break; } if (key == KEY_F5) diff --git a/main/scores.c b/main/scores.c index 6e11f54e2..ce7e7d76f 100644 --- a/main/scores.c +++ b/main/scores.c @@ -354,7 +354,7 @@ int scores_handler(window *wind, d_event *event, scores_menu *menu) case EVENT_MOUSE_BUTTON_DOWN: case EVENT_MOUSE_BUTTON_UP: - if (mouse_get_button(event) == MBTN_LEFT || mouse_get_button(event) == MBTN_RIGHT) + if (event_mouse_get_button(event) == MBTN_LEFT || event_mouse_get_button(event) == MBTN_RIGHT) { window_close(wind); return 1;