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 | 51cda2252ceb088d75f25074f1e83e8eec5f18b6 (patch) | |
tree | 34abcc3662d6f35a9ace2d7f77586e68242b96e7 /src/news_gui.cpp | |
parent | 5a7fcf9aa3ce17e9f8602a682171b30cc8b1a786 (diff) | |
download | openttd-51cda2252ceb088d75f25074f1e83e8eec5f18b6.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); } |