Skip to content

Commit

Permalink
DM: Remove blitToScreen overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 883370e commit ce1c52b
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 124 deletions.
37 changes: 24 additions & 13 deletions engines/dm/champion.cpp
Expand Up @@ -751,7 +751,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
if (_g407_party._shieldDefense > 0)
nativeBitmapIndices[AL_0_borderCount++] = k37_BorderPartyShieldIndice;
while (AL_0_borderCount--) {
dispMan.blitToScreen(dispMan.getBitmap(nativeBitmapIndices[AL_0_borderCount]), 80, 0, 0, box, k10_ColorFlesh);
dispMan.blitToBitmap(dispMan.getBitmap(nativeBitmapIndices[AL_0_borderCount]), 80, 0, 0,
dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, box, k10_ColorFlesh);
}
if (isInventoryChamp) {
invMan.drawStatusBoxPortrait(champIndex);
Expand All @@ -760,8 +761,9 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
champAttributes |= (k0x0080_ChampionAttributeNameTitle | k0x0100_ChampionAttributeStatistics | k0x2000_ChampionAttributeWounds | k0x8000_ChampionAttributeActionHand);
}
} else {
dispMan.blitToScreen(dispMan.getBitmap(k8_StatusBoxDeadChampion), 80, 0, 0, box, k255_ColorNoTransparency);
_vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, champ->_name);
dispMan.blitToBitmap(dispMan.getBitmap(k8_StatusBoxDeadChampion), 80, 0, 0,
dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, box, k255_ColorNoTransparency);
_vm->_textMan->f53_printToLogicalScreen(champStatusBoxX + 1, 5, k13_ColorLightestGray, k1_ColorDarkGary, champ->_name);
menuMan.drawActionIcon(champIndex);
goto T0292042_green;
}
Expand All @@ -788,7 +790,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
box._x1 = champStatusBoxX;
box._x2 = box._x1 + 42 + 1;
dispMan.clearScreenBox(k1_ColorDarkGary, box);
_vm->_textMan->printTextToScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, k1_ColorDarkGary, champ->_name);
_vm->_textMan->f53_printToLogicalScreen(champStatusBoxX + 1, 5, AL_0_colorIndex, k1_ColorDarkGary, champ->_name);
}
}

Expand All @@ -802,7 +804,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
} else {
AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
}
dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxMouth, k12_ColorDarkestGray, g296_DungeonViewport);
dispMan.blitToBitmap(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0,
dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, gBoxMouth, k12_ColorDarkestGray);
AL_2_nativeBitmapIndex = k33_SlotBoxNormalIndice;
for (int16 AL_0_statisticIndex = k1_ChampionStatStrength; AL_0_statisticIndex <= k6_ChampionStatAntifire; AL_0_statisticIndex++) {
if (champ->getStatistic((ChampionStatisticType)AL_0_statisticIndex, k1_ChampionStatCurrent)
Expand All @@ -811,7 +814,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
break;
}
}
dispMan.blitToScreen(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0, gBoxEye, k12_ColorDarkestGray, g296_DungeonViewport);
dispMan.blitToBitmap(dispMan.getBitmap(AL_2_nativeBitmapIndex), 32, 0, 0,
dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, gBoxEye, k12_ColorDarkestGray);
champAttributes |= k0x4000_ChampionAttributeViewport;
}
}
Expand Down Expand Up @@ -854,8 +858,8 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {

if ((champAttributes & k28_ChampionIcons) && (eventMan._g599_useChampionIconOrdinalAsMousePointerBitmap != _vm->indexToOrdinal(AL_0_championIconIndex))) {
dispMan.clearScreenBox(g46_ChampionColor[champIndex], g54_BoxChampionIcons[AL_0_championIconIndex]);
dispMan.blitToScreen(dispMan.getBitmap(k28_ChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_g308_partyDir) * 19, 0,
g54_BoxChampionIcons[AL_0_championIconIndex], k12_ColorDarkestGray);
dispMan.blitToBitmap(dispMan.getBitmap(k28_ChampionIcons), 80, championIconIndex(champ->_dir, _vm->_dungeonMan->_g308_partyDir) * 19, 0,
dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g54_BoxChampionIcons[AL_0_championIconIndex], k12_ColorDarkestGray);
}
}

Expand All @@ -881,7 +885,7 @@ void ChampionMan::drawChampionState(ChampionIndex champIndex) {
}

if (champAttributes & k0x4000_ChampionAttributeViewport) {
warning("MISSGIN CODE: F0097_DUNGEONVIEW_DrawViewport");
dispMan.f97_drawViewport(k0_viewportNotDungeonView);
}


Expand Down Expand Up @@ -975,8 +979,13 @@ void ChampionMan::drawSlot(uint16 champIndex, ChampionSlot slotIndex) {

if (nativeBitmapIndex != -1) {
_vm->_displayMan->_g578_useByteBoxCoordinates = false;
_vm->_displayMan->blitToScreen(_vm->_displayMan->getBitmap(nativeBitmapIndex), 32, 0, 0,
box, k12_ColorDarkestGray, isInventoryChamp ? g296_DungeonViewport : gDefultViewPort);
if (isInventoryChamp) {
_vm->_displayMan->blitToBitmap(_vm->_displayMan->getBitmap(nativeBitmapIndex), 32, 0, 0,
_vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport * 2, box, k12_ColorDarkestGray);
} else {
_vm->_displayMan->blitToBitmap(_vm->_displayMan->getBitmap(nativeBitmapIndex), 32, 0, 0,
_vm->_displayMan->_g348_bitmapScreen, k160_byteWidthScreen * 2, box, k12_ColorDarkestGray);
}
}

_vm->_objectMan->drawIconInSlotBox(slotBoxIndex, iconIndex);
Expand All @@ -998,8 +1007,9 @@ void ChampionMan::renameChampion(Champion* champ) {
box._x1 = 3;
box._x2 = box._x1 + 167;

dispMan.clearScreenBox(k12_ColorDarkestGray, box, g296_DungeonViewport);
dispMan.blitToScreen(dispMan.getBitmap(k27_PanelRenameChampionIndice), 144, 0, 0, g32_BoxPanel, k4_ColorCyan, g296_DungeonViewport);
dispMan.f135_fillBoxBitmap(dispMan._g296_bitmapViewport, box, k12_ColorDarkestGray, k112_byteWidthViewport * 2, k136_heightViewport);
dispMan.blitToBitmap(dispMan.getBitmap(k27_PanelRenameChampionIndice), 144, 0, 0,
dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, g32_BoxPanel, k4_ColorCyan);
textMan.printToViewport(177, 58, k13_ColorLightestGray, "_______");
textMan.printToViewport(105, 76, k13_ColorLightestGray, "___________________");
Common::Point clickPos;
Expand All @@ -1009,6 +1019,7 @@ void ChampionMan::renameChampion(Champion* champ) {
if (_vm->_eventMan->hasPendingClick(clickPos, k1_LeftMouseButton) && okButtonBox.isPointInside(clickPos)) {
return;
}
dispMan.f97_drawViewport(k0_viewportNotDungeonView);
dispMan.updateScreen();
}
}
Expand Down
7 changes: 5 additions & 2 deletions engines/dm/dm.cpp
Expand Up @@ -263,11 +263,14 @@ void DMEngine::gameloop() {

if (!_inventoryMan->_g432_inventoryChampionOrdinal && !_championMan->_g300_partyIsSleeping) {
Box box(0, 224, 0, 126);
_displayMan->clearScreenBox(k0_ColorBlack, box, g296_DungeonViewport); // dummy code
_displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport * 2, k136_heightViewport); // dummy code
_displayMan->drawDungeon(_dungeonMan->_g308_partyDir, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY);
}
// DUMMY CODE: next line

// DUMMY CODE: next 2 lines
_menuMan->drawMovementArrows();
_displayMan->f97_drawViewport(k1_viewportDungeonView);

_displayMan->updateScreen();
_system->delayMillis(10);
}
Expand Down
3 changes: 3 additions & 0 deletions engines/dm/dm.h
Expand Up @@ -96,6 +96,9 @@ enum Cell {
k3_CellSouthWest = 3 // @ C03_CELL_SOUTHWEST
};

#define kM1_mapIndexNone -1 // @ CM1_MAP_INDEX_NONE
#define k255_mapIndexEntrance 255 // @ C255_MAP_INDEX_ENTRANCE

class Thing {
uint16 _data;
public:
Expand Down
65 changes: 29 additions & 36 deletions engines/dm/gfx.cpp
Expand Up @@ -577,8 +577,6 @@ byte g222_PalChangesCreature_D2[16] = {0, 10, 20, 30, 40, 30, 60, 70, 50, 0, 0,



Viewport gDefultViewPort(0, 0, 320, 200);
Viewport g296_DungeonViewport(0, 33, 224, 136); // @ G0296_puc_Bitmap_Viewport

byte g17_PalChangesNoChanges[16] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150}; // @ G0017_auc_Graphic562_PaletteChanges_NoChanges

Expand Down Expand Up @@ -955,7 +953,7 @@ void DisplayMan::f565_viewportSetPalette(uint16* middleScreenPalette, uint16* to

void DisplayMan::f566_viewportBlitToScreen() {
warning("MISSING FUNCTIONALITY: using correct colorpalette");
Box box(0, 33, 223, 135);
Box box(0, 223, 33, 33 + 135);

blitToBitmap(_g296_bitmapViewport, k112_byteWidthViewport * 2, 0, 0, _g348_bitmapScreen, k160_byteWidthScreen * 2, box, k255_ColorNoTransparency);
}
Expand Down Expand Up @@ -1020,12 +1018,12 @@ void DisplayMan::loadIntoBitmap(uint16 index, byte *destBitmap) {
}


void DisplayMan::blitToBitmap(byte* srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, byte* destBitmap, uint16 destWidth, Box& box, Color transparent, Viewport& viewport) {
void DisplayMan::blitToBitmap(byte* srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, byte* destBitmap, uint16 destWidth, Box& box, Color transparent) {
for (uint16 y = 0; y < box._y2 - box._y1; ++y)
for (uint16 x = 0; x < box._x2 - box._x1; ++x) {
byte srcPixel = srcBitmap[srcWidth * (y + srcY) + srcX + x];
if (srcPixel != transparent)
destBitmap[destWidth * (y + box._y1 + viewport._posY) + box._x1 + x + viewport._posX] = srcPixel;
destBitmap[destWidth * (y + box._y1) + box._x1 + x] = srcPixel;
}

}
Expand All @@ -1035,30 +1033,24 @@ void DisplayMan::blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight
memcpy(destBitmap + destWidth*(y + destY) + destX, srcBitmap + y * srcWidth, sizeof(byte)* srcWidth);
}

void DisplayMan::clearScreenBox(Color color, Box &box, Viewport &viewport) {
void DisplayMan::clearScreenBox(Color color, Box &box) {
uint16 width = box._x2 - box._x1;
for (int y = box._y1 + viewport._posY; y < box._y2 + viewport._posY; ++y)
memset(_g348_bitmapScreen + y * _screenWidth + box._x1 + viewport._posX, color, sizeof(byte) * width);
for (int16 y = box._y1; y < box._y2; ++y)
memset(_g348_bitmapScreen + y * _screenWidth + box._x1, color, sizeof(byte) * width);
}

void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
Box &box,
Color transparent, Viewport &viewport) {
blitToBitmap(srcBitmap, srcWidth, srcX, srcY, _g348_bitmapScreen, k160_byteWidthScreen * 2, box, transparent, viewport);
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));
}

void DisplayMan::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, Viewport &viewport) {
int16 xPos, int16 yPos, int16 destHeight, int16 height2) {
warning("STUB FUNCTION: does nothing at all");
}


void DisplayMan::blitBoxFilledWithMaskedBitmapToScreen(byte* src, byte* mask, byte* tmp, Box& box,
int16 lastUnitIndex, int16 firstUnitIndex, int16 destPixelWidth, Color transparent,
int16 xPos, int16 yPos, int16 destHeight, int16 height2, Viewport& viewport) {
blitBoxFilledWithMaskedBitmap(src, _g348_bitmapScreen, mask, tmp, box, lastUnitIndex, firstUnitIndex, _screenWidth, transparent, xPos, yPos, _screenHeight, height2, viewport);
}

void DisplayMan::flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height) {
for (uint16 y = 0; y < height; ++y) {
Expand Down Expand Up @@ -1166,12 +1158,12 @@ void DisplayMan::f99_copyBitmapAndFlipHorizontal(byte* srcBitmap, byte* destBitm

void DisplayMan::drawWallSetBitmapWithoutTransparency(byte *bitmap, Frame &f) {
if (f._srcWidth)
blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, k255_ColorNoTransparency, g296_DungeonViewport);
blitToBitmap(bitmap, f._srcWidth, f._srcX, f._srcY, _g296_bitmapViewport, k112_byteWidthViewport * 2, f._box, k255_ColorNoTransparency);
}

void DisplayMan::drawWallSetBitmap(byte *bitmap, Frame &f) {
if (f._srcWidth)
blitToScreen(bitmap, f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(bitmap, f._srcWidth, f._srcX, f._srcY, _g296_bitmapViewport, k112_byteWidthViewport * 2, f._box, k10_ColorFlesh);
}


Expand Down Expand Up @@ -1578,6 +1570,7 @@ void DisplayMan::drawDungeon(direction dir, int16 posX, int16 posY) {
}

delete[] tmpBitmap;
f97_drawViewport((_vm->_dungeonMan->_g309_partyMapIndex != k255_mapIndexEntrance) ? 1 : 0);
}

void DisplayMan::clearScreen(Color color) {
Expand Down Expand Up @@ -1752,16 +1745,15 @@ void DisplayMan::applyCreatureReplColors(int replacedColor, int replacementColor
}

void DisplayMan::drawFloorPitOrStairsBitmap(uint16 nativeIndex, Frame &f) {
if (f._srcWidth) {
blitToScreen(_bitmaps[nativeIndex], f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, g296_DungeonViewport);
}
if (f._srcWidth)
blitToBitmap(_bitmaps[nativeIndex], f._srcWidth, f._srcX, f._srcY, _g296_bitmapViewport, k112_byteWidthViewport * 2, f._box, k10_ColorFlesh);
}

void DisplayMan::drawFloorPitOrStairsBitmapFlippedHorizontally(uint16 nativeIndex, Frame &f) {
if (f._srcWidth) {
blitToBitmap(_bitmaps[nativeIndex], f._srcWidth, f._srcHeight, _g74_tmpBitmap, f._srcWidth);
flipBitmapHorizontal(_g74_tmpBitmap, f._srcWidth, f._srcHeight);
blitToScreen(_g74_tmpBitmap, f._srcWidth, f._srcX, f._srcY, f._box, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(_g74_tmpBitmap, f._srcWidth, f._srcX, f._srcY, _g296_bitmapViewport, k112_byteWidthViewport * 2, f._box, k10_ColorFlesh);
}
}

Expand Down Expand Up @@ -1826,7 +1818,8 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
if (viewWallIndex == k12_ViewWall_D1C_FRONT) {
if (isInscription) {
Frame &D1CFrame = g163_FrameWalls[k6_ViewSquare_D1C];
blitToScreen(_g700_bitmapWallSet_Wall_D1LCR, D1CFrame._srcWidth, 94, 28, g202_BoxWallPatchBehindInscription, k255_ColorNoTransparency, g296_DungeonViewport);
blitToBitmap(_g700_bitmapWallSet_Wall_D1LCR, D1CFrame._srcWidth, 94, 28, _g296_bitmapViewport, k112_byteWidthViewport * 2,
g202_BoxWallPatchBehindInscription, k255_ColorNoTransparency);

unsigned char *string = inscriptionString;
bitmapRed = _bitmaps[k120_InscriptionFontIndice];
Expand All @@ -1840,7 +1833,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
frame._box._x2 = (frame._box._x1 = 112 - (characterCount * 4)) + 7;
frame._box._y1 = (frame._box._y2 = g203_InscriptionLineY[textLineIndex++]) - 7;
while (characterCount--) {
blitToScreen(bitmapRed, 288, (*string++) * 8, 0, frame._box, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(bitmapRed, 288, (*string++) * 8, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, frame._box, k10_ColorFlesh);
frame._box._x1 += 8;
frame._box._x2 += 8;
}
Expand Down Expand Up @@ -1929,12 +1922,12 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex
coordinateSetA[3] = g204_UnreadableInscriptionBoxY2[g190_WallOrnDerivedBitmapIndexIncrement[viewWallIndex] * 3 + unreadableTextLineCount - 1];
}
}
blitToScreen(bitmapGreen, coordinateSetA[4], var_X, 0, *(Box*)coordinateSetA, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(bitmapGreen, coordinateSetA[4], var_X, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, *(Box*)coordinateSetA, k10_ColorFlesh);

if ((viewWallIndex == k12_ViewWall_D1C_FRONT) && _g289_championPortraitOrdinal--) {
Box &box = g109_BoxChampionPortraitOnWall;
blitToScreen(_bitmaps[k26_ChampionPortraitsIndice], 256, (_g289_championPortraitOrdinal & 0x7) << 5, (_g289_championPortraitOrdinal >> 3) * 29,
box, k1_ColorDarkGary, g296_DungeonViewport);
blitToBitmap(_bitmaps[k26_ChampionPortraitsIndice], 256, (_g289_championPortraitOrdinal & 0x7) << 5, (_g289_championPortraitOrdinal >> 3) * 29,
_g296_bitmapViewport, k112_byteWidthViewport * 2, box, k1_ColorDarkGary);
}
return isAlcove;
}
Expand Down Expand Up @@ -2441,7 +2434,7 @@ creatures are drawn in the right order and so that Fluxcages are not drawn twice
AL_6_bitmapRedBanana = bitmapGreenAnt;
dunMan._g292_pileTopObject[AL_2_viewCell] = thingParam; /* The object is at the top of the pile */
}
blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, boxByteGreen, k10_ColorFlesh);

if (drawProjectileAsObject)
goto T0115171_BackFromT0115015_DrawProjectileAsObject;
Expand Down Expand Up @@ -2692,7 +2685,7 @@ creatures are drawn in the right order and so that Fluxcages are not drawn twice
AL_0_creaturePosX = creaturePaddingPixelCount + (byteWidth - AL_4_xPos - 1);
}
warning("SUPER WARNINIG: we might nee noralized with on byteWidth");
blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_0_creaturePosX, 0, boxByteGreen, (Color)transparentColor, g296_DungeonViewport);
blitToBitmap(AL_6_bitmapRedBanana, byteWidth, AL_0_creaturePosX, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, boxByteGreen, (Color)transparentColor);

T0115126_CreatureNotVisible:
if (twoHalfSquareCreaturesFrontView) {
Expand Down Expand Up @@ -2827,7 +2820,7 @@ the bitmap is flipped horizontally (flipHorizontal = C1_TRUE) then a wrong part
screen. To fix this bug, "+ paddingPixelCount" must be added to the second parameter of this function call */
AL_4_xPos = MAX(paddingPixelCount, (int16)(byteWidth - projectilePosX - 1));
}
blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, boxByteGreen, k10_ColorFlesh);
} else { /* Positive value: projectile aspect is the index of a OBJECT_ASPECT */
useAlcoveObjectImage = false;
projectileCoordinates[0] = projectilePosX;
Expand Down Expand Up @@ -2914,9 +2907,9 @@ T0115171_BackFromT0115015_DrawProjectileAsObject:;
blitToBitmapShrinkWithPalChange(AL_6_bitmapRedBanana, 48, 32, _g74_tmpBitmap, 48, 32, g212_PalChangeSmoke);
AL_6_bitmapRedBanana = _g74_tmpBitmap;
}
blitBoxFilledWithMaskedBitmapToScreen(AL_6_bitmapRedBanana, nullptr, getDerivedBitmap(k0_DerivedBitmapViewport), g105_BoxExplosionPattern_D0C,
_vm->_rnd->getRandomNumber(4) + 87, _vm->_rnd->getRandomNumber(64),
224, (Color)(k0x0080_BlitDoNotUseMask | k10_ColorFlesh), 0, 0, 136, 93);
blitBoxFilledWithMaskedBitmap(AL_6_bitmapRedBanana, _g296_bitmapViewport, nullptr, getDerivedBitmap(k0_DerivedBitmapViewport), g105_BoxExplosionPattern_D0C,
_vm->_rnd->getRandomNumber(4) + 87, _vm->_rnd->getRandomNumber(64),
224, (Color)(k0x0080_BlitDoNotUseMask | k10_ColorFlesh), 0, 0, 136, 93);
warning("IGNORED CODE: F0493_CACHE_AddDerivedBitmap");
warning("IGNORED CODE: F0493_CACHE_AddDerivedBitmap");
} else {
Expand Down Expand Up @@ -2979,7 +2972,7 @@ then a wrong part of the bitmap is drawn on screen. To fix this bug, "+ paddingP
if (flipVertical) {
flipBitmapVertical(AL_6_bitmapRedBanana, byteWidth, heightRedEagle);
}
blitToScreen(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, boxByteGreen, k10_ColorFlesh, g296_DungeonViewport);
blitToBitmap(AL_6_bitmapRedBanana, byteWidth, AL_4_xPos, 0, _g296_bitmapViewport, k112_byteWidthViewport * 2, boxByteGreen, k10_ColorFlesh);
}
}
} while ((thingParam = dunMan.getNextThing(thingParam)) != Thing::_endOfList);
Expand Down

0 comments on commit ce1c52b

Please sign in to comment.