diff options
author | Bendegúz Nagy | 2016-07-28 19:27:58 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | e9622e27b16fda6c5e87d092f2ad477c35966fc1 (patch) | |
tree | 4332a0e211b3e7cb45af7afd0f750be87524b468 /engines/dm | |
parent | e0d89afbc30a36d5825e637a06da0e695a91b57a (diff) | |
download | scummvm-rg350-e9622e27b16fda6c5e87d092f2ad477c35966fc1.tar.gz scummvm-rg350-e9622e27b16fda6c5e87d092f2ad477c35966fc1.tar.bz2 scummvm-rg350-e9622e27b16fda6c5e87d092f2ad477c35966fc1.zip |
DM: Add f349_processCommand70_clickOnMouth
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/TODOs/todo.txt | 3 | ||||
-rw-r--r-- | engines/dm/eventman.cpp | 20 | ||||
-rw-r--r-- | engines/dm/eventman.h | 3 | ||||
-rw-r--r-- | engines/dm/inventory.cpp | 194 | ||||
-rw-r--r-- | engines/dm/inventory.h | 2 | ||||
-rw-r--r-- | engines/dm/menus.cpp | 43 | ||||
-rw-r--r-- | engines/dm/objectman.cpp | 9 | ||||
-rw-r--r-- | engines/dm/objectman.h | 2 |
8 files changed, 247 insertions, 29 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt index db6733a365..3bbcf6bdfe 100644 --- a/engines/dm/TODOs/todo.txt +++ b/engines/dm/TODOs/todo.txt @@ -5,6 +5,9 @@ Bugs: Arrow and hand display is messed up Items are displayed in the wrong cells + Gui is messed up by drawn spell area line on startup + Spellcasting tabs are displayed inproperly, switching between them is possible tho + Logic: When object are put on the right side of the current square, they disappear diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index fbfc6e0f4c..83e07eb1f7 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -357,6 +357,7 @@ EventManager::EventManager(DMEngine *vm) : _vm(vm) { _g444_secondaryKeyboardInput = nullptr; _g597_ignoreMouseMovements = false; _g587_hideMousePointerRequestCount = 0; + _g558_mouseButtonStatus = 0; } EventManager::~EventManager() { @@ -529,6 +530,9 @@ void EventManager::f77_hideMouse() { // CursorMan.showMouse(false); } +bool EventManager::isMouseButtonDown(MouseButton button) { + return (button != k0_NoneMouseButton) ? (_g558_mouseButtonStatus & button) : (_g558_mouseButtonStatus == 0); +} void EventManager::setMousePos(Common::Point pos) { _vm->_system->warpMouse(pos.x, pos.y); @@ -576,15 +580,24 @@ Common::EventType EventManager::processInput(Common::Event *grabKey, Common::Eve _mousePos = event.mouse; break; case Common::EVENT_LBUTTONDOWN: - case Common::EVENT_RBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: { + MouseButton button = (event.type == Common::EVENT_LBUTTONDOWN) ? k1_LeftMouseButton : k2_RightMouseButton; + _g558_mouseButtonStatus |= button; if (grabMouseClick) { *grabMouseClick = event; return event.type; } _g436_pendingClickPresent = true; _g437_pendingClickPos = _mousePos; - _g439_pendingClickButton = (event.type == Common::EVENT_LBUTTONDOWN) ? k1_LeftMouseButton : k2_RightMouseButton; + _g439_pendingClickButton = button; + break; + } + case Common::EVENT_LBUTTONUP: + case Common::EVENT_RBUTTONUP: { + MouseButton button = (event.type == Common::EVENT_LBUTTONDOWN) ? k1_LeftMouseButton : k2_RightMouseButton; + _g558_mouseButtonStatus &= ~button; break; + } default: break; } @@ -705,7 +718,7 @@ void EventManager::f380_processCommandQueue() { return; } if (cmdType == k70_CommandClickOnMouth) { - warning(false, "MISSING CODE: F0349_INVENTORY_ProcessCommand70_ClickOnMouth();"); + _vm->_inventoryMan->f349_processCommand70_clickOnMouth(); return; } if (cmdType == k71_CommandClickOnEye) { @@ -749,7 +762,6 @@ void EventManager::f380_processCommandQueue() { } if (cmdType == k140_CommandSaveGame) { if ((_vm->_championMan->_g305_partyChampionCount > 0) && !_vm->_championMan->_g299_candidateChampionOrdinal) { - warning(false, "MISSING CODE: F0433_STARTEND_ProcessCommand140_SaveGame_CPSCDF();"); _vm->f433_processCommand140_saveGame(1, "Nice save:)"); } return; diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h index 731044eee7..a12cc2e852 100644 --- a/engines/dm/eventman.h +++ b/engines/dm/eventman.h @@ -249,6 +249,7 @@ class EventManager { byte *_gK190_mousePointerTempBuffer; // @ K0190_puc_Bitmap_MousePointerTemporaryBuffer int16 _gK104_mousePointerType; // @ K0104_i_MousePointerType int16 _gK105_previousMousePointerType; // @ K0105_i_PreviousMousePointerType + uint16 _g558_mouseButtonStatus;// @ G0588_i_MouseButtonsStatus // this doesn't seem to be used anywhere at all bool _g435_isCommandQueueLocked; // @ G0435_B_CommandQueueLocked @@ -258,7 +259,6 @@ class EventManager { void f366_commandMoveParty(CommandType cmdType); // @ F0366_COMMAND_ProcessTypes3To6_MoveParty bool f375_processType80_clickDungeonView_isLeaderHandObjThrown(int16 posX, int16 posY); // @ F0375_COMMAND_ProcessType80_ClickInDungeonView_IsLeaderHandObjectThrown - public: explicit EventManager(DMEngine *vm); ~EventManager(); @@ -282,6 +282,7 @@ public: void f69_setMousePointer(); // @ F0069_MOUSE_SetPointer void f78_showMouse(); // @ F0077_MOUSE_HidePointer_CPSE void f77_hideMouse(); // @ F0078_MOUSE_ShowPointer + bool isMouseButtonDown(MouseButton button); void setMousePos(Common::Point pos); Common::Point getMousePos() { return _mousePos; } diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 86b78bdb2b..52e70d4e62 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -32,6 +32,8 @@ #include "gfx.h" #include "text.h" #include "objectman.h" +#include "timeline.h" +#include "projexpl.h" namespace DM { @@ -745,4 +747,196 @@ void InventoryMan::f353_drawStopPressingEye() { } _vm->_eventMan->f77_hideMouse(); } + +void InventoryMan::f349_processCommand70_clickOnMouth() { + static int16 G0242_ai_Graphic559_FoodAmounts[8] = { + 500, /* Apple */ + 600, /* Corn */ + 650, /* Bread */ + 820, /* Cheese */ + 550, /* Screamer Slice */ + 350, /* Worm round */ + 990, /* Drumstick / Shank */ + 1400}; /* Dragon steak */ + + Thing L1078_T_Thing; + uint16 L1079_ui_IconIndex; + uint16 L1080_ui_ChampionIndex; + bool L1081_B_RemoveObjectFromLeaderHand; + Junk* L1082_ps_Junk; + Champion* L1083_ps_Champion; + TimelineEvent L1084_s_Event; + uint16 L1085_ui_Multiple; +#define AL1085_ui_PotionPower L1085_ui_Multiple +#define AL1085_ui_AdjustedPotionPower L1085_ui_Multiple +#define AL1085_ui_Counter L1085_ui_Multiple + uint16 L1086_ui_Counter; + int16 L1087_i_Wounds; + uint16 L1088_ui_Multiple; +#define AL1088_ui_ThingType L1088_ui_Multiple +#define AL1088_ui_Mana L1088_ui_Multiple +#define AL1088_ui_HealWoundIterationCount L1088_ui_Multiple + uint16 L1089_ui_Weight; + + + if (_vm->_championMan->_g415_leaderEmptyHanded) { + if (_vm->_inventoryMan->_g424_panelContent == k0_PanelContentFoodWaterPoisoned) { + return; + } + _vm->_eventMan->_g597_ignoreMouseMovements = true; + _vm->_g333_pressingMouth = true; + if (!_vm->_eventMan->isMouseButtonDown(k1_LeftMouseButton)) { + _vm->_eventMan->_g597_ignoreMouseMovements = false; + _vm->_g333_pressingMouth = false; + _vm->_g334_stopPressingMouth = false; + } else { + _vm->_eventMan->f78_showMouse(); + _vm->_eventMan->_g587_hideMousePointerRequestCount = 1; + _vm->_inventoryMan->f345_drawPanelFoodWaterPoisoned(); + _vm->_displayMan->f97_drawViewport(k0_viewportNotDungeonView); + } + return; + } + if (_vm->_championMan->_g299_candidateChampionOrdinal) { + return; + } + if (!getFlag(g237_ObjectInfo[_vm->_dungeonMan->f141_getObjectInfoIndex(L1078_T_Thing = _vm->_championMan->_g414_leaderHandObject)]._allowedSlots, k0x0001_ObjectAllowedSlotMouth)) { + return; + } + L1079_ui_IconIndex = _vm->_objectMan->f33_getIconIndex(L1078_T_Thing); + AL1088_ui_ThingType = L1078_T_Thing.getType(); + L1089_ui_Weight = _vm->_dungeonMan->f140_getObjectWeight(L1078_T_Thing); + L1083_ps_Champion = &_vm->_championMan->_gK71_champions[L1080_ui_ChampionIndex = _vm->M1_ordinalToIndex(_vm->_inventoryMan->_g432_inventoryChampionOrdinal)]; + L1082_ps_Junk = (Junk*)_vm->_dungeonMan->f156_getThingData(L1078_T_Thing); + if ((L1079_ui_IconIndex >= k8_IconIndiceJunkWater) && (L1079_ui_IconIndex <= k9_IconIndiceJunkWaterSkin)) { + if (!(L1082_ps_Junk->getChargeCount())) { + return; + } + L1083_ps_Champion->_water = MIN(L1083_ps_Champion->_water + 800, 2048); + L1082_ps_Junk->setChargeCount(L1082_ps_Junk->getChargeCount() - 1); + L1081_B_RemoveObjectFromLeaderHand = false; + } else { + if (AL1088_ui_ThingType == k8_PotionThingType) { + L1081_B_RemoveObjectFromLeaderHand = false; + } else { + L1082_ps_Junk->setNextThing(Thing::_none); + L1081_B_RemoveObjectFromLeaderHand = true; + } + } + _vm->_eventMan->f78_showMouse(); + if (L1081_B_RemoveObjectFromLeaderHand) { + _vm->_championMan->f298_getObjectRemovedFromLeaderHand(); + } + if (AL1088_ui_ThingType == k8_PotionThingType) { + AL1085_ui_PotionPower = ((Potion*)L1082_ps_Junk)->getPower(); + L1086_ui_Counter = ((511 - AL1085_ui_PotionPower) / (32 + (AL1085_ui_PotionPower + 1) / 8)) >> 1; + AL1085_ui_AdjustedPotionPower = (AL1085_ui_PotionPower / 25) + 8; /* Value between 8 and 18 */ + switch (((Potion*)L1082_ps_Junk)->getType()) { + case k6_PotionTypeRos: + f348_adjustStatisticCurrentValue(L1083_ps_Champion, k2_ChampionStatDexterity, AL1085_ui_AdjustedPotionPower); + break; + case k7_PotionTypeKu: + f348_adjustStatisticCurrentValue(L1083_ps_Champion, k1_ChampionStatStrength, (((Potion*)L1082_ps_Junk)->getPower() / 35) + 5); /* Value between 5 and 12 */ + break; + case k8_PotionTypeDane: + f348_adjustStatisticCurrentValue(L1083_ps_Champion, k3_ChampionStatWisdom, AL1085_ui_AdjustedPotionPower); + break; + case k9_PotionTypeNeta: + f348_adjustStatisticCurrentValue(L1083_ps_Champion, k4_ChampionStatVitality, AL1085_ui_AdjustedPotionPower); + break; + case k10_PotionTypeAntivenin: + _vm->_championMan->f323_unpoison(L1080_ui_ChampionIndex); + break; + case k11_PotionTypeMon: + L1083_ps_Champion->_currStamina += MIN(L1083_ps_Champion->_maxStamina - L1083_ps_Champion->_currStamina, L1083_ps_Champion->_maxStamina / L1086_ui_Counter); + break; + case k12_PotionTypeYa: + AL1085_ui_AdjustedPotionPower += AL1085_ui_AdjustedPotionPower >> 1; + if (L1083_ps_Champion->_shieldDefense > 50) { + AL1085_ui_AdjustedPotionPower >>= 2; + } + L1083_ps_Champion->_shieldDefense += AL1085_ui_AdjustedPotionPower; + L1084_s_Event._type = k72_TMEventTypeChampionShield; + M33_setMapAndTime(L1084_s_Event._mapTime, _vm->_dungeonMan->_g309_partyMapIndex, _vm->_g313_gameTime + (AL1085_ui_AdjustedPotionPower * AL1085_ui_AdjustedPotionPower)); + L1084_s_Event._priority = L1080_ui_ChampionIndex; + L1084_s_Event._B._defense = AL1085_ui_AdjustedPotionPower; + _vm->_timeline->f238_addEventGetEventIndex(&L1084_s_Event); + setFlag(L1083_ps_Champion->_attributes, k0x1000_ChampionAttributeStatusBox); + break; + case k13_PotionTypeEe: + AL1088_ui_Mana = MIN(900, (L1083_ps_Champion->_currMana + AL1085_ui_AdjustedPotionPower) + (AL1085_ui_AdjustedPotionPower - 8)); + if (AL1088_ui_Mana > L1083_ps_Champion->_maxMana) { + AL1088_ui_Mana -= (AL1088_ui_Mana - MAX(L1083_ps_Champion->_currMana, L1083_ps_Champion->_maxMana)) >> 1; + } + L1083_ps_Champion->_currMana = AL1088_ui_Mana; + break; + case k14_PotionTypeVi: + AL1088_ui_HealWoundIterationCount = MAX(1, (((Potion*)L1082_ps_Junk)->getPower() / 42)); + L1083_ps_Champion->_currHealth += L1083_ps_Champion->_maxHealth / L1086_ui_Counter; + if (L1087_i_Wounds = L1083_ps_Champion->_wounds) { /* If the champion is wounded */ + L1086_ui_Counter = 10; + do { + for (AL1085_ui_Counter = 0; AL1085_ui_Counter < AL1088_ui_HealWoundIterationCount; AL1085_ui_Counter++) { + L1083_ps_Champion->_wounds &= _vm->getRandomNumber(65536); + } + AL1088_ui_HealWoundIterationCount = 1; + } while ((L1087_i_Wounds == L1083_ps_Champion->_wounds) && --L1086_ui_Counter); /* Loop until at least one wound is healed or there are no more heal iterations */ + } + setFlag(L1083_ps_Champion->_attributes, k0x0200_ChampionAttributeLoad | k0x2000_ChampionAttributeWounds); + break; + case k15_PotionTypeWaterFlask: + L1083_ps_Champion->_water = MIN(L1083_ps_Champion->_water + 1600, 2048); + } + ((Potion*)L1082_ps_Junk)->setType(k20_PotionTypeEmptyFlask); + } else { + if ((L1079_ui_IconIndex >= k168_IconIndiceJunkApple) && (L1079_ui_IconIndex < k176_IconIndiceJunkIronKey)) { + L1083_ps_Champion->_food = MIN(L1083_ps_Champion->_food + G0242_ai_Graphic559_FoodAmounts[L1079_ui_IconIndex - k168_IconIndiceJunkApple], 2048); + } + } + if (L1083_ps_Champion->_currStamina > L1083_ps_Champion->_maxStamina) { + L1083_ps_Champion->_currStamina = L1083_ps_Champion->_maxStamina; + } + if (L1083_ps_Champion->_currHealth > L1083_ps_Champion->_maxHealth) { + L1083_ps_Champion->_currHealth = L1083_ps_Champion->_maxHealth; + } + if (L1081_B_RemoveObjectFromLeaderHand) { + for (L1086_ui_Counter = 5; --L1086_ui_Counter; _vm->f22_delay(8)) { /* Animate mouth icon */ + _vm->_objectMan->f37_drawIconToScreen(k205_IconIndiceMouthOpen + !(L1086_ui_Counter & 0x0001), 56, 46); + _vm->_eventMan->processInput(); + _vm->_displayMan->updateScreen(); + } + } else { + _vm->_championMan->f296_drawChangedObjectIcons(); + _vm->_championMan->_gK71_champions[_vm->_championMan->_g411_leaderIndex]._load += _vm->_dungeonMan->f140_getObjectWeight(L1078_T_Thing) - L1089_ui_Weight; + setFlag(_vm->_championMan->_gK71_champions[_vm->_championMan->_g411_leaderIndex]._attributes, k0x0200_ChampionAttributeLoad); + } + _vm->f064_SOUND_RequestPlay_CPSD(k08_soundSWALLOW, _vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY, k0_soundModePlayImmediately); + setFlag(L1083_ps_Champion->_attributes, k0x0100_ChampionAttributeStatistics); + if (_vm->_inventoryMan->_g424_panelContent == k0_PanelContentFoodWaterPoisoned) { + setFlag(L1083_ps_Champion->_attributes, k0x0800_ChampionAttributePanel); + } + _vm->_championMan->f292_drawChampionState((ChampionIndex)L1080_ui_ChampionIndex); + _vm->_eventMan->f77_hideMouse(); +} + +void InventoryMan::f348_adjustStatisticCurrentValue(Champion* champ, uint16 statIndex, int16 valueDelta) { + int16 L1077_i_Multiple; +#define AL1077_i_CurrentValue L1077_i_Multiple +#define AL1077_i_Delta L1077_i_Multiple + + if (valueDelta >= 0) { + if ((AL1077_i_CurrentValue = champ->_statistics[statIndex][k1_ChampionStatCurrent]) > 120) { + valueDelta >>= 1; + if (AL1077_i_CurrentValue > 150) { + valueDelta >>= 1; + } + valueDelta++; + } + AL1077_i_Delta = MIN(valueDelta, (int16)(170 - AL1077_i_CurrentValue)); + } else { /* BUG0_00 Useless code. The function is always called with valueDelta having a positive value */ + AL1077_i_Delta = MAX(valueDelta, int16(champ->_statistics[statIndex][k2_ChampionStatMinimum] - champ->_statistics[statIndex][k1_ChampionStatCurrent])); + } + champ->_statistics[statIndex][k1_ChampionStatCurrent] += AL1077_i_Delta; +} + } diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h index 106e4cd24d..a115c9819f 100644 --- a/engines/dm/inventory.h +++ b/engines/dm/inventory.h @@ -83,6 +83,8 @@ public: void f351_drawChampionSkillsAndStatistics(); // @ F0351_INVENTORY_DrawChampionSkillsAndStatistics void f350_drawStopPressingMouth(); // @ F0350_INVENTORY_DrawStopPressingMouth void f353_drawStopPressingEye();// @ F0353_INVENTORY_DrawStopPressingEye + void f349_processCommand70_clickOnMouth(); // @ F0349_INVENTORY_ProcessCommand70_ClickOnMouth + void f348_adjustStatisticCurrentValue(Champion *champ, uint16 statIndex, int16 valueDelta); // @ F0348_INVENTORY_AdjustStatisticCurrentValue }; diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index f0db59b068..29312531b4 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -396,35 +396,32 @@ void MenuMan::f392_buildSpellAreaLine(int16 spellAreaBitmapLine) { }
void MenuMan::f394_setMagicCasterAndDrawSpellArea(int16 champIndex) {
- ChampionMan &champMan = *_vm->_championMan;
- DisplayMan &dispMan = *_vm->_displayMan;
+ Champion* L1213_ps_Champion;
- if ((champIndex == champMan._g514_magicCasterChampionIndex)
- || ((champIndex != kM1_ChampionNone) && !champMan._gK71_champions[champIndex]._currHealth))
+ if ((champIndex == _vm->_championMan->_g514_magicCasterChampionIndex) || ((champIndex != kM1_ChampionNone) && !_vm->_championMan->_gK71_champions[champIndex]._currHealth)) {
return;
- if (champMan._g514_magicCasterChampionIndex == kM1_ChampionNone) {
- warning(false, "MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan.f132_blitToBitmap(dispMan.f489_getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), dispMan._g348_bitmapScreen, g0_BoxSpellArea, 0, 0,
- 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
- warning(false, "MISSING CODE: F0078_MOUSE_ShowPointer");
+ }
+ if (_vm->_championMan->_g514_magicCasterChampionIndex == kM1_ChampionNone) {
+ _vm->_eventMan->f78_showMouse();
+ _vm->_displayMan->f21_blitToScreen(_vm->_displayMan->f489_getNativeBitmapOrGraphic(k9_MenuSpellAreaBackground), &g0_BoxSpellArea, k48_byteWidth, kM1_ColorNoTransparency, 33);
+ _vm->_eventMan->f77_hideMouse();
}
if (champIndex == kM1_ChampionNone) {
- champMan._g514_magicCasterChampionIndex = kM1_ChampionNone;
- warning(false, "MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- dispMan._g578_useByteBoxCoordinates = false;
- dispMan.D24_fillScreenBox(g0_BoxSpellArea, k0_ColorBlack);
- warning(false, "MISSING CODE: F0078_MOUSE_ShowPointer");
+ _vm->_championMan->_g514_magicCasterChampionIndex = kM1_ChampionNone;
+ _vm->_eventMan->f78_showMouse();
+ _vm->_displayMan->_g578_useByteBoxCoordinates = false;
+ _vm->_displayMan->D24_fillScreenBox(g0_BoxSpellArea, k0_ColorBlack);
+ _vm->_eventMan->f77_hideMouse();
return;
}
-
- champMan._g514_magicCasterChampionIndex = (ChampionIndex)champIndex;
- f392_buildSpellAreaLine(k2_SpellAreaAvailableSymbols);
- warning(false, "MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
- f393_drawSpellAreaControls((ChampionIndex)champIndex);
- dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK75_BoxSpellAreaLine2, 0, 0, 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
- f392_buildSpellAreaLine(k3_SpellAreaChampionSymbols);
- dispMan.f132_blitToBitmap(_gK72_bitmapSpellAreaLine, dispMan._g348_bitmapScreen, gK76_BoxSpellAreaLine3, 0, 0, 48, k160_byteWidthScreen, kM1_ColorNoTransparency);
- warning(false, "MISSING CODE: F0078_MOUSE_ShowPointer");
+ L1213_ps_Champion = &_vm->_championMan->_gK71_champions[_vm->_championMan->_g514_magicCasterChampionIndex = (ChampionIndex)champIndex];
+ _vm->_menuMan->f392_buildSpellAreaLine(k2_SpellAreaAvailableSymbols);
+ _vm->_eventMan->f78_showMouse();
+ _vm->_menuMan->f393_drawSpellAreaControls((ChampionIndex)champIndex);
+ _vm->_displayMan->f21_blitToScreen(_vm->_menuMan->_gK72_bitmapSpellAreaLine, &gK75_BoxSpellAreaLine2, k48_byteWidth, kM1_ColorNoTransparency, 12);
+ _vm->_menuMan->f392_buildSpellAreaLine(k3_SpellAreaChampionSymbols);
+ _vm->_displayMan->f21_blitToScreen(_vm->_menuMan->_gK72_bitmapSpellAreaLine, &gK76_BoxSpellAreaLine3, k48_byteWidth, kM1_ColorNoTransparency, 12);
+ _vm->_eventMan->f77_hideMouse();
}
void MenuMan::f457_drawEnabledMenus() {
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp index 40c650b0f8..192e66192c 100644 --- a/engines/dm/objectman.cpp +++ b/engines/dm/objectman.cpp @@ -259,4 +259,13 @@ void ObjectMan::f35_clearLeaderObjectName() { _vm->_displayMan->D24_fillScreenBox(g28_BoxLeaderHandObjectName, k0_ColorBlack); } +void ObjectMan::f37_drawIconToScreen(int16 iconIndex, int16 posX, int16 posY) { + static byte L0013_puc_Bitmap_Icon[16 * 16]; + Box L0014_s_Box; + + L0014_s_Box._x2 = (L0014_s_Box._x1 = posX) + 15; + L0014_s_Box._y2 = (L0014_s_Box._y1 = posY) + 15; + _vm->_objectMan->f36_extractIconFromBitmap(iconIndex, L0013_puc_Bitmap_Icon); + _vm->_displayMan->f21_blitToScreen(L0013_puc_Bitmap_Icon, &L0014_s_Box, k8_byteWidth, kM1_ColorNoTransparency, 16); +} } diff --git a/engines/dm/objectman.h b/engines/dm/objectman.h index 3f90f805d4..3b55e194f9 100644 --- a/engines/dm/objectman.h +++ b/engines/dm/objectman.h @@ -65,7 +65,7 @@ public: void f34_drawLeaderObjectName(Thing thing); // @ F0034_OBJECT_DrawLeaderHandObjectName IconIndice f39_getIconIndexInSlotBox(uint16 slotBoxIndex); // @ F0039_OBJECT_GetIconIndexInSlotBox void f35_clearLeaderObjectName(); // @ F0035_OBJECT_ClearLeaderHandObjectName - + void f37_drawIconToScreen(int16 iconIndex, int16 posX, int16 posY); // @ F0037_OBJECT_DrawIconToScreen }; |