NScumm.Scumm.ScummEngine6.GetActorRoom C# (CSharp) Метод

GetActorRoom() приватный Метод

private GetActorRoom ( int index ) : void
index int
Результат void
        protected virtual void GetActorRoom(int index)
        {
            if (index == 0)
            {
                // This case occurs at the very least in COMI. That's because in COMI's script 28,
                // there is a check which looks as follows:
                //   if (((VAR_TALK_ACTOR != 0) && (VAR_HAVE_MSG == 1)) &&
                //        (getActorRoom(VAR_TALK_ACTOR) == VAR_ROOM))
                // Due to the way this is represented in bytecode, the engine cannot
                // short circuit. Hence, even though this would be perfectly fine code
                // in C/C++, here it can (and does) lead to getActorRoom(0) being
                // invoked. We silently ignore this.
                Push(0);
                return;
            }

            if (index == 255)
            {
                // This case also occurs in COMI...
                Push(0);
                return;
            }

            var actor = Actors[index];
            Push(actor.Room);
        }
ScummEngine6