diff options
Diffstat (limited to 'engines/dm/inventory.cpp')
-rw-r--r-- | engines/dm/inventory.cpp | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 1d1eb5e8c9..9718a57be2 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -128,8 +128,7 @@ void InventoryMan::f354_drawStatusBoxPortrait(ChampionIndex championIndex) { box._y2 = 28 + 1; box._x1 = championIndex * k69_ChampionStatusBoxSpacing + 7; box._x2 = box._x1 + 31 + 1; - dispMan.f132_blitToBitmap(_vm->_championMan->_gK71_champions[championIndex]._portrait, 32, 0, 0, - dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, box, k255_ColorNoTransparency); + 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) { @@ -162,15 +161,11 @@ void InventoryMan::f345_drawPanelFoodWaterPoisoned() { Champion &champ = _vm->_championMan->_gK71_champions[_g432_inventoryChampionOrdinal]; f334_closeChest(); DisplayMan &dispMan = *_vm->_displayMan; - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k20_PanelEmptyIndice), 144, 0, 0, - dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g32_BoxPanel, k8_ColorRed); - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k30_FoodLabelIndice), 48, 0, 0, - dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g35_BoxFood, k12_ColorDarkestGray); - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k31_WaterLabelIndice), 48, 0, 0, - dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g36_BoxWater, k12_ColorDarkestGray); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k20_PanelEmptyIndice), dispMan._g348_bitmapScreen, g32_BoxPanel, 0, 0, 144, k160_byteWidthScreen * 2, k8_ColorRed); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k30_FoodLabelIndice), dispMan._g348_bitmapScreen, g35_BoxFood, 0, 0, 48, k160_byteWidthScreen * 2, k12_ColorDarkestGray); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k31_WaterLabelIndice), dispMan._g348_bitmapScreen, g36_BoxWater, 0, 0, 48, k160_byteWidthScreen * 2, k12_ColorDarkestGray); if (champ._poisonEventCount) { - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k32_PoisionedLabelIndice), 96, 0, 0, - dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g37_BoxPoisoned, k12_ColorDarkestGray); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k32_PoisionedLabelIndice), dispMan._g348_bitmapScreen, g37_BoxPoisoned, 0, 0, 96, k160_byteWidthScreen * 2, k12_ColorDarkestGray); } f344_drawPanelFoodOrWaterBar(champ._food, 69, k5_ColorLightBrown); f344_drawPanelFoodOrWaterBar(champ._water, 92, k14_ColorBlue); @@ -178,8 +173,7 @@ void InventoryMan::f345_drawPanelFoodWaterPoisoned() { void InventoryMan::f346_drawPanelResurrectReincarnate() { _g424_panelContent = k5_PanelContentResurrectReincarnate; - _vm->_displayMan->f132_blitToBitmap(_vm->_displayMan->f489_getBitmap(k40_PanelResurectReincaranteIndice), 144, 0, 0, - _vm->_displayMan->_g296_bitmapViewport, k112_byteWidthViewport * 2, g32_BoxPanel, k6_ColorDarkGreen); + _vm->_displayMan->f132_blitToBitmap(_vm->_displayMan->f489_getBitmap(k40_PanelResurectReincaranteIndice), _vm->_displayMan->_g296_bitmapViewport, g32_BoxPanel, 0, 0, 144, k112_byteWidthViewport * 2, k6_ColorDarkGreen); } void InventoryMan::f347_drawPanel() { @@ -262,7 +256,7 @@ void InventoryMan::f341_drawPanelScroll(Scroll* scroll) { charRed++; } *charRed = '\0'; - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k23_PanelOpenScrollIndice), 144, 0, 0, dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, g32_BoxPanel, k8_ColorRed); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k23_PanelOpenScrollIndice), dispMan._g296_bitmapViewport, g32_BoxPanel, 0, 0, 144, k112_byteWidthViewport * 2, k8_ColorRed); int16 lineCount = 1; charRed++; char *charGreen = charRed; // first char of the second line @@ -314,7 +308,7 @@ void InventoryMan::f333_openAndDrawChest(Thing thingToOpen, Container* chest, bo if (!isPressingEye) { objMan.f38_drawIconInSlotBox(k9_SlotBoxInventoryActionHand, k145_IconIndiceContainerChestOpen); } - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k25_PanelOpenChestIndice), 144, 0, 0, dispMan._g348_bitmapScreen, k160_byteWidthScreen * 2, g32_BoxPanel, k8_ColorRed); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k25_PanelOpenChestIndice), dispMan._g348_bitmapScreen, g32_BoxPanel, 0, 0, 144, k160_byteWidthScreen * 2, k8_ColorRed); int16 chestSlotIndex = 0; Thing thing = chest->getSlot(); @@ -340,8 +334,7 @@ void InventoryMan::f332_drawIconToViewport(IconIndice iconIndex, int16 xPos, int box._x2 = (box._x1 = xPos) + 15 + 1; box._y2 = (box._y1 = yPos) + 15 + 1; _vm->_objectMan->f36_extractIconFromBitmap(iconIndex, iconBitmap); - _vm->_displayMan->f132_blitToBitmap(iconBitmap, 16, 0, 0, _vm->_displayMan->_g296_bitmapViewport, - k112_byteWidthViewport * 2, box, k255_ColorNoTransparency); + _vm->_displayMan->f132_blitToBitmap(iconBitmap, _vm->_displayMan->_g296_bitmapViewport, box, 0, 0, 16, k112_byteWidthViewport * 2, k255_ColorNoTransparency); } void InventoryMan::f336_buildObjectAttributeString(int16 potentialAttribMask, int16 actualAttribMask, char** attribStrings, char* destString, char* prefixString, char* suffixString) { @@ -415,8 +408,7 @@ Box g33_BoxArrowOrEye = Box(83, 98, 57, 65); // @ G0033_s_Graphic562_Box_ArrowOr void InventoryMan::f339_drawPanelArrowOrEye(bool pressingEye) { DisplayMan &dispMan = *_vm->_displayMan; - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(pressingEye ? k19_EyeForObjectDescriptionIndice : k18_ArrowForChestContentIndice), - 16, 0, 0, dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, g33_BoxArrowOrEye, k8_ColorRed); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(pressingEye ? k19_EyeForObjectDescriptionIndice : k18_ArrowForChestContentIndice), dispMan._g296_bitmapViewport, g33_BoxArrowOrEye, 0, 0, 16, k112_byteWidthViewport * 2, k8_ColorRed); } @@ -448,10 +440,8 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { f333_openAndDrawChest(thingToDraw, (Container*)rawThingPtr, pressingEye); } else { IconIndice iconIndex = objMan.f33_getIconIndex(thingToDraw); - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k20_PanelEmptyIndice), 144, 0, 0, - dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, g32_BoxPanel, k8_ColorRed); - dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k29_ObjectDescCircleIndice), 32, 0, 0, - dispMan._g296_bitmapViewport, k112_byteWidthViewport * 2, g34_BoxObjectDescCircle, k12_ColorDarkestGray); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k20_PanelEmptyIndice), dispMan._g296_bitmapViewport, g32_BoxPanel, 0, 0, 144, k112_byteWidthViewport * 2, k8_ColorRed); + dispMan.f132_blitToBitmap(dispMan.f489_getBitmap(k29_ObjectDescCircleIndice), dispMan._g296_bitmapViewport, g34_BoxObjectDescCircle, 0, 0, 32, k112_byteWidthViewport * 2, k12_ColorDarkestGray); char *descString = nullptr; char str[40]; @@ -552,7 +542,7 @@ void InventoryMan::f342_drawPanelObject(Thing thingToDraw, bool pressingEye) { strcat(str, "."); // TODO: localization weight -= (weight / 10) * 10; - strcat(str, champMan.f288_getStringFromInteger(weight, false, 1).c_str()); + strcat(str, champMan.f288_getStringFromInteger(weight, false, 1).c_str()); strcat(str, " KG."); // TODO: localization |