public SCMain(List <Map> _maps, OverworldMap _overworldMap, NPCdata _npcdata, OwLocationData locations, FF1Rom _rom) { maps = _maps; overworldMap = _overworldMap; rom = _rom; npcdata = _npcdata; mapTileSets = new MapTileSets(rom); enter = new EnterTeleData(rom); tele = new NormTeleData(rom); exit = new ExitTeleData(rom); mapTileSets.LoadTable(); enter.LoadData(); tele.LoadData(); exit.LoadData(); for (int i = 0; i < 8; i++) { tileSets[i] = new SCTileSet(rom, (byte)i); } owtileset = new SCTileSet(rom, TileSet.OverworldIndex); Stopwatch w = Stopwatch.StartNew(); List <SCMap> tmpscmaps = new List <SCMap>(); //Parallel.ForEach(Enum.GetValues<MapId>(), mapid => ProcessMap(mapid, tmpscmaps)); foreach (var mapid in Enum.GetValues <MapId>()) { ProcessMap(mapid, tmpscmaps); } scmaps = tmpscmaps.ToDictionary(m => m.MapId); ComposeDungeons(); //SCCoords bridge = new SCCoords(0x98, 0x98); //SCCoords canal = new SCCoords(0x66, 0xA4); Overworld = new SCOwMap(overworldMap, SCMapCheckFlags.None, _rom, owtileset, enter, exit, locations.BridgeLocation, locations.CanalLocation); w.Stop(); }
public SCMap(MapId _mapid, Map _map, SCMapCheckFlags cflags, FF1Rom _rom, NPCdata _npcData, SCTileSet _tileSet, EnterTeleData _enter, ExitTeleData _exit, NormTeleData _tele) { MapId = _mapid; CFlags = cflags; map = _map; rom = _rom; tileSet = _tileSet; enter = _enter; exit = _exit; tele = _tele; npcdata = _npcData; ProcessTiles(); ProcessNPCs(); ProcessTeleporters(); ProcessPointsOfInterest(); ComposeAreas(); }