public override void DrawMap(PlayerTurnEvent e) { e.CalculateVisibility(); for (int i = 0; i < GameUniverse.MapHeight; i++) { for (int j = 0; j < GameUniverse.MapWidth; j++) { Point p = new Point(j, i); Creature creature = CreatureAt(p); ItemType?item = ItemAt(p)?.Type; //todo check ID if (drawEnemies && creature != null && e.CreaturesVisibleThisTurn.Contains(creature)) { DrawToMap(i, j, DetermineCreatureColorGlyph(creature.OriginalType, TileTypeAt(p), FeaturesAt(p), item)); //todo, need to consider inverting colors when colors are the same. MapUI.RecordMapMemory(p); } else if (e.CellsVisibleThisTurn[p]) { MapUI.RecordMapMemory(p); //todo, can I avoid calling RecordMapMemory more than once per turn? ColorGlyph cg = DetermineVisibleColorGlyph(TileTypeAt(p), FeaturesAt(p), item, Map.CurrentDepthSeed, p); if (!e.CellsLitThisTurn[p]) { DrawToMap(i, j, cg.GlyphIndex, Color.DarkCyan, cg.BackgroundColor); //todo, only some tiles get darkened this way, right? } else { DrawToMap(i, j, cg); } } else if (false) // todo, this is where the dcss-style option for seeing previous monster locations will be added { } else if (Map.Seen[p]) { if (memoryFullyVisible) { if (false) { //todo, if this tile type is unknown until seen in light... } else { ColorGlyph cg = DetermineVisibleColorGlyph(TileTypeAt(p), FeaturesAt(p), item, Map.CurrentDepthSeed, p); DrawToMap(i, j, cg); } } DrawToMap(i, j, GetLastSeenColorGlyph(p, true)); } else { DrawToMap(i, j, ' ', Color.White); } } } if (highlight != null) { DrawHighlight(highlight); } if (cursor != null) { SetCursorPositionOnMap(cursor.Value.Y, cursor.Value.X); } }