forked from mirror/OpenTTD
(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user