From 2eef026fe35b9236606062f7d8a59d5661a5c748 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 8 May 2008 11:31:41 +0000 Subject: (svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor. --- src/news_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/news_gui.cpp') diff --git a/src/news_gui.cpp b/src/news_gui.cpp index f67e8667f..2b1bacb6a 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -432,7 +432,7 @@ static void ShowNewspaper(NewsItem *ni) case NM_NORMAL: case NM_CALLBACK: _news_type13_desc.top = top; - w = AllocateWindowDesc(&_news_type13_desc); + w = new Window(&_news_type13_desc); if (ni->flags & NF_VIEWPORT) { InitializeWindowViewport(w, 2, 58, 426, 110, ni->data_a | (ni->flags & NF_VEHICLE ? 0x80000000 : 0), ZOOM_LVL_NEWS); @@ -441,7 +441,7 @@ static void ShowNewspaper(NewsItem *ni) case NM_THIN: _news_type2_desc.top = top; - w = AllocateWindowDesc(&_news_type2_desc); + w = new Window(&_news_type2_desc); if (ni->flags & NF_VIEWPORT) { InitializeWindowViewport(w, 2, 58, 426, 70, ni->data_a | (ni->flags & NF_VEHICLE ? 0x80000000 : 0), ZOOM_LVL_NEWS); @@ -450,7 +450,7 @@ static void ShowNewspaper(NewsItem *ni) default: _news_type0_desc.top = top; - w = AllocateWindowDesc(&_news_type0_desc); + w = new Window(&_news_type0_desc); if (ni->flags & NF_VIEWPORT) { InitializeWindowViewport(w, 3, 17, 274, 47, ni->data_a | (ni->flags & NF_VEHICLE ? 0x80000000 : 0), ZOOM_LVL_NEWS); @@ -711,7 +711,7 @@ static const WindowDesc _message_history_desc = { void ShowMessageHistory() { DeleteWindowById(WC_MESSAGE_HISTORY, 0); - Window *w = AllocateWindowDesc(&_message_history_desc); + Window *w = new Window(&_message_history_desc); if (w == NULL) return; @@ -933,7 +933,7 @@ static const WindowDesc _message_options_desc = { void ShowMessageOptions() { DeleteWindowById(WC_GAME_OPTIONS, 0); - AllocateWindowDesc(&_message_options_desc); + new Window(&_message_options_desc); } -- cgit v1.2.3-70-g09d2