aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-21 20:39:49 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit1639c2e887ae8bee4d43bddb84440b8639ce4efb (patch)
tree788f6d2eefc6aeb2f6d018423363b8dd1f072280 /engines/dm
parent485d5f94de671aa28017edca2c4725fc09c796c4 (diff)
downloadscummvm-rg350-1639c2e887ae8bee4d43bddb84440b8639ce4efb.tar.gz
scummvm-rg350-1639c2e887ae8bee4d43bddb84440b8639ce4efb.tar.bz2
scummvm-rg350-1639c2e887ae8bee4d43bddb84440b8639ce4efb.zip
DM: Fix several inclusive boundary errors with Box types
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/champion.cpp8
-rw-r--r--engines/dm/inventory.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index d41429e817..693fb50ace 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -315,20 +315,20 @@ void ChampionMan::drawChampionBarGraphs(ChampionIndex champIndex) {
Box box;
box._x1 = champIndex * kChampionStatusBoxSpacing + 46;
- box._x2 = box._x1 + 3;
+ box._x2 = box._x1 + 3 + 1;
box._y1 = 2;
- box._y2 = 26;
+ box._y2 = 26 + 1;
for (int16 AL_0_barGraphIndex = 0; AL_0_barGraphIndex < 3; AL_0_barGraphIndex++) {
int16 barGraphHeight = barGraphHeightArray[AL_0_barGraphIndex];
if (barGraphHeight < 25) {
box._y1 = 2;
- box._y1 = 27 - barGraphHeight;
+ box._y1 = 27 - barGraphHeight + 1;
_vm->_displayMan->clearScreenBox(gChampionColor[champIndex], box);
}
if (barGraphHeight) {
box._y1 = 27 - barGraphHeight;
- box._y2 = 26;
+ box._y2 = 26 + 1;
_vm->_displayMan->clearScreenBox(gChampionColor[champIndex], box);
}
box._x1 += 7;
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index b0cc9f0281..a67d308e68 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -102,9 +102,9 @@ void InventoryMan::drawStatusBoxPortrait(ChampionIndex championIndex) {
void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color) {
Box box;
box._x1 = x;
- box._x2 = box._x1 + pixelWidth;
+ box._x2 = box._x1 + pixelWidth + 1;
box._y1 = y;
- box._y2 = box._y1 + 6;
+ box._y2 = box._y1 + 6 + 1;
_vm->_displayMan->_useByteBoxCoordinates = false;
_vm->_displayMan->clearScreenBox(color, box);
}