[Scummvm-git-logs] scummvm master -> 2bd81bac81cfa7ef222412525858ff85941e1063
dreammaster
dreammaster at scummvm.org
Fri Mar 30 04:41:56 CEST 2018
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
60fdd3d5f2 XEEN: Added intangible debugger command
2bd81bac81 XEEN: Improvements for trip to Rivercity
Commit: 60fdd3d5f2918c2b48e8f3143020d0f770f47dea
https://github.com/scummvm/scummvm/commit/60fdd3d5f2918c2b48e8f3143020d0f770f47dea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-29T21:35:25-04:00
Commit Message:
XEEN: Added intangible debugger command
Changed paths:
engines/xeen/debugger.cpp
engines/xeen/debugger.h
engines/xeen/interface.cpp
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp
index fed0307..978baf1 100644
--- a/engines/xeen/debugger.cpp
+++ b/engines/xeen/debugger.cpp
@@ -45,7 +45,7 @@ static int strToInt(const char *s) {
/*------------------------------------------------------------------------*/
Debugger::Debugger(XeenEngine *vm) : GUI::Debugger(), _vm(vm),
- _invincible(false) {
+ _spellId(-1), _invincible(false), _intangible(false) {
registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("spell", WRAP_METHOD(Debugger, cmdSpell));
registerCmd("spells", WRAP_METHOD(Debugger, cmdSpells));
@@ -55,8 +55,7 @@ Debugger::Debugger(XeenEngine *vm) : GUI::Debugger(), _vm(vm),
registerCmd("map", WRAP_METHOD(Debugger, cmdMap));
registerCmd("pos", WRAP_METHOD(Debugger, cmdPos));
registerCmd("invincible", WRAP_METHOD(Debugger, cmdInvincible));
-
- _spellId = -1;
+ registerCmd("intangible", WRAP_METHOD(Debugger, cmdIntangible));
}
void Debugger::update() {
@@ -201,4 +200,10 @@ bool Debugger::cmdInvincible(int argc, const char **argv) {
return true;
}
+bool Debugger::cmdIntangible(int argc, const char **argv) {
+ _intangible = (argc < 2) || strcmp(argv[1], "off");
+ debugPrintf("Intangibility is %s\n", _intangible ? "on" : "off");
+ return true;
+}
+
} // End of namespace Xeen
diff --git a/engines/xeen/debugger.h b/engines/xeen/debugger.h
index b7e1f1c..c459dc1 100644
--- a/engines/xeen/debugger.h
+++ b/engines/xeen/debugger.h
@@ -74,8 +74,14 @@ private:
* Flags whether to make the party invincible
*/
bool cmdInvincible(int argc, const char **argv);
+
+ /**
+ * Flags whether to make the party invincible
+ */
+ bool cmdIntangible(int argc, const char **argv);
public:
bool _invincible;
+ bool _intangible;
public:
Debugger(XeenEngine *vm);
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 9d195f7..de343fe 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -895,6 +895,7 @@ void Interface::startFalling(bool flag) {
}
bool Interface::checkMoveDirection(int key) {
+ Debugger &debugger = *g_vm->_debugger;
Map &map = *_vm->_map;
Party &party = *_vm->_party;
Sound &sound = *_vm->_sound;
@@ -920,6 +921,9 @@ bool Interface::checkMoveDirection(int key) {
int startSurfaceId = map._currentSurfaceId;
int surfaceId;
+ if (debugger._intangible)
+ return true;
+
if (map._isOutdoors) {
party._mazeDirection = dir;
Commit: 2bd81bac81cfa7ef222412525858ff85941e1063
https://github.com/scummvm/scummvm/commit/2bd81bac81cfa7ef222412525858ff85941e1063
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-29T22:41:02-04:00
Commit Message:
XEEN: Improvements for trip to Rivercity
This slightly slows down movement to more closely match the original,
and stops a turn pass from occurring when Rivercity is reached
Changed paths:
engines/xeen/dialogs/dialogs_input.cpp
engines/xeen/scripts.cpp
diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp
index c2dac52..0ac8f36 100644
--- a/engines/xeen/dialogs/dialogs_input.cpp
+++ b/engines/xeen/dialogs/dialogs_input.cpp
@@ -69,7 +69,6 @@ int Input::getString(Common::String &line, uint maxLen, int maxWidth, bool isNum
}
}
- _vm->_interface->clearEvents();
_vm->_noDirectionSense = false;
return line.size();
}
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 2ffdcd1..d135a4a 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -238,6 +238,8 @@ int Scripts::checkEvents() {
_vm->_mode = oldMode;
windows.closeAll();
+ if (_scriptExecuted)
+ intf.clearEvents();
if (_scriptExecuted || !intf._objNumber || _dirFlag) {
if (_dirFlag && !_scriptExecuted && intf._objNumber && !map._currentIsEvent) {
sound.playFX(21);
@@ -522,7 +524,7 @@ bool Scripts::cmdTeleport(ParamsIterator ¶ms) {
if (restartFlag) {
// Draw the new location and start any script at that location
- intf.draw3d(true);
+ events.ipause(2);
_lineNum = SCRIPT_RESET;
return false;
} else {
More information about the Scummvm-git-logs
mailing list