Exemplo n.º 1
0
        public static Cinematic Read(Reader reader, Pointer offset)
        {
            MapLoader l = MapLoader.Loader;
            Cinematic c = new Cinematic(offset);

            c.actors = LinkedList <CinematicActor> .Read(ref reader, Pointer.Current(reader), (off_actor) => {
                return(CinematicActor.Read(reader, off_actor));
            }, type : LinkedList.Type.Double);

            c.off_next     = Pointer.Read(reader);
            c.off_previous = Pointer.Read(reader);
            c.off_header   = Pointer.Read(reader);
            reader.ReadUInt32();
            reader.ReadUInt32();
            c.name = reader.ReadString(0x100);
            //MapLoader.Loader.print(c.name);
            return(c);
        }
Exemplo n.º 2
0
        public static CinematicActor Read(Reader reader, Pointer offset)
        {
            MapLoader      l  = MapLoader.Loader;
            CinematicActor ca = new CinematicActor(offset);

            if (Settings.s.game == Settings.Game.R3 || Settings.s.game == Settings.Game.Dinosaur)
            {
                if (Settings.s.platform != Settings.Platform.PS2)
                {
                    if (Settings.s.platform == Settings.Platform.GC)
                    {
                        reader.ReadUInt32();
                        reader.ReadUInt32();
                    }
                    reader.ReadUInt32();
                }
            }
            ca.off_a3d = Pointer.Read(reader);
            reader.ReadUInt32();
            ca.name          = reader.ReadString(0x100);
            ca.off_perso     = Pointer.Read(reader);
            ca.off_waitState = Pointer.Read(reader);
            ca.off_cineState = Pointer.Read(reader);
            reader.ReadUInt32();
            ca.setCustomBitFlag1 = reader.ReadByte();
            ca.setCustomBitFlag2 = reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            ca.cineStateRepeatAnimation = reader.ReadByte();
            ca.cineStateSpeed           = reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            ca.off_IPO = Pointer.Read(reader);
            reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            ca.hasChangeComport1 = reader.ReadByte();
            reader.ReadByte();
            ca.off_comport1      = Pointer.Read(reader);
            ca.hasChangeComport2 = reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            reader.ReadByte();
            ca.off_comport2 = Pointer.Read(reader);
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            ca.hasSnd = reader.ReadBytes(4);
            for (int i = 0; i < 4; i++)
            {
                ca.snd[i] = reader.ReadUInt32();
            }
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            ca.off_cinematic = Pointer.Read(reader);
            reader.ReadUInt32();
            reader.ReadUInt32();
            reader.ReadUInt32();
            ca.off_next     = Pointer.Read(reader);
            ca.off_previous = Pointer.Read(reader);
            ca.off_header   = Pointer.Read(reader);

            //MapLoader.Loader.print(ca.name);
            ca.anim_ref  = l.FromOffsetOrRead <AnimationReference>(reader, ca.off_a3d);
            ca.perso     = Perso.FromOffset(ca.off_perso);
            ca.waitState = State.FromOffset(ca.off_waitState);
            ca.cineState = State.FromOffset(ca.off_cineState);

            return(ca);
        }