diff options
author | Bendegúz Nagy | 2016-07-03 03:07:38 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | bd06132072852e7695015cad4373c31893b04934 (patch) | |
tree | dffab906266bb1d4d6397ac9f2ff3a67daf5d26e | |
parent | f01a03e91865a4cec1119bb83a5682d8f5f25553 (diff) | |
download | scummvm-rg350-bd06132072852e7695015cad4373c31893b04934.tar.gz scummvm-rg350-bd06132072852e7695015cad4373c31893b04934.tar.bz2 scummvm-rg350-bd06132072852e7695015cad4373c31893b04934.zip |
DM: Box objects are not expected to conatain inclusive boundaries, blitting and other methods adapted
-rw-r--r-- | engines/dm/champion.cpp | 24 | ||||
-rw-r--r-- | engines/dm/dm.cpp | 2 | ||||
-rw-r--r-- | engines/dm/eventman.cpp | 4 | ||||
-rw-r--r-- | engines/dm/gfx.cpp | 45 | ||||
-rw-r--r-- | engines/dm/gfx.h | 14 | ||||
-rw-r--r-- | engines/dm/inventory.cpp | 12 | ||||
-rw-r--r-- | engines/dm/menus.cpp | 8 | ||||
-rw-r--r-- | engines/dm/objectman.cpp | 4 |
8 files changed, 59 insertions, 54 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 125bdde4ea..44d783f4ff 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -666,20 +666,20 @@ void ChampionMan::f287_drawChampionBarGraphs(ChampionIndex champIndex) { Box box;
box._x1 = champIndex * k69_ChampionStatusBoxSpacing + 46;
- box._x2 = box._x1 + 3 + 1;
+ box._x2 = box._x1 + 3;
box._y1 = 2;
- box._y2 = 26 + 1;
+ box._y2 = 26;
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 + 1;
+ box._y1 = 27 - barGraphHeight;
_vm->_displayMan->D24_fillScreenBox(box, g46_ChampionColor[champIndex]);
}
if (barGraphHeight) {
box._y1 = 27 - barGraphHeight;
- box._y2 = 26 + 1;
+ box._y2 = 26;
_vm->_displayMan->D24_fillScreenBox(box, g46_ChampionColor[champIndex]);
}
box._x1 += 7;
@@ -734,9 +734,9 @@ void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) { dispMan._g578_useByteBoxCoordinates = false;
if (champAttributes & k0x1000_ChampionAttributeStatusBox) {
box._y1 = 0;
- box._y2 = 28 + 1;
+ box._y2 = 28;
box._x1 = champStatusBoxX;
- box._x2 = box._x1 + 66 + 1;
+ box._x2 = box._x1 + 66;
if (champ->_currHealth) {
dispMan.D24_fillScreenBox(box, k12_ColorDarkestGray);
int16 nativeBitmapIndices[3];
@@ -783,9 +783,9 @@ void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) { champAttributes |= k0x4000_ChampionAttributeViewport;
} else {
box._y1 = 0;
- box._y2 = 6 + 1;
+ box._y2 = 6;
box._x1 = champStatusBoxX;
- box._x2 = box._x1 + 42 + 1;
+ box._x2 = box._x1 + 42;
dispMan.D24_fillScreenBox(box, k1_ColorDarkGary);
_vm->_textMan->f53_printToLogicalScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, k1_ColorDarkGary, champ->_name);
}
@@ -930,8 +930,8 @@ void ChampionMan::f291_drawSlot(uint16 champIndex, ChampionSlot slotIndex) { Box box;
box._x1 = slotBox->_x - 1;
box._y1 = slotBox->_y - 1;
- box._x2 = box._x1 + 17 + 1;
- box._y2 = box._y1 + 17 + 1;
+ box._x2 = box._x1 + 17;
+ box._y2 = box._y1 + 17;
if (!isInventoryChamp) {
@@ -999,7 +999,7 @@ void ChampionMan::f281_renameChampion(Champion* champ) { Box box;
box._y1 = 3;
- box._y2 = 8 + 1;
+ box._y2 = 8;
box._x1 = 3;
box._x2 = box._x1 + 167;
@@ -1008,7 +1008,7 @@ void ChampionMan::f281_renameChampion(Champion* champ) { textMan.f52_printToViewport(177, 58, k13_ColorLightestGray, "_______");
textMan.f52_printToViewport(105, 76, k13_ColorLightestGray, "___________________");
Common::Point clickPos;
- static Box okButtonBox(197, 215, 147, 155); // inclusive boundaries, constructor adds +1
+ static Box okButtonBox(197, 215, 147, 155);
for (;;) {
_vm->_eventMan->processInput();
if (_vm->_eventMan->f360_hasPendingClick(clickPos, k1_LeftMouseButton) && okButtonBox.isPointInside(clickPos)) {
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index c5ff2f2287..7a3ce4089e 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -262,7 +262,7 @@ void DMEngine::f2_gameloop() { //} while (!_g321_stopWaitingForPlayerInput || !_g301_gameTimeTicking); if (!_inventoryMan->_g432_inventoryChampionOrdinal && !_championMan->_g300_partyIsSleeping) { - Box box(0, 224, 0, 126); + Box box(0, 223, 0, 135); _displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport * 2, k136_heightViewport); // dummy code _displayMan->f128_drawDungeon(_dungeonMan->_g308_partyDir, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); } diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index a4d1b6d640..490449d61c 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -610,9 +610,9 @@ void EventManager::f282_commandProcessCommands160To162ClickInResurrectReincarnat champMan._g305_partyChampionCount--; Box box; box._y1 = 0; - box._y2 = 28 + 1; + box._y2 = 28; box._x1 = championIndex * k69_ChampionStatusBoxSpacing; - box._x2 = box._x1 + 66 + 1; + box._x2 = box._x1 + 66; dispMan._g578_useByteBoxCoordinates = false; dispMan.D24_fillScreenBox(box, k0_ColorBlack); dispMan.D24_fillScreenBox(g54_BoxChampionIcons[champMan.M26_championIconIndex(champ->_cell, dunMan._g308_partyDir) * 2], k0_ColorBlack); diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index a9c555e857..d4229bdd91 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -120,7 +120,7 @@ FieldAspect g188_FieldAspects[12] = { // @ G0188_as_Graphic558_FieldAspects FieldAspect(0, 63, 0x0A, 0x83, 16, 136, 0, 64), /* D0L */ FieldAspect(0, 63, 0x0A, 0x03, 16, 136, 0, 64)}; /* D0R */ -Box g2_BoxMovementArrows = Box(224, 319, 124, 168); +Box g2_BoxMovementArrows = Box(224, 319, 124, 168); // @ G0002_s_Graphic562_Box_MovementArrows byte g212_PalChangeSmoke[16] = {0, 10, 20, 30, 40, 50, 120, 10, 80, 90, 100, 110, 120, 130, 140, 150}; // @ G0212_auc_Graphic558_PaletteChanges_Smoke @@ -1021,8 +1021,8 @@ void DisplayMan::f132_blitToBitmap(byte *srcBitmap, byte *destBitmap, Box &box, uint16 destWidth, Color transparent, int16 srcHeight, int16 destHight) { // Note: if you want to use srcHeight and destHight parameters, remove the defaults values and // and complete the function calls at the callsites, otherwise their value can be the default -1 - for (uint16 y = 0; y < box._y2 - box._y1; ++y) - for (uint16 x = 0; x < box._x2 - box._x1; ++x) { + for (uint16 y = 0; y < box._y2 + 1 - box._y1; ++y) // + 1 for inclusive boundaries + for (uint16 x = 0; x < box._x2 + 1 - box._x1; ++x) { // + 1 for inclusive boundaries byte srcPixel = srcBitmap[srcWidth * (y + srcY) + srcX + x]; if (srcPixel != transparent) destBitmap[destWidth * (y + box._y1) + box._x1 + x] = srcPixel; @@ -1030,19 +1030,20 @@ void DisplayMan::f132_blitToBitmap(byte *srcBitmap, byte *destBitmap, Box &box, } void DisplayMan::D24_fillScreenBox(Box &box, Color color) { - uint16 width = box._x2 - box._x1; - for (int16 y = box._y1; y < box._y2; ++y) + uint16 width = box._x2 + 1 - box._x1; // + 1 for inclusive boundaries + for (int16 y = box._y1; y < box._y2 + 1; ++y) // + 1 for inclusive boundaries memset(_g348_bitmapScreen + y * _screenWidth + box._x1, color, sizeof(byte) * width); } void DisplayMan::f135_fillBoxBitmap(byte* destBitmap, Box &box, Color color, int16 pixelWidth, int16 height) { - for (int16 y = box._y1; y < box._y2; ++y) - memset(destBitmap + y * pixelWidth + box._x1, color, sizeof(byte) * (box._x2 - box._x1)); + for (int16 y = box._y1; y < box._y2 + 1; ++y) // + 1 for inclusive boundaries + memset(destBitmap + y * pixelWidth + box._x1, color, sizeof(byte) * (box._x2 - box._x1 + 1)); // + 1 for inclusive boundaries } void DisplayMan::f133_blitBoxFilledWithMaskedBitmap(byte* src, byte* dest, byte* mask, byte* tmp, Box& box, int16 lastUnitIndex, int16 firstUnitIndex, int16 destPixelWidth, Color transparent, int16 xPos, int16 yPos, int16 destHeight, int16 height2) { + // make sure to take care of inclusive boundaries warning("STUB FUNCTION: does nothing at all"); } @@ -2368,7 +2369,7 @@ T0115015_DrawProjectileAsObject: } } AL_4_xPos = coordinateSet[0]; - boxByteGreen._y2 = coordinateSet[1] + 1; + boxByteGreen._y2 = coordinateSet[1]; if (!drawProjectileAsObject) { /* If drawing an object that is not a projectile */ AL_4_xPos += g223_ShiftSets[AL_8_shiftSetIndex][g217_ObjectPileShiftSetIndices[objectShiftIndex][0]]; boxByteGreen._y2 += g223_ShiftSets[AL_8_shiftSetIndex][g217_ObjectPileShiftSetIndices[objectShiftIndex][1]]; @@ -2381,12 +2382,12 @@ T0115015_DrawProjectileAsObject: objectShiftIndex &= 0x000F; } } - boxByteGreen._y1 = boxByteGreen._y2 - (heightRedEagle - 1) - 1; - if (boxByteGreen._y2 > 136) { - boxByteGreen._y2 = 136; + boxByteGreen._y1 = boxByteGreen._y2 - (heightRedEagle - 1); + if (boxByteGreen._y2 > 135) { + boxByteGreen._y2 = 135; } - boxByteGreen._x2 = MIN(224, AL_4_xPos + byteWidth); - if (boxByteGreen._x1 = MAX(0, AL_4_xPos - byteWidth + 1)) { + boxByteGreen._x2 = MIN(223, AL_4_xPos + byteWidth); + if (boxByteGreen._x1 = MAX(0, AL_4_xPos - byteWidth)) { if (flipHorizontal) { AL_4_xPos = paddingPixelCount; } else { @@ -2402,7 +2403,7 @@ T0115015_DrawProjectileAsObject: if (AL_6_boxPtrRed->_x1 == 255) { /* If the grabbable object is the first */ *AL_6_boxPtrRed = boxByteGreen; - if ((heightGreenGoat = AL_6_boxPtrRed->_y2 - AL_6_boxPtrRed->_y1) < 15) { /* If the box is too small then enlarge it a little */ + if ((heightGreenGoat = AL_6_boxPtrRed->_y2 - AL_6_boxPtrRed->_y1) < 14) { /* If the box is too small then enlarge it a little */ heightGreenGoat = heightGreenGoat >> 1; AL_6_boxPtrRed->_y1 += heightGreenGoat - 7; if (heightGreenGoat < 4) { @@ -2648,7 +2649,7 @@ T0115077_DrawSecondHalfSquareCreature: } AL_4_yPos = coordinateSet[1]; AL_4_yPos += g223_ShiftSets[AL_8_shiftSetIndex][M23_getVerticalOffsetM23(creatureAspectInt)]; - boxByteGreen._y2 = MIN(AL_4_yPos, (int16)135) + 1; + boxByteGreen._y2 = MIN(AL_4_yPos, (int16)135); boxByteGreen._y1 = MIN(0, AL_4_yPos - (heightRedEagle - 1)); AL_4_xPos = coordinateSet[0]; AL_4_xPos += g223_ShiftSets[AL_8_shiftSetIndex][M22_getHorizontalOffsetM22(creatureAspectInt)]; @@ -2659,7 +2660,7 @@ T0115077_DrawSecondHalfSquareCreature: AL_4_xPos += 100; } } - if (boxByteGreen._x2 = 1 + MIN(MAX(0, AL_4_xPos + byteWidth), 223) <= 1) + if (!(boxByteGreen._x2 = MIN(MAX(0, AL_4_xPos + byteWidth), 223))) goto T0115126_CreatureNotVisible; if (boxByteGreen._x1 = MIN(MAX(0, AL_4_xPos - byteWidth + 1), 223)) { if (boxByteGreen._x1 == 223) @@ -2788,9 +2789,9 @@ continue; f103_flipBitmapHorizontal(AL_6_bitmapRedBanana, AL_4_normalizdByteWidth, heightRedEagle); } } - boxByteGreen._y2 = (heightRedEagle >> 1) + 47 + 1; + boxByteGreen._y2 = (heightRedEagle >> 1) + 47; boxByteGreen._y1 = 47 - (heightRedEagle >> 1) + !(heightRedEagle & 0x0001); - boxByteGreen._x2 = MIN(223, projectilePosX + byteWidth) + 1; + boxByteGreen._x2 = MIN(223, projectilePosX + byteWidth); if (boxByteGreen._x1 = MAX(0, projectilePosX - byteWidth + 1)) { if (flipHorizontal) { AL_4_xPos = paddingPixelCount; @@ -2920,14 +2921,14 @@ T0115200_DrawExplosion: if (flipHorizontal = _vm->_rnd->getRandomNumber(2)) { paddingPixelCount = (7 - ((byteWidth / 2 - 1) & 0x0007)) << 1; /* Number of unused pixels in the units on the right of the bitmap */ } - boxByteGreen._y2 = MIN(135, explosionCoordinates[1] + (heightRedEagle >> 1)) + 1; + boxByteGreen._y2 = MIN(135, explosionCoordinates[1] + (heightRedEagle >> 1)); AL_4_yPos = MAX(0, explosionCoordinates[1] - (heightRedEagle >> 1) + !(heightRedEagle & 0x0001)); if (AL_4_yPos >= 136) continue; boxByteGreen._y1 = AL_4_yPos; if ((AL_4_xPos = MIN(223, explosionCoordinates[0] + byteWidth)) < 0) continue; - boxByteGreen._x2 = AL_4_xPos + 1; + boxByteGreen._x2 = AL_4_xPos; AL_4_xPos = explosionCoordinates[0]; if (boxByteGreen._x1 = MIN(MAX(0, AL_4_xPos - byteWidth + 1), 223)) { AL_4_xPos = paddingPixelCount; @@ -2942,7 +2943,7 @@ and may cause an incorrect bitmap to be drawn */ only partly visible on the left side of the viewport (boxByteGreen.X1 = 0) and the bitmap is flipped horizontally (flipHorizontal = C1_TRUE) then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingPixelCount" must be added to the second parameter of this function call */ } - if (boxByteGreen._x2 - 1 <= boxByteGreen._x1) + if (boxByteGreen._x2 <= boxByteGreen._x1) continue; warning("might need M77_NORMALIZED_BYTE_WIDTH"); byteWidth = byteWidth; @@ -2965,7 +2966,7 @@ then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingP AL_1_viewSquareExplosionIndex -= 3; /* Convert square index for explosions back to square index */ fieldAspect = g188_FieldAspects[viewSquareIndex]; (fieldAspect._nativeBitmapRelativeIndex)++; /* NativeBitmapRelativeIndex is now the index of the Fluxcage field graphic */ - f113_drawField(&fieldAspect, *(Box*)&g163_FrameWalls[viewSquareIndex]); + f113_drawField(&fieldAspect, g163_FrameWalls[viewSquareIndex]._box); } } diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 1515229d7d..6bfb504326 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -230,6 +230,8 @@ extern uint16 g19_PalCredits[16]; // @ G0019_aui_Graphic562_Palette_Credits extern uint16 g20_PalEntrance[16]; // @ G0020_aui_Graphic562_Palette_Entrance extern uint16 g21_PalDungeonView[6][16]; // @ G0021_aaui_Graphic562_Palette_DungeonView + +// in all cases, where a function takes a Box, it expects it to contain inclusive boundaries class Box { public: uint16 _x1; @@ -237,15 +239,15 @@ public: uint16 _y1; uint16 _y2; - Box(uint16 x1, uint16 x2, uint16 y1, uint16 y2) : _x1(x1), _x2(x2 + 1), _y1(y1), _y2(y2 + 1) {} + Box(uint16 x1, uint16 x2, uint16 y1, uint16 y2) : _x1(x1), _x2(x2), _y1(y1), _y2(y2) {} Box() {} bool isPointInside(Common::Point point) { - return (_x1 <= point.x) && (point.x < _x2) && (_y1 <= point.y) && (point.y < _y2); + return (_x1 <= point.x) && (point.x <= _x2) && (_y1 <= point.y) && (point.y <= _y2); // <= because incluseive boundaries } void setToZero() { _x1 = _x2 = _y1 = _y2 = 0; } }; // @ BOX_BYTE, BOX_WORD -extern Box g2_BoxMovementArrows; // G0002_s_Graphic562_Box_MovementArrows +extern Box g2_BoxMovementArrows; // @ G0002_s_Graphic562_Box_MovementArrows class Frame { public: @@ -550,22 +552,24 @@ public: /* srcHeight and destHeight are not necessary for blitting, only error checking, thus they are defaulted for existing code which does not pass anything, newly imported calls do pass srcHeght and srcWidth, so this is a ceonvenience change so the the parameters match the original exatcly, if need arises for heights then we'll have to retrospectively add them in old function calls*/ + /* Expects inclusive boundaries in box */ void f132_blitToBitmap(byte *srcBitmap, byte *destBitmap, Box &box, uint16 srcX, uint16 srcY, uint16 srcWidth, uint16 destWidth, Color transparent = k255_ColorNoTransparency, int16 srcHeight = -1, int16 destHight = -1); // @ F0132_VIDEO_Blit - +/* Expects inclusive boundaries in box */ void f133_blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box &box, int16 lastUnitIndex, int16 firstUnitIndex, int16 destPixelWidth, Color transparent, int16 xPos, int16 yPos, int16 destHeight, int16 height2); // @ F0133_VIDEO_BlitBoxFilledWithMaskedBitmap void f129_blitToBitmapShrinkWithPalChange(byte *srcBitmap, int16 srcWidth, int16 srcHight, byte *destBitmap, int16 destWidth, int16 destHeight, byte *palChange); // @ F0129_VIDEO_BlitShrinkWithPaletteChanges - void f103_flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height); // @ F0103_DUNGEONVIEW_DrawDoorFrameBitmapFlippedHorizontally void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height); byte *f114_getExplosionBitmap(uint16 explosionAspIndex, uint16 scale, int16 &returnPixelWidth, int16 &returnHeight); // @ F0114_DUNGEONVIEW_GetExplosionBitmap void f134_fillBitmap(byte *bitmap, uint16 width, uint16 height, Color color); // @ F0134_VIDEO_FillBitmap void fillScreen(Color color); + /* Expects inclusive boundaries in box */ void D24_fillScreenBox(Box &box, Color color); // @ D24_FillScreenBox, F0550_VIDEO_FillScreenBox +/* Expects inclusive boundaries in box */ void f135_fillBoxBitmap(byte *destBitmap, Box &box, Color color, int16 pixelWidth, int16 height); // @ F0135_VIDEO_FillBox void f128_drawDungeon(direction dir, int16 posX, int16 posY); // @ F0128_DUNGEONVIEW_Draw_CPSF void updateScreen(); diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 527fea3da3..77242c1e58 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -125,18 +125,18 @@ void InventoryMan::f354_drawStatusBoxPortrait(ChampionIndex championIndex) { dispMan._g578_useByteBoxCoordinates = false; Box box; box._y1 = 0; - box._y2 = 28 + 1; + box._y2 = 28; box._x1 = championIndex * k69_ChampionStatusBoxSpacing + 7; - box._x2 = box._x1 + 31 + 1; + box._x2 = box._x1 + 31; dispMan.f132_blitToBitmap(_vm->_championMan->_gK71_champions[championIndex]._portrait, dispMan._g348_bitmapScreen, box, 0, 0, 32, k160_byteWidthScreen * 2, k255_ColorNoTransparency); } void InventoryMan::f343_drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color) { Box box; box._x1 = x; - box._x2 = box._x1 + pixelWidth + 1; + box._x2 = box._x1 + pixelWidth; box._y1 = y; - box._y2 = box._y1 + 6 + 1; + box._y2 = box._y1 + 6; _vm->_displayMan->_g578_useByteBoxCoordinates = false; _vm->_displayMan->D24_fillScreenBox(box, color); } @@ -331,8 +331,8 @@ void InventoryMan::f333_openAndDrawChest(Thing thingToOpen, Container* chest, bo void InventoryMan::f332_drawIconToViewport(IconIndice iconIndex, int16 xPos, int16 yPos) { static byte iconBitmap[16 * 16]; Box box; - box._x2 = (box._x1 = xPos) + 15 + 1; - box._y2 = (box._y1 = yPos) + 15 + 1; + box._x2 = (box._x1 = xPos) + 15; + box._y2 = (box._y1 = yPos) + 15; _vm->_objectMan->f36_extractIconFromBitmap(iconIndex, iconBitmap); _vm->_displayMan->f132_blitToBitmap(iconBitmap, _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 16, k112_byteWidthViewport * 2, k255_ColorNoTransparency); } diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 38b974bb79..196fab740f 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -85,9 +85,9 @@ void MenuMan::f386_drawActionIcon(ChampionIndex championIndex) { Box box;
box._x1 = championIndex * 22 + 233;
- box._x2 = box._x1 + 19 + 1;
+ box._x2 = box._x1 + 19;
box._y1 = 86;
- box._y2 = 120 + 1;
+ box._y2 = 120;
dm._g578_useByteBoxCoordinates = false;
if (!champion._currHealth) {
dm.D24_fillScreenBox(box, k0_ColorBlack);
@@ -110,9 +110,9 @@ T0386006: dm.D24_fillScreenBox(box, k4_ColorCyan);
Box box2;
box2._x1 = box._x1 + 2;
- box2._x2 = box._x2 - 2; // no need to add +1 for exclusive boundaries, box already has that
+ box2._x2 = box._x2 - 2;
box2._y1 = 95;
- box2._y2 = 110 + 1;
+ box2._y2 = 110;
dm.f132_blitToBitmap(bitmapIcon, dm._g348_bitmapScreen, box2, 0, 0, 16, k160_byteWidthScreen * 2, k255_ColorNoTransparency);
if (champion.getAttributes(k0x0008_ChampionAttributeDisableAction) || _vm->_championMan->_g299_candidateChampionOrdinal || _vm->_championMan->_g300_partyIsSleeping) {
warning("MISSING CODE: F0136_VIDEO_ShadeScreenBox");
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp index 2daf3e12bb..1d8b7800bb 100644 --- a/engines/dm/objectman.cpp +++ b/engines/dm/objectman.cpp @@ -209,8 +209,8 @@ void ObjectMan::f38_drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) { Box box; box._x1 = slotBox->_x; box._y1 = slotBox->_y; - box._x2 = box._x1 + 15 + 1; - box._y2 = box._y1 + 15 + 1; + box._x2 = box._x1 + 15; + box._y2 = box._y1 + 15; uint16 iconGraphicIndex; for (iconGraphicIndex = 0; iconGraphicIndex < 7; ++iconGraphicIndex) { |