(svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window.

This commit is contained in:
rubidium
2008-05-08 11:50:34 +00:00
parent 51cda2252c
commit 92aac531c2
28 changed files with 75 additions and 76 deletions

View File

@@ -268,7 +268,7 @@ static const WindowDesc _town_authority_desc = {
static void ShowTownAuthorityWindow(uint town)
{
Window *w = AllocateWindowDescFront(&_town_authority_desc, town);
Window *w = AllocateWindowDescFront<Window>(&_town_authority_desc, town);
if (w != NULL) {
w->vscroll.cap = 5;
@@ -397,7 +397,7 @@ void ShowTownViewWindow(TownID town)
{
Window *w;
w = AllocateWindowDescFront(&_town_view_desc, town);
w = AllocateWindowDescFront<Window>(&_town_view_desc, town);
if (w != NULL) {
w->flags4 |= WF_DISABLE_VP_SCROLL;
@@ -576,7 +576,7 @@ static const WindowDesc _town_directory_desc = {
void ShowTownDirectory()
{
Window *w = AllocateWindowDescFront(&_town_directory_desc, 0);
Window *w = AllocateWindowDescFront<Window>(&_town_directory_desc, 0);
if (w != NULL) {
w->vscroll.cap = 16;
@@ -705,6 +705,6 @@ static const WindowDesc _scen_edit_town_gen_desc = {
void ShowBuildTownWindow()
{
if (_game_mode != GM_EDITOR && !IsValidPlayer(_current_player)) return;
AllocateWindowDescFront(&_scen_edit_town_gen_desc, 0);
AllocateWindowDescFront<Window>(&_scen_edit_town_gen_desc, 0);
}