From e8db28371cb0baab1b48f02b94d7dbfb1b6790bc Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 12 Jan 2008 17:40:50 +0000 Subject: Fix tiles title screen issues on Win32. Continuing tile code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3257 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tile2.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/tile2.cc') diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc index 844439349a..6908039f4f 100644 --- a/crawl-ref/source/tile2.cc +++ b/crawl-ref/source/tile2.cc @@ -2697,17 +2697,20 @@ void TileDrawTitle() if (!TitleImg) return; - // We don't need an entirely separate region for the title, so - // just resize the tile region to fit the screen temporarily. - int old_mx = region_tile->mx; - int old_my = region_tile->my; - int old_dx = region_tile->dx; - int old_dy = region_tile->dy; int winx = win_main->wx; int winy = win_main->wy; - region_tile->resize(winx, winy, 1, 1); - region_tile->resize_backbuf(); - img_type pBuf = region_tile->backbuf; + + TileRegionClass title(winx, winy, 1, 1); + title.win = win_main; + title.sx = 0; + title.sy = 0; + title.ex = winx; + title.ey = winy; + title.wx = winx; + title.wy = winy; + title.init_backbuf(); + title.flag = true; + img_type pBuf = title.backbuf; int tx = ImgWidth(TitleImg); int ty = ImgHeight(TitleImg); @@ -2735,15 +2738,12 @@ void TileDrawTitle() } ImgCopy(TitleImg, 0, 0, tx, ty, pBuf, x, y, 1); - region_tile->make_active(); - region_tile->redraw(); + title.make_active(); + title.redraw(); ImgDestroy(TitleImg); getch(); clrscr(); - - region_tile->resize(old_mx, old_my, old_dx, old_dy); - region_tile->resize_backbuf(); } static void TilePutch(int c, img_type Dest, int dx, int dy) -- cgit v1.2.3-54-g00ecf