Exemple #1
0
        internal LabyrinthSection ReadSection(long addr)
        {
            if (addr == 0)
            {
                return(null);           //Should never happens
            }
            var section = new LabyrinthSection(M, addr);

            return(section);
        }
Exemple #2
0
        internal LabyrinthRoom(Memory m, long address)
        {
            M       = m;
            Address = address;
            Secret1 = ReadSecret(M.ReadLong(Address + 0x40));
            Secret2 = ReadSecret(M.ReadLong(Address + 0x50));
            Section = ReadSection(M.ReadLong(Address + 0x30));

            var roomsPointers = M.ReadPointersArray(Address, Address + 0x20);

            Connections = roomsPointers.Select(x => x == 0 ? null : LabyrinthData.GetRoomById(x)).ToArray();
        }
        internal LabyrinthRoom(IMemory m, long address, WorldAreas filesWorldAreas)
        {
            FilesWorldAreas = filesWorldAreas;
            M       = m;
            Address = address;
            Secret1 = ReadSecret(M.Read <long>(Address + 0x40));
            Secret2 = ReadSecret(M.Read <long>(Address + 0x50));
            Section = ReadSection(M.Read <long>(Address + 0x30));

            var roomsPointers = M.ReadPointersArray(Address, Address + 0x20);

            Connections = roomsPointers.Select(x => x == 0 ? null : LabyrinthData.GetRoomById(x)).ToArray();
        }