mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 20:01:25 +00:00
DIRECTOR: Remove getCastMemberByScriptId from Movie
This can be called on the correct cast directly.
This commit is contained in:
parent
b3a09db38b
commit
2d5ca7a1d6
@ -965,14 +965,14 @@ ScriptContext *LingoCompiler::compileLingoV4(Common::SeekableReadStreamEndian &s
|
||||
// initialise the script
|
||||
ScriptType scriptType = kCastScript;
|
||||
Common::String castName;
|
||||
CastMember *member = g_director->getCurrentMovie()->getCastMemberByScriptId(scriptId);
|
||||
CastMember *member = archive->cast->getCastMemberByScriptId(scriptId);
|
||||
int castId;
|
||||
if (member) {
|
||||
if (member->_type == kCastLingoScript)
|
||||
scriptType = ((ScriptCastMember *)member)->_scriptType;
|
||||
|
||||
castId = member->getID();
|
||||
CastMemberInfo *info = g_director->getCurrentMovie()->getCastMemberInfo(castId);
|
||||
CastMemberInfo *info = member->getInfo();
|
||||
if (info)
|
||||
castName = info->name;
|
||||
} else {
|
||||
|
@ -312,14 +312,6 @@ CastMember *Movie::getCastMemberByName(const Common::String &name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
CastMember *Movie::getCastMemberByScriptId(int scriptId) {
|
||||
CastMember *result = _cast->getCastMemberByScriptId(scriptId);
|
||||
if (result == nullptr && _sharedCast) {
|
||||
result = _sharedCast->getCastMemberByScriptId(scriptId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
CastMemberInfo *Movie::getCastMemberInfo(int castId) {
|
||||
CastMemberInfo *result = _cast->getCastMemberInfo(castId);
|
||||
if (result == nullptr && _sharedCast) {
|
||||
|
@ -119,7 +119,6 @@ public:
|
||||
|
||||
CastMember *getCastMember(int castId);
|
||||
CastMember *getCastMemberByName(const Common::String &name);
|
||||
CastMember *getCastMemberByScriptId(int scriptId);
|
||||
CastMemberInfo *getCastMemberInfo(int castId);
|
||||
const Stxt *getStxt(int castId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user