private void SetShipDock(SCCoords coords) { if ((main.Overworld.Tiles[coords.X, coords.Y].Tile & SCBitFlags.ShipDock) > 0) { shipDockArea = main.Overworld.Areas[main.Overworld.Tiles[coords.X, coords.Y].Area]; } }
private void DoPathing() { areadic = new List <SCOwArea>(4096); var start = new SCCoords(0, 0); var startingarea = new SCOwArea(0, Tiles[start.X, start.Y].Tile); startingarea.Start = start; areadic.Add(startingarea); Tiles[start.X, start.Y].Area = startingarea.Index; CheckTile(start.OwLeft, startingarea.Index, startingarea.Tile); CheckTile(start.OwRight, startingarea.Index, startingarea.Tile); CheckTile(start.OwUp, startingarea.Index, startingarea.Tile); CheckTile(start.OwDown, startingarea.Index, startingarea.Tile); ProcessImmediates(); while (deferredqueue.Count > 0) { ProcessDeferred(); ProcessImmediates(); } }
public SCEntrance(SCMap _map, SCCoords _coords) { Map = _map; Coords = _coords; InstatiateMapData(); DoPathing(); ProcessPointsOfInterest(); }
private void CheckTile(SCCoords coords, SCBitFlags requirements) { var tile = Tiles[coords.X, coords.Y]; requirements |= tile.Tile; if (!tile.Tile.IsBlocked() && Tiles[coords.X, coords.Y].MergeFlag(requirements) && !tile.Tile.IsImpassable()) { todoset.Enqueue(new SCTileQueueEntry { BitFlags = requirements, Coords = coords }); } }
private void CheckTile(SCCoords coords, short area, SCBitFlags tile) { if (Tiles[coords.X, coords.Y].Area >= 0) { return; } if (Tiles[coords.X, coords.Y].Tile == tile) { Tiles[coords.X, coords.Y].Area = area; immediatequeue.Enqueue(new SCOwTileQueueEntry { Coords = coords, Area = area, Tile = tile }); } else { deferredqueue.Enqueue(new SCOwTileQueueEntry { Coords = coords, Area = area }); } }
public SCOwMap(OverworldMap _map, SCMapCheckFlags cflags, FF1Rom _rom, SCTileSet _tileSet, EnterTeleData _enter, ExitTeleData _exit, SCCoords bridge, SCCoords canal) { CFlags = cflags; map = _map; rom = _rom; tileSet = _tileSet; enter = _enter; exit = _exit; Bridge = bridge; Canal = canal; ProcessTiles(); ProcessTeleporters(); ProcessSpecialPointOfInterests(); DoPathing(); ProcessPointsOfInterest(); FilterAreas(); }
public SCTeleport(TeleData t, SCPointOfInterestType type) { Type = type; TargetMap = t.Map; TargetCoords = new SCCoords(t.X, t.Y).SmClamp; }
private SCBitFlagSet GetBitFlagSetFromTile(SCCoords coords) { return(Tiles[coords.X, coords.Y].GetBitFlagSet()); }