NScumm.Scumm.ScummEngine2.LoadRoomWithEgo C# (CSharp) Метод

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

private LoadRoomWithEgo ( ) : void
Результат void
        void LoadRoomWithEgo()
        {
            int x, y, dir;

            var obj = GetVarOrDirectWord(OpCodeParameter.Param1);
            var room = (byte)GetVarOrDirectByte(OpCodeParameter.Param2);

            var a = Actors[Variables[VariableEgo.Value]];

            // The original interpreter sets the actors new room X/Y to the last rooms X/Y
            // This fixes a problem with MM: script 161 in room 12, the 'Oomph!' script
            // This scripts runs before the actor position is set to the correct room entry location
            if ((Game.GameId == GameId.Maniac) /*&& (Game.Platform != Platform.NES)*/)
            {
                a.PutActor(a.Position, room);
            }
            else
            {
                a.PutActor(room);
            }
            EgoPositioned = false;

            x = (sbyte)ReadByte();
            y = (sbyte)ReadByte();

            StartScene(a.Room, a, obj);

            Point p2;
            GetObjectXYPos(obj, out p2, out dir);
            AdjustBoxResult r = a.AdjustXYToBeInBox(p2);
            p2 = r.Position;
            a.PutActor(p2, CurrentRoom);
            a.SetDirection(dir + 180);

            Camera.DestinationPosition.X = Camera.CurrentPosition.X = a.Position.X;
            SetCameraAt(a.Position);
            SetCameraFollows(a);

            _fullRedraw = true;

            ResetSentence();

            if (x >= 0 && y >= 0)
            {
                a.StartWalk(new Point(x, y), -1);
            }
            RunScript(5, false, false, new int[0]);
        }
ScummEngine2