initial port of the new interpreter

This commit is contained in:
Jeff Hutchinson 2021-03-30 19:33:19 -04:00
parent 5d2654b1ba
commit 35500a87c6
47 changed files with 3675 additions and 5839 deletions

View file

@ -328,11 +328,6 @@ SimObject* findObject(const char* fileName, S32 declarationLine)
return gRootGroup->findObjectByLineNumber(fileName, declarationLine, true);
}
SimObject* findObject(ConsoleValueRef &ref)
{
return findObject((const char*)ref);
}
SimObject* findObject(const char* name)
{
PROFILE_SCOPE(SimFindObject);
@ -391,6 +386,24 @@ SimObject* findObject(const char* name)
return obj->findObject(name + len + 1);
}
SimObject* findObject(const ConsoleValue &val)
{
if (val.getType() == ConsoleValueType::cvNone)
return NULL;
if (val.getType() == ConsoleValueType::cvInteger)
return findObject((SimObjectId)val.getInt());
return findObject(val.getString());
}
SimObject* findObject(ConsoleValue* val)
{
if (val->getType() == ConsoleValueType::cvNone)
return NULL;
if (val->getType() == ConsoleValueType::cvInteger)
return findObject((SimObjectId)val->getInt());
return findObject(val->getString());
}
SimObject* findObject(SimObjectId id)
{
return gIdDictionary->find(id);