Пример #1
0
        /// <summary>
        /// Loads level-specific pattern groups.
        /// </summary>
        /// <param name="level">The level to load patter groups for.</param>
        public PatternGroupIndexTable(Level level)
        {
            this.level  = level;
            this.rom    = level.Rom;
            this.ranges = level.Rom.PatternGroupOffsets;

            if (level.Index == LevelIndex.Brinstar)
            {
                indexOffsets = PatternGroupIndexOffsets.Brinstar;
            }
            else if (level.Index == LevelIndex.Norfair)
            {
                indexOffsets = PatternGroupIndexOffsets.Norfair;
            }
            else if (level.Index == LevelIndex.Tourian)
            {
                indexOffsets = PatternGroupIndexOffsets.Tourian;
            }
            else if (level.Index == LevelIndex.Kraid)
            {
                indexOffsets = PatternGroupIndexOffsets.Kraid;
            }
            else if (level.Index == LevelIndex.Ridley)
            {
                indexOffsets = PatternGroupIndexOffsets.Ridley;
            }
        }
Пример #2
0
        /// <summary>
        /// Loads global pattern groups.
        /// </summary>
        /// <param name="rom">The ROM to load pattern groups for.</param>
        public PatternGroupIndexTable(MetroidRom rom)
        {
            this.level  = null;
            this.rom    = rom;
            this.ranges = rom.PatternGroupOffsets;

            indexOffsets = PatternGroupIndexOffsets.Global;
        }