Beispiel #1
0
        /// <summary>
        /// Loads all currentLevelIndex-specific data for a specific currentLevelIndex in a given ROM image
        /// </summary>
        /// <param name="rom">The Rom object to load data from</param>
        /// <param name="currentLevelIndex">The currentLevelIndex to load</param>
        public Level(MetroidRom rom, LevelIndex level)
        {
            this.rom   = rom;
            data       = rom.data;
            this.index = level;

            Format    = rom.Format.CreateLevelFormat(this);
            this.Bank = rom.Format.Banks[Format.LevelBankIndex];

            Bytes = new ByteIndexer(this);
            PCpu  = new PointerIndexer(this);
            PRom  = new PRomIndexer(this);

            pointers_deprecated = new LevelPointers(rom, this);

            structures = new StructureCollection(this);
            screens    = new ScreenCollection(this);

            patternGroups = new PatternGroupIndexTable(this);
            LoadPatterns();
            LoadPalette();

            combos  = new ComboTable(rom, Format.ComboDataOffset);
            sprites = Graphic.LevelSprites.GetSprites(level);
            itemTable_DEPRECATED = new ItemLoader(this, rom);
            //structures = new StructureCollection(this);
            altMusic = new AlternateMusicRooms(rom, this);

            this.Items = new ItemCollection(this);
            Items.LoadItems();

            TilePhysicsTableLocation = Format.GetTilePhysicsTableLocation();
        }
Beispiel #2
0
		public void SetCombos(ComboTable combos) {
			_Combos = combos;
		}