diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 9651db678c8b..69efb41d2b10 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -2216,8 +2216,7 @@ void ChampionMan::f292_drawChampionState(ChampionIndex champIndex) { strcat(_vm->_g353_stringBuildBuffer, "/"); maxLoad = (f309_getMaximumLoad(curChampion) + 5) / 10; strcat(_vm->_g353_stringBuildBuffer, f288_getStringFromInteger(maxLoad, true, 3).c_str()); - warning(false, "Possibly wrong localization"); - strcat(_vm->_g353_stringBuildBuffer, " KG"); // this line + strcat(_vm->_g353_stringBuildBuffer, " KG"); _vm->_textMan->f52_printToViewport(148, 132, loadColor, _vm->_g353_stringBuildBuffer); setFlag(championAttributes, k0x4000_ChampionAttributeViewport); } diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index f71627bfa7e7..fa35035a2ef2 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -427,14 +427,6 @@ Common::Error DMEngine::run() { } void DMEngine::f2_gameloop() { - //HACK: Remove this block to get real starting position in the Hall of Champions - if (_g298_newGame) { - warning(false, "DUMMY CODE: SETTING PARTY POS AND DIRECTION"); - _dungeonMan->_g306_partyMapX = 9; - _dungeonMan->_g307_partyMapY = 9; - _dungeonMan->_g308_partyDir = kDirWest; - } - _canLoadFromGMM = true; _g318_waitForInputMaxVerticalBlankCount = 10; while (true) { @@ -471,8 +463,7 @@ void DMEngine::f2_gameloop() { if (!_inventoryMan->_g432_inventoryChampionOrdinal && !_championMan->_g300_partyIsSleeping) { Box box(0, 223, 0, 135); - warning(false, "DUMMY CODE: clearing screen to black"); - _displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); // dummy code + _displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); // (possibly dummy code) _displayMan->f128_drawDungeon(_dungeonMan->_g308_partyDir, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); if (_g325_setMousePointerToObjectInMainLoop) { _g325_setMousePointerToObjectInMainLoop = false; @@ -818,7 +809,6 @@ void DMEngine::f439_drawEntrance() { // note, a global variable is used here in the original _displayMan->f466_loadIntoBitmap(k4_entranceGraphicIndice, _displayMan->_g348_bitmapScreen); _displayMan->f128_drawDungeon(kDirSouth, 2, 0); - warning(false, "IGNORED CODE: G0324_B_DrawViewportRequested = false;"); if (!_savedScreenForOpenEntranceDoors) _savedScreenForOpenEntranceDoors = new byte[k200_heightScreen * k160_byteWidthScreen * 2]; diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index f6b9b077b7ed..f9ce68be7a85 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -314,6 +314,7 @@ EventManager::EventManager(DMEngine *vm) : _vm(vm) { warning(false, "_g587_hideMousePointerRequestCount should start with value 1"); _g587_hideMousePointerRequestCount = 0; _g558_mouseButtonStatus = 0; + _highlightScreenBox.setToZero(); } EventManager::~EventManager() { @@ -1556,4 +1557,18 @@ void EventManager::f541_waitForMouseOrKeyActivity() { _vm->_displayMan->updateScreen(); } } + +void EventManager::f362_commandHighlightBoxEnable(int16 x1, int16 x2, int16 y1, int16 y2) { + _highlightScreenBox = Box(x1, x2, y1, y2); + f6_highlightScreenBox(x1, x2, y1, y2); + _g341_highlightBoxEnabled = true; +} + +void EventManager::f363_highlightBoxDisable() { + if (_g341_highlightBoxEnabled == true) { + f6_highlightScreenBox(_highlightScreenBox._x1, _highlightScreenBox._x2, _highlightScreenBox._y1, _highlightScreenBox._y2); + _g341_highlightBoxEnabled = false; + } +} + } // end of namespace DM diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h index 520648505e13..7dfd5ac9e090 100644 --- a/engines/dm/eventman.h +++ b/engines/dm/eventman.h @@ -260,6 +260,7 @@ class EventManager { bool f375_processType80_clickDungeonView_isLeaderHandObjThrown(int16 posX, int16 posY); // @ F0375_COMMAND_ProcessType80_ClickInDungeonView_IsLeaderHandObjectThrown void setMousePointerFromSpriteData(byte* mouseSprite); + Box _highlightScreenBox; // @ G0336_i_HighlightBoxX1 public: explicit EventManager(DMEngine *vm); ~EventManager(); @@ -319,8 +320,8 @@ class EventManager { void f371_commandProcessType111To115_ClickInActionArea(int16 posX, int16 posY); // @ F0371_COMMAND_ProcessType111To115_ClickInActionArea_CPSE void f544_resetPressingEyeOrMouth(); // @ F0544_INPUT_ResetPressingEyeOrMouth void f541_waitForMouseOrKeyActivity(); // @ F0541_INPUT_WaitForMouseOrKeyboardActivity - void f362_commandHighlightBoxEnable(int16 x1, int16 x2, int16 y1, int16 y2) { warning(false, "STUB METHOD: f362_commandHighlightBoxEnable"); }// @ F0362_COMMAND_HighlightBoxEnable - void f363_highlightBoxDisable() { warning(false, "STUB METHOD: f363_highlightBoxDisable"); } // @ F0363_COMMAND_HighlightBoxDisable + void f362_commandHighlightBoxEnable(int16 x1, int16 x2, int16 y1, int16 y2); // @ F0362_COMMAND_HighlightBoxEnable + void f363_highlightBoxDisable(); // @ F0363_COMMAND_HighlightBoxDisable void f6_highlightScreenBox(int16 x1, int16 x2, int16 y1, int16 y2) { warning(false, "STUB METHOD: f6_highlightScreenBox"); } // @ F0006_MAIN_HighlightScreenBox }; diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index e6996d3ed405..44b1cc1bb968 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -2147,7 +2147,8 @@ void DisplayMan::f128_drawDungeon(Direction dir, int16 posX, int16 posY) { } void DisplayMan::f98_drawFloorAndCeiling() { - warning(false, "f98_drawFloorAndCeiling doesn't do anything"); + Box box(0, 223, 0, 36); + f135_fillBoxBitmap(_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); _g297_drawFloorAndCeilingRequested = false; } @@ -3735,9 +3736,7 @@ byte* DisplayMan::f492_getDerivedBitmap(int16 derivedBitmapIndex) { return _g638_derivedBitmaps[derivedBitmapIndex]; } -void DisplayMan::f493_addDerivedBitmap(int16 derivedBitmapIndex) { - warning(false, "f493_addDerivedBitmap DOES NOTHING"); -} +void DisplayMan::f493_addDerivedBitmap(int16 derivedBitmapIndex) {} void DisplayMan::f480_releaseBlock(uint16 index) { delete[] _g638_derivedBitmaps[index]; diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index d19f47c7b486..f7152277d8c2 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -246,8 +246,7 @@ void InventoryMan::f346_drawPanelResurrectReincarnate() { } void InventoryMan::f347_drawPanel() { - warning(false, "possible reintroduction of BUG0_48"); - f334_closeChest(); // possibility of BUG0_48 + f334_closeChest(); ChampionMan &cm = *_vm->_championMan; if (cm._g299_candidateChampionOrdinal) {