diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-03-03 20:59:35 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 20:57:25 +0200 |
commit | 1d054725dd5165d349f5c8fd425e6161bf67c6f5 (patch) | |
tree | f663a2c46c02a4093b44823736f65201f550cfb3 /src/main-win.c | |
parent | c033064404865fd1cccad23e36ce195fca92c64d (diff) |
Refactor: USE_TRANSPARENCY compile-time flag always set
Diffstat (limited to 'src/main-win.c')
-rw-r--r-- | src/main-win.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/main-win.c b/src/main-win.c index d0548d3b..420ac858 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -467,15 +467,11 @@ static bool_ can_use_graphics = FALSE; */ static DIBINIT infGraph; -#ifdef USE_TRANSPARENCY - /* * The global bitmap mask */ static DIBINIT infMask; -#endif /* USE_TRANSPARENCY */ - #endif /* USE_GRAPHICS */ @@ -1245,8 +1241,6 @@ static bool_ init_graphics() int wid, hgt; cptr name; -#ifdef USE_TRANSPARENCY - /* Unused */ PALETTEENTRY entry = { @@ -1254,8 +1248,6 @@ static bool_ init_graphics() }; (void)entry; -#endif /* USE_TRANSPARENCY */ - if (arg_graphics == 2) { wid = 16; @@ -1289,8 +1281,6 @@ static bool_ init_graphics() infGraph.CellHeight = hgt; -#ifdef USE_TRANSPARENCY - path_build(buf, 1024, ANGBAND_DIR_XTRA_GRAF, "mask.bmp"); /* Load the bitmap or quit */ if (!ReadDIB(data[0].w, buf, &infMask)) @@ -1299,8 +1289,6 @@ static bool_ init_graphics() return (FALSE); } -#endif /* USE_TRANSPARENCY */ - /* Activate a palette */ if (!new_palette()) { @@ -2212,11 +2200,7 @@ static errr Term_text_win(int x, int y, int n, byte a, const char *s) * * If "graphics" is not available, we simply "wipe" the given grids. */ -# ifdef USE_TRANSPARENCY static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp, const byte *tap, const char *tcp, const byte *eap, const char *ecp) -# else /* USE_TRANSPARENCY */ -static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) -# endif /* USE_TRANSPARENCY */ { term_data *td = (term_data*)(Term->data); @@ -2226,16 +2210,12 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) int x1, y1, w1, h1; int x2, y2, w2, h2, tw2; -# ifdef USE_TRANSPARENCY - int x3, y3; HDC hdcMask = NULL; int x4, y4; -# endif /* USE_TRANSPARENCY */ - HDC hdc; HDC hdcSrc; HBITMAP hbmSrcOld; @@ -2270,16 +2250,12 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) hdcSrc = CreateCompatibleDC(hdc); hbmSrcOld = SelectObject(hdcSrc, infGraph.hBitmap); -# ifdef USE_TRANSPARENCY - if (arg_graphics == 2) { hdcMask = CreateCompatibleDC(hdc); SelectObject(hdcMask, infMask.hBitmap); } -# endif /* USE_TRANSPARENCY */ - /* Draw attr/char pairs */ for (i = 0; i < n; i++, x2 += w2) { @@ -2294,8 +2270,6 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) x1 = col * w1; y1 = row * h1; -# ifdef USE_TRANSPARENCY - if (arg_graphics == 2) { x3 = (tcp[i] & 0x7F) * w1; @@ -2359,9 +2333,6 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) } } else - -# endif /* USE_TRANSPARENCY */ - { /* Perfect size */ if ((w1 == tw2) && (h1 == h2)) @@ -2386,8 +2357,6 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) SelectObject(hdcSrc, hbmSrcOld); DeleteDC(hdcSrc); -# ifdef USE_TRANSPARENCY - if (arg_graphics == 2) { /* Release */ @@ -2395,8 +2364,6 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp) DeleteDC(hdcMask); } -# endif /* USE_TRANSPARENCY */ - /* Release */ ReleaseDC(td->w, hdc); |