From 956e309409a9be55007f8729fc13d8e9f5bab308 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 13 Sep 2016 23:45:40 +0100 Subject: [PATCH] Remove remaining addresses in window.c --- src/interface/window.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/interface/window.c b/src/interface/window.c index 9ab4cef030..9a78fa750a 100644 --- a/src/interface/window.c +++ b/src/interface/window.c @@ -14,7 +14,6 @@ *****************************************************************************/ #pragma endregion -#include "../addresses.h" #include "../audio/audio.h" #include "../cursors.h" #include "../drawing/drawing.h" @@ -562,21 +561,24 @@ rct_window *window_create_auto_pos(int width, int height, rct_window_event_list uint16 screenWidth = gScreenWidth; uint16 screenHeight = gScreenHeight; - if (cls & 0x80) { - cls &= ~0x80; - rct_window *w = window_find_by_number(RCT2_GLOBAL(0x0013CE928, rct_windowclass), RCT2_GLOBAL(0x0013CE92A, rct_windownumber)); - if (w != NULL) { - if (w->x > -60 && w->x < gScreenWidth - 20) { - if (w->y < gScreenHeight - 20) { - int x = w->x; - if (w->x + width > gScreenWidth) - x = gScreenWidth - 20 - width; - int y = w->y; - return window_create(x + 10, y + 10, width, height, event_handlers, cls, flags); - } - } - } - } + // TODO dead code, looks like it is cascading the new window offset from an existing window + // we will have to re-implement this in our own way. + // + // if (cls & 0x80) { + // cls &= ~0x80; + // rct_window *w = window_find_by_number(0, 0); + // if (w != NULL) { + // if (w->x > -60 && w->x < gScreenWidth - 20) { + // if (w->y < gScreenHeight - 20) { + // int x = w->x; + // if (w->x + width > gScreenWidth) + // x = gScreenWidth - 20 - width; + // int y = w->y; + // return window_create(x + 10, y + 10, width, height, event_handlers, cls, flags); + // } + // } + // } + // } // Place window in an empty corner of the screen int x = 0;