diff options
author | Eugene Sandulenko | 2019-06-23 18:56:04 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:58 +0200 |
commit | f3bfdf42958f77a360e019cf54cd83d0f7f5d4d3 (patch) | |
tree | 3d040f7ddbbc4a3a8f3196ed78a772028404bdf9 /engines | |
parent | 0dcf1568ee7deeba1f5dbfad3e0f96f5a3d36af1 (diff) | |
download | scummvm-rg350-f3bfdf42958f77a360e019cf54cd83d0f7f5d4d3.tar.gz scummvm-rg350-f3bfdf42958f77a360e019cf54cd83d0f7f5d4d3.tar.bz2 scummvm-rg350-f3bfdf42958f77a360e019cf54cd83d0f7f5d4d3.zip |
HDB: Fix dialog border drawing
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/window.cpp | 77 |
1 files changed, 43 insertions, 34 deletions
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index a30289d209..95fc21fe1c 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -223,23 +223,26 @@ void Window::drawBorder(int x, int y, int width, int height, bool guyTalking) { _gfxTR->drawMasked(x + i * 16, y + j * 16); else if (!j) _gfxTM->draw(x + i * 16, y + j * 16); - - // Bottom Lines - if ((j == high - 1) && !i) - _gfxBL->drawMasked(x + i * 16, y + j * 16); - else if ((j == high - 1) && (i == wide - 1)) - _gfxBR->drawMasked(x + i * 16, y + j * 16); - else if ((j == high - 1) && i < wide) - _gfxBM->draw(x + i * 16, y + j * 16); - - // Middle lines - if (!i && j < high) - _gfxL->draw(x + i * 16, y + j * 16); - else if ((i == wide - 1) && j < high) - _gfxR->draw(x + i * 16, y + j * 16); - - // Most drawn = middle block - _gfxM->draw(x + i * 16, y + j * 16); + else { + + // Bottom Lines + if ((j == high - 1) && !i) + _gfxBL->drawMasked(x + i * 16, y + j * 16); + else if ((j == high - 1) && (i == wide - 1)) + _gfxBR->drawMasked(x + i * 16, y + j * 16); + else if ((j == high - 1) && i < wide) + _gfxBM->draw(x + i * 16, y + j * 16); + else { + // Middle lines + if (!i && j < high) + _gfxL->draw(x + i * 16, y + j * 16); + else if ((i == wide - 1) && j < high) + _gfxR->draw(x + i * 16, y + j * 16); + else + // Most drawn = middle block + _gfxM->draw(x + i * 16, y + j * 16); + } + } } } else { wide = (width / 16) + 1; @@ -253,23 +256,29 @@ void Window::drawBorder(int x, int y, int width, int height, bool guyTalking) { _gGfxTR->drawMasked(x + i * 16, y + j * 16); else if (!j) _gGfxTM->draw(x + i * 16, y + j * 16); - - // Bottom Lines - if ((j == high - 1) && !i) - _gGfxBL->drawMasked(x + i * 16, y + j * 16); - else if ((j == high - 1) && (i == wide - 1)) - _gGfxBR->drawMasked(x + i * 16, y + j * 16); - else if ((j == high - 1) && i < wide) - _gGfxBM->draw(x + i * 16, y + j * 16); - - // Middle lines - if (!i && j < high) - _gGfxL->draw(x + i * 16, y + j * 16); - else if ((i == wide - 1) && j < high) - _gGfxR->draw(x + i * 16, y + j * 16); - - // Most drawn = middle block - _gGfxM->draw(x + i * 16, y + j * 16); + else { + + // Bottom Lines + if ((j == high - 1) && !i) + _gGfxBL->drawMasked(x + i * 16, y + j * 16); + else if ((j == high - 1) && (i == wide - 1)) + _gGfxBR->drawMasked(x + i * 16, y + j * 16); + else if ((j == high - 1) && i < wide) + _gGfxBM->draw(x + i * 16, y + j * 16); + else { + + // Middle lines + if (!i && j < high) + _gGfxL->draw(x + i * 16, y + j * 16); + else if ((i == wide - 1) && j < high) + _gGfxR->draw(x + i * 16, y + j * 16); + else + + // Most drawn = middle block + _gGfxM->draw(x + i * 16, y + j * 16); + + } + } } } } |