[Scummvm-git-logs] scummvm master -> f3b166befc5318e0fb3c13151ad69f4de11a1c68
moralrecordings
code at moral.net.au
Mon May 24 01:13:12 UTC 2021
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:
ee0b6affc3 DIRECTOR: Limit SoundCastMember looping flag to v4 and up
f3b166befc DIRECTOR: Adjust lingoexec debugging levels
Commit: ee0b6affc38e07fbdc174c43ffc375797add27d8
https://github.com/scummvm/scummvm/commit/ee0b6affc38e07fbdc174c43ffc375797add27d8
Author: Scott Percival (code at moral.net.au)
Date: 2021-05-24T09:08:45+08:00
Commit Message:
DIRECTOR: Limit SoundCastMember looping flag to v4 and up
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index fda019778f..5fd4edaef6 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1199,7 +1199,7 @@ void Cast::loadCastInfo(Common::SeekableReadStreamEndian &stream, uint16 id) {
}
// For SoundCastMember, read the flags in the CastInfo
- if ((_vm->getVersion() < 500) && (member->_type == kCastSound)) {
+ if (_vm->getVersion() >= 400 && _vm->getVersion() < 500 && member->_type == kCastSound) {
((SoundCastMember *)member)->_looping = castInfo.flags & 16 ? 0 : 1;
}
Commit: f3b166befc5318e0fb3c13151ad69f4de11a1c68
https://github.com/scummvm/scummvm/commit/f3b166befc5318e0fb3c13151ad69f4de11a1c68
Author: Scott Percival (code at moral.net.au)
Date: 2021-05-24T09:08:45+08:00
Commit Message:
DIRECTOR: Adjust lingoexec debugging levels
--debuglevel=2 will show the call stack after each function call
--debuglevel=3 will show the current instruction
--debuglevel=5 will show the stack after each instruction
--debuglevel=9 will show the variables after each instruction
Changed paths:
engines/director/lingo/lingo-code.cpp
engines/director/lingo/lingo.cpp
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index aff04cad8f..dcb519b7dc 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -292,7 +292,7 @@ void Lingo::pushContext(const Symbol funcSym, bool allowRetVal, Datum defaultRet
g_lingo->_callstack.push_back(fp);
- if (debugChannelSet(5, kDebugLingoExec)) {
+ if (debugChannelSet(2, kDebugLingoExec)) {
g_lingo->printCallStack(0);
}
}
@@ -335,7 +335,7 @@ void Lingo::popContext() {
g_lingo->_localvars = fp->localvars;
}
- if (debugChannelSet(5, kDebugLingoExec)) {
+ if (debugChannelSet(2, kDebugLingoExec)) {
g_lingo->printCallStack(g_lingo->_pc);
}
@@ -1401,7 +1401,7 @@ void LC::c_callfunc() {
}
void LC::call(const Common::String &name, int nargs, bool allowRetVal) {
- if (debugChannelSet(5, kDebugLingoExec))
+ if (debugChannelSet(3, kDebugLingoExec))
g_lingo->printSTUBWithArglist(name.c_str(), nargs, "call:");
Symbol funcSym;
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 8167a4ec96..055e6f5c10 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -468,7 +468,11 @@ void Lingo::printStack(const char *s, uint pc) {
}
void Lingo::printCallStack(uint pc) {
- debugC(5, kDebugLingoExec, "Call stack:");
+ if (g_lingo->_callstack.size() == 0) {
+ debugC(2, kDebugLingoExec, "\nEnd of execution");
+ return;
+ }
+ debugC(2, kDebugLingoExec, "\nCall stack:");
for (int i = 0; i < (int)g_lingo->_callstack.size(); i++) {
CFrame *frame = g_lingo->_callstack[i];
uint framePc = pc;
@@ -476,12 +480,12 @@ void Lingo::printCallStack(uint pc) {
framePc = g_lingo->_callstack[i + 1]->retpc;
if (frame->sp.type != VOIDSYM) {
- debugC(5, kDebugLingoExec, "#%d %s:%d", i + 1,
+ debugC(2, kDebugLingoExec, "#%d %s:%d", i + 1,
g_lingo->_callstack[i]->sp.name->c_str(),
framePc
);
} else {
- debugC(5, kDebugLingoExec, "#%d [unknown]:%d", i + 1,
+ debugC(2, kDebugLingoExec, "#%d [unknown]:%d", i + 1,
framePc
);
}
@@ -598,7 +602,7 @@ void Lingo::execute(uint pc) {
debug("me: %s", _currentMe.asString(true).c_str());
}
- debugC(1, kDebugLingoExec, "[%3d]: %s", current, instr.c_str());
+ debugC(3, kDebugLingoExec, "[%3d]: %s", current, instr.c_str());
_pc++;
(*((*_currentScript)[_pc - 1]))();
More information about the Scummvm-git-logs
mailing list