Ejemplo n.º 1
0
        public void Load(BinaryReader br, UInt32 address)
        {
            br.Jump(address);

            Name      = br.ReadStringFromOffset();
            width     = br.ReadUInt32();
            height    = br.ReadUInt32();
            box       = new Rectangle();
            box.X     = (int)br.ReadUInt32();         // Left
            box.Width = (int)br.ReadUInt32() - box.X; // Right
            UInt32 bottom = br.ReadUInt32();

            box.Y      = (int)br.ReadUInt32(); // Top
            box.Height = (int)bottom - box.Y;  // Bottom
            br.Advance(12);                    // Unknown[4]
            boundingBoxMode = br.ReadUInt32();
            sepMasks        = br.ReadUInt32();
            originX         = br.ReadUInt32();
            originY         = br.ReadUInt32();

            UInt32 textureCount = br.ReadUInt32();

            texturePages = new TexturePage[textureCount];

            for (int i = 0; i < texturePages.Length; i++)
            {
                UInt32      offset = br.ReadUInt32();
                TexturePage tp     = new TexturePage();
                tp.Load(br, offset);

                texturePages[i] = tp;
            }

            br.JumpBack();
        }
Ejemplo n.º 2
0
        public void Load(BinaryReader br, UInt32 address)
        {
            br.Jump(address);

            Name = br.ReadStringFromOffset();
            br.Advance(12);             // Unknown[3]
            UInt32 tpOff = br.ReadUInt32();

            texturePage = new TexturePage();
            texturePage.Load(br, tpOff);

            br.JumpBack();
        }