mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
DIRECTOR: LINGO: Suppress var not found warnings
This commit is contained in:
parent
7ae8fc0ff0
commit
5176a39a90
@ -1356,7 +1356,7 @@ void LC::call(const Common::String &name, int nargs, SymbolType bltinType) {
|
||||
if (firstArg.lazy) { // first arg could be method name
|
||||
Datum objName(name);
|
||||
objName.type = VAR;
|
||||
Datum obj = g_lingo->varFetch(objName);
|
||||
Datum obj = g_lingo->varFetch(objName, false, nullptr, true);
|
||||
if (obj.type == OBJECT && (obj.u.obj->getObjType() & (kFactoryObj | kXObj))) {
|
||||
debugC(3, kDebugLingoExec, "Method called on object: <%s>", obj.asString(true).c_str());
|
||||
AbstractObject *target = obj.u.obj;
|
||||
|
@ -1269,7 +1269,7 @@ void Lingo::varAssign(Datum &var, Datum &value, bool global, DatumHash *localvar
|
||||
}
|
||||
}
|
||||
|
||||
Datum Lingo::varFetch(Datum &var, bool global, DatumHash *localvars) {
|
||||
Datum Lingo::varFetch(Datum &var, bool global, DatumHash *localvars, bool silent) {
|
||||
if (localvars == nullptr) {
|
||||
localvars = _localvars;
|
||||
}
|
||||
@ -1307,7 +1307,8 @@ Datum Lingo::varFetch(Datum &var, bool global, DatumHash *localvars) {
|
||||
return _globalvars[name];
|
||||
}
|
||||
|
||||
warning("varFetch: variable %s not found", name.c_str());
|
||||
if (!silent)
|
||||
warning("varFetch: variable %s not found", name.c_str());
|
||||
return result;
|
||||
} else if (var.type == FIELDREF) {
|
||||
CastMember *cast = _vm->getCurrentMovie()->getCastMember(var.u.i);
|
||||
|
@ -288,7 +288,7 @@ public:
|
||||
void cleanLocalVars();
|
||||
int castIdFetch(Datum &var);
|
||||
void varAssign(Datum &var, Datum &value, bool global = false, DatumHash *localvars = nullptr);
|
||||
Datum varFetch(Datum &var, bool global = false, DatumHash *localvars = nullptr);
|
||||
Datum varFetch(Datum &var, bool global = false, DatumHash *localvars = nullptr, bool silent = false);
|
||||
|
||||
int getAlignedType(const Datum &d1, const Datum &d2);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user