[Scummvm-cvs-logs] scummvm master -> 581031a55d35f50f11819e9738f886945f026293
athrxx
athrxx at scummvm.org
Mon Apr 22 21:25:43 CEST 2013
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cdff19324c KYRA: (EOB) - add debugger functions
3e1ccff79d KYRA: (EOB) - minor fix to door opening/closing in EOB1
581031a55d KYRA: (EOB) - fix bug #3596547
Commit: cdff19324cbd91f0b08cd565486a607fea877cf0
https://github.com/scummvm/scummvm/commit/cdff19324cbd91f0b08cd565486a607fea877cf0
Author: athrxx (athrxx at scummvm.org)
Date: 2013-04-22T12:23:23-07:00
Commit Message:
KYRA: (EOB) - add debugger functions
(open_door, close_door)
Changed paths:
engines/kyra/debugger.cpp
engines/kyra/debugger.h
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 0a9ec25..702707e 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -487,7 +487,8 @@ void Debugger_EoB::initialize() {
DCmd_Register("list_monsters", WRAP_METHOD(Debugger_EoB, cmd_listMonsters));
DCmd_Register("show_position", WRAP_METHOD(Debugger_EoB, cmd_showPosition));
DCmd_Register("set_position", WRAP_METHOD(Debugger_EoB, cmd_setPosition));
-
+ DCmd_Register("open_door", WRAP_METHOD(Debugger_EoB, cmd_openDoor));
+ DCmd_Register("close_door", WRAP_METHOD(Debugger_EoB, cmd_closeDoor));
}
bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
@@ -618,6 +619,36 @@ bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
return true;
}
+bool Debugger_EoB::cmd_openDoor(int, const char **) {
+ DebugPrintf("Warning: Using this command may cause glitches.\n");
+ uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
+ int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
+ int v = _vm->_levelBlockProperties[block].walls[c];
+ int flg = (_vm->_flags.gameID == GI_EOB1) ? 1 : 0x10;
+ if (_vm->_wllWallFlags[v] & flg) {
+ DebugPrintf("Couldn't open any door. Make sure you're facing the door you wish to open and standing right in front of it.\n\n");
+ } else {
+ _vm->openDoor(block);
+ DebugPrintf("Trying to open door at block %d.\n\n", block);
+ }
+ return true;
+}
+
+bool Debugger_EoB::cmd_closeDoor(int, const char **) {
+ DebugPrintf("Warning: Using this command may cause glitches.\n");
+ uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
+ int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
+ int v = _vm->_levelBlockProperties[block].walls[c];
+ int flg = (_vm->_flags.gameID == GI_EOB1) ? 1 : 0x10;
+ if ((_vm->_flags.gameID == GI_EOB1 && !(_vm->_wllWallFlags[v] & 1)) || (_vm->_flags.gameID == GI_EOB2 && (_vm->_wllWallFlags[v] & 0x20))) {
+ DebugPrintf("Couldn't close any door. Make sure you're facing the door you wish to open and standing right in front of it.\n\n");
+ } else {
+ _vm->closeDoor(block);
+ DebugPrintf("Trying to close door at block %d.\n\n", block);
+ }
+ return true;
+}
+
#endif // ENABLE_EOB
} // End of namespace Kyra
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index 1432670..76264ec 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -124,6 +124,8 @@ protected:
bool cmd_listMonsters(int argc, const char **argv);
bool cmd_showPosition(int argc, const char **argv);
bool cmd_setPosition(int argc, const char **argv);
+ bool cmd_openDoor(int argc, const char **argv);
+ bool cmd_closeDoor(int argc, const char **argv);
};
#endif // ENABLE_EOB
Commit: 3e1ccff79d0e3615f662a8d9fa1e9343d748ee89
https://github.com/scummvm/scummvm/commit/3e1ccff79d0e3615f662a8d9fa1e9343d748ee89
Author: athrxx (athrxx at scummvm.org)
Date: 2013-04-22T12:23:25-07:00
Commit Message:
KYRA: (EOB) - minor fix to door opening/closing in EOB1
Changed paths:
engines/kyra/scene_rpg.cpp
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 6d724ef..927d891 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -563,9 +563,9 @@ void KyraRpgEngine::openCloseDoor(int block, int openClose) {
int c = (_wllWallFlags[_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
int v = _levelBlockProperties[block].walls[c];
- int flg = (openClose == 1) ? 0x10 : (openClose == -1 ? 0x20 : 0);
+ int flg = (_flags.gameID == GI_EOB1) ? 1 : ((openClose == 1) ? 0x10 : (openClose == -1 ? 0x20 : 0));
- if (_wllWallFlags[v] & flg)
+ if ((_flags.gameID == GI_EOB1 && openClose == -1 && !(_wllWallFlags[v] & flg)) || (!(_flags.gameID == GI_EOB1 && openClose == -1) && (_wllWallFlags[v] & flg)))
return;
for (int i = 0; i < 3; i++) {
Commit: 581031a55d35f50f11819e9738f886945f026293
https://github.com/scummvm/scummvm/commit/581031a55d35f50f11819e9738f886945f026293
Author: athrxx (athrxx at scummvm.org)
Date: 2013-04-22T12:23:27-07:00
Commit Message:
KYRA: (EOB) - fix bug #3596547
(EOB1: Door Buttons Don't Work)
Changed paths:
engines/kyra/scene_eob.cpp
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index 45de232..cfac5db 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -86,6 +86,10 @@ void EoBCoreEngine::loadLevel(int level, int sub) {
pos += 2;
}
+ // WORKAROUND for bug #3596547 (EOB1: Door Buttons Don't Work)
+ if (_flags.gameID == GI_EOB1 && level == 7 && _levelBlockProperties[0x035C].assignedObjects == 0x0E89)
+ _levelBlockProperties[0x035C].assignedObjects = 0x0E8D;
+
loadVcnData(gfxFile.c_str(), (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[level - 1]] : 0);
_screen->loadEoBBitmap("INVENT", _cgaMappingInv, 5, 3, 2);
delayUntil(end);
More information about the Scummvm-git-logs
mailing list