Skip to content

Commit

Permalink
DIRECTOR: Lingo: More debug output to call() method
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Mar 8, 2017
1 parent 0a044b2 commit ff7cff7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engines/director/lingo/lingo-builtins.cpp
Expand Up @@ -362,7 +362,7 @@ void Lingo::initBuiltIns() {
}
}

void Lingo::printSTUBWithArglist(const char *funcname, int nargs) {
void Lingo::printSTUBWithArglist(const char *funcname, int nargs, const char *prefix) {
Common::String s(funcname);

s += '(';
Expand All @@ -379,7 +379,7 @@ void Lingo::printSTUBWithArglist(const char *funcname, int nargs) {

s += ")";

warning("STUB: %s", s.c_str());
warning("%s: %s", prefix, s.c_str());
}

void Lingo::convertVOIDtoString(int arg, int nargs) {
Expand Down
3 changes: 3 additions & 0 deletions engines/director/lingo/lingo-code.cpp
Expand Up @@ -1023,6 +1023,9 @@ void Lingo::c_call() {
void Lingo::call(Common::String name, int nargs) {
bool dropArgs = false;

if (debugChannelSet(3, kDebugLingoExec))
printSTUBWithArglist(name.c_str(), nargs, "call:");

Symbol *sym = g_lingo->getHandler(name);

if (!g_lingo->_eventHandlerTypeIds.contains(name)) {
Expand Down
2 changes: 1 addition & 1 deletion engines/director/lingo/lingo.h
Expand Up @@ -314,7 +314,7 @@ class Lingo {

static void c_open();

void printSTUBWithArglist(const char *funcname, int nargs);
void printSTUBWithArglist(const char *funcname, int nargs, const char *prefix = "STUB:");
void convertVOIDtoString(int arg, int nargs);
void dropStack(int nargs);
void drop(uint num);
Expand Down

0 comments on commit ff7cff7

Please sign in to comment.