aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-20 14:34:31 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit051b1d9adf69ac82a76751a0fe13c69ac7822934 (patch)
tree106243033e8348acc74b42578bdbbae9ce88d9e5
parent2a2a9a53b0b6dbd0cb18104b2603b3f7968f9d74 (diff)
downloadscummvm-rg350-051b1d9adf69ac82a76751a0fe13c69ac7822934.tar.gz
scummvm-rg350-051b1d9adf69ac82a76751a0fe13c69ac7822934.tar.bz2
scummvm-rg350-051b1d9adf69ac82a76751a0fe13c69ac7822934.zip
DM: Remove demo code from ToggleInventory, add dummy code setting _inventoryChampionOrdinal, fix error in InventoryToggle getting champion pointer
-rw-r--r--engines/dm/dm.cpp8
-rw-r--r--engines/dm/inventory.cpp7
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index e8543fc307..c1d7e14c0d 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -168,6 +168,9 @@ void DMEngine::gameloop() {
_dungeonMan->_currMap._partyPosY = 4;
_dungeonMan->_currMap._partyDir = kDirNorth;
+
+ warning("DUMMY CODE: setting InventoryMan::_inventoryChampionOrdinal to zero");
+ _inventoryMan->_inventoryChampionOrdinal = 0;
while (true) {
_stopWaitingForPlayerInput = false;
//do {
@@ -175,8 +178,9 @@ void DMEngine::gameloop() {
_eventMan->processCommandQueue();
//} while (!_stopWaitingForPlayerInput || !_gameTimeTicking);
- _displayMan->clearScreen(kColorBlack);
- _displayMan->drawDungeon(_dungeonMan->_currMap._partyDir, _dungeonMan->_currMap._partyPosX, _dungeonMan->_currMap._partyPosY);
+ if (!_inventoryMan->_inventoryChampionOrdinal && !_championMan->_partyIsSleeping) {
+ _displayMan->drawDungeon(_dungeonMan->_currMap._partyDir, _dungeonMan->_currMap._partyPosX, _dungeonMan->_currMap._partyPosY);
+ }
// DUMMY CODE: next line
_menuMan->drawMovementArrows();
_displayMan->updateScreen();
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 70359334b0..5c448c0175 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -9,7 +9,7 @@ namespace DM {
Box gBoxFloppyZzzCross = Box(174, 218, 2, 12); // @ G0041_s_Graphic562_Box_ViewportFloppyZzzCross
-InventoryMan::InventoryMan(DMEngine *vm): _vm(vm) {}
+InventoryMan::InventoryMan(DMEngine *vm) : _vm(vm) {}
void InventoryMan::toggleInventory(ChampionIndex championIndex) {
ChampionMan &cm = *_vm->_championMan;
@@ -30,7 +30,7 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
if (invChampOrdinal) {
_inventoryChampionOrdinal = indexToOrdinal(kChampionNone);
warning("MISSING CODE: F0334_INVENTORY_CloseChest");
- champion = &cm._champions[ordinalToIndex(kChampionNone)];
+ champion = &cm._champions[ordinalToIndex(_inventoryChampionOrdinal)];
if (champion->_currHealth && !cm._candidateChampionOrdinal) {
champion->setAttributeFlag(kChampionAttributeStatusBox, true);
warning("MISSING CODE: F0292_CHAMPION_DrawState");
@@ -60,9 +60,6 @@ void InventoryMan::toggleInventory(ChampionIndex championIndex) {
dm.blitToScreen(dm.getBitmap(kInventoryGraphicIndice), w, 0, 0, 0, w, 0, h, kColorNoTransparency, gDungeonViewport);
if (cm._candidateChampionOrdinal) {
dm.clearScreenBox(kColorDarkestGray, gBoxFloppyZzzCross, gDungeonViewport);
- } else {
- static Box gBoxFloppy = Box(174, 182, 2, 12); // @ K0300_s_Box_ViewportFloppy
- dm.clearScreenBox(kColorDarkestGray, gBoxFloppy, gDungeonViewport);
}
warning("MISSING CODE: F0052_TEXT_PrintToViewport -> HEALTH");
warning("MISSING CODE: F0052_TEXT_PrintToViewport -> STAMINA");