Ejemplo n.º 1
0
        public void Initialize(System.IO.BinaryReader br)
        {
            int nodes;
            int address;
            int loop = 0;

            br.BaseStream.Position = PathListAddress;
            do
            {
                nodes = br.ReadSByte();
                br.BaseStream.Position += 3;
                address = br.ReadBigInt32();

                if (nodes <= 0 ||
                    loop >= 50
                    ||
                    ((address >> 16) & 0xFFC0)        //assuming an address range of 0200 0000 to 022F FFFF, quite larger than expected
                    != (((int)ORom.Bank.scene) << 8)) //
                {
                    break;
                }

                var t = br.BaseStream.Position;
                Paths.Add(new Path(nodes, address & 0xFFFFFF, br));
                br.BaseStream.Position = t;

                loop++;
            }while (true);
        }