diff options
author | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-08 11:31:41 +0000 |
commit | 2eef026fe35b9236606062f7d8a59d5661a5c748 (patch) | |
tree | 34abcc3662d6f35a9ace2d7f77586e68242b96e7 /src/news_gui.cpp | |
parent | d3650ecb3a42529c720634dcdc982d046a47a1ee (diff) | |
download | openttd-2eef026fe35b9236606062f7d8a59d5661a5c748.tar.xz |
(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r-- | src/news_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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); } |